adjustments for animation/penumbra update
This commit is contained in:
@@ -348,6 +348,8 @@ public class CachedPlayer
|
||||
_dalamudUtil.FrameworkUpdate -= DalamudUtilOnFrameworkUpdate;
|
||||
_ipcManager.PenumbraRedrawEvent -= IpcManagerOnPenumbraRedrawEvent;
|
||||
_ipcManager.PenumbraRemoveTemporaryCollection(PlayerName);
|
||||
_downloadCancellationTokenSource?.Cancel();
|
||||
_downloadCancellationTokenSource?.Dispose();
|
||||
if (PlayerCharacter != null && PlayerCharacter.IsValid())
|
||||
{
|
||||
foreach (var item in _cachedData.FileReplacements)
|
||||
@@ -355,9 +357,6 @@ public class CachedPlayer
|
||||
RevertCustomizationData(item.Key);
|
||||
}
|
||||
}
|
||||
|
||||
_downloadCancellationTokenSource?.Cancel();
|
||||
_downloadCancellationTokenSource?.Dispose();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -316,7 +316,7 @@ namespace MareSynchronos.Managers
|
||||
foreach (var deletion in fileCachesToDelete)
|
||||
{
|
||||
var entries = db.FileCaches.Where(f =>
|
||||
f.Hash == deletion.Hash && f.Filepath.ToLowerInvariant() == deletion.Filepath.ToLowerInvariant());
|
||||
f.Hash == deletion.Hash && f.Filepath.ToLower() == deletion.Filepath.ToLower());
|
||||
if (await entries.AnyAsync(ct))
|
||||
{
|
||||
Logger.Verbose("Removing file from DB: " + deletion.Filepath);
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace MareSynchronos.Managers
|
||||
{
|
||||
foreach (var obj in playerRelatedObjects)
|
||||
{
|
||||
if (obj.DrawObjectAddress == drawObj && !obj.HasUnprocessedUpdate)
|
||||
if (obj.Address == drawObj && !obj.HasUnprocessedUpdate)
|
||||
{
|
||||
obj.HasUnprocessedUpdate = true;
|
||||
OnPlayerOrAttachedObjectsChanged();
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace MareSynchronos.Managers
|
||||
{
|
||||
foreach (var item in TransientResources.ToList())
|
||||
{
|
||||
if (!dalamudUtil.IsDrawObjectPresent(item.Key))
|
||||
if (!dalamudUtil.IsGameObjectPresent(item.Key))
|
||||
{
|
||||
Logger.Debug("Object not present anymore: " + item.Key);
|
||||
TransientResources.Remove(item.Key);
|
||||
@@ -37,9 +37,9 @@ namespace MareSynchronos.Managers
|
||||
}
|
||||
}
|
||||
|
||||
public List<string> GetTransientResources(IntPtr drawObject)
|
||||
public List<string> GetTransientResources(IntPtr gameObject)
|
||||
{
|
||||
if (TransientResources.TryGetValue(drawObject, out var result))
|
||||
if (TransientResources.TryGetValue(gameObject, out var result))
|
||||
{
|
||||
return result.ToList();
|
||||
}
|
||||
@@ -47,11 +47,11 @@ namespace MareSynchronos.Managers
|
||||
return new List<string>();
|
||||
}
|
||||
|
||||
private void Manager_PenumbraResourceLoadEvent(IntPtr drawObject, string gamePath, string filePath)
|
||||
private void Manager_PenumbraResourceLoadEvent(IntPtr gameObject, string gamePath, string filePath)
|
||||
{
|
||||
if (!TransientResources.ContainsKey(drawObject))
|
||||
if (!TransientResources.ContainsKey(gameObject))
|
||||
{
|
||||
TransientResources[drawObject] = new();
|
||||
TransientResources[gameObject] = new();
|
||||
}
|
||||
|
||||
if (filePath.StartsWith("|"))
|
||||
@@ -61,11 +61,11 @@ namespace MareSynchronos.Managers
|
||||
|
||||
var newPath = filePath.ToLowerInvariant().Replace("\\", "/");
|
||||
|
||||
if (filePath != gamePath && !TransientResources[drawObject].Contains(newPath))
|
||||
if (filePath != gamePath && !TransientResources[gameObject].Contains(newPath))
|
||||
{
|
||||
TransientResources[drawObject].Add(newPath);
|
||||
Logger.Debug($"Adding {filePath.ToLowerInvariant().Replace("\\", "/")} for {drawObject}");
|
||||
TransientResourceLoaded?.Invoke(drawObject);
|
||||
TransientResources[gameObject].Add(newPath);
|
||||
Logger.Debug($"Adding {filePath.ToLowerInvariant().Replace("\\", "/")} for {gameObject}");
|
||||
TransientResourceLoaded?.Invoke(gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user