mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
split getBonusLocalFirst into two distinct method:
- const method getFirstBonus that returns single matching bonusToString - non-const method getLocalBonus that returns bonus from current node
This commit is contained in:
@@ -929,7 +929,7 @@ void CGArtifact::serializeJsonOptions(JsonSerializeFormat& handler)
|
||||
|
||||
if(handler.saving && ID == Obj::SPELL_SCROLL)
|
||||
{
|
||||
const std::shared_ptr<Bonus> b = storedArtifact->getBonusLocalFirst(Selector::type()(BonusType::SPELL));
|
||||
const auto & b = storedArtifact->getFirstBonus(Selector::type()(BonusType::SPELL));
|
||||
SpellID spellId(b->subtype.as<SpellID>());
|
||||
|
||||
handler.serializeId("spell", spellId, SpellID::NONE);
|
||||
|
||||
Reference in New Issue
Block a user