1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Split CConnection into GameConnection and IGameConnection classes

This commit is contained in:
Ivan Savenko
2025-06-26 17:15:36 +03:00
parent 790c5cb455
commit 58de180083
21 changed files with 133 additions and 93 deletions

View File

@@ -32,7 +32,7 @@
#include "../../lib/mapping/CMap.h"
#include "../../lib/networkPacks/PacksForClient.h"
#include "../../lib/networkPacks/StackLocation.h"
#include "../../lib/serializer/Connection.h"
#include "../../lib/serializer/IGameConnection.h"
#include "../../lib/spells/CSpellHandler.h"
#include "../lib/VCMIDirs.h"
@@ -964,14 +964,14 @@ void PlayerMessageProcessor::executeCheatCode(const std::string & cheatName, Pla
callbacks.at(cheatName)();
}
void PlayerMessageProcessor::sendSystemMessage(std::shared_ptr<CConnection> connection, const MetaString & message)
void PlayerMessageProcessor::sendSystemMessage(std::shared_ptr<IGameConnection> connection, const MetaString & message)
{
SystemMessage sm;
sm.text = message;
connection->sendPack(sm);
}
void PlayerMessageProcessor::sendSystemMessage(std::shared_ptr<CConnection> connection, const std::string & message)
void PlayerMessageProcessor::sendSystemMessage(std::shared_ptr<IGameConnection> connection, const std::string & message)
{
MetaString str;
str.appendRawString(message);