1
0
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:
Ivan Savenko
2025-05-13 15:24:45 +03:00
parent f7d08a7288
commit 716da918f8
109 changed files with 854 additions and 933 deletions

View File

@@ -420,7 +420,7 @@ std::optional<ui8> CampaignState::getBonusID(CampaignScenarioID which) const
return chosenCampaignBonuses.at(which);
}
std::unique_ptr<CMap> CampaignState::getMap(CampaignScenarioID scenarioId, IGameCallback * cb)
std::unique_ptr<CMap> CampaignState::getMap(CampaignScenarioID scenarioId, CPrivilegedInfoCallback * cb)
{
// FIXME: there is certainly better way to handle maps inside campaigns
if(scenarioId == CampaignScenarioID::NONE)