1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-10 22:31:40 +02:00

Merge pull request #5633 from SoundSSGood/battle-query-fix

Fix end of battle for AI
This commit is contained in:
Ivan Savenko
2025-04-17 12:23:35 +03:00
committed by GitHub

View File

@@ -369,6 +369,7 @@ void BattleResultProcessor::endBattleConfirm(const CBattleInfoCallback & battle)
raccepted.winnerSide = finishingBattle->winnerSide;
gameHandler->sendAndApply(raccepted);
gameHandler->queries->popIfTop(battleQuery); // Workaround to remove battle query for AI case. TODO Think of a cleaner solution.
//--> continuation (battleFinalize) occurs after level-up gameHandler->queries are handled or on removing query
}