libtooltip: improve auction item link handling

based on: https://github.com/shagu/ShaguTweaks/commit/2eace5ffd6ecda09d376969885aabcf247611b8e
This commit is contained in:
shagu
2025-06-30 08:08:51 +02:00
parent b66ccd9198
commit 49bdddf25c
2 changed files with 5 additions and 7 deletions
+4 -6
View File
@@ -141,17 +141,15 @@ end
local pfHookSetAuctionItem = GameTooltip.SetAuctionItem
function GameTooltip.SetAuctionItem(self, atype, index)
local itemName, _, itemCount = GetAuctionItemInfo(atype, index)
libtooltip.itemCount = itemCount
libtooltip.itemLink = GetItemLinkByName(itemName)
_, libtooltip.itemCount = GetAuctionItemInfo(atype, index)
libtooltip.itemLink = GetAuctionItemLink(atype, index)
return pfHookSetAuctionItem(self, atype, index)
end
local pfHookSetAuctionSellItem = GameTooltip.SetAuctionSellItem
function GameTooltip.SetAuctionSellItem(self)
local itemName, _, itemCount = GetAuctionSellItemInfo()
libtooltip.itemCount = itemCount
libtooltip.itemLink = GetItemLinkByName(itemName)
_, libtooltip.itemCount = GetAuctionSellItemInfo()
libtooltip.itemLink = GetAuctionSellItemLink()
return pfHookSetAuctionSellItem(self)
end
+1 -1
View File
@@ -32,7 +32,7 @@ pfUI:RegisterModule("sellvalue", "vanilla:tbc", function ()
pfUI.sellvalue:SetScript("OnShow", function()
if libtooltip:GetItemLink() then
local id = libtooltip:GetItemID()
local count = libtooltip:GetItemCount() or 1
local count = tonumber(libtooltip:GetItemCount()) or 1
AddVendorPrices(GameTooltip, id, math.max(count, 1))
end
end)