read spell rank via C_Spell.GetSpellSubtext

The rank string comes from the spell subtext ("Rank N"), which ClassicAPI's
C_Spell.GetSpellSubtext returns directly -- so drop nampower's
GetSpellRecField(spellId, "rank") here. The existing "Rank " gsub parse is
unchanged.
This commit is contained in:
Brues
2026-07-25 00:53:55 -05:00
parent 4b1ba99b4f
commit a6cf157518
3 changed files with 7 additions and 9 deletions
+2 -2
View File
@@ -93,8 +93,8 @@ pfUI:RegisterModule("castbar", function ()
cb.bar:SetStatusBarColor(strsplit(",", C.appearance.castbar[isChannel and "channelcolor" or "castbarcolor"]))
local rank = ""
if spellID and GetSpellRecField then
rank = GetSpellRecField(spellID, "rank") or ""
if spellID then
rank = C_Spell.GetSpellSubtext(spellID) or ""
end
local spellname = (cb.showname and name) and (name .. " ") or ""
local rankstr = (cb.showrank and rank ~= "") and string.format("|cffaaffcc[%s]|r", rank) or ""