Core/PacketIO: Updated and enabled CMSG_CONFIRM_RESPEC_WIPE, SMSG_RESPEC_WIPE_CONFIRM

This commit is contained in:
Shauren
2016-01-30 23:56:02 +01:00
parent 3ec79c96c3
commit a174fa4d7b
7 changed files with 65 additions and 16 deletions

View File

@@ -37,16 +37,18 @@ void WorldSession::HandleLearnTalentsOpcode(WorldPackets::Talent::LearnTalents&
_player->SendTalentsInfoData();
}
void WorldSession::HandleConfirmRespecWipeOpcode(WorldPacket& recvData)
void WorldSession::HandleConfirmRespecWipeOpcode(WorldPackets::Talent::ConfirmRespecWipe& confirmRespecWipe)
{
TC_LOG_DEBUG("network", "MSG_TALENT_WIPE_CONFIRM");
ObjectGuid guid;
recvData >> guid;
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER);
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(confirmRespecWipe.RespecMaster, UNIT_NPC_FLAG_TRAINER);
if (!unit)
{
TC_LOG_DEBUG("network", "WORLD: HandleConfirmRespecWipeOpcode - %s not found or you can't interact with him.", guid.ToString().c_str());
TC_LOG_DEBUG("network", "WORLD: HandleConfirmRespecWipeOpcode - %s not found or you can't interact with him.", confirmRespecWipe.RespecMaster.ToString().c_str());
return;
}
if (confirmRespecWipe.RespecType != SPEC_RESET_TALENTS)
{
TC_LOG_DEBUG("network", "WORLD: HandleConfirmRespecWipeOpcode - reset type %d is not implemented.", confirmRespecWipe.RespecType);
return;
}