aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/MiscHandler.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2013-03-15 21:19:15 +0100
committerShauren <shauren.trinity@gmail.com>2013-03-15 21:19:15 +0100
commitdcdd9447fd9e07a9601134880356a3d53e43f919 (patch)
treebdcae5d19633c8e9ecf9f0a6ca34a48f9a8acbd0 /src/server/game/Handlers/MiscHandler.cpp
parente58e05d9d5da894447b81ded17c3b8fd9f4820a8 (diff)
Core/PacketIO: Allow playing all ingame movies
Closes #9434
Diffstat (limited to 'src/server/game/Handlers/MiscHandler.cpp')
-rw-r--r--src/server/game/Handlers/MiscHandler.cpp46
1 files changed, 43 insertions, 3 deletions
diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp
index 94ef34e8dd7..a0a721c8971 100644
--- a/src/server/game/Handlers/MiscHandler.cpp
+++ b/src/server/game/Handlers/MiscHandler.cpp
@@ -55,6 +55,7 @@
#include "BattlegroundMgr.h"
#include "Battlefield.h"
#include "BattlefieldMgr.h"
+#include "DB2Stores.h"
void WorldSession::HandleRepopRequestOpcode(WorldPacket& recvData)
{
@@ -1894,22 +1895,61 @@ void WorldSession::HandleRequestHotfix(WorldPacket& recvPacket)
switch (type)
{
- case DB2_REPLY_ITEM:
+ case DB2_HASH_ITEM:
SendItemDb2Reply(entry);
break;
- case DB2_REPLY_SPARSE:
+ case DB2_HASH_ITEM_SPARSE:
SendItemSparseDb2Reply(entry);
break;
+ case DB2_HASH_KEYCHAIN:
+ SendKeyChainDb2Reply(entry);
+ break;
default:
- sLog->outError(LOG_FILTER_NETWORKIO, "CMSG_REQUEST_HOTFIX: Received unknown hotfix type: %u", type);
+ {
+ WorldPacket data(SMSG_DB_REPLY, 4 * 4);
+ data << -int32(entry);
+ data << uint32(type);
+ data << uint32(time(NULL));
+ data << uint32(0);
+ SendPacket(&data);
+
+ sLog->outError(LOG_FILTER_NETWORKIO, "CMSG_REQUEST_HOTFIX: Received unknown hotfix type: %u, entry %u", type, entry);
recvPacket.rfinish();
break;
+ }
}
}
delete[] guids;
}
+void WorldSession::SendKeyChainDb2Reply(uint32 entry)
+{
+ WorldPacket data(SMSG_DB_REPLY, 44);
+ KeyChainEntry const* keyChain = sKeyChainStore.LookupEntry(entry);
+ if (!keyChain)
+ {
+ data << -int32(entry); // entry
+ data << uint32(DB2_HASH_KEYCHAIN);
+ data << uint32(time(NULL)); // hotfix date
+ data << uint32(0); // size of next block
+ return;
+ }
+
+ data << uint32(entry);
+ data << uint32(DB2_HASH_KEYCHAIN);
+ data << uint32(sObjectMgr->GetHotfixDate(entry, DB2_HASH_KEYCHAIN));
+
+ ByteBuffer buff;
+ buff << uint32(entry);
+ buff.append(keyChain->Key, KEYCHAIN_SIZE);
+
+ data << uint32(buff.size());
+ data.append(buff);
+
+ SendPacket(&data);
+}
+
void WorldSession::HandleUpdateMissileTrajectory(WorldPacket& recvPacket)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_UPDATE_MISSILE_TRAJECTORY");