From d9a78ff1cee3d288018697817519e8b31c778eb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=2E=20Urba=C5=84czyk?= Date: Wed, 22 Feb 2012 14:31:53 +0000 Subject: [PATCH] * fixed #871 * dead stacks won't be also shaded as possible targets --- client/BattleInterface/CBattleInterface.cpp | 3 ++- lib/BattleState.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client/BattleInterface/CBattleInterface.cpp b/client/BattleInterface/CBattleInterface.cpp index 7f0a4d86a..2061b88df 100644 --- a/client/BattleInterface/CBattleInterface.cpp +++ b/client/BattleInterface/CBattleInterface.cpp @@ -2919,7 +2919,8 @@ void CBattleInterface::endAction(const BattleAction* action) queue->update(); - if(tacticsMode) //we have activated next stack after sending request that has been just realized -> blockmap due to movement has changed + if(tacticsMode //we have activated next stack after sending request that has been just realized -> blockmap due to movement has changed + || action->actionType == BattleAction::HERO_SPELL) redrawBackgroundWithHexes(activeStack); } diff --git a/lib/BattleState.cpp b/lib/BattleState.cpp index 9902245e4..ca37a2617 100644 --- a/lib/BattleState.cpp +++ b/lib/BattleState.cpp @@ -344,7 +344,7 @@ std::vector BattleInfo::getAccessibility( const CStack * stack, bool }; BOOST_FOREACH(const CStack * otherSt, stacks) { - if(otherSt->owner == stack->owner) + if(otherSt->owner == stack->owner || !otherSt->isValidTarget(false)) continue; std::vector occupiedBySecond;