Core/Auras/Totems: Fixed incorrect visibility checks in target searchers
This commit is contained in:
@@ -813,7 +813,7 @@ namespace Trinity
|
||||
return u->isAlive()
|
||||
&& i_obj->IsWithinDistInMap(u, i_range)
|
||||
&& !i_funit->IsFriendlyTo(u)
|
||||
&& u->canSeeOrDetect(i_funit);
|
||||
&& i_funit->canSeeOrDetect(u);
|
||||
}
|
||||
private:
|
||||
WorldObject const* i_obj;
|
||||
@@ -875,7 +875,7 @@ namespace Trinity
|
||||
bool operator()(Unit* u)
|
||||
{
|
||||
if (u->isTargetableForAttack() && i_obj->IsWithinDistInMap(u, i_range) &&
|
||||
!i_funit->IsFriendlyTo(u) && u->canSeeOrDetect(i_funit))
|
||||
!i_funit->IsFriendlyTo(u) && i_funit->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