mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 08:28:32 +01:00
Unit/PlayerAI: Yeah, we allow charmer to be null now, should probably check for that.
Fixes and closes #16728.
(cherry picked from commit 49de12b1cf)
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