Skip to content

TBC WA bug, Clickable items cannot use Weak Aura. #6136

@dallgoon

Description

@dallgoon

Is there an existing issue for this?

  • I have searched the existing open and closed issues.

Description

Hello. Thank you for creating such a great addon.

I've been using a WeakAura setup that works fine, but it's not working on TBC.

The same WeakAura works fine on SOD.

I'm not sure if there was a change in the settings or if TBC changed how it works.

It works fine on the same WeakAura version, Classic. Is TBC preventing clicking on WeakAura?


local f = aura_env.region
if not f then return end
if InCombatLockdown and InCombatLockdown() then return end
if f.button then return end

local data = WeakAuras.GetData and WeakAuras.GetData(aura_env.id)
if not data or not data.triggers or not data.triggers[1] then return end

local trigger = data.triggers[1].trigger
if not trigger then return end

local itemField = trigger.itemName or trigger.item or trigger.itemID
if not itemField then return end

local itemIdNum = tonumber(itemField)
local macrotext
if itemIdNum then
macrotext = "/use item:" .. itemIdNum
else
macrotext = "/use " .. itemField
end

local btn = CreateFrame("Button", nil, UIParent, "SecureActionButtonTemplate")
f.button = btn

btn:SetAttribute("type", "macro")
btn:SetAttribute("macrotext", macrotext)
btn:SetAllPoints(f)
btn:SetFrameStrata(f:GetFrameStrata())
btn:SetFrameLevel(f:GetFrameLevel() + 1)

btn:SetScript("OnEnter", function(self)
GameTooltip:SetOwner(self, "ANCHOR_CURSOR")
GameTooltip:ClearLines()
if itemIdNum then
GameTooltip:SetItemByID(itemIdNum)
else
GameTooltip:AddLine(itemField)
end
GameTooltip:Show()
end)

btn:SetScript("OnLeave", function(self)
GameTooltip:Hide()
end)

WeakAuras Version

WA 5.5

World of Warcraft Flavor

Burning Crusade Anniversary

World of Warcraft Region

US/NA

Tested with only WeakAuras

I got this issue with only WeakAuras enabled

Lua Error


Reproduction Steps

local f = aura_env.region
if not f then return end
if InCombatLockdown and InCombatLockdown() then return end
if f.button then return end

local data = WeakAuras.GetData and WeakAuras.GetData(aura_env.id)
if not data or not data.triggers or not data.triggers[1] then return end

local trigger = data.triggers[1].trigger
if not trigger then return end

local itemField = trigger.itemName or trigger.item or trigger.itemID
if not itemField then return end

local itemIdNum = tonumber(itemField)
local macrotext
if itemIdNum then
macrotext = "/use item:" .. itemIdNum
else
macrotext = "/use " .. itemField
end

local btn = CreateFrame("Button", nil, UIParent, "SecureActionButtonTemplate")
f.button = btn

btn:SetAttribute("type", "macro")
btn:SetAttribute("macrotext", macrotext)
btn:SetAllPoints(f)
btn:SetFrameStrata(f:GetFrameStrata())
btn:SetFrameLevel(f:GetFrameLevel() + 1)

btn:SetScript("OnEnter", function(self)
GameTooltip:SetOwner(self, "ANCHOR_CURSOR")
GameTooltip:ClearLines()
if itemIdNum then
GameTooltip:SetItemByID(itemIdNum)
else
GameTooltip:AddLine(itemField)
end
GameTooltip:Show()
end)

btn:SetScript("OnLeave", function(self)
GameTooltip:Hide()
end)

Last Good Version

No response

Screenshots

No response

Export String


Bisector Report


Metadata

Metadata

Assignees

No one assigned

    Labels

    ⏱ Awaiting ResponseThis ticket hasn't been triaged yet.🐛 BugThis is a problem with WeakAuras.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions