Skip to content

Commit 03a4e70

Browse files
committed
Some fixes for loose hair files.
1 parent 0fdc09c commit 03a4e70

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

xivModdingFramework/Mods/EndwalkerUpgrade.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,7 +1283,8 @@ private static async Task UpdateUnclaimedHairTextures(HairRegexSet hairset, List
12831283
var results = new Dictionary<int, Dictionary<int, List<(string Path, XivTexType TexType)>>>();
12841284

12851285
var materials = new List<(int Race, int Hair)>();
1286-
foreach (var file in files)
1286+
List<string> fileList = fileInfos != null ? fileInfos.Keys.ToList() : files.ToList();
1287+
foreach (var file in fileList)
12871288
{
12881289
var matMatch = hairset.MaterialRegex.Match(file);
12891290
if (matMatch.Success)
@@ -1294,6 +1295,9 @@ private static async Task UpdateUnclaimedHairTextures(HairRegexSet hairset, List
12941295
continue;
12951296
}
12961297

1298+
// Only match textures to those in the main list.
1299+
if (!files.Contains(file)) continue;
1300+
12971301
var match = hairset.OldTextureRegex.Match(file);
12981302
if (!match.Success) continue;
12991303

@@ -1398,7 +1402,7 @@ private static async Task UpdateUnclaimedHairTextures(HairRegexSet hairset, List
13981402
{
13991403
var newPath = tex.TexType == XivTexType.Normal ? normTex.Dx11Path : maskTex.Dx11Path;
14001404

1401-
if (files.Contains(newPath))
1405+
if (fileList.Contains(newPath))
14021406
{
14031407
// Already converted.
14041408
skip = true;

0 commit comments

Comments
 (0)