public MSG_C2S_1106_219() { MsgHeader = new MSG_HEAD_WITH_PROTOCOL(); MsgHeader.dwSize = GetSize(); MsgHeader.wProtocol = 0x1106; Unknown = 0x0243; }
/// <summary> /// CL->ZS: 패킷 Decrypt후 필요한 경우 578버전으로 형 변환 한다 /// </summary> /// <param name="buffer"></param> /// <param name="Uid"></param> /// <param name="cVer"></param> /// <param name="cltIP"></param> public void Convert_C2S(ref byte[] buffer, uint Uid, ClientVer cVer, string cltIP) { try { //클라에서 오는 패킷은 uid가 비어있으므로 uid추가 해준 후 decrypt ByteTools.SetPCID(ref buffer, Uid); Crypter.Decrypt(ref buffer, cVer); MSG_HEAD_WITH_PROTOCOL pHeader = new MSG_HEAD_WITH_PROTOCOL(); pHeader.Deserialize(ref buffer); if (cVer == ClientVer.v578) { Type type = Type.GetType(string.Format("pConverter.Ox{0}", pHeader.wProtocol.ToString("X4"))); if (type != null) { object dClass = Activator.CreateInstance(type); MethodInfo C2S_TO219 = type.GetMethod("C2S_TO219"); object[] args = new object[] { buffer }; C2S_TO219.Invoke(dClass, args); buffer = (byte[])args[0]; } else { Logger.NewPacket("C2S", buffer, cltIP, cVer); } } } catch (Exception ex) { Logger.Write(string.Format("Convert_C2S: {0}", ex)); } }
/// <summary> /// ZS->CL: 형 변환이 필요한경우 578버전으로 바꾼 후 패킷을 Encrypt한다 /// </summary> /// <param name="buffer"></param> /// <param name="cVer"></param> public void Convert_S2C(ref byte[] buffer, ClientVer cVer) { try { MSG_HEAD_WITH_PROTOCOL pHeader = new MSG_HEAD_WITH_PROTOCOL(); pHeader.Deserialize(ref buffer); if (pHeader.byCtrl != 0x03) { return; } if (cVer == ClientVer.v578) { Type type = Type.GetType(string.Format("pConverter.Ox{0}", pHeader.wProtocol.ToString("X4"))); if (type != null) { object dClass = Activator.CreateInstance(type); MethodInfo S2C_TO578 = type.GetMethod("S2C_TO578"); object[] args = new object[] { buffer }; S2C_TO578.Invoke(dClass, args); buffer = (byte[])args[0]; } else { Logger.NewPacket("S2C", buffer, "localhost", cVer); } } else if (pHeader.wProtocol == 0x1105 && cVer == ClientVer.v562) { new Ox1105().S2C_TO562(ref buffer); } Crypter.Encrypt(ref buffer, cVer); } catch (Exception ex) { Logger.Write(string.Format("Convert_S2C: {0}", ex)); } }
public MSG_C2S_REQ_TELEPORT() { MsgHeader = new MSG_HEAD_WITH_PROTOCOL(); MsgHeader.dwSize = GetSize(); MsgHeader.wProtocol = 0x1112; }
public MSG_C2S_1107_219() { MsgHeader = new MSG_HEAD_WITH_PROTOCOL(); MsgHeader.dwSize = GetSize(); MsgHeader.wProtocol = 0x1107; }