GetArtOfType.cpp 695 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * GetArtOfType.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 "GetArtOfType.h"
  12. #include "FindObj.h"
  13. #include "../VCAI.h"
  14. #include "../AIUtility.h"
  15. extern boost::thread_specific_ptr<CCallback> cb;
  16. extern boost::thread_specific_ptr<VCAI> ai;
  17. extern FuzzyHelper * fh;
  18. using namespace Goals;
  19. bool GetArtOfType::operator==(const GetArtOfType & other) const
  20. {
  21. return other.hero.h == hero.h && other.objid == objid;
  22. }
  23. TSubgoal GetArtOfType::whatToDoToAchieve()
  24. {
  25. return sptr(FindObj(Obj::ARTIFACT, aid));
  26. }