mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Learn preview talents fix
This commit is contained in:
parent
49322fa20a
commit
329b06d1e3
6 changed files with 139 additions and 35 deletions
|
|
@ -510,6 +510,7 @@ void WorldSession::HandlePetUnlearnOpcode(WorldPacket& recvPacket)
|
|||
return;
|
||||
}
|
||||
pet->resetTalents();
|
||||
_player->SendTalentsInfoData(true);
|
||||
}
|
||||
|
||||
void WorldSession::HandlePetSpellAutocastOpcode( WorldPacket& recvPacket )
|
||||
|
|
@ -669,4 +670,31 @@ void WorldSession::HandlePetLearnTalent( WorldPacket & recv_data )
|
|||
recv_data >> guid >> talent_id >> requested_rank;
|
||||
|
||||
_player->LearnPetTalent(guid, talent_id, requested_rank);
|
||||
_player->SendTalentsInfoData(true);
|
||||
}
|
||||
|
||||
void WorldSession::HandleLearnPreviewTalentsPet( WorldPacket & recv_data )
|
||||
{
|
||||
sLog.outDebug("CMSG_LEARN_PREVIEW_TALENTS_PET");
|
||||
|
||||
CHECK_PACKET_SIZE(recv_data, 8+4);
|
||||
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
|
||||
uint32 talentsCount;
|
||||
recv_data >> talentsCount;
|
||||
|
||||
uint32 talentId, talentRank;
|
||||
|
||||
for(uint32 i = 0; i < talentsCount; ++i)
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, recv_data.rpos()+4+4);
|
||||
|
||||
recv_data >> talentId >> talentRank;
|
||||
|
||||
_player->LearnPetTalent(guid, talentId, talentRank, true);
|
||||
}
|
||||
|
||||
_player->SendTalentsInfoData(true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue