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

Remove some usages of server-side translations

This commit is contained in:
Ivan Savenko
2024-04-08 18:21:40 +03:00
parent 7a42e21e4d
commit 18ece6dcf6
8 changed files with 27 additions and 41 deletions

View File

@@ -388,7 +388,7 @@ void CGameHandler::giveExperience(const CGHeroInstance * hero, TExpType amountTo
InfoWindow iw;
iw.player = hero->tempOwner;
iw.text.appendLocalString(EMetaText::GENERAL_TXT, 1); //can gain no more XP
iw.text.replaceRawString(hero->getNameTranslated());
iw.text.replaceTextID(hero->getNameTextID());
sendAndApply(&iw);
}
@@ -1593,7 +1593,7 @@ void CGameHandler::useScholarSkill(ObjectInstanceID fromHero, ObjectInstanceID t
iw.components.emplace_back(ComponentType::SEC_SKILL, scholarSkill, scholarSkillLevel);
iw.text.appendLocalString(EMetaText::GENERAL_TXT, 139);//"%s, who has studied magic extensively,
iw.text.replaceRawString(h1->getNameTranslated());
iw.text.replaceTextID(h1->getNameTextID());
if (!cs2.spells.empty())//if found new spell - apply
{
@@ -1614,7 +1614,7 @@ void CGameHandler::useScholarSkill(ObjectInstanceID fromHero, ObjectInstanceID t
}
}
iw.text.appendLocalString(EMetaText::GENERAL_TXT, 142);//from %s
iw.text.replaceRawString(h2->getNameTranslated());
iw.text.replaceTextID(h2->getNameTextID());
sendAndApply(&cs2);
}
@@ -1642,7 +1642,7 @@ void CGameHandler::useScholarSkill(ObjectInstanceID fromHero, ObjectInstanceID t
}
}
iw.text.appendLocalString(EMetaText::GENERAL_TXT, 148);//from %s
iw.text.replaceRawString(h2->getNameTranslated());
iw.text.replaceTextID(h2->getNameTextID());
sendAndApply(&cs1);
}
sendAndApply(&iw);
@@ -4265,14 +4265,6 @@ void CGameHandler::showInfoDialog(InfoWindow * iw)
sendAndApply(iw);
}
void CGameHandler::showInfoDialog(const std::string & msg, PlayerColor player)
{
InfoWindow iw;
iw.player = player;
iw.text.appendRawString(msg);
showInfoDialog(&iw);
}
CRandomGenerator & CGameHandler::getRandomGenerator()
{
return CRandomGenerator::getDefault();