diff --git a/cmake_modules/VCMI_lib.cmake b/cmake_modules/VCMI_lib.cmake index bb0654071..37309fc08 100644 --- a/cmake_modules/VCMI_lib.cmake +++ b/cmake_modules/VCMI_lib.cmake @@ -134,9 +134,9 @@ macro(add_main_lib TARGET_NAME LIBRARY_TYPE) ${MAIN_LIB_DIR}/spells/BattleSpellMechanics.cpp ${MAIN_LIB_DIR}/spells/BonusCaster.cpp ${MAIN_LIB_DIR}/spells/CSpellHandler.cpp + ${MAIN_LIB_DIR}/spells/ExternalCaster.cpp ${MAIN_LIB_DIR}/spells/ISpellMechanics.cpp ${MAIN_LIB_DIR}/spells/ObstacleCasterProxy.cpp - ${MAIN_LIB_DIR}/spells/OuterCaster.cpp ${MAIN_LIB_DIR}/spells/Problem.cpp ${MAIN_LIB_DIR}/spells/ProxyCaster.cpp ${MAIN_LIB_DIR}/spells/TargetCondition.cpp @@ -398,8 +398,9 @@ macro(add_main_lib TARGET_NAME LIBRARY_TYPE) ${MAIN_LIB_DIR}/spells/BattleSpellMechanics.h ${MAIN_LIB_DIR}/spells/BonusCaster.h ${MAIN_LIB_DIR}/spells/CSpellHandler.h + ${MAIN_LIB_DIR}/spells/ExternalCaster.h ${MAIN_LIB_DIR}/spells/ISpellMechanics.h - ${MAIN_LIB_DIR}/spells/OuterCaster.h + ${MAIN_LIB_DIR}/spells/ObstacleCasterProxy.h ${MAIN_LIB_DIR}/spells/Problem.h ${MAIN_LIB_DIR}/spells/ProxyCaster.h ${MAIN_LIB_DIR}/spells/TargetCondition.h diff --git a/lib/mapObjects/CRewardableObject.h b/lib/mapObjects/CRewardableObject.h index 980557235..74b7a413e 100644 --- a/lib/mapObjects/CRewardableObject.h +++ b/lib/mapObjects/CRewardableObject.h @@ -14,7 +14,7 @@ #include "../NetPacksBase.h" #include "../ResourceSet.h" -#include "../spells/OuterCaster.h" +#include "../spells/ExternalCaster.h" VCMI_LIB_NAMESPACE_BEGIN @@ -326,7 +326,7 @@ protected: bool onceVisitableObjectCleared; /// caster to cast adveture spells - mutable spells::OuterCaster caster; + mutable spells::ExternalCaster caster; public: EVisitMode getVisitMode() const; diff --git a/lib/spells/OuterCaster.cpp b/lib/spells/ExternalCaster.cpp similarity index 50% rename from lib/spells/OuterCaster.cpp rename to lib/spells/ExternalCaster.cpp index 99c70e701..a48735bb9 100644 --- a/lib/spells/OuterCaster.cpp +++ b/lib/spells/ExternalCaster.cpp @@ -1,5 +1,5 @@ /* - * OuterCaster.cpp, part of VCMI engine + * ExternalCaster.cpp, part of VCMI engine * * Authors: listed in file AUTHORS in main folder * @@ -10,39 +10,39 @@ #include "StdInc.h" -#include "OuterCaster.h" +#include "ExternalCaster.h" VCMI_LIB_NAMESPACE_BEGIN namespace spells { -OuterCaster::OuterCaster() +ExternalCaster::ExternalCaster() : ProxyCaster(nullptr), schoolLevel(0) { } -OuterCaster::OuterCaster(const Caster * actualCaster_, int schoolLevel_) +ExternalCaster::ExternalCaster(const Caster * actualCaster_, int schoolLevel_) : ProxyCaster(actualCaster_), schoolLevel(schoolLevel_) { } -void OuterCaster::setActualCaster(const Caster * actualCaster_) +void ExternalCaster::setActualCaster(const Caster * actualCaster_) { actualCaster = actualCaster_; } -void OuterCaster::setSpellSchoolLevel(int level) +void ExternalCaster::setSpellSchoolLevel(int level) { schoolLevel = level; } -void OuterCaster::spendMana(ServerCallback * server, const int32_t spellCost) const +void ExternalCaster::spendMana(ServerCallback * server, const int32_t spellCost) const { //do nothing } -int32_t OuterCaster::getSpellSchoolLevel(const Spell * spell, int32_t * outSelectedSchool) const +int32_t ExternalCaster::getSpellSchoolLevel(const Spell * spell, int32_t * outSelectedSchool) const { return schoolLevel; } diff --git a/lib/spells/OuterCaster.h b/lib/spells/ExternalCaster.h similarity index 77% rename from lib/spells/OuterCaster.h rename to lib/spells/ExternalCaster.h index bb70777c4..22e91fcb1 100644 --- a/lib/spells/OuterCaster.h +++ b/lib/spells/ExternalCaster.h @@ -1,5 +1,5 @@ /* - * OuterCaster.h, part of VCMI engine + * ExternalCaster.h, part of VCMI engine * * Authors: listed in file AUTHORS in main folder * @@ -17,12 +17,12 @@ VCMI_LIB_NAMESPACE_BEGIN namespace spells { -class DLL_LINKAGE OuterCaster : public ProxyCaster +class DLL_LINKAGE ExternalCaster : public ProxyCaster { int schoolLevel; public: - OuterCaster(); - OuterCaster(const Caster * actualCaster_, int schoolLevel_); + ExternalCaster(); + ExternalCaster(const Caster * actualCaster_, int schoolLevel_); void setActualCaster(const Caster * actualCaster); void setSpellSchoolLevel(int level);