fix(Core/TotemAI): Totems should not attack neutral unless owner is in combat (#5434)

This commit is contained in:
Kitzunu
2021-05-01 19:18:29 +02:00
committed by GitHub
parent 46c9aa6f3a
commit 752595dccf
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -76,6 +76,12 @@ void TotemAI::UpdateAI(uint32 /*diff*/)
me->VisitNearbyObject(max_range, checker);
}
if (!victim && me->GetCharmerOrOwnerOrSelf()->IsInCombat())
{
victim = me->GetCharmerOrOwnerOrSelf()->GetVictim();
}
// If have target
if (victim)
{