mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
[810] Fix bonus duplication
This commit is contained in:
committed by
Andrii Danylchenko
parent
f81d869b4a
commit
f7bf1ad467
@@ -957,7 +957,10 @@ void CBonusSystemNode::getAllBonusesRec(BonusList &out) const
|
||||
auto updated = b->updater
|
||||
? getUpdatedBonus(b, b->updater)
|
||||
: b;
|
||||
out.push_back(updated);
|
||||
|
||||
//do not add bonus with same pointer
|
||||
if(!vstd::contains(out, updated))
|
||||
out.push_back(updated);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user