From 8627dd8f491c3daf4a8e9dd788bc566fd7497ccb Mon Sep 17 00:00:00 2001 From: Jackson <9527380+Jaksuhn@users.noreply.github.com> Date: Tue, 12 Dec 2023 11:42:53 +0000 Subject: [PATCH] added GetTargetName --- SomethingNeedDoing/Interface/HelpWindow.cs | 5 ++++- SomethingNeedDoing/Misc/CommandInterface.cs | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/SomethingNeedDoing/Interface/HelpWindow.cs b/SomethingNeedDoing/Interface/HelpWindow.cs index 976dcd7d6..03f8deb1f 100644 --- a/SomethingNeedDoing/Interface/HelpWindow.cs +++ b/SomethingNeedDoing/Interface/HelpWindow.cs @@ -327,7 +327,8 @@ static void DisplayChangelog(string date, string changes, bool separator = true) "- Added IsQuestComplete()\n" + "- Added GetQuestSequence()\n" + "- Added GetQuestIDByName()\n" + - "- Added GetNodeListCount()\n"); + "- Added GetNodeListCount()\n" + + "- Added GetTargetName()\n"); DisplayChangelog( "2023-11-06", @@ -963,6 +964,8 @@ byte GetQuestSequence(ushort id) uint? GetQuestIDByName(string name) int GetNodeListCount(string addonName) + +string GetTargetName() ".Trim(); ImGui.TextWrapped(text); diff --git a/SomethingNeedDoing/Misc/CommandInterface.cs b/SomethingNeedDoing/Misc/CommandInterface.cs index 537649d28..c1fb6e681 100644 --- a/SomethingNeedDoing/Misc/CommandInterface.cs +++ b/SomethingNeedDoing/Misc/CommandInterface.cs @@ -610,6 +610,8 @@ public unsafe int GetNodeListCount(string addonName) return 0; } + public string GetTargetName() => Svc.Targets.Target?.Name.TextValue ?? ""; + private unsafe int GetNodeTextAsInt(AtkTextNode* node, string error) { try