Core/Misc: Send saved client settings instantly after login, not only after entering world

Port From (https://github.com/TrinityCore/TrinityCore/commit/3917c2ad01882d43265e38c66e35b0a7fe3f087f)
This commit is contained in:
hondacrx
2021-11-07 20:53:30 -05:00
parent f766a06c8d
commit f60ff57739
4 changed files with 18 additions and 8 deletions
+3 -7
View File
@@ -733,6 +733,7 @@ namespace Game
pCurrChar.SetVirtualPlayerRealm(Global.WorldMgr.GetVirtualRealmAddress());
SendAccountDataTimes(ObjectGuid.Empty, AccountDataTypes.GlobalCacheMask);
SendTutorialsData();
pCurrChar.GetMotionMaster().Initialize();
@@ -743,15 +744,10 @@ namespace Game
loginVerifyWorld.Pos = pCurrChar.GetPosition();
SendPacket(loginVerifyWorld);
// load player specific part before send times
LoadAccountData(holder.GetResult(PlayerLoginQueryLoad.AccountData), AccountDataTypes.PerCharacterCacheMask);
AccountDataTimes accountDataTimes = new();
accountDataTimes.PlayerGuid = playerGuid;
accountDataTimes.ServerTime = (uint)GameTime.GetGameTime();
for (AccountDataTypes i = 0; i < AccountDataTypes.Max; ++i)
accountDataTimes.AccountTimes[(int)i] = (uint)GetAccountData(i).Time;
SendPacket(accountDataTimes);
SendAccountDataTimes(playerGuid, AccountDataTypes.AllAccountDataCacheMask);
SendFeatureSystemStatus();