mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
addNewBonus: add turnsRemain check for N_TURNS, N_DAYS and ONE_WEEK
This commit is contained in:
parent
f99ffbd074
commit
b48d65ad57
@ -780,6 +780,12 @@ void CBonusSystemNode::updateBonuses(const CSelector &s)
|
||||
|
||||
void CBonusSystemNode::addNewBonus(Bonus *b)
|
||||
{
|
||||
//turnsRemain shouldn't be zero for following durations
|
||||
if(Bonus::NTurns(b) || Bonus::NDays(b) || Bonus::OneWeek(b))
|
||||
{
|
||||
assert(b->turnsRemain);
|
||||
}
|
||||
|
||||
assert(!vstd::contains(exportedBonuses,b));
|
||||
exportedBonuses.push_back(b);
|
||||
exportBonus(b);
|
||||
|
Loading…
Reference in New Issue
Block a user