IGameCallback.h 936 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * IGameCallback.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 "CPrivilegedInfoCallback.h"
  12. #include "IGameEventCallback.h"
  13. VCMI_LIB_NAMESPACE_BEGIN
  14. #if SCRIPTING_ENABLED
  15. namespace scripting
  16. {
  17. class Pool;
  18. }
  19. #endif
  20. /// Interface class for handling general game logic and actions
  21. class DLL_LINKAGE IGameCallback : public CPrivilegedInfoCallback, public IGameEventCallback
  22. {
  23. public:
  24. virtual ~IGameCallback(){};
  25. #if SCRIPTING_ENABLED
  26. virtual scripting::Pool * getGlobalContextPool() const = 0;
  27. #endif
  28. //get info
  29. virtual bool isVisitCoveredByAnotherQuery(const CGObjectInstance *obj, const CGHeroInstance *hero) { return false; }
  30. friend struct CPack;
  31. friend struct CPackForClient;
  32. friend struct CPackForServer;
  33. };
  34. VCMI_LIB_NAMESPACE_END