From be67faad90913b2b236646bef621e937c7935de3 Mon Sep 17 00:00:00 2001 From: AlexVinS Date: Tue, 1 Mar 2016 12:44:54 +0300 Subject: [PATCH] Drafts --- lib/CBattleCallback.cpp | 2 -- lib/spells/BattleSpellMechanics.cpp | 6 ++++++ lib/spells/BattleSpellMechanics.h | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/CBattleCallback.cpp b/lib/CBattleCallback.cpp index e3016a09d..2e3b7c904 100644 --- a/lib/CBattleCallback.cpp +++ b/lib/CBattleCallback.cpp @@ -1732,8 +1732,6 @@ ESpellCastProblem::ESpellCastProblem CBattleInfoCallback::battleCanCastThisSpell } } break; - case CSpell::OBSTACLE: - break; } return ESpellCastProblem::OK; diff --git a/lib/spells/BattleSpellMechanics.cpp b/lib/spells/BattleSpellMechanics.cpp index 9507850b8..e90822e35 100644 --- a/lib/spells/BattleSpellMechanics.cpp +++ b/lib/spells/BattleSpellMechanics.cpp @@ -568,6 +568,12 @@ bool RemoveObstacleMechanics::canRemove(const CObstacleInstance * obstacle, cons } ///RisingSpellMechanics +ESpellCastProblem::ESpellCastProblem RisingSpellMechanics::canBeCast(const SpellTargetingContext & ctx) const +{ + //todo: RisingSpellMechanics::canBeCast + return ESpellCastProblem::OK; +} + HealingSpellMechanics::EHealLevel RisingSpellMechanics::getHealLevel(int effectLevel) const { //this may be even distinct class diff --git a/lib/spells/BattleSpellMechanics.h b/lib/spells/BattleSpellMechanics.h index 16ff46014..1489d12e3 100644 --- a/lib/spells/BattleSpellMechanics.h +++ b/lib/spells/BattleSpellMechanics.h @@ -125,6 +125,7 @@ class DLL_LINKAGE RisingSpellMechanics : public HealingSpellMechanics { public: RisingSpellMechanics(CSpell * s): HealingSpellMechanics(s){}; + ESpellCastProblem::ESpellCastProblem canBeCast(const SpellTargetingContext & ctx) const override; EHealLevel getHealLevel(int effectLevel) const override; };