소스 검색

Fixed a bug in phoenix code. Fixed a couple warnings.

Frank Zago 14 년 전
부모
커밋
9c3a10b2c7
3개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      client/CCreatureWindow.h
  2. 1 1
      lib/BattleState.cpp
  3. 1 1
      lib/BattleState.h

+ 1 - 1
client/CCreatureWindow.h

@@ -13,7 +13,7 @@
  *
  */
 
-class Bonus;
+struct Bonus;
 class CCreature;
 class CStackInstance;
 class CStack;

+ 1 - 1
lib/BattleState.cpp

@@ -2504,7 +2504,7 @@ void CStack::prepareAttacked(BattleStackAttacked &bsa) const
 				resurrectedCount += ((base->count % resurrectedCount) * resurrectFactor / 100.0f) > ran()%100 ? 1 : 0; //last stack has proportional chance to rebirth
 			else //only one unit
 				resurrectedCount += (base->count * resurrectFactor / 100.0f) > ran()%100 ? 1 : 0;
-			if (hasBonusOfType(Bonus::REBIRTH, 1));
+			if (hasBonusOfType(Bonus::REBIRTH, 1))
 				amax (resurrectedCount, 1); //resurrect at least one Sacred Phoenix
 			if (resurrectedCount)
 			{

+ 1 - 1
lib/BattleState.h

@@ -100,7 +100,7 @@ struct DLL_EXPORT BattleInfo : public CBonusSystemNode
 	ui32 calculateSpellDmg(const CSpell * sp, const CGHeroInstance * caster, const CStack * affectedCreature, int spellSchoolLevel, int usedSpellPower) const; //calculates damage inflicted by spell
 	ui32 calculateHealedHP(const CGHeroInstance * caster, const CSpell * spell, const CStack * stack) const;
 	ui32 calculateHealedHP(int healedHealth, const CSpell * spell, const CStack * stack) const; //for Archangel
-	ui32 BattleInfo::calculateHealedHP(const CSpell * spell, int usedSpellPower, int spellSchoolLevel, const CStack * stack) const; //unused
+	ui32 calculateHealedHP(const CSpell * spell, int usedSpellPower, int spellSchoolLevel, const CStack * stack) const; //unused
 	bool resurrects(TSpell spellid) const; //TODO: move it to spellHandler?
 	si8 hasDistancePenalty(const CStack * stackID, THex destHex) const; //determines if given stack has distance penalty shooting given pos
 	si8 sameSideOfWall(int pos1, int pos2) const; //determines if given positions are on the same side of wall