[10635] Convert many opcode handlers to ObjectGuid use.

Also re-enabled anticheating check for bank window open
base at .bank command access rights.
This commit is contained in:
VladimirMangos 2010-10-21 06:38:24 +04:00
parent 0901a4c2ac
commit 851e15c70a
26 changed files with 322 additions and 326 deletions

View file

@ -899,21 +899,21 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
void WorldSession::HandlePetitionShowListOpcode(WorldPacket & recv_data)
{
DEBUG_LOG("Received CMSG_PETITION_SHOWLIST"); // ok
DEBUG_LOG("Received CMSG_PETITION_SHOWLIST");
//recv_data.hexlike();
uint64 guid;
ObjectGuid guid;
recv_data >> guid;
SendPetitionShowList(guid);
}
void WorldSession::SendPetitionShowList(uint64 guid)
void WorldSession::SendPetitionShowList(ObjectGuid guid)
{
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_PETITIONER);
if (!pCreature)
{
DEBUG_LOG("WORLD: HandlePetitionShowListOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
DEBUG_LOG("WORLD: HandlePetitionShowListOpcode - %s not found or you can't interact with him.", guid.GetString().c_str());
return;
}
@ -928,7 +928,7 @@ void WorldSession::SendPetitionShowList(uint64 guid)
count = 3;
WorldPacket data(SMSG_PETITION_SHOWLIST, 8+1+4*6);
data << uint64(guid); // npc guid
data << ObjectGuid(guid); // npc guid
data << uint8(count); // count
if(count == 1)
{