DismissHero.h 703 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * DismissHero.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 "CGoal.h"
  12. namespace NKAI
  13. {
  14. namespace Goals
  15. {
  16. class DLL_EXPORT DismissHero : public ElementarGoal<DismissHero>
  17. {
  18. private:
  19. std::string heroName;
  20. public:
  21. DismissHero(const CGHeroInstance * hero)
  22. : ElementarGoal(Goals::DISMISS_HERO)
  23. {
  24. sethero(hero);
  25. heroName = hero->getNameTranslated();
  26. }
  27. void accept(AIGateway * ai) override;
  28. std::string toString() const override;
  29. bool operator==(const DismissHero & other) const override;
  30. };
  31. }
  32. }