mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Map objects now use shared_ptr (game)
This commit is contained in:
@@ -87,18 +87,17 @@ public:
|
||||
events::EventBus * eventBus() const override;
|
||||
CVCMIServer & gameLobby() const;
|
||||
|
||||
bool isValidObject(const CGObjectInstance *obj) const;
|
||||
bool isBlockedByQueries(const CPackForServer *pack, PlayerColor player);
|
||||
bool isAllowedExchange(ObjectInstanceID id1, ObjectInstanceID id2);
|
||||
void giveSpells(const CGTownInstance *t, const CGHeroInstance *h);
|
||||
|
||||
// Helpers to create new object of specified type
|
||||
|
||||
CGObjectInstance * createNewObject(const int3 & visitablePosition, MapObjectID objectID, MapObjectSubID subID);
|
||||
std::shared_ptr<CGObjectInstance> createNewObject(const int3 & visitablePosition, MapObjectID objectID, MapObjectSubID subID);
|
||||
void createWanderingMonster(const int3 & visitablePosition, CreatureID creature);
|
||||
void createBoat(const int3 & visitablePosition, BoatId type, PlayerColor initiator) override;
|
||||
void createHole(const int3 & visitablePosition, PlayerColor initiator);
|
||||
void newObject(CGObjectInstance * object, PlayerColor initiator);
|
||||
void newObject(std::shared_ptr<CGObjectInstance> object, PlayerColor initiator);
|
||||
|
||||
explicit CGameHandler(CVCMIServer * lobby);
|
||||
~CGameHandler();
|
||||
|
||||
Reference in New Issue
Block a user