From 330c0961b7e68e2d75e94bbd60ba9519d90de0ae Mon Sep 17 00:00:00 2001 From: dydzio Date: Sun, 29 Jan 2017 12:19:50 +0100 Subject: [PATCH] Add missing code fix --- config/bonuses_texts.json | 2 +- server/CGameHandler.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/bonuses_texts.json b/config/bonuses_texts.json index 9aae5157c..75d0f1941 100644 --- a/config/bonuses_texts.json +++ b/config/bonuses_texts.json @@ -332,7 +332,7 @@ "SOUL_STEAL": { "name": "Soul Steal", - "description": "Gains ${val}% new creatures for each enemy killed" + "description": "Gains ${val} new creatures for each enemy killed" }, "SPELLCASTER": diff --git a/server/CGameHandler.cpp b/server/CGameHandler.cpp index a4e048e7b..5099c7de6 100644 --- a/server/CGameHandler.cpp +++ b/server/CGameHandler.cpp @@ -145,7 +145,7 @@ static void SummonGuardiansHelper(std::vector & output, const BattleH if (targetIsAttacker) //handle front guardians, TODO: should we handle situation when units start battle near opposite side of the battlefield? Cannot happen in normal H3... BattleHex::checkAndPush(targetPosition.movedInDir(BattleHex::EDir::RIGHT, false).movedInDir(BattleHex::EDir::RIGHT, false), output); else - BattleHex::checkAndPush(BattleHex(targetPosition).movedInDir(BattleHex::EDir::LEFT, false).movedInDir(BattleHex::EDir::LEFT, false), output); + BattleHex::checkAndPush(targetPosition.movedInDir(BattleHex::EDir::LEFT, false).movedInDir(BattleHex::EDir::LEFT, false), output); //guardian spawn locations for four default position cases for attacker and defender, non-default starting location for att and def is handled in first two if's if (targetIsAttacker && ((y % 2 == 0) || (x > 1))) @@ -993,7 +993,7 @@ void CGameHandler::applyBattleEffects(BattleAttack &bat, const CStack *att, cons StacksHealedOrResurrected::HealInfo hi; hi.stackID = att->ID; hi.healedHP = bsa.killedAmount * att->valOfBonuses(Bonus::SOUL_STEAL) * att->MaxHealth(); //TODO: Should unit be additionally healed after life drain? - hi.lowLevelResurrection = false; + hi.lowLevelResurrection = att->hasBonusOfType(Bonus::SOUL_STEAL, 1); shi.healedStacks.push_back(hi); if (hi.healedHP > 0) @@ -6391,7 +6391,7 @@ CasualtiesAfterBattle::CasualtiesAfterBattle(const CArmedInstance * _army, Battl StackLocation sl(army, st->slot); newStackCounts.push_back(TStackAndItsNewCount(sl, st->count)); } - else if (st->count > army->getStackCount(st->slot) && !st->hasBonusOfType(Bonus::SOUL_STEAL, 1)) + else if (st->count > army->getStackCount(st->slot)) { logGlobal->debug("Stack gained %d units.", st->count - army->getStackCount(st->slot)); StackLocation sl(army, st->slot);