1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Possible fix for #923

This commit is contained in:
AlexVinS 2015-04-11 07:18:40 +03:00
parent b55ab61605
commit 6cf82ceab5
2 changed files with 2 additions and 2 deletions

View File

@ -712,7 +712,7 @@ void CCommanderInstance::setAlive (bool Alive)
alive = Alive;
if (!alive)
{
getBonusList().remove_if (Bonus::UntilCommanderKilled);
popBonuses(Bonus::UntilCommanderKilled);
}
}

View File

@ -1175,7 +1175,7 @@ void BattleResult::applyGs( CGameState *gs )
{
if(auto h = gs->curB->battleGetFightingHero(i))
{
h->getBonusList().remove_if(Bonus::OneBattle); //remove any "until next battle" bonuses
h->popBonuses(Bonus::OneBattle); //remove any "until next battle" bonuses
if (h->commander && h->commander->alive)
{
for (auto art : h->commander->artifactsWorn) //increment bonuses for commander artifacts