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); }
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); }
public void GetTaskPacket(MyTask task, WorldPacket ms) { ms.InputInt(task._taskItems.Count); foreach (TaskInfo info in task._taskItems) { ms.InputString(info._param1, 0x20); ms.InputString(info._param2, 0x100); ms.InputString(info._param3, 0x100); ms.InputString(info._param4, 0x100); ms.InputString(info._param5, 0x100); } if ((task._HourClicks != null) && (task._HourClicks.Count == 0x30)) { for (int i = 0; i < 0x30; i++) { ms.InputUInt32((uint) task._HourClicks[i]); } } else { for (int j = 0; j < 0x30; j++) { ms.InputUInt32(0); } } int[] numArray = new int[2]; if ((task._AreaClicks != null) && (task._AreaClicks.Count == 0x23)) { for (int k = 0; k < 0x1f; k++) { numArray[0] |= ((bool) task._AreaClicks[k]) ? (((int) 1) << k) : 0; } for (int m = 0x1f; m < 0x23; m++) { numArray[1] |= ((bool) task._AreaClicks[m]) ? (((int) 1) << (m - 0x1f)) : 0; } } ms.InputInt(numArray[0]); ms.InputInt(numArray[1]); ms.InputString(task.Note, 0x40); }
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); } }
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); } }