mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-29 21:56:54 +02:00
Workaround on crash on visiting configurable building with "bonus"
duration
This commit is contained in:
parent
67132b3e7f
commit
162535e6d8
@ -84,11 +84,9 @@ bool IBonusBearer::hasBonusOfType(BonusType type, BonusSubtypeID subtype) const
|
||||
|
||||
bool IBonusBearer::hasBonusFrom(BonusSource source, BonusSourceID sourceID) const
|
||||
{
|
||||
boost::format fmt("source_%did_%s");
|
||||
fmt % static_cast<int>(source) % sourceID.toString();
|
||||
|
||||
return hasBonus(Selector::source(source,sourceID), fmt.str());
|
||||
return hasBonus(Selector::source(source,sourceID));
|
||||
}
|
||||
|
||||
std::shared_ptr<const Bonus> IBonusBearer::getBonus(const CSelector &selector) const
|
||||
{
|
||||
auto bonuses = getAllBonuses(selector, Selector::all);
|
||||
|
Loading…
x
Reference in New Issue
Block a user