private static DataTable GetDataTable(String tableKey) { PackedFile currentPackedFile = currentPackFile.Files[0]; PackedFile replacementPackedFile = currentPackedFile; DBFile test = PackedFileDbCodec.Decode(currentPackedFile); test.Entries[0][0].Value = "dicks and or butts"; Encode(new MemoryStream(replacementPackedFile.Data), test); //currentPackFile.Files[0] = currentPackedFile; //currentPackFile.Files[0] = null; currentPackFile.Files.Remove(currentPackedFile); currentPackFile.Files.Add(replacementPackedFile); return(new DataTable()); }
/* * Create DBFile from the given PackedFile. */ public static DBFile Decode(PackedFile file) { PackedFileDbCodec codec = FromFilename(file.FullPath); return(codec.Decode(file.Data)); }