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

Replace bonus string description with metastring that can properly

handle translations
This commit is contained in:
Ivan Savenko
2024-04-07 19:57:49 +03:00
parent b0334b381e
commit 9e49587749
19 changed files with 98 additions and 146 deletions

View File

@@ -225,15 +225,15 @@ void CBank::doVisit(const CGHeroInstance * hero) const
{
case Obj::SHIPWRECK:
textID = 123;
gbonus.bdescr.appendRawString(VLC->generaltexth->arraytxt[99]);
gbonus.bonus.description.appendRawString(VLC->generaltexth->arraytxt[99]);
break;
case Obj::DERELICT_SHIP:
textID = 42;
gbonus.bdescr.appendRawString(VLC->generaltexth->arraytxt[101]);
gbonus.bonus.description.appendRawString(VLC->generaltexth->arraytxt[101]);
break;
case Obj::CRYPT:
textID = 120;
gbonus.bdescr.appendRawString(VLC->generaltexth->arraytxt[98]);
gbonus.bonus.description.appendRawString(VLC->generaltexth->arraytxt[98]);
break;
}
cb->giveHeroBonus(&gbonus);
@@ -244,7 +244,8 @@ void CBank::doVisit(const CGHeroInstance * hero) const
case Obj::PYRAMID:
{
GiveBonus gb;
gb.bonus = Bonus(BonusDuration::ONE_BATTLE, BonusType::LUCK, BonusSource::OBJECT_INSTANCE, -2, BonusSourceID(id), VLC->generaltexth->arraytxt[70]);
gb.bonus = Bonus(BonusDuration::ONE_BATTLE, BonusType::LUCK, BonusSource::OBJECT_INSTANCE, -2, BonusSourceID(id));
gb.bonus.description.appendTextID("core.arraytxt.70");
gb.id = hero->id;
cb->giveHeroBonus(&gb);
textID = 107;