fix(Core/Player): Force UpdateZone on resurrect to apply Zone auras (#21888)

This commit is contained in:
Jelle Meeus
2025-04-12 18:38:32 +02:00
committed by GitHub
parent d75073a941
commit 4b64c4ed25
3 changed files with 7 additions and 4 deletions

View File

@@ -1249,17 +1249,20 @@ void Player::UpdateArea(uint32 newArea)
RemoveRestFlag(REST_FLAG_IN_FACTION_AREA);
}
void Player::UpdateZone(uint32 newZone, uint32 newArea)
void Player::UpdateZone(uint32 newZone, uint32 newArea, bool force)
{
if (!newZone)
return;
if (m_zoneUpdateId != newZone)
if (m_zoneUpdateId != newZone || force)
{
sOutdoorPvPMgr->HandlePlayerLeaveZone(this, m_zoneUpdateId);
sOutdoorPvPMgr->HandlePlayerEnterZone(this, newZone);
sWorldState->HandlePlayerLeaveZone(this, static_cast<WorldStateZoneId>(m_zoneUpdateId));
sWorldState->HandlePlayerEnterZone(this, static_cast<WorldStateZoneId>(newZone));
}
if (m_zoneUpdateId != newZone)
{
sBattlefieldMgr->HandlePlayerLeaveZone(this, m_zoneUpdateId);
sBattlefieldMgr->HandlePlayerEnterZone(this, newZone);
SendInitWorldStates(newZone,