ProxyCaster.cpp 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. namespace spells
  14. {
  15. ProxyCaster::ProxyCaster(const Caster * actualCaster_)
  16. : actualCaster(actualCaster_)
  17. {
  18. }
  19. ProxyCaster::~ProxyCaster() = default;
  20. ui8 ProxyCaster::getSpellSchoolLevel(const Spell * spell, int * outSelectedSchool) const
  21. {
  22. return actualCaster->getSpellSchoolLevel(spell, outSelectedSchool);
  23. }
  24. int ProxyCaster::getEffectLevel(const Spell * spell) const
  25. {
  26. return actualCaster->getEffectLevel(spell);
  27. }
  28. int64_t ProxyCaster::getSpellBonus(const Spell * spell, int64_t base, const battle::Unit * affectedStack) const
  29. {
  30. return actualCaster->getSpellBonus(spell, base, affectedStack);
  31. }
  32. int64_t ProxyCaster::getSpecificSpellBonus(const Spell * spell, int64_t base) const
  33. {
  34. return actualCaster->getSpecificSpellBonus(spell, base);
  35. }
  36. int ProxyCaster::getEffectPower(const Spell * spell) const
  37. {
  38. return actualCaster->getEffectPower(spell);
  39. }
  40. int ProxyCaster::getEnchantPower(const Spell * spell) const
  41. {
  42. return actualCaster->getEnchantPower(spell);
  43. }
  44. int64_t ProxyCaster::getEffectValue(const Spell * spell) const
  45. {
  46. return actualCaster->getEffectValue(spell);
  47. }
  48. const PlayerColor ProxyCaster::getOwner() const
  49. {
  50. return actualCaster->getOwner();
  51. }
  52. void ProxyCaster::getCasterName(MetaString & text) const
  53. {
  54. return actualCaster->getCasterName(text);
  55. }
  56. void ProxyCaster::getCastDescription(const Spell * spell, const std::vector<const battle::Unit*> & attacked, MetaString & text) const
  57. {
  58. actualCaster->getCastDescription(spell, attacked, text);
  59. }
  60. void ProxyCaster::spendMana(const PacketSender * server, const int spellCost) const
  61. {
  62. actualCaster->spendMana(server, spellCost);
  63. }
  64. }