private static void QueueServerSessionResponse(Queue <byte[]> queueList, SoeBaseObject sessionRecived) { using (var stream = new MemoryStream()) { using (var output = new SwgOutputStream(stream)) { output.SetOpCode((short)SoeOpCodes.SoeSessionResponse); // OPCode output.WriteInt(sessionRecived.ClientId); // Client Id output.ReverseBytes(sessionRecived.CsrSeed); // CsrSeed output.WriteByte(2); // CsrLength output.WriteByte(1); // Use compression output.WriteByte(4); // SeedSize output.WriteInt(Constants.Constants.LoginServer.MaxPacketSize); // Server UDP Size stream.Position = 0; var byterray = stream.ToArray(); queueList.Enqueue(byterray); } } }
private void GenerateAck(short sequence) { using (var stream = new MemoryStream()) { using (var output = new SwgOutputStream(stream)) { output.WriteShort((short)SoeOpCodes.SoeChlDataA); output.WriteByte(0); output.WriteShort(0); output.GenerateCrCSeed(stream.ToArray(), 0); _systemMessage.SendMessage(stream.ToArray()); } } }