public AuthPacket(AuthServerMessage message, AuthChannel channel = AuthChannel.None) { while (true) { IL_111: uint arg_E5_0 = 4169648401u; while (true) { uint num; switch ((num = (arg_E5_0 ^ 2523131924u)) % 8u) { case 0u: goto IL_111; case 2u: this.Header = new AuthPacketHeader(); arg_E5_0 = (num * 4138080164u ^ 2675252904u); continue; case 3u: this.Write <byte>((byte)this.Header.Channel, 4); arg_E5_0 = (num * 3127461979u ^ 2628254444u); continue; case 4u: this.Header.Message = (byte)message; arg_E5_0 = (num * 1888841257u ^ 182257382u); continue; case 5u: this.stream = AuthPacket.smethod_1(AuthPacket.smethod_0()); arg_E5_0 = (num * 4268182235u ^ 1808986985u); continue; case 6u: { this.Header.Channel = channel; bool flag = channel > AuthChannel.None; this.Write <byte>(this.Header.Message, 6); arg_E5_0 = (num * 1702613302u ^ 3433456695u); continue; } case 7u: { bool flag; this.Write <bool>(flag, 1); arg_E5_0 = (((!flag) ? 1611924362u : 28007344u) ^ num * 3110452489u); continue; } } return; } } }
public AuthPacket(AuthServerMessage message, AuthChannel channel = AuthChannel.None) { stream = new BinaryWriter(new MemoryStream()); Header = new AuthPacketHeader(); Header.Message = (byte)message; Header.Channel = channel; var hasChannel = channel != AuthChannel.None; Write(Header.Message, 6); Write(hasChannel, 1); if (hasChannel) { Write((byte)Header.Channel, 4); } }
public AuthPacket(AuthServerMessage message, AuthChannel channel = AuthChannel.Authentication) { writeStream = new BinaryWriter(new MemoryStream()); Header = new AuthPacketHeader(); Header.Message = (ushort)message; Header.Channel = channel; var hasChannel = channel != AuthChannel.Authentication; var msg = Header.Message >= 0x7E ? (Header.Message >> (byte)channel) - 0x3F : Header.Message - 0x3F; Write(msg, 6); Write(hasChannel, 1); if (hasChannel) { Write((byte)Header.Channel, 4); } }
public void Send(AuthServerMessage message, params object[] parameters) { Send((int)message, parameters); }
protected ServerPacket(AuthServerMessage netMessage, AuthChannel channel = AuthChannel.Authentication) { Packet = new AuthPacket(netMessage, channel); }