public static uint ClientReceive(IntPtr netMessage, IntPtr arg2, IntPtr arg3, IntPtr dataPtr, UIntPtr length) { var pkt = new Packet(dataPtr, (int)(length.ToUInt64() & 0xFFFFFFFF)); PacketLog.Write(pkt, "ServerMessage"); Memory.Write(originalFunction, originalInstruction); var ret = (uint)originalDelegate.DynamicInvoke(new object[] { netMessage, arg2, arg3, dataPtr, length }); Memory.Write(originalFunction, hookInstruction); return(ret); }
public static uint ClientReceive(IntPtr ptr, IntPtr arg, ref CDataStore dataStore, IntPtr arg2) { var ds = dataStore.Clone(); var pkt = new Packet(ds); PacketLog.Write(pkt, "ServerMessage"); Memory.Write(originalFunction, originalInstruction); var ret = (uint)originalDelegate.DynamicInvoke(new object[] { ptr, arg, dataStore, arg2 }); Memory.Write(originalFunction, hookInstruction); return((uint)ret); }