fix(Core/Visibility): Fix initial visibility on player reused sessions (#22673)

This commit is contained in:
Takenbacon 2025-08-11 10:07:00 -07:00 committed by GitHub
parent 1d70c6acc3
commit 12bee97df9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1180,6 +1180,10 @@ void WorldSession::HandlePlayerLoginToCharInWorld(Player* pCurrChar)
pCurrChar->GetMap()->SendInitTransports(pCurrChar);
pCurrChar->GetMap()->SendInitSelf(pCurrChar);
pCurrChar->GetMap()->SendZoneDynamicInfo(pCurrChar);
// If we are logging into an existing player, simply clear visibility references
// so player will receive a fresh list of new objects on the next vis update.
pCurrChar->GetObjectVisibilityContainer().CleanVisibilityReferences();
pCurrChar->UpdateObjectVisibility(false);
pCurrChar->CleanupChannels();