mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
fix (core): Prevent Forced UpdateObjectVisibility Before in World (#11730)
fix (Core): Prevent Forced UpdateObjectVisibility Before in World
TC Cherry Pick: 38dc5667ba
Co-Authored-By: Shauren <shauren.trinity@gmail.com>
Co-Authored-By: Jurgis <326232+chemicstry@users.noreply.github.com>
Co-authored-by: Shauren <shauren.trinity@gmail.com>
Co-authored-by: Jurgis <326232+chemicstry@users.noreply.github.com>
This commit is contained in:
@@ -1548,6 +1548,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())
|
||||
|
||||
Reference in New Issue
Block a user