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:
@@ -39,7 +39,7 @@ public:
|
||||
std::optional<CGDwellingRandomizationInfo> randomizationInfo; //random dwelling options; not serialized
|
||||
TCreaturesSet creatures; //creatures[level] -> <vector of alternative ids (base creature and upgrades, creatures amount>
|
||||
|
||||
CGDwelling(IGameCallback *cb);
|
||||
CGDwelling(CPrivilegedInfoCallback *cb);
|
||||
~CGDwelling() override;
|
||||
|
||||
const IOwnableObject * asOwnable() const final;
|
||||
@@ -55,15 +55,15 @@ private:
|
||||
|
||||
void pickRandomObject(vstd::RNG & rand) override;
|
||||
void initObj(vstd::RNG & rand) override;
|
||||
void onHeroVisit(const CGHeroInstance * h) const override;
|
||||
void newTurn(vstd::RNG & rand) const override;
|
||||
void onHeroVisit(IGameEventCallback & gameEvents, const CGHeroInstance * h) const override;
|
||||
void newTurn(IGameEventCallback & gameEvents) const override;
|
||||
void setPropertyDer(ObjProperty what, ObjPropertyID identifier) override;
|
||||
void battleFinished(const CGHeroInstance *hero, const BattleResult &result) const override;
|
||||
void blockingDialogAnswered(const CGHeroInstance *hero, int32_t answer) const override;
|
||||
void battleFinished(IGameEventCallback & gameEvents, const CGHeroInstance *hero, const BattleResult &result) const override;
|
||||
void blockingDialogAnswered(IGameEventCallback & gameEvents, const CGHeroInstance *hero, int32_t answer) const override;
|
||||
std::vector<Component> getPopupComponents(PlayerColor player) const override;
|
||||
|
||||
void updateGuards() const;
|
||||
void heroAcceptsCreatures(const CGHeroInstance *h) const;
|
||||
void updateGuards(IGameEventCallback & gameEvents) const;
|
||||
void heroAcceptsCreatures(IGameEventCallback & gameEvents, const CGHeroInstance *h) const;
|
||||
|
||||
public:
|
||||
template <typename Handler> void serialize(Handler &h)
|
||||
|
||||
Reference in New Issue
Block a user