mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Split BattleAI::activeStack into several smaller methods
This commit is contained in:
@ -774,6 +774,14 @@ BattleAction CPlayerInterface::activeStack(const CStack * stack) //called when i
|
||||
logGlobal->trace("Awaiting command for %s", stack->nodeName());
|
||||
auto stackId = stack->unitId();
|
||||
auto stackName = stack->nodeName();
|
||||
|
||||
assert(!cb->battleIsFinished());
|
||||
if (cb->battleIsFinished())
|
||||
{
|
||||
logGlobal->error("Received CPlayerInterface::activeStack after battle is finished!");
|
||||
return BattleAction::makeDefend(stack);
|
||||
}
|
||||
|
||||
if (autofightingAI)
|
||||
{
|
||||
if (isAutoFightOn)
|
||||
|
Reference in New Issue
Block a user