From 85c1f5e542b423170934a24f17b3a34a16edefa8 Mon Sep 17 00:00:00 2001 From: Lundmark <82000605+LundmarkJ@users.noreply.github.com> Date: Thu, 27 Feb 2025 14:05:48 +0100 Subject: [PATCH] (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. --- WeakAuras/GenericTrigger.lua | 6 ++++-- .../AceGUIWidget-WeakAurasMiniTalent_Wrath.lua | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/WeakAuras/GenericTrigger.lua b/WeakAuras/GenericTrigger.lua index 973a8b9..6c6a9ea 100644 --- a/WeakAuras/GenericTrigger.lua +++ b/WeakAuras/GenericTrigger.lua @@ -3886,7 +3886,8 @@ function GenericTrigger.SetToolTip(trigger, state) end return true elseif (state.spellId) then - GameTooltip:SetSpellByID(state.spellId); + --DEPRECATED GameTooltip:SetSpellByID(state.spellId); + GameTooltip:SetHyperlink("spell:"..(state.spellId or 0)); return true elseif (state.link) then GameTooltip:SetHyperlink(state.link); @@ -3909,7 +3910,8 @@ function GenericTrigger.SetToolTip(trigger, state) local prototype = GenericTrigger.GetPrototype(trigger) if prototype then if prototype.hasSpellID then - GameTooltip:SetSpellByID(trigger.spellName or 0); + --DEPRECATED GameTooltip:SetSpellByID(trigger.spellName or 0); + GameTooltip:SetHyperlink("spell:"..(trigger.spellName or 0)); return true elseif prototype.hasItemID then GameTooltip:SetHyperlink("item:"..(trigger.itemName or 0)..":0:0:0:0:0:0:0") diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMiniTalent_Wrath.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMiniTalent_Wrath.lua index dfb6343..a93abd6 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMiniTalent_Wrath.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMiniTalent_Wrath.lua @@ -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)