diff options
| author | megamage <none@none> | 2009-08-31 00:59:02 -0500 |
|---|---|---|
| committer | megamage <none@none> | 2009-08-31 00:59:02 -0500 |
| commit | fe3e40c284d02ad336ccd9ffecdf051866e4bd51 (patch) | |
| tree | 388ad96ca580ddd89ac78e3d241c17688f28253d /src | |
| parent | 29901b5389bc67075cc561f2758df1a793d016db (diff) | |
*Fix possible freezing bug of last rev.
--HG--
branch : trunk
Diffstat (limited to 'src')
| -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])) { |
