Skip to content

Commit d987d77

Browse files
committed
Use UnitManager to detect nameplate hiding
1 parent 1a8d728 commit d987d77

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

Mappy/Controllers/IntegrationsController.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -189,14 +189,8 @@ public static bool ShouldShowMap() {
189189
return true;
190190
}
191191

192-
private static bool IsNamePlateAddonVisible() {
193-
var addonNamePlate = (AddonNamePlate*) Service.GameGui.GetAddonByName("NamePlate");
194-
195-
if (addonNamePlate is null) return false;
196-
if (!addonNamePlate->IsReady) return false;
197-
198-
return true;
199-
}
192+
private static bool IsNamePlateAddonVisible()
193+
=> !RaptureAtkUnitManager.Instance()->UiFlags.HasFlag(UIModule.UiFlags.Nameplates);
200194

201195
private uint? GetMapIdForQuest(OpenMapInfo* mapInfo) {
202196
foreach (var leveQuest in QuestManager.Instance()->LeveQuests) {

0 commit comments

Comments
 (0)