AIPathfinder.h 751 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * AIPathfinder.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 "AINodeStorage.h"
  12. #include "../AIUtility.h"
  13. class Nullkiller;
  14. class AIPathfinder
  15. {
  16. private:
  17. std::shared_ptr<AINodeStorage> storage;
  18. CPlayerSpecificInfoCallback * cb;
  19. Nullkiller * ai;
  20. public:
  21. AIPathfinder(CPlayerSpecificInfoCallback * cb, Nullkiller * ai);
  22. std::vector<AIPath> getPathInfo(const int3 & tile) const;
  23. bool isTileAccessible(const HeroPtr & hero, const int3 & tile) const;
  24. void updatePaths(std::map<const CGHeroInstance *, HeroRole> heroes, bool useHeroChain = false);
  25. void init();
  26. };