Core/Players: Improve setting ActivePlayerData::TransportServerTime by including TIME_SYNC and CMSG_QUEUED_MESSAGES_END values in its calculation
Port From (https://github.com/TrinityCore/TrinityCore/commit/821ecf8fa3b6b922ba178cde7593ef5d84ef734b)
This commit is contained in:
@@ -783,6 +783,9 @@ namespace Game
|
||||
|
||||
SendPacket(new ResumeComms(ConnectionType.Instance));
|
||||
|
||||
// client will respond to SMSG_RESUME_COMMS with CMSG_QUEUED_MESSAGES_END
|
||||
RegisterTimeSync(SPECIAL_RESUME_COMMS_TIME_SYNC_COUNTER);
|
||||
|
||||
AddQueryHolderCallback(DB.Characters.DelayQueryHolder(holder)).AfterComplete(holder => HandlePlayerLogin((LoginQueryHolder)holder));
|
||||
}
|
||||
|
||||
@@ -799,6 +802,12 @@ namespace Game
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_timeSyncClockDeltaQueue.IsEmpty)
|
||||
{
|
||||
pCurrChar.SetPlayerLocalFlag(PlayerLocalFlags.OverrideTransportServerTime);
|
||||
pCurrChar.SetTransportServerTime((int)_timeSyncClockDelta);
|
||||
}
|
||||
|
||||
pCurrChar.SetVirtualPlayerRealm(Global.WorldMgr.GetVirtualRealmAddress());
|
||||
|
||||
SendAccountDataTimes(ObjectGuid.Empty, AccountDataTypes.GlobalCacheMask);
|
||||
|
||||
Reference in New Issue
Block a user