mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[9657] Not include in .list talents disabled spells
Also some more cleanups in free talent points update calls.
This commit is contained in:
parent
034da8f6d4
commit
973a21060b
4 changed files with 7 additions and 11 deletions
|
|
@ -3611,11 +3611,9 @@ bool Player::resetTalents(bool no_cost)
|
|||
if(HasAtLoginFlag(AT_LOGIN_RESET_TALENTS))
|
||||
RemoveAtLoginFlag(AT_LOGIN_RESET_TALENTS,true);
|
||||
|
||||
uint32 talentPointsForLevel = CalculateTalentsPoints();
|
||||
|
||||
if (m_usedTalentCount == 0)
|
||||
{
|
||||
SetFreeTalentPoints(talentPointsForLevel);
|
||||
UpdateFreeTalentPoints(false); // for fix if need counter
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -3681,7 +3679,7 @@ bool Player::resetTalents(bool no_cost)
|
|||
}
|
||||
}
|
||||
|
||||
SetFreeTalentPoints(talentPointsForLevel);
|
||||
UpdateFreeTalentPoints(false);
|
||||
|
||||
if(!no_cost)
|
||||
{
|
||||
|
|
@ -20854,6 +20852,7 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank)
|
|||
if (HasSpell(depTalentInfo->RankID[i]))
|
||||
hasEnoughRank = true;
|
||||
}
|
||||
|
||||
if (!hasEnoughRank)
|
||||
return;
|
||||
}
|
||||
|
|
@ -21040,9 +21039,6 @@ void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank)
|
|||
// learn! (other talent ranks will unlearned at learning)
|
||||
pet->learnSpell(spellid);
|
||||
sLog.outDetail("PetTalentID: %u Rank: %u Spell: %u\n", talentId, talentRank, spellid);
|
||||
|
||||
// update free talent points
|
||||
pet->SetFreeTalentPoints(CurTalentPoints - (talentRank - curtalent_maxrank + 1));
|
||||
}
|
||||
|
||||
void Player::UpdateKnownCurrencies(uint32 itemId, bool apply)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue