public void AddSniffData(StoreNameType type, int id, string data) { if (type == StoreNameType.None) return; if (id == 0 && type != StoreNameType.Map) return; // Only maps can have id 0 if (type == StoreNameType.Opcode && !SniffDataOpcodes) return; // Don't add opcodes if its config is not enabled if (type != StoreNameType.Opcode && !SniffData) return; var item = new SniffData { FileName = FileName, ObjectType = type, Id = id, Data = data, }; Storage.SniffData.Add(item, TimeSpan); }
public void AddSniffData(StoreNameType type, int id, string data) { if (type == StoreNameType.None) return; if (id == 0 && type != StoreNameType.Map) return; // Only maps can have id 0 if (type == StoreNameType.Opcode && !SniffDataOpcodes) return; // Don't add opcodes if its config is not enabled if (type != StoreNameType.Opcode && !SniffData) return; var item = new SniffData { FileName = FileName, TimeStamp = Utilities.GetUnixTimeFromDateTime(Time), ObjectType = type, Id = id, Data = data, Number = Number, }; Storage.SniffData.Add(item); }