AlexVinS 8 年之前
父節點
當前提交
3ce238e4d3
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      client/battle/CBattleInterface.cpp

+ 3 - 3
client/battle/CBattleInterface.cpp

@@ -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