2023-04-10 03:39:25 +02:00
|
|
|
/*
|
2023-04-10 18:56:50 +02:00
|
|
|
* ExternalCaster.cpp, part of VCMI engine
|
2023-04-10 03:39:25 +02:00
|
|
|
*
|
|
|
|
* Authors: listed in file AUTHORS in main folder
|
|
|
|
*
|
|
|
|
* License: GNU General Public License v2.0 or later
|
|
|
|
* Full text of license available in license.txt file, in main folder
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2023-04-10 10:17:43 +02:00
|
|
|
#include "StdInc.h"
|
|
|
|
|
2023-04-10 18:56:50 +02:00
|
|
|
#include "ExternalCaster.h"
|
2023-04-10 03:39:25 +02:00
|
|
|
|
|
|
|
VCMI_LIB_NAMESPACE_BEGIN
|
|
|
|
|
|
|
|
namespace spells
|
|
|
|
{
|
|
|
|
|
2023-04-10 18:56:50 +02:00
|
|
|
ExternalCaster::ExternalCaster()
|
2023-04-10 15:08:24 +02:00
|
|
|
: ProxyCaster(nullptr), schoolLevel(0)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2023-04-10 18:56:50 +02:00
|
|
|
ExternalCaster::ExternalCaster(const Caster * actualCaster_, int schoolLevel_)
|
2023-04-10 03:39:25 +02:00
|
|
|
: ProxyCaster(actualCaster_), schoolLevel(schoolLevel_)
|
|
|
|
{
|
2023-04-10 15:08:24 +02:00
|
|
|
}
|
|
|
|
|
2023-04-10 18:56:50 +02:00
|
|
|
void ExternalCaster::setActualCaster(const Caster * actualCaster_)
|
2023-04-10 15:08:24 +02:00
|
|
|
{
|
|
|
|
actualCaster = actualCaster_;
|
|
|
|
}
|
2023-04-10 03:39:25 +02:00
|
|
|
|
2023-04-10 18:56:50 +02:00
|
|
|
void ExternalCaster::setSpellSchoolLevel(int level)
|
2023-04-10 15:08:24 +02:00
|
|
|
{
|
|
|
|
schoolLevel = level;
|
2023-04-10 03:39:25 +02:00
|
|
|
}
|
|
|
|
|
2023-04-10 18:56:50 +02:00
|
|
|
void ExternalCaster::spendMana(ServerCallback * server, const int32_t spellCost) const
|
2023-04-10 03:39:25 +02:00
|
|
|
{
|
|
|
|
//do nothing
|
|
|
|
}
|
|
|
|
|
2023-11-05 18:58:07 +02:00
|
|
|
int32_t ExternalCaster::getSpellSchoolLevel(const Spell * spell, SpellSchool * outSelectedSchool) const
|
2023-04-10 03:39:25 +02:00
|
|
|
{
|
|
|
|
return schoolLevel;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
VCMI_LIB_NAMESPACE_END
|