From 215932b520fbd03b7ce22f86faff536c4a6e2dbc Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Fri, 2 Dec 2022 00:06:57 +0200 Subject: [PATCH] Fix compile after merge --- client/battle/CBattleInterface.cpp | 1 - client/battle/CBattleInterfaceClasses.cpp | 2 +- client/battle/CBattleSiegeController.cpp | 5 +++++ client/battle/CBattleSiegeController.h | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/client/battle/CBattleInterface.cpp b/client/battle/CBattleInterface.cpp index a8702ee35..4274cbc10 100644 --- a/client/battle/CBattleInterface.cpp +++ b/client/battle/CBattleInterface.cpp @@ -188,7 +188,6 @@ CBattleInterface::CBattleInterface(const CCreatureSet *army1, const CCreatureSet addUsedEvents(RCLICK | MOVE | KEYBOARD); controlPanel->blockUI(true); queue->update(); - blockUI(true); } CBattleInterface::~CBattleInterface() diff --git a/client/battle/CBattleInterfaceClasses.cpp b/client/battle/CBattleInterfaceClasses.cpp index 3bc35a49f..619b71300 100644 --- a/client/battle/CBattleInterfaceClasses.cpp +++ b/client/battle/CBattleInterfaceClasses.cpp @@ -696,7 +696,7 @@ void CStackQueue::update() int32_t CStackQueue::getSiegeShooterIconID() { - return owner->siegeH->town->town->faction->index; + return owner->siegeController->getSiegedTown()->town->faction->index; } CStackQueue::StackBox::StackBox(CStackQueue * owner): diff --git a/client/battle/CBattleSiegeController.cpp b/client/battle/CBattleSiegeController.cpp index d5f6fef31..d3807a256 100644 --- a/client/battle/CBattleSiegeController.cpp +++ b/client/battle/CBattleSiegeController.cpp @@ -350,3 +350,8 @@ void CBattleSiegeController::stackIsCatapulting(const CatapultAttack & ca) wallPieceImages[wallId] = IImage::createFromFile(getWallPieceImageName(EWallVisual::EWallVisual(wallId), wallState)); } } + +const CGTownInstance *CBattleSiegeController::getSiegedTown() const +{ + return town; +} diff --git a/client/battle/CBattleSiegeController.h b/client/battle/CBattleSiegeController.h index 0e30152bc..c944ba080 100644 --- a/client/battle/CBattleSiegeController.h +++ b/client/battle/CBattleSiegeController.h @@ -106,5 +106,5 @@ public: const CCreature *getTurretCreature() const; Point getTurretCreaturePosition( BattleHex position ) const; - + const CGTownInstance *getSiegedTown() const; };