ProxyCaster.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * ProxyCaster.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. #include <vcmi/spells/Caster.h>
  12. VCMI_LIB_NAMESPACE_BEGIN
  13. namespace spells
  14. {
  15. class DLL_LINKAGE ProxyCaster : public Caster
  16. {
  17. public:
  18. ProxyCaster(const Caster * actualCaster_);
  19. virtual ~ProxyCaster();
  20. int32_t getCasterUnitId() const override;
  21. int32_t getSpellSchoolLevel(const Spell * spell, int32_t * outSelectedSchool = nullptr) const override;
  22. int32_t getEffectLevel(const Spell * spell) const override;
  23. int64_t getSpellBonus(const Spell * spell, int64_t base, const battle::Unit * affectedStack) const override;
  24. int64_t getSpecificSpellBonus(const Spell * spell, int64_t base) const override;
  25. int32_t getEffectPower(const Spell * spell) const override;
  26. int32_t getEnchantPower(const Spell * spell) const override;
  27. int64_t getEffectValue(const Spell * spell) const override;
  28. PlayerColor getCasterOwner() const override;
  29. void getCasterName(MetaString & text) const override;
  30. void getCastDescription(const Spell * spell, const std::vector<const battle::Unit *> & attacked, MetaString & text) const override;
  31. void spendMana(ServerCallback * server, const int32_t spellCost) const override;
  32. const CGHeroInstance * getHeroCaster() const override;
  33. protected:
  34. const Caster * actualCaster;
  35. };
  36. } // namespace spells
  37. VCMI_LIB_NAMESPACE_END