Release 4.2: spell IDs, base-health verify, macro display

- Find Life Tap ranks by spell ID (FindSpellBookSlotByID) with name scan fallback
- /slt verify [adopt|reset] compares BASE table to C_Spell.GetSpellDescription
- Macro buttons with /slt cast show the current rank (C_Macro.SetMacroDisplay)
- Debug output of raw combat log values to confirm powerType position
- Options: macro display checkbox, taller standalone window

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019W3rwwaFE77MpiHiYhRwLT
This commit is contained in:
2026-10-31 23:20:08 +00:00
co-authored by Claude Sonnet 5.5
parent c1b0800bdb
commit a05e2d5ff9
4 changed files with 277 additions and 19 deletions
+6 -3
View File
@@ -1,4 +1,4 @@
-- ScaledLifeTap 4.1 - options window
-- ScaledLifeTap 4.2 - options window
--
-- With ClassicAPI, the pages are added to its AddOn Options window (game menu
-- -> AddOn Options -> ScaledLifeTap), following the same conventions as
@@ -11,7 +11,7 @@
-- Lua 5.0 / 1.12 API only: no `...` expressions, no select(), handlers use `this`.
local SLT = ScaledLifeTap
local VERSION = type(GetAddOnMetadata) == "function" and GetAddOnMetadata("ScaledLifeTap", "Version") or "4.1"
local VERSION = type(GetAddOnMetadata) == "function" and GetAddOnMetadata("ScaledLifeTap", "Version") or "4.2"
local T = {
ABOUT = "Casts the highest Life Tap rank that fits into your missing mana. Put |cffffffff/slt cast|r in a macro.",
@@ -23,6 +23,8 @@ local T = {
CALIBRATE_RESET_TIP = "Forget what the mana check has learned.",
DEBUG = "Show each cast in chat",
DEBUG_TIP = "Prints the rank, health cost and mana gained every time Life Tap is cast.",
MACRO_DISPLAY = "Show rank on macro button",
MACRO_DISPLAY_TIP = "Macros that contain /slt cast show the Life Tap rank that would be cast right now. Needs ClassicAPI.",
RESERVE = "Health reserve (%)",
RESERVE_TIP = "Never tap below this percentage of your maximum health. 0 means only the health the tap itself needs.",
SOURCE = "Spell damage source",
@@ -260,6 +262,7 @@ AddButton(main, T.CALIBRATE_RESET, T.CALIBRATE_RESET_TIP, function()
SLT.ResetCalibration()
RefreshControls(main)
end, 220, main.y + 30 - 4, 80)
AddCheckbox(main, T.MACRO_DISPLAY, T.MACRO_DISPLAY_TIP, ConfigSetting("macroDisplay", SLT.RefreshMacroDisplay), SLT.CanMacroDisplay)
AddCheckbox(main, T.DEBUG, T.DEBUG_TIP, ConfigSetting("debug"))
AddSlider(main, T.RESERVE, T.RESERVE_TIP, ConfigSetting("reserve"), 0, 90, 5)
AddDropDown(main, T.SOURCE, T.SOURCE_TIP, ConfigSetting("source", SLT.Rescan), function()
@@ -308,7 +311,7 @@ local function ShowStandalone()
if not standalone then
standalone = CreateFrame("Frame", "ScaledLifeTapOptionsWindow", UIParent)
standalone:SetWidth(420)
standalone:SetHeight(470)
standalone:SetHeight(500)
standalone:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
standalone:SetFrameStrata("DIALOG")
standalone:SetBackdrop({