private void HandleReplyRegisterRoomServer(Msg_LR_ReplyRegisterRoomServer msg, PBChannel channel, int handle, uint seq) { if (msg.IsOk == true) { m_IsContinueRegister = false; } }
internal void RegisterRoomServer(RoomServerInfo info) { if (!m_LobbyInfo.RoomServerInfos.ContainsKey(info.RoomServerName)) { m_LobbyInfo.RoomServerInfos.Add(info.RoomServerName, info); } else { RoomServerInfo info_ = m_LobbyInfo.RoomServerInfos[info.RoomServerName]; info_.RoomServerName = info.RoomServerName; info_.ServerIp = info.ServerIp; info_.ServerPort = info.ServerPort; info_.MaxRoomNum = info.MaxRoomNum; //To do more 关闭原RoomServer上的所有房间 foreach (var room in m_LobbyInfo.Rooms.Values) { if (room.RoomServerName == info.RoomServerName) { room.EndBattle(); } } } Msg_LR_ReplyRegisterRoomServer.Builder resultBuilder = Msg_LR_ReplyRegisterRoomServer.CreateBuilder(); resultBuilder.SetIsOk(true); LobbyServer.Instance.RoomSvrChannel.Send(info.RoomServerName, resultBuilder.Build()); LogSys.Log(LOG_TYPE.DEBUG, "RegisterRoomServer,name:{0},ip:{1},port:{2},max room num:{3}", info.RoomServerName, info.ServerIp, info.ServerPort, info.MaxRoomNum); }
internal void RegisterRoomServer(RoomServerInfo info) { if (!m_LobbyInfo.RoomServerInfos.ContainsKey(info.RoomServerName)) { m_LobbyInfo.RoomServerInfos.Add(info.RoomServerName, info); } else { RoomServerInfo info_ = m_LobbyInfo.RoomServerInfos[info.RoomServerName]; info_.RoomServerName = info.RoomServerName; info_.ServerIp = info.ServerIp; info_.ServerPort = info.ServerPort; info_.MaxRoomNum = info.MaxRoomNum; } Msg_LR_ReplyRegisterRoomServer resultBuilder = new Msg_LR_ReplyRegisterRoomServer(); resultBuilder.IsOk = true; LobbyServer.Instance.RoomSvrChannel.Send(info.RoomServerName, resultBuilder); LogSys.Log(LOG_TYPE.DEBUG, "RegisterRoomServer,name:{0},ip:{1},port:{2},max room num:{3}", info.RoomServerName, info.ServerIp, info.ServerPort, info.MaxRoomNum); }