1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00
This commit is contained in:
AlexVinS 2017-07-03 13:40:22 +03:00
parent e4c14c4cc2
commit 3ce238e4d3

View File

@ -3104,12 +3104,12 @@ void CBattleInterface::showHighlightedHexes(SDL_Surface *to)
if(spellToCast)//hero casts spell
{
spell = SpellID(spellToCast->additionalInfo).toSpell();
caster = activeStack->side == BattleSide::ATTACKER ? attackingHeroInstance : defendingHeroInstance;
caster = getActiveHero();
}
else if(creatureSpellToCast >= 0 && stackCanCastSpell && creatureCasting)//stack casts spell
{
spell = SpellID(creatureSpellToCast).toSpell();
caster = activeStack;
spell = SpellID(creatureSpellToCast).toSpell();
caster = activeStack;
}
if(caster && spell) //when casting spell