1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

secondary skill bonuses get updated via replacement (issue 2796)

This commit is contained in:
Henning Koehler
2018-03-01 08:44:05 +13:00
committed by ArseniyShestakov
parent 26aad17295
commit 4c0a67041b
3 changed files with 13 additions and 15 deletions

View File

@@ -850,6 +850,14 @@ void CBonusSystemNode::removeBonus(const std::shared_ptr<Bonus>& b)
CBonusSystemNode::treeHasChanged();
}
void CBonusSystemNode::removeBonuses(const CSelector &selector)
{
BonusList toRemove;
exportedBonuses.getBonuses(toRemove, selector);
for(auto bonus : toRemove)
removeBonus(bonus);
}
bool CBonusSystemNode::actsAsBonusSourceOnly() const
{
switch(nodeType)