public static void PlayServer(NetState state, PacketReader pvSrc) { int index = pvSrc.ReadInt16(); ServerInfo[] info = state.ServerInfo; IAccount a = state.Account; if (info == null || a == null || index < 0 || index >= info.Length) { state.Dispose(); } else { ServerInfo si = info[index]; PlayServerAck.m_AuthID = GenerateAuthID(); /* send AuthID to game server? */ GameServerConfig config = Core.Config.GameServerListConfig[si.Name]; if (config != null && config.SendAuthID) { NetState ns2 = NetState.GameServerClient(config); if (ns2 != null) { ns2.Send(new AddAuthID(PlayServerAck.m_AuthID, state.Account.ToString())); } } state.SentFirstPacket = false; state.Send(new PlayServerAck(si)); Console.WriteLine("Client {0} playing server '{1}'", state, si.Name); } }