1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00

Fix inability of unit to cast spell after receiving morale

This commit is contained in:
Ivan Savenko
2025-04-28 19:34:36 +03:00
parent 5433b07e5f
commit 5550edeb9a
16 changed files with 62 additions and 26 deletions

View File

@ -666,7 +666,7 @@ void BattleInfo::nextRound()
obst->battleTurnPassed();
}
void BattleInfo::nextTurn(uint32_t unitId)
void BattleInfo::nextTurn(uint32_t unitId, BattleUnitTurnReason reason)
{
activeStack = unitId;
@ -675,7 +675,7 @@ void BattleInfo::nextTurn(uint32_t unitId)
//remove bonuses that last until when stack gets new turn
st->removeBonusesRecursive(Bonus::UntilGetsTurn);
st->afterGetsTurn();
st->afterGetsTurn(reason);
}
void BattleInfo::addUnit(uint32_t id, const JsonNode & data)