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

Access to quests texts is now processed via translator

This commit is contained in:
Ivan Savenko
2022-12-27 23:17:41 +02:00
parent bdb8e0ee5c
commit 85d7b470d4
9 changed files with 118 additions and 33 deletions

View File

@@ -1300,7 +1300,7 @@ void CGameHandler::addGenericKilledLog(BattleLogMessage & blm, const CStack * de
if(killed > 0)
{
const int32_t txtIndex = (killed > 1) ? 379 : 378;
std::string formatString = VLC->generaltexth->allTexts.at(txtIndex);
std::string formatString = VLC->generaltexth->allTexts[txtIndex];
// these default h3 texts have unnecessary new lines, so get rid of them before displaying (and trim just in case, trimming newlines does not works for some reason)
formatString.erase(std::remove(formatString.begin(), formatString.end(), '\n'), formatString.end());
@@ -5209,7 +5209,7 @@ void CGameHandler::playerMessage(PlayerColor player, const std::string &message,
if (cheated)
{
SystemMessage temp_message(VLC->generaltexth->allTexts.at(260));
SystemMessage temp_message(VLC->generaltexth->allTexts[260]);
sendAndApply(&temp_message);
if(!player.isSpectator())