1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00

Fix merge of SpellsRefactoring5

This commit is contained in:
AlexVinS
2015-03-10 23:14:58 +03:00
parent 719fcef34e
commit 1fd4a6daae
2 changed files with 7 additions and 7 deletions

View File

@ -9,7 +9,7 @@
#include "CModHandler.h" #include "CModHandler.h"
#include "VCMI_Lib.h" #include "VCMI_Lib.h"
#include "mapping/CMap.h" #include "mapping/CMap.h"
#include "spells/SpellMechanics.h" #include "spells/CSpellHandler.h"
#include "CCreatureHandler.h" #include "CCreatureHandler.h"
#include "CGameState.h" #include "CGameState.h"
#include "BattleState.h" #include "BattleState.h"
@ -185,11 +185,11 @@ DLL_LINKAGE void ChangeSpells::applyGs( CGameState *gs )
DLL_LINKAGE void SetMana::applyGs( CGameState *gs ) DLL_LINKAGE void SetMana::applyGs( CGameState *gs )
{ {
CGHeroInstance * hero = gs->getHero(hid); CGHeroInstance * hero = gs->getHero(hid);
assert(hero); assert(hero);
if(absolute) if(absolute)
hero->mana = val; hero->mana = val;
else else
hero->mana += val; hero->mana += val;
@ -1338,7 +1338,7 @@ DLL_LINKAGE void BattleSpellCast::applyGs( CGameState *gs )
assert(gs->curB); assert(gs->curB);
const CSpell * spell = SpellID(id).toSpell(); const CSpell * spell = SpellID(id).toSpell();
spell->applyBattle(gs->curB, this); spell->applyBattle(gs->curB, this);
} }
@ -1578,7 +1578,7 @@ DLL_LINKAGE void BattleStackAdded::applyGs(CGameState *gs)
gs->curB->localInitStack(addedStack); gs->curB->localInitStack(addedStack);
gs->curB->stacks.push_back(addedStack); //the stack is not "SUMMONED", it is permanent gs->curB->stacks.push_back(addedStack); //the stack is not "SUMMONED", it is permanent
newStackID = addedStack->ID; newStackID = addedStack->ID;
} }

View File

@ -27,7 +27,7 @@
#include "../BattleState.h" #include "../BattleState.h"
#include "../CBattleCallback.h" #include "../CBattleCallback.h"
#include "SpellMechanics.h" #include "ISpellMechanics.h"
namespace SpellConfig namespace SpellConfig
{ {