From e3a8a410631d62bc31384dd8d867bfc26d760a6f Mon Sep 17 00:00:00 2001 From: DjWarmonger Date: Mon, 5 Sep 2011 06:37:24 +0000 Subject: [PATCH] Fixed #804. Phoenix won't upgrade to Centaur Captain ;) Minor tweaks. --- client/CPlayerInterface.cpp | 2 +- config/battles_graphics.json | 2 +- config/creatures.json | 1 - lib/CArtHandler.h | 12 ++++++------ server/CGameHandler.cpp | 4 ++-- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/client/CPlayerInterface.cpp b/client/CPlayerInterface.cpp index e348e4c51..e04f505a2 100644 --- a/client/CPlayerInterface.cpp +++ b/client/CPlayerInterface.cpp @@ -600,7 +600,7 @@ void CPlayerInterface::battleStacksHealedRes(const std::vectordisplayEffect(52, attacker->position); + battleInt->displayEffect(52, attacker->position); //TODO: transparency if (attacker->count > 1) { textOff += 1; diff --git a/config/battles_graphics.json b/config/battles_graphics.json index 637f9e20b..8b857f82f 100644 --- a/config/battles_graphics.json +++ b/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" ] }, diff --git a/config/creatures.json b/config/creatures.json index dc142e676..6d425b212 100644 --- a/config/creatures.json +++ b/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" }, diff --git a/lib/CArtHandler.h b/lib/CArtHandler.h index da762f4fd..6a45010e6 100644 --- a/lib/CArtHandler.h +++ b/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; diff --git a/server/CGameHandler.cpp b/server/CGameHandler.cpp index b59b38bd1..087963899 100644 --- a/server/CGameHandler.cpp +++ b/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() )