mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 02:50:29 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user