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:
@@ -99,7 +99,7 @@ local function GetCarnageOverride(effect)
|
||||
end
|
||||
|
||||
for spellID, override in pairs(CleveRoids.carnageDurationOverrides) do
|
||||
local spellName = GetSpellRecField(spellID, "name")
|
||||
local spellName = C_Spell.GetSpellName(spellID)
|
||||
if spellName then
|
||||
local baseName = CleveRoids.StripRank(spellName)
|
||||
if baseName == effect and override.timestamp and (GetTime() - override.timestamp) < 5 then
|
||||
@@ -209,7 +209,7 @@ function Extension.HookPfUILibdebuff()
|
||||
for spellID, rec in pairs(CleveRoids.libdebuff.objects[unitGUID]) do
|
||||
if rec and rec.start and rec.duration then
|
||||
-- Get spell name for this ID
|
||||
local spellName = GetSpellRecField(spellID, "name")
|
||||
local spellName = C_Spell.GetSpellName(spellID)
|
||||
if spellName then
|
||||
local baseName = CleveRoids.StripRank(spellName)
|
||||
if baseName == effect then
|
||||
@@ -380,7 +380,7 @@ function Extension.SyncComboDurationToPfUI(guid, spellID, duration)
|
||||
end
|
||||
|
||||
-- Get spell name from spell ID
|
||||
local spellName = GetSpellRecField(spellID, "name")
|
||||
local spellName = C_Spell.GetSpellName(spellID)
|
||||
if not spellName then
|
||||
if CleveRoids.debug then
|
||||
DEFAULT_CHAT_FRAME:AddMessage("|cffff0000[pfUI Sync]|r Could not find spell name for ID " .. spellID)
|
||||
|
||||
Reference in New Issue
Block a user