1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

compile fix.

This commit is contained in:
alexvins
2013-02-11 20:34:31 +00:00
parent 4f75e47c47
commit ba3fbe05a7

View File

@@ -289,7 +289,7 @@ void CGameHandler::levelUpHero(const CGHeroInstance * hero)
{ {
if(hlu.skills.size() > 1) //apply and ask for secondary skill if(hlu.skills.size() > 1) //apply and ask for secondary skill
{ {
boost::function<void(ui32)> callback = boost::function<void(ui32)>(boost::bind boost::function<void(ui32)> callback = boost::function<void(ui32)>(boost::bind
(callWith<SecondarySkill::SecondarySkill>, hlu.skills, (callWith<SecondarySkill::SecondarySkill>, hlu.skills,
boost::function<void(SecondarySkill::SecondarySkill)>(boost::bind boost::function<void(SecondarySkill::SecondarySkill)>(boost::bind
(&CGameHandler::levelUpHero, this, hero, _1) ), _1)); (&CGameHandler::levelUpHero, this, hero, _1) ), _1));
@@ -3970,7 +3970,7 @@ void CGameHandler::handleSpellCasting( int spellID, int spellLvl, BattleHex dest
sc.tile = destination; sc.tile = destination;
sc.dmgToDisplay = 0; sc.dmgToDisplay = 0;
sc.castedByHero = (bool)caster; sc.castedByHero = (bool)caster;
sc.attackerType = (stack ? stack->type->idNumber : CreatureID::NONE); sc.attackerType = (stack ? stack->type->idNumber : CreatureID(CreatureID::NONE));
sc.manaGained = 0; sc.manaGained = 0;
sc.spellCost = 0; sc.spellCost = 0;
@@ -4035,9 +4035,9 @@ void CGameHandler::handleSpellCasting( int spellID, int spellLvl, BattleHex dest
vstd::amin(sc.dmgToDisplay, (*attackedCres.begin())->count); //stack is already reduced after attack vstd::amin(sc.dmgToDisplay, (*attackedCres.begin())->count); //stack is already reduced after attack
} }
StacksInjured si; StacksInjured si;
//applying effects //applying effects
if (spell->isOffensiveSpell()) if (spell->isOffensiveSpell())
{ {
int spellDamage = 0; int spellDamage = 0;
@@ -4082,7 +4082,7 @@ void CGameHandler::handleSpellCasting( int spellID, int spellLvl, BattleHex dest
if (spellID == SpellID::CHAIN_LIGHTNING) if (spellID == SpellID::CHAIN_LIGHTNING)
++chainLightningModifier; ++chainLightningModifier;
} }
} }
else if (spell->hasEffects()) else if (spell->hasEffects())
{ {
@@ -4164,7 +4164,7 @@ void CGameHandler::handleSpellCasting( int spellID, int spellLvl, BattleHex dest
if(!sse.stacks.empty()) if(!sse.stacks.empty())
sendAndApply(&sse); sendAndApply(&sse);
} }
else if (spell->isRisingSpell() || spell->id == SpellID::CURE) else if (spell->isRisingSpell() || spell->id == SpellID::CURE)
{ {
@@ -4195,7 +4195,7 @@ void CGameHandler::handleSpellCasting( int spellID, int spellLvl, BattleHex dest
hi.healedHP = gs->curB->calculateHealedHP(hpGained, spell, *it); //archangel hi.healedHP = gs->curB->calculateHealedHP(hpGained, spell, *it); //archangel
} }
else else
hi.healedHP = gs->curB->calculateHealedHP(spell, usedSpellPower, spellLvl, *it); //any typical spell (commander's cure or animate dead) hi.healedHP = gs->curB->calculateHealedHP(spell, usedSpellPower, spellLvl, *it); //any typical spell (commander's cure or animate dead)
} }
else else
hi.healedHP = gs->curB->calculateHealedHP(caster, spell, *it, gs->curB->battleGetStackByID(selectedStack)); //Casted by hero hi.healedHP = gs->curB->calculateHealedHP(caster, spell, *it, gs->curB->battleGetStackByID(selectedStack)); //Casted by hero
@@ -4209,7 +4209,7 @@ void CGameHandler::handleSpellCasting( int spellID, int spellLvl, BattleHex dest
BattleStacksRemoved bsr; BattleStacksRemoved bsr;
bsr.stackIDs.insert (selectedStack); //somehow it works for teleport? bsr.stackIDs.insert (selectedStack); //somehow it works for teleport?
sendAndApply(&bsr); sendAndApply(&bsr);
} }
} }
else else
switch (spellID) switch (spellID)