mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
Minor fixes
This commit is contained in:
committed by
Andrii Danylchenko
parent
8cae3398ba
commit
9e3c4b69c4
@@ -1931,9 +1931,13 @@ const std::string CGTownBuilding::getVisitingBonusGreeting() const
|
||||
bonusGreeting = std::string(VLC->generaltexth->localizedTexts["townHall"]["greetingDefence"].String());
|
||||
break;
|
||||
}
|
||||
|
||||
assert(!bonusGreeting.empty());
|
||||
auto buildingName = town->town->getSpecialBuilding(bType)->Name();
|
||||
|
||||
if(bonusGreeting.empty())
|
||||
{
|
||||
bonusGreeting = "Error: Bonus greeting for '%s' is not localized.";
|
||||
logGlobal->error("'%s' building of '%s' faction has not localized bonus greeting.", buildingName, town->town->getLocalizedFactionName());
|
||||
}
|
||||
boost::algorithm::replace_first(bonusGreeting, "%s", buildingName);
|
||||
town->town->setGreeting(bType, bonusGreeting);
|
||||
return bonusGreeting;
|
||||
|
||||
Reference in New Issue
Block a user