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 ).
This commit is contained in:
jackpoz
2014-06-05 22:50:11 +02:00
parent 7d623eed18
commit d565c2b303

View File

@@ -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();
}