Merge branch 'azerothcore:master' into Playerbot

This commit is contained in:
ZhengPeiRu21
2022-05-16 13:11:42 -06:00
committed by GitHub
9 changed files with 147 additions and 103 deletions

View File

@@ -1550,6 +1550,10 @@ void Player::UpdateVisibilityForPlayer(bool mapChange)
void Player::UpdateObjectVisibility(bool forced, bool fromUpdate)
{
// Prevent updating visibility if player is not in world (example: LoadFromDB sets drunkstate which updates invisibility while player is not in map)
if (!IsInWorld())
return;
if (!forced)
AddToNotify(NOTIFY_VISIBILITY_CHANGED);
else if (!isBeingLoaded())