File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
xivModdingFramework/SqPack/FileTypes Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,15 @@ public Task<bool> HaveFilesAddedByTexTools(XivDataFile dataFile)
199
199
} ) ;
200
200
}
201
201
202
+ public async Task < int > GetDataOffset ( string fullPath )
203
+ {
204
+ var dataFile = IOUtil . GetDataFileFromPath ( fullPath ) ;
205
+
206
+ var pathHash = HashGenerator . GetHash ( fullPath . Substring ( 0 , fullPath . LastIndexOf ( "/" , StringComparison . Ordinal ) ) ) ;
207
+ var fileHash = HashGenerator . GetHash ( Path . GetFileName ( fullPath ) ) ;
208
+ return await GetDataOffset ( pathHash , fileHash , dataFile ) ;
209
+
210
+ }
202
211
/// <summary>
203
212
/// Gets the offset for the data in the .dat file
204
213
/// </summary>
@@ -915,7 +924,7 @@ public bool DeleteFileDescriptor(string fullPath, XivDataFile dataFile)
915
924
/// <param name="dataOffset">Raw DAT file offset to use for the new file.</param>
916
925
/// <param name="dataFile">Which data file set to use.</param>
917
926
/// <returns></returns>
918
- public bool AddFileDescriptor ( string fullPath , int dataOffset , XivDataFile dataFile )
927
+ public bool AddFileDescriptor ( string fullPath , int dataOffset , XivDataFile dataFile )
919
928
{
920
929
fullPath = fullPath . Replace ( "\\ " , "/" ) ;
921
930
var pathHash = HashGenerator . GetHash ( fullPath . Substring ( 0 , fullPath . LastIndexOf ( "/" , StringComparison . Ordinal ) ) ) ;
You can’t perform that action at this time.
0 commit comments