CPlayerSpecificInfoCallback.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * CPlayerSpecificInfoCallback.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 "CGameInfoCallback.h"
  12. VCMI_LIB_NAMESPACE_BEGIN
  13. struct QuestInfo;
  14. class ResourceSet;
  15. class DLL_LINKAGE CPlayerSpecificInfoCallback : public CGameInfoCallback
  16. {
  17. public:
  18. // keep player-specific override in scope
  19. using CGameInfoCallback::howManyTowns;
  20. virtual int howManyTowns() const;
  21. virtual int howManyHeroes(bool includeGarrisoned = true) const;
  22. virtual int3 getGrailPos(double *outKnownRatio);
  23. virtual std::vector <const CGTownInstance *> getTownsInfo(bool onlyOur = true) const; //true -> only owned; false -> all visible
  24. virtual int getHeroSerial(const CGHeroInstance * hero, bool includeGarrisoned=true) const;
  25. virtual const CGTownInstance* getTownBySerial(int serialId) const; // serial id is [0, number of towns)
  26. virtual const CGHeroInstance* getHeroBySerial(int serialId, bool includeGarrisoned=true) const; // serial id is [0, number of heroes)
  27. virtual std::vector <const CGHeroInstance *> getHeroesInfo() const;
  28. virtual std::vector <const CGObjectInstance * > getMyObjects() const; //returns all objects flagged by belonging player
  29. virtual std::vector <QuestInfo> getMyQuests() const;
  30. virtual int getResourceAmount(GameResID type) const;
  31. virtual ResourceSet getResourceAmount() const;
  32. };
  33. VCMI_LIB_NAMESPACE_END