Some cleanup of CanSeeOrDetect code.
This commit is contained in:
@@ -21077,15 +21077,15 @@ WorldLocation Player::GetStartPosition() const
|
||||
return WorldLocation(mapId, info->positionX, info->positionY, info->positionZ, 0);
|
||||
}
|
||||
|
||||
bool Player::isValid() const
|
||||
bool Player::IsNeverVisible() const
|
||||
{
|
||||
if (!Unit::isValid())
|
||||
return false;
|
||||
if (Unit::IsNeverVisible())
|
||||
return true;
|
||||
|
||||
if (GetSession()->PlayerLogout() || GetSession()->PlayerLoading())
|
||||
return false;
|
||||
return true;
|
||||
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Player::canSeeAlways(WorldObject const* obj) const
|
||||
|
||||
@@ -2326,7 +2326,7 @@ class Player : public Unit, public GridObject<Player>
|
||||
|
||||
bool HaveAtClient(WorldObject const* u) const { return u == this || m_clientGUIDs.find(u->GetGUID()) != m_clientGUIDs.end(); }
|
||||
|
||||
bool isValid() const;
|
||||
bool IsNeverVisible() const;
|
||||
|
||||
bool IsVisibleGloballyFor(Player* pl) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user