FindObj.h 883 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * FindObj.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 FindObj : public CGoal<FindObj>
  18. {
  19. public:
  20. FindObj() {} // empty constructor not allowed
  21. FindObj(int ID)
  22. : CGoal(Goals::FIND_OBJ)
  23. {
  24. objid = ID;
  25. resID = -1; //subid unspecified
  26. priority = 1;
  27. }
  28. FindObj(int ID, int subID)
  29. : CGoal(Goals::FIND_OBJ)
  30. {
  31. objid = ID;
  32. resID = subID;
  33. priority = 1;
  34. }
  35. TGoalVec getAllPossibleSubgoals() override
  36. {
  37. return TGoalVec();
  38. }
  39. TSubgoal whatToDoToAchieve() override;
  40. bool fulfillsMe(TSubgoal goal) override;
  41. bool operator==(const FindObj & other) const override;
  42. };
  43. }