public Packet(CDataStore dataStore, bool other = false) { TimeStamp = Helper.GetUnixTime(); var buffer = Memory.Read(dataStore.Data, (int)dataStore.Size); if (buffer != null) { if (!other) { stream = new BinaryReader(new MemoryStream(buffer)); Message = stream.ReadUInt32(); var size = (int)dataStore.Size - 4; Data = stream.ReadBytes(size); } else { stream = new BinaryReader(new MemoryStream(buffer)); var size = (int)dataStore.Size; Data = stream.ReadBytes(size); } } }
public CDataStore Clone() { var ds = new CDataStore { VTable = this.VTable, Data = this.Data, Base = this.Base, Alloc = this.Alloc, Size = this.Size, Read = this.Read, }; return(ds); }
public CDataStore Clone() { var ds = new CDataStore { VTable = this.VTable, Data = this.Data, Base = this.Base, Alloc = this.Alloc, Size = this.Size, Read = this.Read, }; return ds; }
public static uint ClientSend(IntPtr ptr, ref CDataStore dataStore, int args) { var ds = dataStore.Clone(); var pkt = new Packet(ds); PacketLog.Write(pkt, "ClientMessage"); Memory.Write(originalFunction, originalInstruction); var ret = (uint)originalDelegate.DynamicInvoke(new object[] { ptr, dataStore, args }); Memory.Write(originalFunction, hookInstruction); return (uint)ret; }
public Packet(CDataStore dataStore) { TimeStamp = Helper.GetUnixTime(); var buffer = Memory.Read(dataStore.Data, (int)dataStore.Size); if (buffer != null) { stream = new BinaryReader(new MemoryStream(buffer)); Message = stream.ReadUInt32(); var size = (int)dataStore.Size - 4; Data = stream.ReadBytes(size); } }