Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class LoginMessage : IModule
- {
- public double UserId;
- [CompilerGenerated]
- private static Func<byte[], IEnumerable<byte>> func_0;
- private int _version;
- public static int Id = -25981;
- public string SessionId = "";
- public LoginMessage(double UID = 0.0, string SID = "")
- {
- this.UserId = UID;
- this.SessionId = SID;
- }
- [CompilerGenerated]
- private static IEnumerable<byte> smethod_0(byte[] byte_0)
- {
- return byte_0;
- }
- public override int getId()
- {
- return 15540;
- }
- public override int getVersion()
- {
- return 0;
- }
- public override int getRemoteVersion()
- {
- return this._version;
- }
- public override int getEstimatedLength()
- {
- return 10;
- }
- public override void read(IDataInput param1)
- {
- this._version = param1.readShort();
- this._version = 65535 & ((65535 & this._version) << 3 % 16 | (65535 & this._version) >> 16 - 3 % 16);
- this._version = (this._version > 32767) ? (this._version - 65536) : this._version;
- this.UserId = param1.readDouble();
- this.SessionId = param1.readUTF();
- }
- public override byte[] write()
- {
- if (func_0 == null)
- {
- func_0 = new Func<byte[], IEnumerable<byte>>(LoginMessage.smethod_0);
- }
- return new List<byte[]> { IDataOutput.WriteShort(15540), IDataOutput.WriteShort(65535 & ((65535 & 0) >> 3 % 16 | (65535 & 0) << 16 - 3 % 16)), IDataOutput.WriteString(this.SessionId), IDataOutput.writeDouble(this.UserId) }.SelectMany<byte[], byte>(func_0).ToArray<byte>();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement