mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-22 22:13:35 +02:00
[810] Fix bonus duplication
This commit is contained in:
parent
6a011b5ee0
commit
e455f66e86
@ -957,6 +957,9 @@ void CBonusSystemNode::getAllBonusesRec(BonusList &out) const
|
|||||||
auto updated = b->updater
|
auto updated = b->updater
|
||||||
? getUpdatedBonus(b, b->updater)
|
? getUpdatedBonus(b, b->updater)
|
||||||
: b;
|
: b;
|
||||||
|
|
||||||
|
//do not add bonus with same pointer
|
||||||
|
if(!vstd::contains(out, updated))
|
||||||
out.push_back(updated);
|
out.push_back(updated);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user