public int HandlePacket(ClientBase client, GamePacket packet) { GatewayClient gc = client as GatewayClient; if (gc.Account.IsNullOrEmpty()) { return(0); } RegisteServerPacket pkg = new RegisteServerPacket(); pkg.ClientID = gc.ClientID; pkg.Account = gc.Account; pkg.NickName = packet.ReadUTF(); GatewayGlobal.Send2Center(pkg, client); return(0); }
public int HandlePacket(ClientBase client, GamePacket packet) { GatewayClient gc = client as GatewayClient; gc.LogicServer = GatewayGlobal.GetFreeLogicServer(gc); if (gc.LogicServer == null) { return(0); } string account = packet.ReadUTF(); gc.Account = account; ValidateLoginPacket pkg = new ValidateLoginPacket(); pkg.ClientID = gc.ClientID; pkg.Account = account; GatewayGlobal.Send2Center(pkg, client); return(0); }
public int HandlePacket(ServerConnector connector, GamePacket packet) { GatewayGlobal.Send2Center(packet, null); return(0); }