mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
Fix frost nova crash (#1106)
This commit is contained in:
parent
76830796e9
commit
e319334b03
@ -16,7 +16,10 @@ Value<Unit*>* CastPolymorphAction::GetTargetValue() { return context->GetValue<U
|
|||||||
bool CastFrostNovaAction::isUseful()
|
bool CastFrostNovaAction::isUseful()
|
||||||
{
|
{
|
||||||
Unit* target = AI_VALUE(Unit*, "current target");
|
Unit* target = AI_VALUE(Unit*, "current target");
|
||||||
if (target && target->ToCreature() && target->ToCreature()->HasMechanicTemplateImmunity(1 << (MECHANIC_FREEZE - 1)))
|
if (!target || !target->IsInWorld())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (target->ToCreature() && target->ToCreature()->HasMechanicTemplateImmunity(1 << (MECHANIC_FREEZE - 1)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (target->isFrozen())
|
if (target->isFrozen())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user