fix(Core/Totems): Searing Totem will properly attack neutral targets. (#7157)

Fixed #6310

Co-authored-by: Stefano Borzì <stefanoborzi32@gmail.com>
This commit is contained in:
UltraNix
2021-08-05 15:15:12 +02:00
committed by GitHub
parent 36a1777b99
commit ed4cfd37f4
2 changed files with 2 additions and 2 deletions

View File

@@ -78,7 +78,7 @@ void TotemAI::UpdateAI(uint32 /*diff*/)
if (!victim && me->GetCharmerOrOwnerOrSelf()->IsInCombat())
{
victim = me->GetCharmerOrOwnerOrSelf()->GetVictim();
victim = me->GetCharmerOrOwnerOrSelf()->getAttackerForHelper();
}
// If have target

View File

@@ -933,7 +933,7 @@ namespace Acore
bool operator()(Unit* u)
{
if (u->isTargetableForAttack(true, i_funit) && i_obj->IsWithinDistInMap(u, i_range) &&
(i_funit->IsInCombatWith(u) || i_funit->IsHostileTo(u)) && i_obj->CanSeeOrDetect(u))
(i_funit->IsInCombatWith(u) || u->IsHostileTo(i_funit)) && i_obj->CanSeeOrDetect(u))
{
i_range = i_obj->GetDistance(u); // use found unit range as new range limit for next check
return true;