From 7007b86737da3522ef4f5e62118977040ab1fbb3 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Wed, 7 Dec 2022 15:57:17 +0200 Subject: [PATCH] Do not show destroyed towers in battle results window --- client/battle/CBattleInterfaceClasses.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/battle/CBattleInterfaceClasses.cpp b/client/battle/CBattleInterfaceClasses.cpp index a51ad59fb..cc05fd231 100644 --- a/client/battle/CBattleInterfaceClasses.cpp +++ b/client/battle/CBattleInterfaceClasses.cpp @@ -478,7 +478,11 @@ CBattleResultWindow::CBattleResultWindow(const BattleResult & br, CPlayerInterfa int yPos = 344 + step * 97; for(auto & elem : br.casualties[step]) { - icons.push_back(std::make_shared("CPRSMALL", CGI->creatures()->getByIndex(elem.first)->getIconIndex(), 0, xPos, yPos)); + auto creature = CGI->creatures()->getByIndex(elem.first); + if (creature->getId() == CreatureID::ARROW_TOWERS ) + continue; // do not show destroyed towers in battle results + + icons.push_back(std::make_shared("CPRSMALL", creature->getIconIndex(), 0, xPos, yPos)); std::ostringstream amount; amount<(xPos + 16, yPos + 42, FONT_SMALL, CENTER, Colors::WHITE, amount.str()));