diff options
author | jackpoz <giacomopoz@gmail.com> | 2014-06-05 22:19:02 +0200 |
---|---|---|
committer | Unholychick <lucas__jensen@hotmail.com> | 2014-06-09 23:10:43 +0200 |
commit | 1e545eaa70a0a64592ba4e20f0224e0a27a28937 (patch) | |
tree | a39d3a014f748cfe0c7cf3b35ceac646ebb8f8d9 /src | |
parent | 281527a9c33429ccc8fd552ea231857120a6017d (diff) |
Core/Talents: Align server checks to Client limits
Set the max amount of talents to process in CMSG_LEARN_PREVIEW_TALENTS to 150 ( 44 talents for 3 trees rounded up ).
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Handlers/SkillHandler.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/server/game/Handlers/SkillHandler.cpp b/src/server/game/Handlers/SkillHandler.cpp index fe893314b87..b7e918ee05b 100644 --- a/src/server/game/Handlers/SkillHandler.cpp +++ b/src/server/game/Handlers/SkillHandler.cpp @@ -45,7 +45,10 @@ void WorldSession::HandleLearnPreviewTalents(WorldPacket& recvPacket) uint32 talentId, talentRank; - for (uint32 i = 0; i < talentsCount; ++i) + // Client has max 44 talents for tree for 3 trees, rounded up : 150 + const int MaxTalentsCount = 150; + + for (uint32 i = 0; i < talentsCount && i < MaxTalentsCount; ++i) { recvPacket >> talentId >> talentRank; @@ -53,6 +56,8 @@ void WorldSession::HandleLearnPreviewTalents(WorldPacket& recvPacket) } _player->SendTalentsInfoData(false); + + recvPacket.rfinish(); } void WorldSession::HandleTalentWipeConfirmOpcode(WorldPacket& recvData) |