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

Rename outer caster

This commit is contained in:
nordsoft
2023-04-10 20:56:50 +04:00
parent b9cabef179
commit 9371f013e9
4 changed files with 17 additions and 16 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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);