RecruitHero.h 889 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * RecruitHero.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. struct HeroPtr;
  13. class VCAI;
  14. class FuzzyHelper;
  15. namespace Goals
  16. {
  17. class DLL_EXPORT RecruitHero : public ElementarGoal<RecruitHero>
  18. {
  19. public:
  20. RecruitHero(const CGTownInstance * townWithTavern, const CGHeroInstance * heroToBuy)
  21. : RecruitHero(townWithTavern)
  22. {
  23. objid = heroToBuy->id.getNum();
  24. }
  25. RecruitHero(const CGTownInstance * townWithTavern)
  26. : ElementarGoal(Goals::RECRUIT_HERO)
  27. {
  28. priority = 1;
  29. town = townWithTavern;
  30. }
  31. virtual bool operator==(const RecruitHero & other) const override
  32. {
  33. return true;
  34. }
  35. virtual std::string toString() const override;
  36. void accept(VCAI * ai) override;
  37. };
  38. }