Преглед изворни кода

Fixed #804.
Phoenix won't upgrade to Centaur Captain ;)

Minor tweaks.

DjWarmonger пре 14 година
родитељ
комит
e3a8a41063
5 измењених фајлова са 10 додато и 11 уклоњено
  1. 1 1
      client/CPlayerInterface.cpp
  2. 1 1
      config/battles_graphics.json
  3. 0 1
      config/creatures.json
  4. 6 6
      lib/CArtHandler.h
  5. 2 2
      server/CGameHandler.cpp

+ 1 - 1
client/CPlayerInterface.cpp

@@ -600,7 +600,7 @@ void CPlayerInterface::battleStacksHealedRes(const std::vector<std::pair<ui32, u
 
 		if (attacker)
 		{
-			battleInt->displayEffect(52, attacker->position);
+			battleInt->displayEffect(52, attacker->position); //TODO: transparency
 			if (attacker->count > 1)
 			{
 				textOff += 1;

+ 1 - 1
config/battles_graphics.json

@@ -103,7 +103,7 @@
 		{ "id": 49, "defnames": [ "C11SPA1.DEF" ] },
 		{ "id": 50, "defnames": [ "C12SPE0.DEF" ] },
 		{ "id": 51, "defnames": [ "C12SPF0.DEF" ] },
-		{ "id": 52, "defnames": [ "C12SPE0.DEF" ] },
+		{ "id": 52, "defnames": [ "SP06_.DEF" ] },
 		{ "id": 53, "defnames": [ "C13SPF.DEF", "C13SPF0.DEF" ] },
 		{ "id": 54, "defnames": [ "C16SPE.DEF", "C16SPE0.DEF" ] },
 		{ "id": 55, "defnames": [ "C17SPE0.DEF" ] },

+ 0 - 1
config/creatures.json

@@ -1341,7 +1341,6 @@
 				"faction": 8,
 				"ability_add": [ [ "CASTS", 1, 0, 0 ],	//Phoenix rebirths once
 							   	 [ "REBIRTH", 20, 0, 0 ] ],	//20% of stack is resurrected
-				"upgrade": 15,
 				"defname": "CPHX.DEF"
 			},
 

+ 6 - 6
lib/CArtHandler.h

@@ -249,16 +249,16 @@ struct DLL_EXPORT ArtSlotInfo
 class DLL_EXPORT IArtifactSetBase 
 { ///artifacts container
 public:
-	virtual void setNewArtSlot(ui16 slot, CArtifactInstance *art, bool locked); //redundant inheritance
-	virtual const CArtifactInstance* getArt(ui16 pos, bool excludeLocked = true) const; //redundant inheritance
+	virtual void setNewArtSlot(ui16 slot, CArtifactInstance *art, bool locked);
+	virtual const CArtifactInstance* getArt(ui16 pos, bool excludeLocked = true) const;
 	virtual CArtifactInstance* getArt(ui16 pos, bool excludeLocked = true); //NULL - no artifact
-	virtual bool hasArt(ui32 aid, bool onlyWorn = false) const; //redundant inheritance
-	virtual bool isPositionFree(ui16 pos, bool onlyLockCheck = false) const; //redundant inheritance
+	virtual bool hasArt(ui32 aid, bool onlyWorn = false) const;
+	virtual bool isPositionFree(ui16 pos, bool onlyLockCheck = false) const;
 
 	virtual ArtSlotInfo &retreiveNewArtSlot(ui16 slot)=0;
 	virtual void eraseArtSlot(ui16 slot)=0;
 
-		virtual const ArtSlotInfo *getSlot(ui16 pos) const=0;
+	virtual const ArtSlotInfo *getSlot(ui16 pos) const=0;
 	virtual si32 getArtPos(int aid, bool onlyWorn = true) const=0; //looks for equipped artifact with given ID and returns its slot ID or -1 if none(if more than one such artifact lower ID is returned)
 	virtual si32 getArtPos(const CArtifactInstance *art) const=0;
 	virtual const CArtifactInstance *getArtByInstanceId(int artInstId) const=0;
@@ -275,7 +275,7 @@ public:
 	void eraseArtSlot(ui16 slot);
 
 	const ArtSlotInfo *getSlot(ui16 pos) const;
-	si32 getArtPos(int aid, bool onlyWorn = true) const; //looks for equipped artifact with given ID and returns its slot ID or -1 if none(if more than one such artifact lower ID is returned)
+	si32 getArtPos(int aid, bool onlyWorn = true) const;
 	si32 getArtPos(const CArtifactInstance *art) const;
 	const CArtifactInstance *getArtByInstanceId(int artInstId) const;
 	si32 getArtTypeId(ui16 pos) const;

+ 2 - 2
server/CGameHandler.cpp

@@ -581,7 +581,6 @@ void CGameHandler::applyBattleEffects(BattleAttack &bat, const CStack *att, cons
 	bsa.stackAttacked = def->ID;
 	bsa.damageAmount = gs->curB->calculateDmg(att, def, gs->curB->battleGetOwner(att), gs->curB->battleGetOwner(def), bat.shot(), distance, bat.lucky(), bat.deathBlow(), bat.ballistaDoubleDmg());
 	def->prepareAttacked(bsa); //calculate casualties
-	bat.bsa.push_back(bsa); //add this stack to the list of victims
 
 	//life drain handling
 	if (att->hasBonusOfType(Bonus::LIFE_DRAIN) && def->isLiving())
@@ -601,7 +600,8 @@ void CGameHandler::applyBattleEffects(BattleAttack &bat, const CStack *att, cons
 		{
 			bsa.healedStacks.push_back(shi);
 		}
-	} 
+	}
+	bat.bsa.push_back(bsa); //add this stack to the list of victims after drain life has been calculated
 
 	//fire shield handling
 	if (!bat.shot() && def->hasBonusOfType(Bonus::FIRE_SHIELD) && !att->hasBonusOfType (Bonus::FIRE_IMMUNITY) && !bsa.killed() )