ProxyCaster.cpp 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /*
  2. * ProxyCaster.cpp, 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. #include "StdInc.h"
  11. #include "ProxyCaster.h"
  12. #include "../GameConstants.h"
  13. VCMI_LIB_NAMESPACE_BEGIN
  14. namespace spells
  15. {
  16. ProxyCaster::ProxyCaster(const Caster * actualCaster_)
  17. : actualCaster(actualCaster_)
  18. {
  19. }
  20. ProxyCaster::~ProxyCaster() = default;
  21. int32_t ProxyCaster::getCasterUnitId() const
  22. {
  23. return actualCaster->getCasterUnitId();
  24. }
  25. int32_t ProxyCaster::getSpellSchoolLevel(const Spell * spell, int32_t * outSelectedSchool) const
  26. {
  27. return actualCaster->getSpellSchoolLevel(spell, outSelectedSchool);
  28. }
  29. int32_t ProxyCaster::getEffectLevel(const Spell * spell) const
  30. {
  31. return actualCaster->getEffectLevel(spell);
  32. }
  33. int64_t ProxyCaster::getSpellBonus(const Spell * spell, int64_t base, const battle::Unit * affectedStack) const
  34. {
  35. return actualCaster->getSpellBonus(spell, base, affectedStack);
  36. }
  37. int64_t ProxyCaster::getSpecificSpellBonus(const Spell * spell, int64_t base) const
  38. {
  39. return actualCaster->getSpecificSpellBonus(spell, base);
  40. }
  41. int32_t ProxyCaster::getEffectPower(const Spell * spell) const
  42. {
  43. return actualCaster->getEffectPower(spell);
  44. }
  45. int32_t ProxyCaster::getEnchantPower(const Spell * spell) const
  46. {
  47. return actualCaster->getEnchantPower(spell);
  48. }
  49. int64_t ProxyCaster::getEffectValue(const Spell * spell) const
  50. {
  51. return actualCaster->getEffectValue(spell);
  52. }
  53. PlayerColor ProxyCaster::getCasterOwner() const
  54. {
  55. return actualCaster->getCasterOwner();
  56. }
  57. void ProxyCaster::getCasterName(MetaString & text) const
  58. {
  59. return actualCaster->getCasterName(text);
  60. }
  61. void ProxyCaster::getCastDescription(const Spell * spell, const std::vector<const battle::Unit*> & attacked, MetaString & text) const
  62. {
  63. actualCaster->getCastDescription(spell, attacked, text);
  64. }
  65. void ProxyCaster::spendMana(ServerCallback * server, const int32_t spellCost) const
  66. {
  67. actualCaster->spendMana(server, spellCost);
  68. }
  69. }
  70. VCMI_LIB_NAMESPACE_END