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

All text for factions/towns/building are passed through translator

This commit is contained in:
Ivan Savenko
2023-01-04 15:17:50 +02:00
parent 388ed88b5d
commit 05a1d7c6e3
36 changed files with 230 additions and 153 deletions

View File

@@ -364,11 +364,11 @@ void CHeroClassHandler::afterLoadFinalization()
{
if (!faction->town)
continue;
if (heroClass->selectionProbability.count(faction->index))
if (heroClass->selectionProbability.count(faction->getIndex()))
continue;
float chance = static_cast<float>(heroClass->defaultTavernChance * faction->town->defaultTavernChance);
heroClass->selectionProbability[faction->index] = static_cast<int>(sqrt(chance) + 0.5); //FIXME: replace with std::round once MVS supports it
heroClass->selectionProbability[faction->getIndex()] = static_cast<int>(sqrt(chance) + 0.5); //FIXME: replace with std::round once MVS supports it
}
// set default probabilities for gaining secondary skills where not loaded previously
heroClass->secSkillProbability.resize(VLC->skillh->size(), -1);