mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-05 00:49:09 +02:00
Fixed crash on ending battle with a draw
This commit is contained in:
@ -2208,8 +2208,12 @@ void BattleResultAccepted::applyGs(CGameState * gs) const
|
|||||||
res.hero->removeBonusesRecursive(Bonus::OneBattle);
|
res.hero->removeBonusesRecursive(Bonus::OneBattle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(winnerSide != 2)
|
||||||
|
{
|
||||||
// Grow up growing artifacts
|
// Grow up growing artifacts
|
||||||
if(const auto hero = heroResult[winnerSide].hero)
|
const auto hero = heroResult[winnerSide].hero;
|
||||||
|
|
||||||
|
if (hero)
|
||||||
{
|
{
|
||||||
if(hero->commander && hero->commander->alive)
|
if(hero->commander && hero->commander->alive)
|
||||||
{
|
{
|
||||||
@ -2221,6 +2225,8 @@ void BattleResultAccepted::applyGs(CGameState * gs) const
|
|||||||
art.second.artifact->growingUp();
|
art.second.artifact->growingUp();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(VLC->settings()->getBoolean(EGameSettings::MODULE_STACK_EXPERIENCE))
|
if(VLC->settings()->getBoolean(EGameSettings::MODULE_STACK_EXPERIENCE))
|
||||||
{
|
{
|
||||||
if(heroResult[0].army)
|
if(heroResult[0].army)
|
||||||
|
Reference in New Issue
Block a user