fixes for summoner

This commit is contained in:
rootdarkarchon
2023-02-19 17:15:53 +01:00
parent 876c0f4f3e
commit 29eea0d800
3 changed files with 6 additions and 4 deletions

View File

@@ -233,7 +233,8 @@ public class CachedPlayer : MediatorSubscriberBase, IDisposable
{
foreach (var item in _cachedData.FileReplacements)
{
RevertCustomizationData(item.Key, name, applicationId).RunSynchronously();
var task = Task.Run(async () => await RevertCustomizationData(item.Key, name, applicationId).ConfigureAwait(false));
Task.WaitAll(new[] { task });
}
}
_currentOtherChara = null;

View File

@@ -143,7 +143,7 @@ public class TransientResourceManager : MediatorSubscriberBase, IDisposable
{
return;
}
if (!PlayerRelatedPointers.Select(p => p.Address).Contains(gameObject))
if (!PlayerRelatedPointers.Select(p => p.CurrentAddress).Contains(gameObject))
{
//_logger.LogDebug("Got resource " + gamePath + " for ptr " + gameObject.ToString("X"));
return;
@@ -172,7 +172,7 @@ public class TransientResourceManager : MediatorSubscriberBase, IDisposable
else
{
TransientResources[gameObject].Add(replacedGamePath);
_logger.LogDebug("Adding {replacedGamePath} for {gameObject} ({filePath})", replacedGamePath, gameObject, filePath);
_logger.LogDebug("Adding {replacedGamePath} for {gameObject} ({filePath})", replacedGamePath, gameObject.ToString("X"), filePath);
Mediator.Publish(new TransientResourceChangedMessage(gameObject));
}
}

View File

@@ -21,6 +21,7 @@ public class GameObjectHandler : MediatorSubscriberBase
public string Name { get; private set; }
public ObjectKind ObjectKind { get; }
public IntPtr Address { get; set; }
public IntPtr CurrentAddress => _getAddress.Invoke();
private IntPtr DrawObjectAddress { get; set; }
private Task? _delayedZoningTask;
private CancellationTokenSource _zoningCts = new();
@@ -95,7 +96,7 @@ public class GameObjectHandler : MediatorSubscriberBase
{
if (!_delayedZoningTask?.IsCompleted ?? false) return;
_performanceCollector.LogPerformance(this, "CheckAndUpdateObject>" + (_isOwnedObject ? "Self+" : "Other+") + ObjectKind + "/"
_performanceCollector.LogPerformance(this, "CheckAndUpdateObject>" + (_isOwnedObject ? "Self+" : "Other+") + ObjectKind + "/"
+ (string.IsNullOrEmpty(Name) ? "Unk" : Name) + "+" + Address.ToString("X"), CheckAndUpdateObject);
}