From 4de0300c769ce9c8b1b2aaba698a32fbc5665f90 Mon Sep 17 00:00:00 2001 From: Andrey Filipenkov Date: Fri, 30 Sep 2022 15:06:50 +0300 Subject: [PATCH 1/2] unlock adventure map UI after closing battle result dialog --- client/CPlayerInterface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/CPlayerInterface.cpp b/client/CPlayerInterface.cpp index 6003d8105..5d8c0be22 100644 --- a/client/CPlayerInterface.cpp +++ b/client/CPlayerInterface.cpp @@ -930,7 +930,6 @@ void CPlayerInterface::battleEnd(const BattleResult *br) isAutoFightOn = false; cb->unregisterBattleInterface(autofightingAI); autofightingAI.reset(); - adventureInt->quickCombatUnlock(); if (!battleInt) { @@ -938,6 +937,7 @@ void CPlayerInterface::battleEnd(const BattleResult *br) // #1490 - during AI turn when quick combat is on, we need to display the message and wait for user to close it. // Otherwise NewTurn causes freeze. waitWhileDialog(); + adventureInt->quickCombatUnlock(); return; } } @@ -945,6 +945,7 @@ void CPlayerInterface::battleEnd(const BattleResult *br) BATTLE_EVENT_POSSIBLE_RETURN; battleInt->battleFinished(*br); + adventureInt->quickCombatUnlock(); } void CPlayerInterface::battleLogMessage(const std::vector & lines) From c4c2e03b6ecb508e0346b038e7222980c8ee5474 Mon Sep 17 00:00:00 2001 From: Andrey Filipenkov Date: Fri, 30 Sep 2022 15:06:56 +0300 Subject: [PATCH 2/2] fix typo --- client/battle/CBattleInterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/battle/CBattleInterface.cpp b/client/battle/CBattleInterface.cpp index e0e0b6713..6606e6dd8 100644 --- a/client/battle/CBattleInterface.cpp +++ b/client/battle/CBattleInterface.cpp @@ -1884,7 +1884,7 @@ void CBattleInterface::blockUI(bool on) bSurrender->block(on || curInt->cb->battleGetSurrenderCost() < 0); // block only if during enemy turn and auto-fight is off - // othervice - crash on accessing non-exisiting active stack + // otherwise - crash on accessing non-exisiting active stack bAutofight->block(!curInt->isAutoFightOn && !activeStack); if (tacticsMode && btactEnd && btactNext)