Skip to content

Commit

Permalink
LinkInfoIcons: Fix usage of GetSpellInfo for 11.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
plusmouse committed Aug 14, 2024
1 parent ade4044 commit 3c7c0c9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/LinkInfoIcons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,13 @@ end

local function SubInSpellInfo(link)
local spellID = tonumber(link:match("Hspell:(%d+)"))
local icon = select(3, GetSpellInfo(spellID))
local icon
if C_Spell and C_Spell.GetSpellInfo then
local info = C_Spell.GetSpellInfo(spellID)
icon = info and info.iconID
else
icon = select(3, GetSpellInfo(spellID))
end

local res = link
if module.db.profile.spell.icon and icon then
Expand Down

0 comments on commit 3c7c0c9

Please sign in to comment.