1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Bonus Source ID now uses metaidentifier

This commit is contained in:
Ivan Savenko
2023-10-10 18:05:18 +03:00
parent 77facf9387
commit b394158dc9
85 changed files with 295 additions and 262 deletions

View File

@@ -227,11 +227,11 @@ void CGPandoraBox::serializeJsonOptions(JsonSerializeFormat & handler)
int val;
handler.serializeInt("morale", val, 0);
if(val)
vinfo.reward.bonuses.emplace_back(BonusDuration::ONE_BATTLE, BonusType::MORALE, BonusSource::OBJECT, val, id);
vinfo.reward.bonuses.emplace_back(BonusDuration::ONE_BATTLE, BonusType::MORALE, BonusSource::OBJECT, val, TBonusSourceID(id));
handler.serializeInt("luck", val, 0);
if(val)
vinfo.reward.bonuses.emplace_back(BonusDuration::ONE_BATTLE, BonusType::LUCK, BonusSource::OBJECT, val, id);
vinfo.reward.bonuses.emplace_back(BonusDuration::ONE_BATTLE, BonusType::LUCK, BonusSource::OBJECT, val, TBonusSourceID(id));
vinfo.reward.resources.serializeJson(handler, "resources");
{