From b2f909aaeb942d07e63a9b637daf1e43d3b65bd2 Mon Sep 17 00:00:00 2001 From: Jackson <9527380+Jaksuhn@users.noreply.github.com> Date: Tue, 12 Dec 2023 11:35:10 +0000 Subject: [PATCH] added GetNodeListCount --- SomethingNeedDoing/Interface/HelpWindow.cs | 5 ++++- SomethingNeedDoing/Misc/CommandInterface.cs | 10 ++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/SomethingNeedDoing/Interface/HelpWindow.cs b/SomethingNeedDoing/Interface/HelpWindow.cs index 4d109a4f4..976dcd7d6 100644 --- a/SomethingNeedDoing/Interface/HelpWindow.cs +++ b/SomethingNeedDoing/Interface/HelpWindow.cs @@ -326,7 +326,8 @@ static void DisplayChangelog(string date, string changes, bool separator = true) "- Added IsQuestAccepted()\n" + "- Added IsQuestComplete()\n" + "- Added GetQuestSequence()\n" + - "- Added GetQuestIDByName()\n"); + "- Added GetQuestIDByName()\n" + + "- Added GetNodeListCount()\n"); DisplayChangelog( "2023-11-06", @@ -960,6 +961,8 @@ bool IsQuestAccepted(ushort id) bool IsQuestComplete(ushort id) byte GetQuestSequence(ushort id) uint? GetQuestIDByName(string name) + +int GetNodeListCount(string addonName) ".Trim(); ImGui.TextWrapped(text); diff --git a/SomethingNeedDoing/Misc/CommandInterface.cs b/SomethingNeedDoing/Misc/CommandInterface.cs index bf088472f..537649d28 100644 --- a/SomethingNeedDoing/Misc/CommandInterface.cs +++ b/SomethingNeedDoing/Misc/CommandInterface.cs @@ -6,6 +6,7 @@ using System.Text.RegularExpressions; using Dalamud.Game.ClientState.Conditions; using Dalamud.Logging; +using ECommons; using ECommons.DalamudServices; using FFXIVClientStructs.FFXIV.Client.Game; using FFXIVClientStructs.FFXIV.Client.Game.UI; @@ -600,6 +601,15 @@ private static object MatchingScore(string item, string line) return score; } + public unsafe int GetNodeListCount(string addonName) + { + if (GenericHelpers.TryGetAddonByName(addonName, out var addon)) + { + return addon->UldManager.NodeListCount; + } + return 0; + } + private unsafe int GetNodeTextAsInt(AtkTextNode* node, string error) { try