Skip to content

Commit

Permalink
added GetNodeListCount
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaksuhn committed Dec 12, 2023
1 parent 930c2bf commit b2f909a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
5 changes: 4 additions & 1 deletion SomethingNeedDoing/Interface/HelpWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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);
Expand Down
10 changes: 10 additions & 0 deletions SomethingNeedDoing/Misc/CommandInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -600,6 +601,15 @@ private static object MatchingScore(string item, string line)
return score;
}

public unsafe int GetNodeListCount(string addonName)
{
if (GenericHelpers.TryGetAddonByName<AtkUnitBase>(addonName, out var addon))
{
return addon->UldManager.NodeListCount;
}
return 0;
}

private unsafe int GetNodeTextAsInt(AtkTextNode* node, string error)
{
try
Expand Down

0 comments on commit b2f909a

Please sign in to comment.