private bool TryGetFileDatOffset(ParsedFilePath path, out byte dataFileId, out long offset) { if (!Index.IsIndex2) { if (IndexHashTableEntries.TryGetValue(path.IndexHash, out var hashTableEntry)) { dataFileId = hashTableEntry.DataFileId; offset = hashTableEntry.Offset; return(true); } } else { if (Index2HashTableEntries.TryGetValue(path.Index2Hash, out var hashTableEntry2)) { dataFileId = hashTableEntry2.DataFileId; offset = hashTableEntry2.Offset; return(true); } } dataFileId = 0; offset = 0; return(false); }
public bool TryGetFileDatOffset(uint hash, out byte dataFileId, out long offset) { if (Index2HashTableEntries.TryGetValue(hash, out var hashTableEntry)) { dataFileId = hashTableEntry.DataFileId; offset = hashTableEntry.Offset; return(true); } dataFileId = 0; offset = 0; return(false); }