Browse Source

Fix CSpellEffectAnimation call parameters
(!) need check areaEffect usage

AlexVinS 11 years ago
parent
commit
c67f52732a
2 changed files with 3 additions and 6 deletions
  1. 1 4
      client/battle/CBattleAnimations.cpp
  2. 2 2
      client/battle/CBattleInterface.cpp

+ 1 - 4
client/battle/CBattleAnimations.cpp

@@ -984,10 +984,7 @@ bool CSpellEffectAnimation::init()
 				be.x += (destStack->attackerOwned ? -1 : 1)*tilePos.w/2;
 
 			//Indicate if effect should be drawn on top of everything or just on top of the hex
-			if(areaEffect)
-				be.position = BattleHex::INVALID;
-			else
-				be.position = destTile;
+			be.position = destTile;
 
 			owner->battleEffects.push_back(be);
 

+ 2 - 2
client/battle/CBattleInterface.cpp

@@ -1557,7 +1557,8 @@ void CBattleInterface::castThisSpell(int spellID)
 
 void CBattleInterface::displayEffect(ui32 effect, int destTile, bool areaEffect)
 {
-	addNewAnim(new CSpellEffectAnimation(this, effect, destTile, 0, 0, false, areaEffect));
+	//todo: recheck areaEffect usage
+	addNewAnim(new CSpellEffectAnimation(this, effect, destTile, 0, 0, false));
 }
 
 void CBattleInterface::battleTriggerEffect(const BattleTriggerEffect & bte)
@@ -1762,7 +1763,6 @@ void CBattleInterface::getPossibleActionsForStack(const CStack * stack)
 void CBattleInterface::printConsoleAttacked( const CStack * defender, int dmg, int killed, const CStack * attacker, bool multiple )
 {
 	boost::format txt;
-	int end = 0;
 	if (attacker) //ignore if stacks were killed by spell
 	{
 		txt = boost::format (CGI->generaltexth->allTexts[attacker->count > 1 ? 377 : 376]) %