1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-15 13:33:36 +02:00

Fix regression from map translation - properly translate custom main

hero name
This commit is contained in:
Ivan Savenko 2023-11-27 20:21:18 +02:00
parent 5df98f3eca
commit 02f7193260

View File

@ -190,7 +190,7 @@ std::string OptionsTab::CPlayerSettingsHelper::getName()
return CGI->generaltexth->allTexts[522];
if(!playerSettings.heroNameTextId.empty())
return playerSettings.heroNameTextId;
return CGI->generaltexth->translate(playerSettings.heroNameTextId);
auto index = playerSettings.getHeroValidated();
return (*CGI->heroh)[index]->getNameTranslated();
}