/// <summary> /// Repairs the dat count in the index files /// </summary> public void RepairIndexDatCounts(XivDataFile dataFile) { var index = new Index(_gameDirectory); var dat = new Dat(_gameDirectory); var largestDatNum = dat.GetLargestDatNumber(dataFile); index.UpdateIndexDatCount(dataFile, largestDatNum); }
/// <summary> /// Checks the index for the number of dats the game will attempt to read /// </summary> /// <returns>True if there is a problem, False otherwise</returns> public Task <bool> CheckIndexDatCounts(XivDataFile dataFile) { return(Task.Run(() => { var indexDatCounts = _index.GetIndexDatCount(dataFile); var largestDatNum = _dat.GetLargestDatNumber(dataFile) + 1; if (indexDatCounts.Index1 != largestDatNum) { return true; } if (indexDatCounts.Index2 != largestDatNum) { return true; } return false; })); }
/// <summary> /// Checks the index for the number of dats the game will attempt to read /// </summary> /// <returns>True if there is a problem, False otherwise</returns> public bool CheckIndexDatCounts(XivDataFile dataFile) { var index = new Index(_gameDirectory); var dat = new Dat(_gameDirectory); var indexDatCounts = index.GetIndexDatCount(dataFile); var largestDatNum = dat.GetLargestDatNumber(dataFile) + 1; if (indexDatCounts.Index1 != largestDatNum) { return(true); } if (indexDatCounts.Index2 != largestDatNum) { return(true); } return(false); }