1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fixes warning about usage of unused variable

This commit is contained in:
Joakim Thorén 2023-12-27 22:25:29 +01:00
parent 406d136cdc
commit 01f602ab92

View File

@ -226,7 +226,7 @@ void CGPandoraBox::serializeJsonOptions(JsonSerializeFormat & handler)
handler.serializeInt("experience", vinfo.reward.heroExperience, 0);
handler.serializeInt("mana", vinfo.reward.manaDiff, 0);
int val;
int val = 0;
handler.serializeInt("morale", val, 0);
if(val)
vinfo.reward.bonuses.emplace_back(BonusDuration::ONE_BATTLE, BonusType::MORALE, BonusSource::OBJECT_INSTANCE, val, BonusSourceID(id));