diff --git a/client/battle/CBattleInterface.cpp b/client/battle/CBattleInterface.cpp index 75d1bd0ec..11c092b4a 100644 --- a/client/battle/CBattleInterface.cpp +++ b/client/battle/CBattleInterface.cpp @@ -792,8 +792,11 @@ void CBattleInterface::bSurrenderf() if (cost >= 0) { std::string enemyHeroName = curInt->cb->battleGetEnemyHero().name; - if (enemyHeroName.empty()) - enemyHeroName = "#ENEMY#"; //TODO: should surrendering without enemy hero be enabled? + if(enemyHeroName.empty()) + { + 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." curInt->showYesNoDialog(surrenderMessage, [this](){ reallySurrender(); }, nullptr); diff --git a/lib/battle/CBattleInfoEssentials.cpp b/lib/battle/CBattleInfoEssentials.cpp index ba8a9202c..366d19bca 100644 --- a/lib/battle/CBattleInfoEssentials.cpp +++ b/lib/battle/CBattleInfoEssentials.cpp @@ -241,7 +241,6 @@ InfoAboutHero CBattleInfoEssentials::battleGetHeroInfo(ui8 side) const auto hero = getBattle()->getSideHero(side); if(!hero) { - logGlobal->warn("%s: side %d does not have hero!", __FUNCTION__, static_cast(side)); return InfoAboutHero(); } InfoAboutHero::EInfoLevel infoLevel = battleDoWeKnowAbout(side) ? InfoAboutHero::EInfoLevel::DETAILED : InfoAboutHero::EInfoLevel::BASIC;