MapInfoCallback.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * MapInfoCallback.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 "IGameInfoCallback.h"
  12. VCMI_LIB_NAMESPACE_BEGIN
  13. class CMap;
  14. class DLL_LINKAGE MapInfoCallback : public IGameInfoCallback
  15. {
  16. protected:
  17. virtual const CMap * getMapConstPtr() const = 0;
  18. public:
  19. virtual ~MapInfoCallback();
  20. const CGObjectInstance * getObj(ObjectInstanceID objid, bool verbose = true) const override;
  21. const CGObjectInstance * getObjInstance(ObjectInstanceID oid) const override;
  22. const CArtifactInstance * getArtInstance(ArtifactInstanceID aid) const override;
  23. const CGHeroInstance * getHero(ObjectInstanceID objid) const override;
  24. const CGTownInstance * getTown(ObjectInstanceID objid) const override;
  25. PlayerColor getOwner(ObjectInstanceID heroID) const;
  26. bool isInTheMap(const int3 & pos) const override;
  27. bool isAllowed(SpellID id) const override;
  28. bool isAllowed(ArtifactID id) const override;
  29. bool isAllowed(SecondarySkill id) const override;
  30. int3 getMapSize() const override;
  31. void getAllowedSpells(std::vector<SpellID> & out, std::optional<ui16> level);
  32. const IGameSettings & getSettings() const override;
  33. const CMapHeader * getMapHeader() const override;
  34. };
  35. VCMI_LIB_NAMESPACE_END