protected internal override void Read() { serverId = ReadD(); string serverName = ReadS(); string serverAddr = ReadS(); bool useAkey = (ReadC() == 1) ? true : false; ServerStruct server = new ServerStruct(serverId, serverName, serverAddr, useAkey); int channel_count = ReadD(); for(int i = 0; i < channel_count; i++) { int id = ReadH(); string name = ReadS(); int port = ReadH(); int type = ReadC(); int max = ReadD(); int curr = ReadD(); ChannelStruct channel = new ChannelStruct(id, name, port, type, max, curr); server.Channels.Add(channel.Id, channel); } LoginServer.ServerList.Add(server.Id, server); }
protected internal override void Read() { serverId = ReadD(); string serverName = ReadS(); string serverAddr = ReadS(); bool useAkey = (ReadC() == 1) ? true : false; ServerStruct server = new ServerStruct(serverId, serverName, serverAddr, useAkey); int channel_count = ReadD(); for (int i = 0; i < channel_count; i++) { int id = ReadH(); string name = ReadS(); int port = ReadH(); int type = ReadC(); int max = ReadD(); int curr = ReadD(); ChannelStruct channel = new ChannelStruct(id, name, port, type, max, curr); server.Channels.Add(channel.Id, channel); } LoginServer.ServerList.Add(server.Id, server); }
public ResponseSelectServer(int sid, int cid) { server = LoginServer.ServerList[sid]; channel = server.Channels[cid]; }