mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
Replace GetSpellRecField name/rank reads with C_Spell equivalents
Swap 166 call sites from GetSpellRecField(id, "name") to C_Spell.GetSpellName(id) and GetSpellRecField(id, "rank") to C_Spell.GetSpellSubtext(id) across Core, Conditionals, Utility, ComboPointTracker, CursiveCustomSpells, pfUI, OverflowBuffFrame, and Generic. Guard forms and the _GetSpellRecField alias calls collapse to the direct C_Spell call. GetSpellRecField stays for fields with no C_Spell equivalent (school, spellIconID, mechanic, effectMechanic, effectApplyAuraName, stackAmount, rangeIndex) and inside the NampowerAPI wrapper layer.
This commit is contained in:
@@ -209,8 +209,8 @@ local function InjectCustomSpells()
|
||||
local count = 0
|
||||
for spellID, data in pairs(CleveRoids.CustomCursiveSpells) do
|
||||
-- Get texture from GetSpellRecField + GetSpellIconTexture
|
||||
local name = GetSpellRecField(spellID, "name")
|
||||
local rank = GetSpellRecField(spellID, "rank")
|
||||
local name = C_Spell.GetSpellName(spellID)
|
||||
local rank = C_Spell.GetSpellSubtext(spellID)
|
||||
local texture = CleveRoids.libdebuff and CleveRoids.libdebuff:GetCachedIcon(spellID)
|
||||
if texture then
|
||||
-- Always update/add (in case Cursive reloaded and cleared them)
|
||||
@@ -524,8 +524,8 @@ CleveRoids.HandleConsoleCommand = function(msg)
|
||||
return
|
||||
end
|
||||
|
||||
local name = GetSpellRecField(spellID, "name")
|
||||
local rank = GetSpellRecField(spellID, "rank")
|
||||
local name = C_Spell.GetSpellName(spellID)
|
||||
local rank = C_Spell.GetSpellSubtext(spellID)
|
||||
local texture = CleveRoids.libdebuff and CleveRoids.libdebuff:GetCachedIcon(spellID)
|
||||
if not name then
|
||||
DEFAULT_CHAT_FRAME:AddMessage("|cffff0000Error:|r Spell ID " .. spellID .. " not found.")
|
||||
|
||||
Reference in New Issue
Block a user