1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00
This commit is contained in:
Michał W. Urbańczyk 2012-08-28 15:38:00 +00:00
parent e913d94c62
commit 0b85cfaf78
2 changed files with 6 additions and 3 deletions

View File

@ -2768,8 +2768,11 @@ void CBattleInterface::handleHex(BattleHex myNumber, int eventType)
}
};
const CStack * const shere = curInt->cb->battleGetStackByPos(myNumber, false);
const CStack * const sactive = activeStack;
//Get stack on the hex - first try to grab the alive one, if not found -> allow dead stacks.
const CStack *shere = curInt->cb->battleGetStackByPos(myNumber, true);
if(!shere)
shere = curInt->cb->battleGetStackByPos(myNumber, false);
if (!sactive)
return;

View File

@ -1716,8 +1716,8 @@ ESpellCastProblem::ESpellCastProblem CBattleInfoCallback::battleCanCastThisSpell
//get dead stack if we cast resurrection or animate dead
const CStack *deadStack = getStackIf([dest](const CStack *s) { return !s->alive() && s->position == dest; });
const CStack *aliveStack = getStackIf([dest](const CStack *s) { return s->alive() && s->position == dest;});
const CStack *deadStack = getStackIf([dest](const CStack *s) { return !s->alive() && s->coversPos(dest); });
const CStack *aliveStack = getStackIf([dest](const CStack *s) { return s->alive() && s->coversPos(dest);});
if(spell->isRisingSpell())