1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Merge pull request #5844 from IvanSavenko/bonus_fixes

Fixes to bonus system functionality
This commit is contained in:
Ivan Savenko
2025-06-30 11:58:42 +03:00
committed by GitHub
92 changed files with 565 additions and 295 deletions

View File

@@ -313,8 +313,8 @@ si32 CCreature::maxAmount(const TResources &res) const //how many creatures can
}
CCreature::CCreature()
:CBonusSystemNode(BonusNodeType::CREATURE)
{
setNodeType(CBonusSystemNode::CREATURE);
fightValue = AIValue = growth = hordeGrowth = ammMin = ammMax = 0;
}
@@ -329,7 +329,7 @@ void CCreature::addBonus(int val, BonusType type, BonusSubtypeID subtype)
BonusList & exported = getExportedBonusList();
BonusList existing;
exported.getBonuses(existing, selector, Selector::all);
exported.getBonuses(existing, selector);
if(existing.empty())
{