Render known-spell action tooltips via spellbook slot, not spellID

GameTooltip.SetAction used GameTooltip:SetSpellByID for spell actions, which
renders the static DBC tooltip. For spells we resolved from the player's own
spellbook, use GameTooltip:SetSpell(spellSlot, bookType) instead so the
tooltip shows live player-accurate data (mana cost, cooldown, range coloring,
reagent counts). spellSlot/bookType/id all come from the same spellbook index
entry, so it renders the identical spell and rank. SetSpellByID remains as a
defensive fallback for entries without a slot. Applied to both the direct and
nested-macro tooltip paths.
This commit is contained in:
Brues
2026-06-23 12:41:17 -05:00
parent 3384765faa
commit fc640abb07
+10 -4
View File
@@ -4425,9 +4425,11 @@ function GameTooltip.SetAction(self, slot)
local current_spell_data = CleveRoids.GetSpell(action_name)
if current_spell_data and current_spell_data.id then
-- ClassicAPI: render by spellID (rank included) instead of routing
-- through the spellbook slot via SetSpell(spellSlot, bookType).
GameTooltip:SetSpellByID(current_spell_data.id)
if current_spell_data.spellSlot and current_spell_data.bookType then
GameTooltip:SetSpell(current_spell_data.spellSlot, current_spell_data.bookType)
else
GameTooltip:SetSpellByID(current_spell_data.id)
end
GameTooltip:Show()
return
end
@@ -4453,7 +4455,11 @@ function GameTooltip.SetAction(self, slot)
current_spell_data = CleveRoids.GetSpell(nested_action_name)
if current_spell_data and current_spell_data.id then
GameTooltip:SetSpellByID(current_spell_data.id)
if current_spell_data.spellSlot and current_spell_data.bookType then
GameTooltip:SetSpell(current_spell_data.spellSlot, current_spell_data.bookType)
else
GameTooltip:SetSpellByID(current_spell_data.id)
end
GameTooltip:Show()
return
end