fix initial cache creation not happening without changes/redraws

This commit is contained in:
Stanley Dimant
2025-02-26 01:41:20 +01:00
parent 1014add755
commit 3e2cbaaee2

View File

@@ -36,6 +36,12 @@ public sealed class CacheCreationService : DisposableMediatorSubscriberBase
_haltCharaDataCreation = !msg.Resume;
});
Mediator.Subscribe<CreateCacheForObjectMessage>(this, (msg) =>
{
Logger.LogDebug("Received CreateCacheForObject for {handler}, updating", msg.ObjectToCreateFor);
AddCacheToCreate(msg.ObjectToCreateFor.ObjectKind);
});
_playerRelatedObjects[ObjectKind.Player] = gameObjectHandlerFactory.Create(ObjectKind.Player, dalamudUtil.GetPlayerPointer, isWatched: true)
.GetAwaiter().GetResult();
_playerRelatedObjects[ObjectKind.MinionOrMount] = gameObjectHandlerFactory.Create(ObjectKind.MinionOrMount, () => dalamudUtil.GetMinionOrMount(), isWatched: true)
@@ -54,12 +60,6 @@ public sealed class CacheCreationService : DisposableMediatorSubscriberBase
}
});
Mediator.Subscribe<CreateCacheForObjectMessage>(this, (msg) =>
{
Logger.LogDebug("Received CreateCacheForObject for {handler}, updating", msg.ObjectToCreateFor);
AddCacheToCreate(msg.ObjectToCreateFor.ObjectKind);
});
Mediator.Subscribe<ClearCacheForObjectMessage>(this, (msg) =>
{
if (msg.ObjectToCreateFor.ObjectKind == ObjectKind.Pet)