[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

@ -56,21 +56,21 @@ void WorldSession::HandleLearnPreviewTalents(WorldPacket& recvPacket)
void WorldSession::HandleTalentWipeConfirmOpcode( WorldPacket & recv_data )
{
DETAIL_LOG("MSG_TALENT_WIPE_CONFIRM");
uint64 guid;
ObjectGuid guid;
recv_data >> guid;
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_TRAINER);
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER);
if (!unit)
{
DEBUG_LOG( "WORLD: HandleTalentWipeConfirmOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
DEBUG_LOG( "WORLD: HandleTalentWipeConfirmOpcode - %s not found or you can't interact with him.", guid.GetString().c_str());
return;
}
// remove fake death
if(GetPlayer()->hasUnitState(UNIT_STAT_DIED))
if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);
if(!(_player->resetTalents()))
if (!(_player->resetTalents()))
{
WorldPacket data( MSG_TALENT_WIPE_CONFIRM, 8+4); //you have not any talent
data << uint64(0);