mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user