ProxyCaster.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. namespace spells
  13. {
  14. class DLL_LINKAGE ProxyCaster : public Caster
  15. {
  16. public:
  17. ProxyCaster(const Caster * actualCaster_);
  18. virtual ~ProxyCaster();
  19. int32_t getCasterUnitId() const override;
  20. int32_t getSpellSchoolLevel(const Spell * spell, int32_t * outSelectedSchool = nullptr) const override;
  21. int32_t getEffectLevel(const Spell * spell) const override;
  22. int64_t getSpellBonus(const Spell * spell, int64_t base, const battle::Unit * affectedStack) const override;
  23. int64_t getSpecificSpellBonus(const Spell * spell, int64_t base) const override;
  24. int32_t getEffectPower(const Spell * spell) const override;
  25. int32_t getEnchantPower(const Spell * spell) const override;
  26. int64_t getEffectValue(const Spell * spell) const override;
  27. PlayerColor getCasterOwner() const override;
  28. void getCasterName(MetaString & text) const override;
  29. void getCastDescription(const Spell * spell, const std::vector<const battle::Unit *> & attacked, MetaString & text) const override;
  30. void spendMana(ServerCallback * server, const int32_t spellCost) const override;
  31. private:
  32. const Caster * actualCaster;
  33. };
  34. } // namespace spells