1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Replace global bonus tree change counter with per-node counter

This commit is contained in:
Ivan Savenko
2025-01-10 23:45:02 +00:00
parent 5ec5e23534
commit e829d723b2
20 changed files with 93 additions and 121 deletions

View File

@@ -1513,7 +1513,7 @@ void CGHeroInstance::setPrimarySkill(PrimarySkill primarySkill, si64 value, ui8
{
skill->val += static_cast<si32>(value);
}
CBonusSystemNode::treeHasChanged();
nodeHasChanged();
}
else if(primarySkill == PrimarySkill::EXPERIENCE)
{
@@ -1550,7 +1550,7 @@ void CGHeroInstance::levelUp(const std::vector<SecondarySkill> & skills)
}
//update specialty and other bonuses that scale with level
treeHasChanged();
nodeHasChanged();
}
void CGHeroInstance::levelUpAutomatically(vstd::RNG & rand)