Fixes names not updating on Pet Nicknames restart (#79)

This commit is contained in:
Amber
2024-09-13 00:19:41 +02:00
committed by Loporrit
parent ca6f963d0f
commit 5642d354e0
3 changed files with 9 additions and 0 deletions

View File

@@ -541,6 +541,13 @@ public sealed class PairHandler : DisposableMediatorSubscriberBase
await _ipcManager.Honorific.SetTitleAsync(PlayerCharacter, _cachedData.HonorificData).ConfigureAwait(false);
});
Mediator.Subscribe<PetNamesReadyMessage>(this, async (_) =>
{
if (string.IsNullOrEmpty(_cachedData?.PetNamesData)) return;
Logger.LogTrace("Reapplying Pet Names data for {this}", this);
await _ipcManager.PetNames.SetPlayerData(PlayerCharacter, _cachedData.PetNamesData).ConfigureAwait(false);
});
if (_penumbraCollection == Guid.Empty)
_penumbraCollection = _ipcManager.Penumbra.CreateTemporaryCollectionAsync(Logger, OnlineUser.User.UID).GetAwaiter().GetResult();
_ipcManager.Penumbra.AssignTemporaryCollectionAsync(Logger, _penumbraCollection, _charaHandler.GetGameObject()!.ObjectIndex).GetAwaiter().GetResult();