Unit/PlayerAI: Yeah, we allow charmer to be null now, should probably check for that.
Fixes and closes #16728. (cherry picked from commit 49de12b1cfaca7f089a1ba2660de4a8644a72e2c)
This commit is contained in:
@@ -147,6 +147,8 @@ Unit* SimpleCharmedPlayerAI::SelectAttackTarget() const
|
||||
void SimpleCharmedPlayerAI::UpdateAI(const uint32 /*diff*/)
|
||||
{
|
||||
Creature* charmer = me->GetCharmer() ? me->GetCharmer()->ToCreature() : nullptr;
|
||||
if (!charmer)
|
||||
return;
|
||||
|
||||
//kill self if charm aura has infinite duration
|
||||
if (charmer->IsInEvadeMode())
|
||||
|
||||
Reference in New Issue
Block a user