(fix/tooltips) SetSpellByID -> Hardcoded Spell Escape Sequence strings

this is a fix for GameTooltip for Spells. In 3.3.5 API, GameTooltip:SetSpellByID only allows player known spells to be set.
The workaround for this is using GameTooltip:SetHyperlink() and hardcoding an escape sequence for spells.
This commit is contained in:
Lundmark
2025-02-27 14:05:48 +01:00
committed by GitHub
parent 04233722ee
commit 85c1f5e542
2 changed files with 6 additions and 3 deletions
@@ -93,7 +93,8 @@ end
local function Button_ShowToolTip(self)
if self.spellId then
GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
GameTooltip:SetSpellByID(self.spellId)
--DEPRECATED GameTooltip:SetSpellByID(self.spellId)
GameTooltip:SetHyperlink("spell:"..(self.spellId or 0))
end
end
local function Button_HideToolTip(self)