public void SendLoginDisconnectResponse() { Packet sPkt = new Packet(); sPkt.Opcode = 1004; sPkt.BuildPacket(); this.Client.Send(sPkt.Data); }
public void SendLoginResponse(byte[] data) { Packet oPkt = new Packet(); oPkt.Opcode = 1005; oPkt.BuildPacket(); this.Client.Send(oPkt.Data); UA_LOGIN_REQ inPkt = new UA_LOGIN_REQ(); inPkt.SetData(data); SysCons.WriteLine("UA_LOGIN_REQ {0} CodePage({1}) {2}.{3}", inPkt.UserID, inPkt.CodePage, inPkt.MajorVer, inPkt.MinorVer); this.Username = inPkt.UserID; this.Password = inPkt.UserPW; this.AccountID = (uint)AuthDB.GetAccountID(this.Username); AU_LOGIN_RES sPkt = new AU_LOGIN_RES(); sPkt.UserID = inPkt.UserID; sPkt.AccountID = this.AccountID; sPkt.AllowedFunctionForDeveloper = 65535; sPkt.AuthKey = Encoding.ASCII.GetBytes("SE@WASDE#$RFWD@D"); sPkt.ResultCode = (ushort)AuthDB.CheckAccount(this.Username, this.Password); sPkt.lastServerID = 255; sPkt.lastChannelID = 255; sPkt.BuildCharServerList(); sPkt.BuildPacket(); this.Client.Send(sPkt.Data); }