|
|
@@ -2205,25 +2205,31 @@ void BattleResultAccepted::applyGs(CGameState * gs) const
|
|
|
for(auto & res : heroResult)
|
|
|
{
|
|
|
if(res.hero)
|
|
|
- res.hero->removeBonusesRecursive(Bonus::OneBattle);
|
|
|
- }
|
|
|
-
|
|
|
- // Grow up growing artifacts
|
|
|
- if(const auto hero = heroResult[winnerSide].hero)
|
|
|
- {
|
|
|
- if(hero->commander && hero->commander->alive)
|
|
|
- {
|
|
|
- for(auto & art : hero->commander->artifactsWorn)
|
|
|
- art.second.artifact->growingUp();
|
|
|
- }
|
|
|
- for(auto & art : hero->artifactsWorn)
|
|
|
- {
|
|
|
- art.second.artifact->growingUp();
|
|
|
- }
|
|
|
- }
|
|
|
- if(VLC->settings()->getBoolean(EGameSettings::MODULE_STACK_EXPERIENCE))
|
|
|
- {
|
|
|
- if(heroResult[0].army)
|
|
|
+ res.hero->removeBonusesRecursive(Bonus::OneBattle);
|
|
|
+ }
|
|
|
+
|
|
|
+ if(winnerSide != 2)
|
|
|
+ {
|
|
|
+ // Grow up growing artifacts
|
|
|
+ const auto hero = heroResult[winnerSide].hero;
|
|
|
+
|
|
|
+ if (hero)
|
|
|
+ {
|
|
|
+ if(hero->commander && hero->commander->alive)
|
|
|
+ {
|
|
|
+ for(auto & art : hero->commander->artifactsWorn)
|
|
|
+ art.second.artifact->growingUp();
|
|
|
+ }
|
|
|
+ for(auto & art : hero->artifactsWorn)
|
|
|
+ {
|
|
|
+ art.second.artifact->growingUp();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(VLC->settings()->getBoolean(EGameSettings::MODULE_STACK_EXPERIENCE))
|
|
|
+ {
|
|
|
+ if(heroResult[0].army)
|
|
|
heroResult[0].army->giveStackExp(heroResult[0].exp);
|
|
|
if(heroResult[1].army)
|
|
|
heroResult[1].army->giveStackExp(heroResult[1].exp);
|