Core/Player: Resequence Player::UpdateZone some more to hopefully prevent future edge cases

Port From (https://github.com/TrinityCore/TrinityCore/commit/10b590acb62ef118cd6c0992f341db8f852958be)
This commit is contained in:
hondacrx
2020-08-24 23:49:12 -04:00
parent 8591dd589a
commit c29516f121
+14 -15
View File
@@ -150,18 +150,6 @@ namespace Game.Entities
{
GetMap().UpdatePlayerZoneStats(m_zoneUpdateId, newZone);
if (m_zoneUpdateId != newZone)
{
Global.OutdoorPvPMgr.HandlePlayerLeaveZone(this, m_zoneUpdateId);
Global.OutdoorPvPMgr.HandlePlayerEnterZone(this, newZone);
Global.BattleFieldMgr.HandlePlayerLeaveZone(this, m_zoneUpdateId);
Global.BattleFieldMgr.HandlePlayerEnterZone(this, newZone);
SendInitWorldStates(newZone, newArea); // only if really enters to new zone, not just area change, works strange...
Guild guild = GetGuild();
if (guild)
guild.UpdateMemberData(this, GuildMemberData.ZoneId, newZone);
}
// group update
if (GetGroup())
{
@@ -172,9 +160,6 @@ namespace Game.Entities
pet.SetGroupUpdateFlag(GroupUpdatePetFlags.Full);
}
m_zoneUpdateId = newZone;
m_zoneUpdateTimer = 1 * Time.InMilliseconds;
// zone changed, so area changed as well, update it
UpdateArea(newArea);
@@ -234,6 +219,20 @@ namespace Game.Entities
UpdateLocalChannels(newZone);
UpdateZoneDependentAuras(newZone);
m_zoneUpdateTimer = 1 * Time.InMilliseconds;
if (m_zoneUpdateId != newZone)
{
m_zoneUpdateId = newZone;
Global.OutdoorPvPMgr.HandlePlayerLeaveZone(this, m_zoneUpdateId);
Global.OutdoorPvPMgr.HandlePlayerEnterZone(this, newZone);
Global.BattleFieldMgr.HandlePlayerLeaveZone(this, m_zoneUpdateId);
Global.BattleFieldMgr.HandlePlayerEnterZone(this, newZone);
SendInitWorldStates(newZone, newArea); // only if really enters to new zone, not just area change, works strange...
Guild guild = GetGuild();
if (guild)
guild.UpdateMemberData(this, GuildMemberData.ZoneId, newZone);
}
}
public InstanceBind GetBoundInstance(uint mapid, Difficulty difficulty, bool withExpired = false)