mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +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:
@@ -21,13 +21,13 @@ class DLL_LINKAGE FlaggableMapObject : public CGObjectInstance, public IOwnableO
|
||||
{
|
||||
std::shared_ptr<FlaggableInstanceConstructor> getFlaggableHandler() const;
|
||||
|
||||
void giveBonusTo(const PlayerColor & player, bool onInit = false) const;
|
||||
void takeBonusFrom(const PlayerColor & player) const;
|
||||
void giveBonusTo(IGameEventCallback & gameEvents, const PlayerColor & player, bool onInit = false) const;
|
||||
void takeBonusFrom(IGameEventCallback & gameEvents, const PlayerColor & player) const;
|
||||
|
||||
public:
|
||||
using CGObjectInstance::CGObjectInstance;
|
||||
|
||||
void onHeroVisit(const CGHeroInstance * h) const override;
|
||||
void onHeroVisit(IGameEventCallback & gameEvents, const CGHeroInstance * h) const override;
|
||||
void markAsDeleted() const;
|
||||
void initObj(vstd::RNG & rand) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user