From 35636f27f6b8b38e6864b6f8d4a6e8e09a857680 Mon Sep 17 00:00:00 2001 From: cake Date: Mon, 3 Nov 2025 21:47:15 +0100 Subject: [PATCH] Cleanup --- LightlessSync/Services/NameplateHandler.cs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/LightlessSync/Services/NameplateHandler.cs b/LightlessSync/Services/NameplateHandler.cs index 185a81d..5e83683 100644 --- a/LightlessSync/Services/NameplateHandler.cs +++ b/LightlessSync/Services/NameplateHandler.cs @@ -205,7 +205,7 @@ public unsafe class NameplateHandler : IMediatorSubscriber private void UpdateNameplateNodes() { - var currentAddon = (AddonNamePlate*)_gameGui.GetAddonByName("NamePlate", 1).Address; + var currentAddon = (AddonNamePlate*)_gameGui.GetAddonByName("NamePlate").Address; if (_mpNameplateAddon == null || currentAddon == null || currentAddon != _mpNameplateAddon) return; @@ -248,7 +248,7 @@ public unsafe class NameplateHandler : IMediatorSubscriber var cid = DalamudUtilService.GetHashedCIDFromPlayerPointer((nint)objectInfo->GameObject); if (cid == null || !_activeBroadcastingCids.Contains(cid)) { - pNode->AtkResNode.ToggleVisibility(false); + pNode->AtkResNode.ToggleVisibility(enable: false); continue; } @@ -256,7 +256,7 @@ public unsafe class NameplateHandler : IMediatorSubscriber if (!config.LightfinderLabelShowOwn && local != null && objectInfo->GameObject->GetGameObjectId() == local.GameObjectId) { - pNode->AtkResNode.ToggleVisibility(false); + pNode->AtkResNode.ToggleVisibility(enable: false); continue; } @@ -266,7 +266,7 @@ public unsafe class NameplateHandler : IMediatorSubscriber var goId = (ulong)objectInfo->GameObject->GetGameObjectId(); if (hidePaired && visibleUserIds.Contains(goId)) { - pNode->AtkResNode.ToggleVisibility(false); + pNode->AtkResNode.ToggleVisibility(enable: false); continue; } @@ -278,7 +278,7 @@ public unsafe class NameplateHandler : IMediatorSubscriber if (root == null || nameContainer == null || nameText == null) { - pNode->AtkResNode.ToggleVisibility(false); + pNode->AtkResNode.ToggleVisibility(enable: false); continue; } @@ -453,7 +453,7 @@ public unsafe class NameplateHandler : IMediatorSubscriber positionY += config.LightfinderLabelOffsetY; alignment = (AlignmentType)System.Math.Clamp((int)alignment, 0, 8); - pNode->AtkResNode.SetUseDepthBasedPriority(true); + pNode->AtkResNode.SetUseDepthBasedPriority(enable: true); pNode->AtkResNode.Color.A = 255; @@ -613,9 +613,8 @@ public unsafe class NameplateHandler : IMediatorSubscriber if (ReferenceEquals(_activeBroadcastingCids, newSet) || _activeBroadcastingCids.SetEquals(newSet)) return; - // single atomic swap – readers always see a consistent snapshot _activeBroadcastingCids = newSet; - _logger.LogInformation("Active broadcast CIDs: {Cids}", string.Join(",", _activeBroadcastingCids)); + _logger.LogInformation("Active broadcast CIDs: {Cids}", string.Join(',', _activeBroadcastingCids)); FlagRefresh(); }