1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

GameHandler now uses GameConnectionID instead of connection pointers

This commit is contained in:
Ivan Savenko
2025-06-29 16:13:56 +03:00
parent 3576efc3f3
commit 52da332640
32 changed files with 238 additions and 363 deletions

View File

@@ -10,11 +10,11 @@
#pragma once
#include "../../lib/GameConstants.h"
#include "../../lib/serializer/GameConnectionID.h"
VCMI_LIB_NAMESPACE_BEGIN
class CGHeroInstance;
class CGTownInstance;
class IGameConnection;
class MetaString;
VCMI_LIB_NAMESPACE_END
@@ -80,8 +80,8 @@ public:
void playerMessage(PlayerColor player, const std::string & message, ObjectInstanceID currObj);
/// Send message to specific client with "System" as sender
void sendSystemMessage(std::shared_ptr<IGameConnection> connection, const MetaString & message);
void sendSystemMessage(std::shared_ptr<IGameConnection> connection, const std::string & message);
void sendSystemMessage(GameConnectionID connectionID, const MetaString & message);
void sendSystemMessage(GameConnectionID connectionID, const std::string & message);
/// Send message to all players with "System" as sender
void broadcastSystemMessage(MetaString message);