rework/cleanup of onlineplayermanager

This commit is contained in:
Stanley Dimant 2025-02-26 22:03:42 +01:00
parent 34ce634ff6
commit 566a71e49b
10 changed files with 118 additions and 103 deletions

View file

@ -42,13 +42,13 @@ public sealed class CacheCreationService : DisposableMediatorSubscriberBase
AddCacheToCreate(msg.ObjectToCreateFor.ObjectKind);
});
_playerRelatedObjects[ObjectKind.Player] = gameObjectHandlerFactory.Create(ObjectKind.Player, dalamudUtil.GetPlayerPointer, isWatched: true)
_playerRelatedObjects[ObjectKind.Player] = gameObjectHandlerFactory.Create(ObjectKind.Player, dalamudUtil.GetPlayerPtr, isWatched: true)
.GetAwaiter().GetResult();
_playerRelatedObjects[ObjectKind.MinionOrMount] = gameObjectHandlerFactory.Create(ObjectKind.MinionOrMount, () => dalamudUtil.GetMinionOrMount(), isWatched: true)
_playerRelatedObjects[ObjectKind.MinionOrMount] = gameObjectHandlerFactory.Create(ObjectKind.MinionOrMount, () => dalamudUtil.GetMinionOrMountPtr(), isWatched: true)
.GetAwaiter().GetResult();
_playerRelatedObjects[ObjectKind.Pet] = gameObjectHandlerFactory.Create(ObjectKind.Pet, () => dalamudUtil.GetPet(), isWatched: true)
_playerRelatedObjects[ObjectKind.Pet] = gameObjectHandlerFactory.Create(ObjectKind.Pet, () => dalamudUtil.GetPetPtr(), isWatched: true)
.GetAwaiter().GetResult();
_playerRelatedObjects[ObjectKind.Companion] = gameObjectHandlerFactory.Create(ObjectKind.Companion, () => dalamudUtil.GetCompanion(), isWatched: true)
_playerRelatedObjects[ObjectKind.Companion] = gameObjectHandlerFactory.Create(ObjectKind.Companion, () => dalamudUtil.GetCompanionPtr(), isWatched: true)
.GetAwaiter().GetResult();
Mediator.Subscribe<ClassJobChangedMessage>(this, (msg) =>
@ -229,7 +229,6 @@ public sealed class CacheCreationService : DisposableMediatorSubscriberBase
catch (OperationCanceledException)
{
Logger.LogDebug("Cache Creation cancelled");
linkedCts.Dispose();
}
catch (Exception ex)
{