public void Process(Socket sender, byte[] data) { ClientEventRequest eventRequest = new ClientEventRequest(data); eventRequest.Process(sender); CurrentEvent = eventRequest; }
public void ProcessEventRequest(Socket sender, ClientEventRequest eventRequest) { switch (eventRequest.Code) { case 0x05: NoticeEvent(sender, eventRequest); break; } }
private void NoticeEvent(Socket sender, ClientEventRequest eventRequest) { byte[] data = new byte[0x298]; Buffer.BlockCopy(BitConverter.GetBytes(User.Instance.Character.Id), 0, data, 0, 4); Buffer.BlockCopy(BitConverter.GetBytes(Id), 0, data, 0x04, 4); data[0x08] = eventRequest.Code; LuaParameters parameters = new LuaParameters(); parameters.Add(Encoding.ASCII.GetBytes("noticeEvent")); parameters.Add(Encoding.ASCII.GetBytes("delegateEvent")); parameters.Add((Command)eventRequest.CallerId); parameters.Add(unchecked ((Command)0xa0f1adb1)); parameters.Add("processTtrNomal001withHQ"); parameters.Add(null); parameters.Add(null); parameters.Add(null); LuaParameters.WriteParameters(ref data, parameters, 0x09); SendPacket(sender, ServerOpcode.StartEventRequest, data); }