diff --git a/LightlessSync/Services/NameplateService.cs b/LightlessSync/Services/NameplateService.cs index d83643a..400ae23 100644 --- a/LightlessSync/Services/NameplateService.cs +++ b/LightlessSync/Services/NameplateService.cs @@ -17,6 +17,7 @@ public class NameplateService : DisposableMediatorSubscriberBase private readonly INamePlateGui _namePlateGui; private readonly PairManager _pairManager; + public NameplateService(ILogger logger, LightlessConfigService configService, INamePlateGui namePlateGui, @@ -36,11 +37,9 @@ public class NameplateService : DisposableMediatorSubscriberBase private void OnNamePlateUpdate(INamePlateUpdateContext context, IReadOnlyList handlers) { - - if (!_configService.Current.IsNameplateColorsEnabled && !_clientState.IsPvPExcludingDen) return; + if (!_configService.Current.IsNameplateColorsEnabled || (_configService.Current.IsNameplateColorsEnabled && _clientState.IsPvPExcludingDen)) return; var visibleUsersIds = _pairManager.GetOnlineUserPairs().Where(u => u.IsVisible && u.PlayerCharacterId != uint.MaxValue).Select(u => (ulong)u.PlayerCharacterId).ToHashSet(); var colors = _configService.Current.NameplateColors; - foreach (var handler in handlers) { var playerCharacter = handler.PlayerCharacter; @@ -63,6 +62,7 @@ public class NameplateService : DisposableMediatorSubscriberBase public void RequestRedraw() { + _namePlateGui.RequestRedraw(); } diff --git a/PenumbraAPI b/PenumbraAPI index 953dd22..dd14131 160000 --- a/PenumbraAPI +++ b/PenumbraAPI @@ -1 +1 @@ -Subproject commit 953dd227afda6b3943b0b88cc965d8aee8a879b5 +Subproject commit dd14131793e5ae47cc8e9232f46469216017b5aa