Use ClassicAPI for action-bar mapping, spell IDs, and dynamic pfUI icons

GetActionInfo:
- Add ClassicAPI.GetActionInfo wrapper; rewrite GetActionButtonInfo
  (Generic.lua) to use it and resolve names via GetSpellRecField /
  GetItem / GetMacroInfo, replacing the per-slot GameTooltip scan +
  texture heuristic. Powers reactive-ability slot detection.
- Delete the dead SuperWoW-GetActionText copy of GetActionButtonInfo.

Spell IDs in the index:
- IndexSpells now uses ClassicAPI GetSpellInfo(slot, bookType), whose
  10th return is the spellID, so every Spells entry carries .id (one
  call also replaces GetSpellName + GetSpellTexture).

Dynamic pfUI action-button icons (pairs with the pfUI fork change):
- GameTooltip.SetAction hook renders spells via ClassicAPI
  SetSpellByID(spell.id) instead of SetSpell(spellSlot, bookType) +
  manual rank text. Items stay location-based (instance data).
- Drop the redundant GetActionSpellSlot -> GetSpellCooldown cooldown
  shim in the pfUI handler; pfUI now routes through the hooked
  GetActionCooldown when it defers macro scanning to us.
This commit is contained in:
Brues
2026-06-21 00:11:46 -05:00
parent b28f4452b9
commit 73e8938d76
6 changed files with 67 additions and 108 deletions
+12
View File
@@ -106,3 +106,15 @@ end
function API.IsPlayerFalling()
return IsFalling()
end
--------------------------------------------------------------------------------
-- Action
--------------------------------------------------------------------------------
-- Action descriptor for a 1-based action-bar slot: actionType, id, subType.
-- actionType: "spell" (id = spellID) | "macro" (id = macroSlot) |
-- "item" (id = itemID, or nil for a bag-instance item)
-- nil for an empty slot.
function API.GetActionInfo(slot)
return GetActionInfo(slot)
end