fix initial cache creation

This commit is contained in:
Stanley Dimant
2023-03-15 10:14:05 +01:00
parent d2c3f5cdc6
commit 01723152d8
2 changed files with 10 additions and 10 deletions

View File

@@ -3,7 +3,7 @@
<PropertyGroup>
<Authors></Authors>
<Company></Company>
<Version>0.8.4</Version>
<Version>0.8.5</Version>
<Description></Description>
<Copyright></Copyright>
<PackageProjectUrl>https://github.com/Penumbra-Sync/client</PackageProjectUrl>

View File

@@ -24,15 +24,6 @@ public sealed class CacheCreationService : DisposableMediatorSubscriberBase
{
_characterDataFactory = characterDataFactory;
_playerRelatedObjects[ObjectKind.Player] =
gameObjectHandlerFactory(ObjectKind.Player, () => dalamudUtil.PlayerPointer, true);
_playerRelatedObjects[ObjectKind.MinionOrMount] =
gameObjectHandlerFactory(ObjectKind.Player, () => dalamudUtil.GetMinionOrMount(), true);
_playerRelatedObjects[ObjectKind.Pet] =
gameObjectHandlerFactory(ObjectKind.Pet, () => dalamudUtil.GetPet(), true);
_playerRelatedObjects[ObjectKind.Companion] =
gameObjectHandlerFactory(ObjectKind.Companion, () => dalamudUtil.GetCompanion(), true);
Mediator.Subscribe<CreateCacheForObjectMessage>(this, (msg) =>
{
Logger.LogDebug("Received CreateCacheForObject for {handler}, updating player", msg.ObjectToCreateFor);
@@ -75,6 +66,15 @@ public sealed class CacheCreationService : DisposableMediatorSubscriberBase
Logger.LogDebug("Received Penumbra Mod settings change, updating player");
await AddPlayerCacheToCreate().ConfigureAwait(false);
});
_playerRelatedObjects[ObjectKind.Player] =
gameObjectHandlerFactory(ObjectKind.Player, () => dalamudUtil.PlayerPointer, true);
_playerRelatedObjects[ObjectKind.MinionOrMount] =
gameObjectHandlerFactory(ObjectKind.Player, () => dalamudUtil.GetMinionOrMount(), true);
_playerRelatedObjects[ObjectKind.Pet] =
gameObjectHandlerFactory(ObjectKind.Pet, () => dalamudUtil.GetPet(), true);
_playerRelatedObjects[ObjectKind.Companion] =
gameObjectHandlerFactory(ObjectKind.Companion, () => dalamudUtil.GetCompanion(), true);
}
protected override void Dispose(bool disposing)