update honorific integration (#50)

This commit is contained in:
Cara 2023-05-04 05:30:11 +09:30 committed by GitHub
parent 3448601b6f
commit 4b52e60e7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 41 additions and 13 deletions

View file

@ -535,6 +535,12 @@ public sealed class CachedPlayer : DisposableMediatorSubscriberBase
_lastGlamourerData = await _ipcManager.GlamourerGetCharacterCustomizationAsync(PlayerCharacter).ConfigureAwait(false);
}
});
Mediator.Subscribe<HonorificReadyMessage>(this, async (_) =>
{
if (string.IsNullOrEmpty(_cachedData?.HonorificData)) return;
Logger.LogTrace("Reapplying Honorific data for {this}", this);
await _ipcManager.HonorificSetTitleAsync(PlayerCharacter, _cachedData.HonorificData).ConfigureAwait(false);
});
_downloadManager.Initialize();
}