Core/Units: Rename and change Get/SetVisibility to use a bool value instead of an unnecessary enum
Also replace some SetVisibility hacks to directly call UpdateObjectVisibility --HG-- branch : trunk
This commit is contained in:
@@ -1144,7 +1144,7 @@ namespace Trinity
|
||||
AllFriendlyCreaturesInGrid(Unit const* obj) : pUnit(obj) {}
|
||||
bool operator() (Unit* u)
|
||||
{
|
||||
if (u->isAlive() && u->GetVisibility() == VISIBILITY_ON && u->IsFriendlyTo(pUnit))
|
||||
if (u->isAlive() && u->IsVisible() && u->IsFriendlyTo(pUnit))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user