1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Use meta string for messages

This commit is contained in:
nordsoft
2023-09-27 23:11:11 +02:00
parent 03c099d4fd
commit ab373f08ab
7 changed files with 29 additions and 28 deletions

View File

@ -35,7 +35,7 @@ void CGPandoraBox::init()
{
i.reward.removeObject = true;
if(!message.empty() && i.message.empty())
i.message = MetaString::createFromRawString(message);
i.message = message;
}
}
@ -209,7 +209,7 @@ void CGPandoraBox::serializeJsonOptions(JsonSerializeFormat & handler)
{
CRewardableObject::serializeJsonOptions(handler);
handler.serializeString("guardMessage", message);
handler.serializeStruct("guardMessage", message);
if(!handler.saving)
{
@ -297,7 +297,7 @@ void CGEvent::init()
{
i.reward.removeObject = removeAfterVisit;
if(!message.empty() && i.message.empty())
i.message = MetaString::createFromRawString(message);
i.message = message;
}
}
@ -327,7 +327,7 @@ void CGEvent::activated( const CGHeroInstance * h ) const
InfoWindow iw;
iw.player = h->tempOwner;
if(!message.empty())
iw.text.appendRawString(message);
iw.text = message;
else
iw.text.appendLocalString(EMetaText::ADVOB_TXT, 16);
cb->showInfoDialog(&iw);