mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
get rid of CPlayerBattleCallback::battleCanCastThisSpell
This commit is contained in:
@@ -2111,18 +2111,6 @@ ReachabilityInfo::Parameters::Parameters(const CStack *Stack)
|
||||
knownAccessible = stack->getHexes();
|
||||
}
|
||||
|
||||
ESpellCastProblem::ESpellCastProblem CPlayerBattleCallback::battleCanCastThisSpell(const CSpell * spell) const
|
||||
{
|
||||
RETURN_IF_NOT_BATTLE(ESpellCastProblem::INVALID);
|
||||
ASSERT_IF_CALLED_WITH_PLAYER
|
||||
|
||||
const ISpellCaster * hero = battleGetMyHero();
|
||||
if(hero == nullptr)
|
||||
return ESpellCastProblem::INVALID;
|
||||
else
|
||||
return CBattleInfoCallback::battleCanCastThisSpell(hero, spell, ECastingMode::HERO_CASTING);
|
||||
}
|
||||
|
||||
bool CPlayerBattleCallback::battleCanFlee() const
|
||||
{
|
||||
RETURN_IF_NOT_BATTLE(false);
|
||||
|
||||
@@ -336,7 +336,6 @@ class DLL_LINKAGE CPlayerBattleCallback : public CBattleInfoCallback
|
||||
public:
|
||||
bool battleCanFlee() const; //returns true if caller can flee from the battle
|
||||
TStacks battleGetStacks(EStackOwnership whose = MINE_AND_ENEMY, bool onlyAlive = true) const; //returns stacks on battlefield
|
||||
ESpellCastProblem::ESpellCastProblem battleCanCastThisSpell(const CSpell * spell) const; //determines if given spell can be cast (and returns problem description)
|
||||
|
||||
int battleGetSurrenderCost() const; //returns cost of surrendering battle, -1 if surrendering is not possible
|
||||
|
||||
|
||||
Reference in New Issue
Block a user