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

Rename toJson to toString/toCompactString for consistency

This commit is contained in:
Ivan Savenko
2024-02-12 01:22:16 +02:00
parent a2b8eaf7fb
commit 54796c7c56
22 changed files with 45 additions and 36 deletions

View File

@@ -45,7 +45,7 @@ void GlobalLobbyProcessor::onDisconnected(const std::shared_ptr<INetworkConnecti
JsonNode message;
message["type"].String() = "leaveGameRoom";
message["accountID"].String() = proxy.first;
controlConnection->sendPacket(message.toBytes(true));
controlConnection->sendPacket(message.toBytes());
break;
}
}
@@ -122,7 +122,7 @@ void GlobalLobbyProcessor::onConnectionEstablished(const std::shared_ptr<INetwor
toSend["gameRoomID"].String() = owner.uuid;
toSend["accountID"] = settings["lobby"]["accountID"];
toSend["accountCookie"] = settings["lobby"]["accountCookie"];
connection->sendPacket(toSend.toBytes(true));
connection->sendPacket(toSend.toBytes());
}
else
{
@@ -137,7 +137,7 @@ void GlobalLobbyProcessor::onConnectionEstablished(const std::shared_ptr<INetwor
toSend["gameRoomID"].String() = owner.uuid;
toSend["guestAccountID"].String() = guestAccountID;
toSend["accountCookie"] = settings["lobby"]["accountCookie"];
connection->sendPacket(toSend.toBytes(true));
connection->sendPacket(toSend.toBytes());
proxyConnections[guestAccountID] = connection;
owner.onNewConnection(connection);