[12662] Basic implementaion of hotfixes

original author of this patch is Shauren
commit is based on 67e61b7e64
This commit is contained in:
sanctum32 2013-08-06 09:05:19 +03:00 committed by Antz
parent ea6eef5a13
commit b4db2f63dd
15 changed files with 386 additions and 4 deletions

View file

@ -1525,3 +1525,39 @@ void WorldSession::HandleHearthandResurrect(WorldPacket& /*recv_data*/)
_player->ResurrectPlayer(100);
_player->TeleportToHomebind();
}
void WorldSession::HandleRequestHotfix(WorldPacket& recv_data)
{
uint32 type, count;
recv_data >> type;
count = recv_data.ReadBits(23);
std::vector<ObjectGuid> guids;
guids.reserve(count);
for (uint32 i = 0; i < count; ++i)
recv_data.ReadGuidMask<0, 4, 7, 2, 5, 3, 6, 1>(guids[i]);
uint32 entry;
for (uint32 i = 0; i < count; ++i)
{
recv_data.ReadGuidBytes<5, 6, 7, 0, 1, 3, 4>(guids[i]);
recv_data >> entry;
recv_data.ReadGuidBytes<2>(guids[i]);
switch (type)
{
case DB2_REPLY_ITEM:
SendItemDb2Reply(entry);
break;
case DB2_REPLY_SPARSE:
SendItemSparseDb2Reply(entry);
break;
default:
sLog.outError("CMSG_REQUEST_HOTFIX: Received unknown hotfix type: %u", type);
recv_data.rfinish();
break;
}
}
}