|
|
@@ -325,7 +325,7 @@ void BattleInterface::battleFinished(const BattleResult& br, QueryID queryID)
|
|
|
curInt->cb->selectionMade(selection, queryID);
|
|
|
};
|
|
|
GH.windows().pushWindow(wnd);
|
|
|
-
|
|
|
+
|
|
|
curInt->waitWhileDialog(); // Avoid freeze when AI end turn after battle. Check bug #1897
|
|
|
CPlayerInterface::battleInt = nullptr;
|
|
|
}
|
|
|
@@ -601,28 +601,13 @@ void BattleInterface::startAction(const BattleAction & action)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- const CStack *stack = curInt->cb->battleGetStackByID(action.stackNumber);
|
|
|
-
|
|
|
- if (stack)
|
|
|
- {
|
|
|
- windowObject->updateQueue();
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- assert(action.actionType == EActionType::HERO_SPELL); //only cast spell is valid action without acting stack number
|
|
|
- }
|
|
|
-
|
|
|
stacksController->startAction(action);
|
|
|
|
|
|
- if(action.actionType == EActionType::HERO_SPELL) //when hero casts spell
|
|
|
+ if (!action.isUnitAction())
|
|
|
return;
|
|
|
|
|
|
- if (!stack)
|
|
|
- {
|
|
|
- logGlobal->error("Something wrong with stackNumber in actionStarted. Stack number: %d", action.stackNumber);
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
+ assert(curInt->cb->battleGetStackByID(action.stackNumber));
|
|
|
+ windowObject->updateQueue();
|
|
|
effectsController->startAction(action);
|
|
|
}
|
|
|
|