mirror of
https://github.com/mangosfour/server.git
synced 2025-12-25 04:37:02 +00:00
[9653] Correctly update talent free points in diff cases.
Before at .unlearn or .learn all_mytalents commands free talent points not updated correctly. Same for .learn all_mypettalents.
This commit is contained in:
parent
d004549fd4
commit
daaeb0a998
8 changed files with 86 additions and 49 deletions
|
|
@ -665,14 +665,19 @@ TalentSpellPos const* GetTalentSpellPos(uint32 spellId)
|
|||
return &itr->second;
|
||||
}
|
||||
|
||||
uint32 GetTalentSpellCost(uint32 spellId)
|
||||
uint32 GetTalentSpellCost(TalentSpellPos const* pos)
|
||||
{
|
||||
if(TalentSpellPos const* pos = GetTalentSpellPos(spellId))
|
||||
if (pos)
|
||||
return pos->rank+1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32 GetTalentSpellCost(uint32 spellId)
|
||||
{
|
||||
return GetTalentSpellCost(GetTalentSpellPos(spellId));
|
||||
}
|
||||
|
||||
int32 GetAreaFlagByAreaID(uint32 area_id)
|
||||
{
|
||||
AreaFlagByAreaID::iterator i = sAreaFlagByAreaID.find(area_id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue