1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-15 01:24:45 +02:00

Fix messages for pandoras

This commit is contained in:
nordsoft
2023-09-15 21:13:07 +02:00
parent b5b5d881c4
commit 4af2d917c0

View File

@ -45,6 +45,7 @@ void CGPandoraBox::onHeroVisit(const CGHeroInstance * h) const
{ {
auto setText = [](MetaString & text, int tId, const CGHeroInstance * h) auto setText = [](MetaString & text, int tId, const CGHeroInstance * h)
{ {
text.clear();
text.appendLocalString(EMetaText::ADVOB_TXT, tId); text.appendLocalString(EMetaText::ADVOB_TXT, tId);
text.replaceRawString(h->getNameTranslated()); text.replaceRawString(h->getNameTranslated());
}; };
@ -179,6 +180,7 @@ void CGPandoraBox::serializeJsonOptions(JsonSerializeFormat & handler)
configuration.info.emplace_back(); configuration.info.emplace_back();
configuration.info.back().visitType = Rewardable::EEventType::EVENT_FIRST_VISIT; configuration.info.back().visitType = Rewardable::EEventType::EVENT_FIRST_VISIT;
configuration.info.back().reward = reward; configuration.info.back().reward = reward;
reward = Rewardable::Reward{};
} }
}; };