Advertisement
Guest User

LoginMessage Seafight

a guest
Jul 23rd, 2014
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.87 KB | None | 0 0
  1. public class LoginMessage : IModule
  2.     {
  3.         public double UserId;
  4.         [CompilerGenerated]
  5.         private static Func<byte[], IEnumerable<byte>> func_0;
  6.         private int _version;
  7.         public static int Id = -25981;
  8.         public string SessionId = "";
  9.  
  10.         public LoginMessage(double UID = 0.0, string SID = "")
  11.         {
  12.             this.UserId = UID;
  13.             this.SessionId = SID;
  14.         }
  15.  
  16.         [CompilerGenerated]
  17.         private static IEnumerable<byte> smethod_0(byte[] byte_0)
  18.         {
  19.             return byte_0;
  20.         }
  21.  
  22.         public override int getId()
  23.         {
  24.             return 15540;
  25.         }
  26.  
  27.         public override int getVersion()
  28.         {
  29.             return 0;
  30.         }
  31.  
  32.         public override int getRemoteVersion()
  33.         {
  34.             return this._version;
  35.         }
  36.  
  37.         public override int getEstimatedLength()
  38.         {
  39.             return 10;
  40.         }
  41.  
  42.         public override void read(IDataInput param1)
  43.         {
  44.             this._version = param1.readShort();
  45.             this._version = 65535 & ((65535 & this._version) << 3 % 16 | (65535 & this._version) >> 16 - 3 % 16);
  46.             this._version = (this._version > 32767) ? (this._version - 65536) : this._version;
  47.            
  48.             this.UserId = param1.readDouble();
  49.             this.SessionId = param1.readUTF();
  50.         }
  51.  
  52.         public override byte[] write()
  53.         {
  54.             if (func_0 == null)
  55.             {
  56.                 func_0 = new Func<byte[], IEnumerable<byte>>(LoginMessage.smethod_0);
  57.             }
  58.             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>();
  59.         }
  60.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement