|
@@ -190,9 +190,7 @@ void BonusList::getBonuses(BonusList & out, const CSelector &selector, const CSe
|
|
|
out.reserve(bonuses.size());
|
|
|
for(const auto & b : bonuses)
|
|
|
{
|
|
|
- //add matching bonuses that matches limit predicate or have NO_LIMIT if no given predicate
|
|
|
- auto noFightLimit = b->effectRange == BonusLimitEffect::NO_LIMIT;
|
|
|
- if(selector(b.get()) && ((!limit && noFightLimit) || ((bool)limit && limit(b.get()))))
|
|
|
+ if(selector(b.get()) && (!limit || ((bool)limit && limit(b.get()))))
|
|
|
out.push_back(b);
|
|
|
}
|
|
|
}
|