mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +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:
@@ -12,18 +12,18 @@
|
||||
|
||||
#include "../GameSettings.h"
|
||||
#include "../GameLibrary.h"
|
||||
#include "../callback/IGameCallback.h"
|
||||
#include "../callback/CPrivilegedInfoCallback.h"
|
||||
#include "../json/JsonNode.h"
|
||||
#include "../mapObjects/CArmedInstance.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
BattleLayout BattleLayout::createDefaultLayout(IGameCallback * cb, const CArmedInstance * attacker, const CArmedInstance * defender)
|
||||
BattleLayout BattleLayout::createDefaultLayout(CPrivilegedInfoCallback * cb, const CArmedInstance * attacker, const CArmedInstance * defender)
|
||||
{
|
||||
return createLayout(cb, "default", attacker, defender);
|
||||
}
|
||||
|
||||
BattleLayout BattleLayout::createLayout(IGameCallback * cb, const std::string & layoutName, const CArmedInstance * attacker, const CArmedInstance * defender)
|
||||
BattleLayout BattleLayout::createLayout(CPrivilegedInfoCallback * cb, const std::string & layoutName, const CArmedInstance * attacker, const CArmedInstance * defender)
|
||||
{
|
||||
const auto & loadHex = [](const JsonNode & node)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user