Fix Vanilla 1.12 vendor tooltip money capture

This commit is contained in:
Dusk-92
2026-08-24 09:25:23 +02:00
parent 9620d79d98
commit 46315cb066
+5 -1
View File
@@ -121,7 +121,11 @@ API.PrepareVendorValues = function()
if count < 1 then count = 1 end
local tooltipName = tooltip and tooltip:GetName()
local moneyFrame = tooltipName and _G[tooltipName .. "MoneyFrame1"]
if not tooltipName then return end
-- Vanilla 1.12 uses GameTooltipMoneyFrame (no numeric suffix). Later
-- FrameXML versions use MoneyFrame1, so keep both for compatibility.
local moneyFrame = _G[tooltipName .. "MoneyFrame"] or _G[tooltipName .. "MoneyFrame1"]
local stackPrice = moneyFrame and moneyFrame:IsShown() and tonumber(moneyFrame.staticMoney)
if not stackPrice or stackPrice <= 0 then return end