@@ -629,7 +629,10 @@ public async Task<List<string>> GetMaterialFiles(int materialVariant = -1, Index
629
629
mdlMats = await XivCache . GetChildFiles ( model ) ;
630
630
} else
631
631
{
632
- mdlMats = await _mdl . GetReferencedMaterialPaths ( model , - 1 , false , false , index , modlist ) ;
632
+ if ( index . Get8xDataOffset ( model ) != 0 )
633
+ {
634
+ mdlMats = await _mdl . GetReferencedMaterialPaths ( model , - 1 , false , false , index , modlist ) ;
635
+ }
633
636
}
634
637
635
638
if ( materialVariant <= 0 )
@@ -718,15 +721,19 @@ public async Task<List<string>> GetTextureFiles(int materialVariant = -1, IndexF
718
721
{
719
722
foreach ( var mat in materials )
720
723
{
721
- List < string > mtrlTexs = null ;
724
+ List < string > mtrlTexs = new List < string > ( ) ;
722
725
if ( index == null )
723
726
{
724
727
mtrlTexs = await XivCache . GetChildFiles ( mat ) ;
725
728
} else
726
729
{
727
730
var dataFile = IOUtil . GetDataFileFromPath ( mat ) ;
728
- var _mtrl = new Mtrl ( XivCache . GameInfo . GameDirectory , dataFile , XivCache . GameInfo . GameLanguage ) ;
729
- mtrlTexs = await _mtrl . GetTexturePathsFromMtrlPath ( mat , false , false , index , modlist ) ;
731
+
732
+ if ( index . Get8xDataOffset ( mat ) != 0 )
733
+ {
734
+ var _mtrl = new Mtrl ( XivCache . GameInfo . GameDirectory , dataFile , XivCache . GameInfo . GameLanguage ) ;
735
+ mtrlTexs = await _mtrl . GetTexturePathsFromMtrlPath ( mat , false , false , index , modlist ) ;
736
+ }
730
737
}
731
738
732
739
foreach ( var tex in mtrlTexs )
0 commit comments