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

* refactoring

This commit is contained in:
mateuszb
2013-02-09 12:56:35 +00:00
parent a269b22741
commit d03dbf64a6
16 changed files with 65 additions and 61 deletions

View File

@ -299,7 +299,7 @@ int CBattleInfoEssentials::battleCastSpells(ui8 side) const
return getBattle()->castSpells[side];
}
ESpellCastProblem::ESpellCastProblem CBattleInfoCallback::battleCanCastSpell(int player, ECastingMode::ECastingMode mode) const
ESpellCastProblem::ESpellCastProblem CBattleInfoCallback::battleCanCastSpell(TPlayerColor player, ECastingMode::ECastingMode mode) const
{
RETURN_IF_NOT_BATTLE(ESpellCastProblem::INVALID);
const ui8 side = playerToSide(player);
@ -1535,7 +1535,7 @@ ESpellCastProblem::ESpellCastProblem CBattleInfoCallback::battleIsImmune(const C
return ESpellCastProblem::OK;
}
ESpellCastProblem::ESpellCastProblem CBattleInfoCallback::battleCanCastThisSpell( int player, const CSpell * spell, ECastingMode::ECastingMode mode ) const
ESpellCastProblem::ESpellCastProblem CBattleInfoCallback::battleCanCastThisSpell( TPlayerColor player, const CSpell * spell, ECastingMode::ECastingMode mode ) const
{
RETURN_IF_NOT_BATTLE(ESpellCastProblem::INVALID);
const ui8 side = playerToSide(player);
@ -1735,7 +1735,7 @@ ui32 CBattleInfoCallback::battleGetSpellCost(const CSpell * sp, const CGHeroInst
return ret - manaReduction + manaIncrease;
}
ESpellCastProblem::ESpellCastProblem CBattleInfoCallback::battleCanCastThisSpellHere( int player, const CSpell * spell, ECastingMode::ECastingMode mode, BattleHex dest ) const
ESpellCastProblem::ESpellCastProblem CBattleInfoCallback::battleCanCastThisSpellHere( TPlayerColor player, const CSpell * spell, ECastingMode::ECastingMode mode, BattleHex dest ) const
{
RETURN_IF_NOT_BATTLE(ESpellCastProblem::INVALID);
ESpellCastProblem::ESpellCastProblem moreGeneralProblem = battleCanCastThisSpell(player, spell, mode);