*Same as previous commit, for pets. I know this could be optimized, but not sure how to do it correctly :/

--HG--
branch : trunk
This commit is contained in:
maximius
2009-08-30 22:53:12 -07:00
parent d9656fbabd
commit 29901b5389
+2 -2
View File
@@ -21265,8 +21265,8 @@ void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank)
return; return;
// find current max talent rank (1~5) // find current max talent rank (1~5)
uint8 curtalent_maxrank = 1; uint8 curtalent_maxrank = 0;
for(uint8 rank = MAX_TALENT_RANK-1; rank > 0; --rank) for(uint8 rank = MAX_TALENT_RANK-1; rank >= 0; --rank)
{ {
if(talentInfo->RankID[rank] && pet->HasSpell(talentInfo->RankID[rank])) if(talentInfo->RankID[rank] && pet->HasSpell(talentInfo->RankID[rank]))
{ {