aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2014-06-05 22:50:11 +0200
committerjackpoz <giacomopoz@gmail.com>2014-06-05 22:50:11 +0200
commitd565c2b303c4a601c9a3425facd53cb4b8f37e52 (patch)
tree9923913aa45a89b961060327062791464e2d3e95 /src
parent7d623eed180ea3d35d356e6defb0511480404c67 (diff)
Core/Talents: Align server checks to Client limits
Set the max amount of talents to process in CMSG_LEARN_PREVIEW_TALENTS_PET to 30 ( 24 talents rounded up ).
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Handlers/PetHandler.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp
index 616ea9c7326..98dfe1af22c 100644
--- a/src/server/game/Handlers/PetHandler.cpp
+++ b/src/server/game/Handlers/PetHandler.cpp
@@ -868,7 +868,10 @@ void WorldSession::HandleLearnPreviewTalentsPet(WorldPacket& recvData)
uint32 talentId, talentRank;
- for (uint32 i = 0; i < talentsCount; ++i)
+ // Client has max 24 talents, rounded up : 30
+ const int MaxTalentsCount = 30;
+
+ for (uint32 i = 0; i < talentsCount && i < MaxTalentsCount; ++i)
{
recvData >> talentId >> talentRank;
@@ -876,4 +879,6 @@ void WorldSession::HandleLearnPreviewTalentsPet(WorldPacket& recvData)
}
_player->SendTalentsInfoData(true);
+
+ recvData.rfinish();
}