mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Completely remove IGameCallback class
- CClient now inherits directly from CPrivilegedInfoCallback, like IGameCallback did before. However CClient no longer needs dummy implementation of IGameEventCallback - CGObjectInstance hierarchy now uses CPrivilegedInfoCallback for callback. Actual events can only be emitted in calls that receive IGameEventCallback pointer, e.g. heroVisit - CGameHandler now inherits directly from both CPrivilegedInfoCallback and IGameEventCallback as it did before via IGameCallback
This commit is contained in:
@@ -18,7 +18,7 @@ VCMI_LIB_NAMESPACE_BEGIN
|
||||
class CMapEditManager;
|
||||
class CGObjectInstance;
|
||||
class ObjectTemplate;
|
||||
class IGameCallback;
|
||||
class CPrivilegedInfoCallback;
|
||||
class ObstacleSetFilter;
|
||||
|
||||
class DLL_LINKAGE ObstacleProxy
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
|
||||
virtual void placeObject(rmg::Object & object, std::set<std::shared_ptr<CGObjectInstance>> & instances);
|
||||
|
||||
virtual std::set<std::shared_ptr<CGObjectInstance>> createObstacles(vstd::RNG & rand, IGameCallback * cb);
|
||||
virtual std::set<std::shared_ptr<CGObjectInstance>> createObstacles(vstd::RNG & rand, CPrivilegedInfoCallback * cb);
|
||||
|
||||
virtual bool isInTheMap(const int3& tile) = 0;
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
virtual void postProcess(const rmg::Object& object) {};
|
||||
|
||||
protected:
|
||||
int getWeightedObjects(const int3& tile, vstd::RNG& rand, IGameCallback * cb, std::list<rmg::Object>& allObjects, std::vector<std::pair<rmg::Object*, int3>>& weightedObjects);
|
||||
int getWeightedObjects(const int3& tile, vstd::RNG& rand, CPrivilegedInfoCallback * cb, std::list<rmg::Object>& allObjects, std::vector<std::pair<rmg::Object*, int3>>& weightedObjects);
|
||||
void sortObstacles();
|
||||
|
||||
rmg::Area blockedArea;
|
||||
|
||||
Reference in New Issue
Block a user