revert pets, fix exception on application for glamourer 2

This commit is contained in:
rootdarkarchon
2023-07-23 16:07:58 +02:00
parent aa3e0373a8
commit 1c66c33daa
2 changed files with 12 additions and 2 deletions

View File

@@ -243,8 +243,15 @@ public sealed class IpcManager : DisposableMediatorSubscriberBase
await PenumbraRedrawInternalAsync(logger, handler, applicationId, (chara) =>
{
logger.LogDebug("[{appid}] Calling on IPC: GlamourerApplyAll", applicationId);
_glamourerApplyAll!.InvokeAction(customization, chara);
try
{
logger.LogDebug("[{appid}] Calling on IPC: GlamourerApplyAll", applicationId);
_glamourerApplyAll!.InvokeAction(customization, chara);
}
catch (Exception)
{
logger.LogWarning("[{appid}] Failed to apply Glamourer data", applicationId);
}
if (_glamourerTestingAvailable)
{
logger.LogDebug("[{appid}] Calling on IPC: PenumbraRedraw", applicationId);

View File

@@ -546,6 +546,7 @@ public sealed class PairHandler : DisposableMediatorSubscriberBase
{
await _ipcManager.CustomizePlusRevertAsync(minionOrMount).ConfigureAwait(false);
using GameObjectHandler tempHandler = await _gameObjectHandlerFactory.Create(ObjectKind.MinionOrMount, () => minionOrMount, false).ConfigureAwait(false);
await _ipcManager.GlamourerRevert(Logger, tempHandler, applicationId, cancelToken.Token).ConfigureAwait(false);
await _ipcManager.PenumbraRedrawAsync(Logger, tempHandler, applicationId, cancelToken.Token).ConfigureAwait(false);
}
}
@@ -556,6 +557,7 @@ public sealed class PairHandler : DisposableMediatorSubscriberBase
{
await _ipcManager.CustomizePlusRevertAsync(pet).ConfigureAwait(false);
using GameObjectHandler tempHandler = await _gameObjectHandlerFactory.Create(ObjectKind.Pet, () => pet, false).ConfigureAwait(false);
await _ipcManager.GlamourerRevert(Logger, tempHandler, applicationId, cancelToken.Token).ConfigureAwait(false);
await _ipcManager.PenumbraRedrawAsync(Logger, tempHandler, applicationId, cancelToken.Token).ConfigureAwait(false);
}
}
@@ -566,6 +568,7 @@ public sealed class PairHandler : DisposableMediatorSubscriberBase
{
await _ipcManager.CustomizePlusRevertAsync(companion).ConfigureAwait(false);
using GameObjectHandler tempHandler = await _gameObjectHandlerFactory.Create(ObjectKind.Pet, () => companion, false).ConfigureAwait(false);
await _ipcManager.GlamourerRevert(Logger, tempHandler, applicationId, cancelToken.Token).ConfigureAwait(false);
await _ipcManager.PenumbraRedrawAsync(Logger, tempHandler, applicationId, cancelToken.Token).ConfigureAwait(false);
}
}