From 87dfd0995f9db0f29f899a47132428e66fec9ff7 Mon Sep 17 00:00:00 2001 From: pepopo978 Date: Tue, 17 Jun 2025 07:44:48 -0700 Subject: [PATCH] realized it doesn't make much sense as a slash command --- Localization.lua | 2 -- README.md | 5 +++-- commands.lua | 5 ----- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/Localization.lua b/Localization.lua index adb85b2..94aca0b 100644 --- a/Localization.lua +++ b/Localization.lua @@ -32,7 +32,6 @@ L:RegisterTranslations("enUS", function() ["curse_duration_format"] = ".*over ([%d.]+) sec.", ["Shared Debuffs"] = true, ["|cffffcc00Cursive:|cffffaaaa Unknown command."] = true, - ["/cursive gettarget |>: Gets the guid of what cursive would target for the spell based on priority and options without casting anything."] = true, -- curses ["(.+) fades from (.+)"] = true, @@ -235,7 +234,6 @@ L:RegisterTranslations("zhCN", function() ["curse_duration_format"] = "(%d+%.?%d*)秒", ["Shared Debuffs"] = "共享debuff", ["|cffffcc00Cursive:|cffffaaaa Unknown command."] = "|cffffcc00Cursive:|cffffaaaa 未知命令.", - ["/cursive gettarget |>: Gets the guid of what cursive would target for the spell based on priority and options without casting anything."] = "/cursive gettarget <法术名称>|<选项列表,用半角逗号分隔>: 获取cursive根据优先级和选项选择的目标ID,不会施放任何法术.", -- curses ["(.+) fades from (.+)"] = "(.+)效果从(.+)身上消失", diff --git a/README.md b/README.md index ef01efe..5e7c123 100644 --- a/README.md +++ b/README.md @@ -45,9 +45,10 @@ EXAMPLE: `/cursive target Icicles|HIGHEST_HP` will target the enemy with the hig can also do it only if you don't have a target already: `/run if not UnitName("target") then SlashCmdList.CURSIVE("target Icicles|HIGHEST_HP") end` -`/cursive gettarget ||`: Returns guid of the unit that would be targeted based on priority and options. +There is also +`/script targetGuid = Cursive:GetTarget("str", "str", {})`: Returns guid of the unit that would be targeted based on priority and options. -EXAMPLE: `/cursive gettarget Corruption|HIGHEST_HP` will return guid of the enemy with the highest HP in range of the spell Corruption that doesn't already have Corruption. +EXAMPLE: `/script targetGuid = Cursive:GetTarget("Corruption", "HIGHEST_HP", {})` will return guid of the enemy with the highest HP in range of the spell Corruption that doesn't already have Corruption. ## Priority Options diff --git a/commands.lua b/commands.lua index 7596f2a..b7ec108 100644 --- a/commands.lua +++ b/commands.lua @@ -22,7 +22,6 @@ local commands = { ["curse"] = L["/cursive curse ||>: Casts spell if not already on target/guid"], ["multicurse"] = L["/cursive multicurse ||>: Picks target based on priority and casts spell if not already on target"], ["target"] = L["/cursive target ||>: Targets unit based on priority if spell in range and not already on target"], - ["gettarget"] = L["/cursive gettarget |>: Gets the guid of what cursive would target for the spell based on priority and options without casting anything."], } local PRIORITY_HIGHEST_HP = "HIGHEST_HP" @@ -118,10 +117,6 @@ local function handleSlashCommands(msg, editbox) local spellName, priority, optionsStr = Cursive.utils.strsplit("|", args) local options = parseOptions(optionsStr) Cursive:Target(spellName, priority, options) - elseif command == "gettarget" then - local spellName, optionsStr = Cursive.utils.strsplit("|", args) - local options = parseOptions(optionsStr) - Cursive:GetSpellTarget(spellName, options) else DEFAULT_CHAT_FRAME:AddMessage(L["|cffffcc00Cursive:|cffffaaaa Unknown command."]) DEFAULT_CHAT_FRAME:AddMessage(curseCommands)