Skip to content

Commit 32487ca

Browse files
authored
fix: monk icon paths (#17)
* Add CurseForge publishing support and MIT license - Add CF_API_KEY to release workflow for CurseForge uploads - Add LICENSE (MIT) - Add curseforge_logo.png and curseforge_description.md - Update .pkgmeta to exclude new non-addon files from zip * chore: add CurseForge project ID to .pkgmeta * Update to WoW 12.0.5 (Interface 120005), add Monk abilities (Revival, Celestial Conduit, Invoke Yu'lon) * fix: correct icon paths for Celestial Conduit and Invoke Yu'lon * fix: resolve Monk spell icons dynamically via C_Spell.GetSpellTexture() Newer WoW spells use numeric FileIDs instead of string icon paths. Added spellId field to Monk entries and CT:ResolveIcons() helper that overwrites string paths with real textures at ADDON_LOADED time.
1 parent 3715db7 commit 32487ca

3 files changed

Lines changed: 26 additions & 2 deletions

File tree

.luacheckrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ read_globals = {
2626
"UIParent",
2727
"GameTooltip",
2828
-- Namespaces
29+
"C_Spell",
2930
"C_Timer",
3031
"Settings",
3132
}

Core.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ eventFrame:SetScript("OnEvent", function(_, event, name)
3333
if CooldownTrackerDB.frameLocked == nil then
3434
CooldownTrackerDB.frameLocked = false
3535
end
36+
-- Resolve spell icons (replaces string paths with FileIDs where possible)
37+
CT:ResolveIcons()
3638
-- Register the settings panel (applies saved durations to COOLDOWNS)
3739
CT:InitSettings()
3840
-- Expand cooldowns before building UI (so copies inherit saved durations)

Data.lua

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ CT.COOLDOWNS = {
130130
duration = 180,
131131
defaultDuration = 180,
132132
icon = "Interface\\Icons\\spell_monk_revival",
133+
spellId = 115310,
133134
r = 0.0, g = 1.0, b = 0.59,
134135
},
135136
{
@@ -138,7 +139,8 @@ CT.COOLDOWNS = {
138139
name = "Celestial Conduit",
139140
duration = 90,
140141
defaultDuration = 90,
141-
icon = "Interface\\Icons\\ability_monk_celestialconduit",
142+
icon = "Interface\\Icons\\ability_monk_conduit_of_the_celestials",
143+
spellId = 443028,
142144
r = 0.0, g = 1.0, b = 0.59,
143145
},
144146
{
@@ -147,7 +149,8 @@ CT.COOLDOWNS = {
147149
name = "Invoke Yu'lon",
148150
duration = 120,
149151
defaultDuration = 120,
150-
icon = "Interface\\Icons\\ability_monk_dragonfire",
152+
icon = "Interface\\Icons\\ability_monk_invokeyulon",
153+
spellId = 322118,
151154
r = 0.0, g = 1.0, b = 0.59,
152155
},
153156

@@ -212,3 +215,21 @@ CT.COOLDOWNS = {
212215
r = 0.2, g = 0.58, b = 0.5,
213216
},
214217
}
218+
219+
--------------------------------------------------------------------------------
220+
-- CT:ResolveIcons()
221+
-- Called once at ADDON_LOADED time. For any cooldown entry that carries a
222+
-- spellId, we ask the WoW client for the real icon FileID and overwrite the
223+
-- string icon path. This ensures newer spells (which lack traditional
224+
-- Interface\Icons\ string paths) display correctly.
225+
--------------------------------------------------------------------------------
226+
function CT:ResolveIcons()
227+
for _, cd in ipairs(CT.COOLDOWNS) do
228+
if cd.spellId and C_Spell and C_Spell.GetSpellTexture then
229+
local tex = C_Spell.GetSpellTexture(cd.spellId)
230+
if tex then
231+
cd.icon = tex
232+
end
233+
end
234+
end
235+
end

0 commit comments

Comments
 (0)