diff options
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r-- | src/game/Player.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 53f7bdfc7ca..ab11ed92c21 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -21127,9 +21127,9 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank) if( (getClassMask() & talentTabInfo->ClassMask) == 0 ) return; - // find current max talent rank (1~5) - uint8 curtalent_maxrank = 0; // Maybe start at 6 and have rank start at MAX_TALENT_RANK-2? Not sure - for(uint8 rank = MAX_TALENT_RANK-1; rank >= 0; --rank) + // find current max talent rank (0~5) + uint8 curtalent_maxrank = 0; // 0 = not learned any rank + for(int8 rank = MAX_TALENT_RANK-1; rank >= 0; --rank) { if(talentInfo->RankID[rank] && HasSpell(talentInfo->RankID[rank])) { @@ -21264,9 +21264,9 @@ void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank) if(!((1 << pet_family->petTalentType) & talentTabInfo->petTalentMask)) return; - // find current max talent rank (1~5) - uint8 curtalent_maxrank = 0; - for(uint8 rank = MAX_TALENT_RANK-1; rank >= 0; --rank) + // find current max talent rank (0~5) + uint8 curtalent_maxrank = 0; // 0 = not learned any rank + for(int8 rank = MAX_TALENT_RANK-1; rank >= 0; --rank) { if(talentInfo->RankID[rank] && pet->HasSpell(talentInfo->RankID[rank])) { |