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
This commit is contained in:
sirikfoll
2018-01-17 18:59:20 -02:00
parent fb8885fabc
commit ed9e220991

View File

@@ -6998,6 +6998,7 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea)
{
if (!IsInWorld())
return;
uint32 const oldZone = m_zoneUpdateId;
m_zoneUpdateId = newZone;
m_zoneUpdateTimer = ZONE_UPDATE_INTERVAL;
@@ -7007,8 +7008,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