small fixes for waiting
This commit is contained in:
@@ -146,7 +146,6 @@ public class CharacterDataFactory
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Logger.Verbose("Adding File Replacement for Material " + fileName);
|
|
||||||
var mtrlPath = fileName.Split("|")[2];
|
var mtrlPath = fileName.Split("|")[2];
|
||||||
|
|
||||||
if (cache.FileReplacements.ContainsKey(objectKind))
|
if (cache.FileReplacements.ContainsKey(objectKind))
|
||||||
@@ -185,8 +184,6 @@ public class CharacterDataFactory
|
|||||||
{
|
{
|
||||||
if (varPath.IsNullOrEmpty()) return;
|
if (varPath.IsNullOrEmpty()) return;
|
||||||
|
|
||||||
//Logger.Verbose("Adding File Replacement for Texture " + texPath);
|
|
||||||
|
|
||||||
if (cache.FileReplacements.ContainsKey(objectKind))
|
if (cache.FileReplacements.ContainsKey(objectKind))
|
||||||
{
|
{
|
||||||
if (cache.FileReplacements[objectKind].Any(c => c.GamePaths.Contains(varPath)))
|
if (cache.FileReplacements[objectKind].Any(c => c.GamePaths.Contains(varPath)))
|
||||||
@@ -205,8 +202,6 @@ public class CharacterDataFactory
|
|||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(texPath)) return;
|
if (string.IsNullOrEmpty(texPath)) return;
|
||||||
|
|
||||||
//Logger.Verbose("Adding File Replacement for Texture " + texPath);
|
|
||||||
|
|
||||||
if (cache.FileReplacements.ContainsKey(objectKind))
|
if (cache.FileReplacements.ContainsKey(objectKind))
|
||||||
{
|
{
|
||||||
if (cache.FileReplacements[objectKind].Any(c => c.GamePaths.Contains(texPath)))
|
if (cache.FileReplacements[objectKind].Any(c => c.GamePaths.Contains(texPath)))
|
||||||
@@ -243,7 +238,8 @@ public class CharacterDataFactory
|
|||||||
Logger.Verbose("Character is null but it shouldn't be, waiting");
|
Logger.Verbose("Character is null but it shouldn't be, waiting");
|
||||||
Thread.Sleep(50);
|
Thread.Sleep(50);
|
||||||
}
|
}
|
||||||
//_dalamudUtil.WaitWhileCharacterIsDrawing(charaPointer);
|
|
||||||
|
_dalamudUtil.WaitWhileCharacterIsDrawing(charaPointer);
|
||||||
|
|
||||||
Stopwatch st = Stopwatch.StartNew();
|
Stopwatch st = Stopwatch.StartNew();
|
||||||
|
|
||||||
@@ -357,8 +353,12 @@ public class CharacterDataFactory
|
|||||||
{
|
{
|
||||||
previousData.FileReplacements.Add(objectKind, new());
|
previousData.FileReplacements.Add(objectKind, new());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!previousData.FileReplacements[objectKind].Any(k => k.ResolvedPath == item.ResolvedPath))
|
||||||
|
{
|
||||||
previousData.FileReplacements[objectKind].Add(item);
|
previousData.FileReplacements[objectKind].Add(item);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
transientResourceManager.PersistTransientResources(charaPointer, objectKind, CreateFileReplacement);
|
transientResourceManager.PersistTransientResources(charaPointer, objectKind, CreateFileReplacement);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user