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:
@@ -122,7 +122,7 @@ local function CreateIconButton(parent, index, iconTable)
|
||||
GameTooltip:SetOwner(btn, "ANCHOR_BOTTOMLEFT")
|
||||
local spellName
|
||||
if data.spellId then
|
||||
spellName = GetSpellRecField and GetSpellRecField(data.spellId, "name") or ("Spell " .. data.spellId)
|
||||
spellName = C_Spell.GetSpellName(data.spellId) or ("Spell " .. data.spellId)
|
||||
else
|
||||
spellName = data.displayName
|
||||
end
|
||||
@@ -649,7 +649,7 @@ local function InjectTestTargetData()
|
||||
for i = 1, table.getn(TEST_TARGET_SPELL_IDS) do
|
||||
local spellId = TEST_TARGET_SPELL_IDS[i]
|
||||
local dur = targetDurations[i] or 60
|
||||
local spellName = GetSpellRecField and GetSpellRecField(spellId, "name") or ("TestSpell" .. spellId)
|
||||
local spellName = C_Spell.GetSpellName(spellId) or ("TestSpell" .. spellId)
|
||||
if not CleveRoids.AllCasterAuraTracking[targetGuid][spellName] then
|
||||
CleveRoids.AllCasterAuraTracking[targetGuid][spellName] = {}
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user