From a35055c4a74ea9fbe1213e6f4a4214c24fc2e0cc Mon Sep 17 00:00:00 2001 From: zamalaev Date: Wed, 19 Feb 2020 12:32:35 +0000 Subject: [PATCH] SMSG_ACCOUNT_DATA_TIMES 5.4.7 (18019) --- src/game/Server/Opcodes.h | 2 +- src/game/Server/WorldSession.cpp | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/game/Server/Opcodes.h b/src/game/Server/Opcodes.h index ae28c7050..d44393214 100644 --- a/src/game/Server/Opcodes.h +++ b/src/game/Server/Opcodes.h @@ -584,7 +584,7 @@ enum Opcodes SMSG_GMTICKET_CREATE = 0x2107, // 4.3.4 15595 CMSG_GMTICKET_UPDATETEXT = 0x0636, // 4.3.4 15595 SMSG_GMTICKET_UPDATETEXT = 0x6535, // 4.3.4 15595 - SMSG_ACCOUNT_DATA_TIMES = 0x4B05, // 4.3.4 15595 + SMSG_ACCOUNT_DATA_TIMES = 0x0F40, // 5.4.7 18019 CMSG_REQUEST_ACCOUNT_DATA = 0x6505, // 4.3.4 15595 CMSG_UPDATE_ACCOUNT_DATA = 0x4736, // 4.3.4 15595 SMSG_UPDATE_ACCOUNT_DATA = 0x0684, // 5.3.0 17128 diff --git a/src/game/Server/WorldSession.cpp b/src/game/Server/WorldSession.cpp index e2a37ac9e..698df8638 100644 --- a/src/game/Server/WorldSession.cpp +++ b/src/game/Server/WorldSession.cpp @@ -1048,13 +1048,15 @@ void WorldSession::SetAccountData(AccountDataType type, time_t time_, const std: void WorldSession::SendAccountDataTimes(uint32 mask) { - WorldPacket data(SMSG_ACCOUNT_DATA_TIMES, 4 + 1 + 4 + 8 * 4); // changed in WotLK - data << uint32(time(NULL)); // unix time of something - data << uint8(1); + WorldPacket data(SMSG_ACCOUNT_DATA_TIMES, 4 + 1 + 4 + NUM_ACCOUNT_DATA_TYPES * 4); data << uint32(mask); // type mask + data << uint32(time(NULL)); // unix time of something + for (uint32 i = 0; i < NUM_ACCOUNT_DATA_TYPES; ++i) - if (mask & (1 << i)) - data << uint32(GetAccountData(AccountDataType(i))->Time);// also unix time + data << uint32(GetAccountData(AccountDataType(i))->Time);// also unix time + + data.WriteBit(1); + SendPacket(&data); }