fixes for summoner
This commit is contained in:
@@ -233,7 +233,8 @@ public class CachedPlayer : MediatorSubscriberBase, IDisposable
|
|||||||
{
|
{
|
||||||
foreach (var item in _cachedData.FileReplacements)
|
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;
|
_currentOtherChara = null;
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ public class TransientResourceManager : MediatorSubscriberBase, IDisposable
|
|||||||
{
|
{
|
||||||
return;
|
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"));
|
//_logger.LogDebug("Got resource " + gamePath + " for ptr " + gameObject.ToString("X"));
|
||||||
return;
|
return;
|
||||||
@@ -172,7 +172,7 @@ public class TransientResourceManager : MediatorSubscriberBase, IDisposable
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
TransientResources[gameObject].Add(replacedGamePath);
|
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));
|
Mediator.Publish(new TransientResourceChangedMessage(gameObject));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ public class GameObjectHandler : MediatorSubscriberBase
|
|||||||
public string Name { get; private set; }
|
public string Name { get; private set; }
|
||||||
public ObjectKind ObjectKind { get; }
|
public ObjectKind ObjectKind { get; }
|
||||||
public IntPtr Address { get; set; }
|
public IntPtr Address { get; set; }
|
||||||
|
public IntPtr CurrentAddress => _getAddress.Invoke();
|
||||||
private IntPtr DrawObjectAddress { get; set; }
|
private IntPtr DrawObjectAddress { get; set; }
|
||||||
private Task? _delayedZoningTask;
|
private Task? _delayedZoningTask;
|
||||||
private CancellationTokenSource _zoningCts = new();
|
private CancellationTokenSource _zoningCts = new();
|
||||||
@@ -95,7 +96,7 @@ public class GameObjectHandler : MediatorSubscriberBase
|
|||||||
{
|
{
|
||||||
if (!_delayedZoningTask?.IsCompleted ?? false) return;
|
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);
|
+ (string.IsNullOrEmpty(Name) ? "Unk" : Name) + "+" + Address.ToString("X"), CheckAndUpdateObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user