mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-26 22:57:00 +02:00
Remove false warning indicating something is wrong
This commit is contained in:
parent
aee4bb7281
commit
cd78779d9c
@ -793,7 +793,10 @@ void CBattleInterface::bSurrenderf()
|
|||||||
{
|
{
|
||||||
std::string enemyHeroName = curInt->cb->battleGetEnemyHero().name;
|
std::string enemyHeroName = curInt->cb->battleGetEnemyHero().name;
|
||||||
if(enemyHeroName.empty())
|
if(enemyHeroName.empty())
|
||||||
enemyHeroName = "#ENEMY#"; //TODO: should surrendering without enemy hero be enabled?
|
{
|
||||||
|
logGlobal->warn("Surrender performed without enemy hero, should not happen!");
|
||||||
|
enemyHeroName = "#ENEMY#";
|
||||||
|
}
|
||||||
|
|
||||||
std::string surrenderMessage = boost::str(boost::format(CGI->generaltexth->allTexts[32]) % enemyHeroName % cost); //%s states: "I will accept your surrender and grant you and your troops safe passage for the price of %d gold."
|
std::string surrenderMessage = boost::str(boost::format(CGI->generaltexth->allTexts[32]) % enemyHeroName % cost); //%s states: "I will accept your surrender and grant you and your troops safe passage for the price of %d gold."
|
||||||
curInt->showYesNoDialog(surrenderMessage, [this](){ reallySurrender(); }, nullptr);
|
curInt->showYesNoDialog(surrenderMessage, [this](){ reallySurrender(); }, nullptr);
|
||||||
|
@ -241,7 +241,6 @@ InfoAboutHero CBattleInfoEssentials::battleGetHeroInfo(ui8 side) const
|
|||||||
auto hero = getBattle()->getSideHero(side);
|
auto hero = getBattle()->getSideHero(side);
|
||||||
if(!hero)
|
if(!hero)
|
||||||
{
|
{
|
||||||
logGlobal->warn("%s: side %d does not have hero!", __FUNCTION__, static_cast<int>(side));
|
|
||||||
return InfoAboutHero();
|
return InfoAboutHero();
|
||||||
}
|
}
|
||||||
InfoAboutHero::EInfoLevel infoLevel = battleDoWeKnowAbout(side) ? InfoAboutHero::EInfoLevel::DETAILED : InfoAboutHero::EInfoLevel::BASIC;
|
InfoAboutHero::EInfoLevel infoLevel = battleDoWeKnowAbout(side) ? InfoAboutHero::EInfoLevel::DETAILED : InfoAboutHero::EInfoLevel::BASIC;
|
||||||
|
Loading…
Reference in New Issue
Block a user