mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Fix free talent points amount in case preview learning
This commit is contained in:
parent
329b06d1e3
commit
ef65518690
1 changed files with 10 additions and 1 deletions
|
|
@ -19864,7 +19864,10 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank, bool skipPrevRanks)
|
|||
sLog.outDetail("TalentID: %u Rank: %u Spell: %u\n", talentId, talentRank, spellid);
|
||||
|
||||
// update free talent points
|
||||
SetFreeTalentPoints(CurTalentPoints - 1);
|
||||
if(skipPrevRanks)
|
||||
SetFreeTalentPoints(CurTalentPoints - (talentRank + 1));
|
||||
else
|
||||
SetFreeTalentPoints(CurTalentPoints - 1);
|
||||
}
|
||||
|
||||
void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank, bool skipPrevRanks)
|
||||
|
|
@ -19986,6 +19989,12 @@ void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank,
|
|||
// learn! (other talent ranks will unlearned at learning)
|
||||
pet->learnSpell(spellid);
|
||||
sLog.outDetail("TalentID: %u Rank: %u Spell: %u\n", talentId, talentRank, spellid);
|
||||
|
||||
// update free talent points
|
||||
if(skipPrevRanks)
|
||||
pet->SetFreeTalentPoints(CurTalentPoints - (talentRank + 1));
|
||||
else
|
||||
pet->SetFreeTalentPoints(CurTalentPoints - 1);
|
||||
}
|
||||
|
||||
void Player::SendEquipmentSetList()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue