1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Fix handling of opening spells when tactics is present

This commit is contained in:
Ivan Savenko 2023-08-31 01:32:32 +03:00
parent 3e169ef2f5
commit 0f4f9b3233
2 changed files with 7 additions and 0 deletions

View File

@ -507,6 +507,12 @@ void BattleFlowProcessor::onActionMade(const BattleAction &ba)
{ {
const auto & battle = gameHandler->gameState()->curB; const auto & battle = gameHandler->gameState()->curB;
if (ba.actionType == EActionType::END_TACTIC_PHASE)
{
onTacticsEnded();
return;
}
const CStack * actedStack = battle->battleGetStackByID(ba.stackNumber, false); const CStack * actedStack = battle->battleGetStackByID(ba.stackNumber, false);
const CStack * activeStack = battle->battleGetStackByID(battle->getActiveStackID(), false); const CStack * activeStack = battle->battleGetStackByID(battle->getActiveStackID(), false);

View File

@ -39,6 +39,7 @@ class BattleProcessor : boost::noncopyable
std::unique_ptr<BattleFlowProcessor> flowProcessor; std::unique_ptr<BattleFlowProcessor> flowProcessor;
std::unique_ptr<BattleResultProcessor> resultProcessor; std::unique_ptr<BattleResultProcessor> resultProcessor;
void onTacticsEnded();
void updateGateState(); void updateGateState();
void engageIntoBattle(PlayerColor player); void engageIntoBattle(PlayerColor player);