Core/Player: Pass correct Zone ID to HandlePlayerLeaveZone

This will fix some issues with Wintergrasp, like phasing auras getting stuck and missing group invites for the battle, among others

(cherry picked from commit ed9e220991)
This commit is contained in:
sirikfoll
2018-01-17 18:59:20 -02:00
committed by Shauren
parent bb7869b31f
commit 78577afa49

View File

@@ -7196,6 +7196,7 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea)
{
if (!IsInWorld())
return;
uint32 const oldZone = m_zoneUpdateId;
m_zoneUpdateId = newZone;
m_zoneUpdateTimer = ZONE_UPDATE_INTERVAL;
@@ -7205,8 +7206,8 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea)
// call leave script hooks immedately (before updating flags)
if (oldZone != newZone)
{
sOutdoorPvPMgr->HandlePlayerLeaveZone(this, m_zoneUpdateId);
sBattlefieldMgr->HandlePlayerLeaveZone(this, m_zoneUpdateId);
sOutdoorPvPMgr->HandlePlayerLeaveZone(this, oldZone);
sBattlefieldMgr->HandlePlayerLeaveZone(this, oldZone);
}
// group update