Example #1
0
        public void SendGateAuth()
        {
            WorldPacket packet = new WorldPacket();
            int         a      = 0;
            string      salt   = LoginUtil.GenerateSalt();

            packet.Initialize(3);
            packet.InputString(this._account, 0x20);
            packet.InputUInt32(this._accountTime);
            if ((this._accountTime == 0) && string.IsNullOrEmpty(this._K))
            {
                a = 1;
            }
            packet.InputInt32(a);
            if (string.IsNullOrEmpty(this._K))
            {
                this._K = LoginUtil.GenerateOrginalKey(this._account, this._password);
            }
            string str2 = string.Empty;

            str2 = LoginUtil.GenerateKey(this._K, salt);
            packet.InputString(salt, 0x40);
            packet.InputString(str2, 0x40);
            this.SendPacket(packet);
        }
Example #2
0
        public void SendGateReg()
        {
            WorldPacket packet = new WorldPacket();

            packet.Initialize(5);
            this.SendPacket(packet);
        }
Example #3
0
 private void SendCryptPacket()
 {
     if (!this._Crypt.IsInitialisedSend())
     {
         int         a      = new Random().Next();
         WorldPacket packet = new WorldPacket();
         packet.Initialize(7);
         packet.InputInt(a);
         this.SendCorePacket(packet);
         this._Crypt.InitialiseSend((uint)a);
     }
 }
Example #4
0
        private void SendAuthPacket()
        {
            WorldPacket packet = new WorldPacket();
            int         a      = 0;
            string      salt   = LoginUtil.GenerateSalt();
            string      str2   = LoginUtil.GenerateKey(this._K, salt);

            packet.Initialize(3);
            packet.InputUInt32(this._accountID);
            packet.InputUInt32(this._accountTime);
            if ((this._accountTime == 0) && string.IsNullOrEmpty(this._K))
            {
                a = 1;
            }
            packet.InputInt32(a);
            packet.InputString("1.0.0.37", 0x100);
            packet.InputString(salt, 0x40);
            packet.InputString(str2, 0x40);
            this.SendCorePacket(packet);
        }
Example #5
0
 public void SendGateReg()
 {
     WorldPacket packet = new WorldPacket();
     packet.Initialize(5);
     this.SendPacket(packet);
 }
Example #6
0
 public void SendModifyAccount(string account, string email, string password, string phone, string referee)
 {
     this._K = client.LoginUtil.GenerateOrginalKey(account, password);
     if (this.IsConnected())
     {
         WorldPacket packet = new WorldPacket();
         packet.Initialize(0x1d);
         packet.InputString(account, 0x20);
         packet.InputString(email, 0x40);
         packet.InputString(this._K, 0x40);
         packet.InputString(phone, 0x40);
         packet.InputString(referee, 0x20);
         this.AddPacket(packet);
     }
     else
     {
         WorldPacket packet2 = new WorldPacket();
         packet2.Initialize(9);
         packet2.InputString(account, 0x20);
         packet2.InputString(email, 0x40);
         packet2.InputString(this._K, 0x40);
         packet2.InputString(phone, 0x40);
         packet2.InputString(referee, 0x20);
         this._gateSession.GateSocket.AddPacket(packet2);
     }
 }
Example #7
0
 private void SendCryptPacket()
 {
     if (!this._Crypt.IsInitialisedSend())
     {
         int a = new Random().Next();
         WorldPacket packet = new WorldPacket();
         packet.Initialize(5);
         packet.InputInt(a);
         this.SendCorePacket(packet);
         this._Crypt.InitialiseSend((uint) a);
     }
 }
Example #8
0
 public void SendAddTask(MyTask task)
 {
     WorldPacket ms = new WorldPacket();
     ms.Initialize(13);
     this.GetTaskPacket(task, ms);
     this.AddPacket(ms);
 }
Example #9
0
 public void SendStopTask(MyTask task)
 {
     WorldPacket packet = new WorldPacket();
     packet.Initialize(0x13);
     packet.InputUInt32(task._id);
     this.AddPacket(packet);
 }
Example #10
0
 private void SendAuthPacket()
 {
     WorldPacket packet = new WorldPacket();
     int a = 0;
     string salt = LoginUtil.GenerateSalt();
     string str2 = LoginUtil.GenerateKey(this._K, salt);
     packet.Initialize(3);
     packet.InputUInt32(this._accountID);
     packet.InputUInt32(this._accountTime);
     if ((this._accountTime == 0) && string.IsNullOrEmpty(this._K))
     {
         a = 1;
     }
     packet.InputInt32(a);
     packet.InputString("1.0.0.37", 0x100);
     packet.InputString(salt, 0x40);
     packet.InputString(str2, 0x40);
     this.SendCorePacket(packet);
 }
Example #11
0
 public void SendModifyTask(MyTask task)
 {
     WorldPacket ms = new WorldPacket();
     ms.Initialize(0x11);
     ms.InputUInt32(task._id);
     this.GetTaskPacket(task, ms);
     this.AddPacket(ms);
 }
Example #12
0
 public void SendRemoveTask(uint taskID)
 {
     WorldPacket packet = new WorldPacket();
     packet.Initialize(0x17);
     packet.InputUInt32(taskID);
     this.AddPacket(packet);
 }
Example #13
0
 public void SendGateAuth()
 {
     WorldPacket packet = new WorldPacket();
     int a = 0;
     string salt = LoginUtil.GenerateSalt();
     packet.Initialize(3);
     packet.InputString(this._account, 0x20);
     packet.InputUInt32(this._accountTime);
     if ((this._accountTime == 0) && string.IsNullOrEmpty(this._K))
     {
         a = 1;
     }
     packet.InputInt32(a);
     if (string.IsNullOrEmpty(this._K))
     {
         this._K = LoginUtil.GenerateOrginalKey(this._account, this._password);
     }
     string str2 = string.Empty;
     str2 = LoginUtil.GenerateKey(this._K, salt);
     packet.InputString(salt, 0x40);
     packet.InputString(str2, 0x40);
     this.SendPacket(packet);
 }
Example #14
0
 public void SendGetTask()
 {
     WorldPacket packet = new WorldPacket();
     packet.Initialize(15);
     this.AddPacket(packet);
 }
Example #15
0
 public void SendGetLoginInfo(bool getTask = true)
 {
     WorldPacket packet = new WorldPacket();
     packet.Initialize(11);
     if (getTask)
     {
         packet.InputUInt32(1);
     }
     else
     {
         packet.InputUInt32(0);
     }
     this.AddPacket(packet);
 }
Example #16
0
 public void SendCompletTask(uint taskID, int taskSteps)
 {
     WorldPacket packet = new WorldPacket();
     packet.Initialize(0x19);
     packet.InputUInt32(taskID);
     packet.InputInt(taskSteps);
     this.AddPacket(packet);
 }
Example #17
0
 public void SendCheckAccountName(string account)
 {
     if (this.IsConnected())
     {
         WorldPacket packet = new WorldPacket();
         packet.Initialize(0x1b);
         packet.InputString(account, 0x20);
         this.AddPacket(packet);
     }
     else
     {
         WorldPacket packet2 = new WorldPacket();
         packet2.Initialize(11);
         packet2.InputString(account, 0x20);
         this._gateSession.GateSocket.AddPacket(packet2);
     }
 }