瀏覽代碼

Renamed openGameRoom to more clear activateGameRoom

Ivan Savenko 1 年之前
父節點
當前提交
5b1549200a
共有 3 個文件被更改,包括 6 次插入6 次删除
  1. 2 2
      client/globalLobby/GlobalLobbyClient.cpp
  2. 3 3
      lobby/LobbyServer.cpp
  3. 1 1
      lobby/LobbyServer.h

+ 2 - 2
client/globalLobby/GlobalLobbyClient.cpp

@@ -279,7 +279,7 @@ void GlobalLobbyClient::sendMessage(const JsonNode & data)
 void GlobalLobbyClient::sendOpenPublicRoom()
 {
 	JsonNode toSend;
-	toSend["type"].String() = "openGameRoom";
+	toSend["type"].String() = "activateGameRoom";
 	toSend["hostAccountID"] = settings["lobby"]["accountID"];
 	toSend["roomType"].String() = "public";
 	sendMessage(toSend);
@@ -288,7 +288,7 @@ void GlobalLobbyClient::sendOpenPublicRoom()
 void GlobalLobbyClient::sendOpenPrivateRoom()
 {
 	JsonNode toSend;
-	toSend["type"].String() = "openGameRoom";
+	toSend["type"].String() = "activateGameRoom";
 	toSend["hostAccountID"] = settings["lobby"]["accountID"];
 	toSend["roomType"].String() = "private";
 	sendMessage(toSend);

+ 3 - 3
lobby/LobbyServer.cpp

@@ -258,8 +258,8 @@ void LobbyServer::onPacketReceived(const NetworkConnectionPtr & connection, cons
 		if(messageType == "sendChatMessage")
 			return receiveSendChatMessage(connection, json);
 
-		if(messageType == "openGameRoom")
-			return receiveOpenGameRoom(connection, json);
+		if(messageType == "activateGameRoom")
+			return receiveActivateGameRoom(connection, json);
 
 		if(messageType == "joinGameRoom")
 			return receiveJoinGameRoom(connection, json);
@@ -464,7 +464,7 @@ void LobbyServer::receiveServerProxyLogin(const NetworkConnectionPtr & connectio
 	//connection->close();
 }
 
-void LobbyServer::receiveOpenGameRoom(const NetworkConnectionPtr & connection, const JsonNode & json)
+void LobbyServer::receiveActivateGameRoom(const NetworkConnectionPtr & connection, const JsonNode & json)
 {
 	std::string hostAccountID = json["hostAccountID"].String();
 	std::string accountID = activeAccounts[connection];

+ 1 - 1
lobby/LobbyServer.h

@@ -77,7 +77,7 @@ class LobbyServer final : public INetworkServerListener
 	void receiveServerProxyLogin(const NetworkConnectionPtr & connection, const JsonNode & json);
 
 	void receiveSendChatMessage(const NetworkConnectionPtr & connection, const JsonNode & json);
-	void receiveOpenGameRoom(const NetworkConnectionPtr & connection, const JsonNode & json);
+	void receiveActivateGameRoom(const NetworkConnectionPtr & connection, const JsonNode & json);
 	void receiveJoinGameRoom(const NetworkConnectionPtr & connection, const JsonNode & json);
 	void receiveLeaveGameRoom(const NetworkConnectionPtr & connection, const JsonNode & json);
 	void receiveSendInvite(const NetworkConnectionPtr & connection, const JsonNode & json);