mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-25 17:16:02 +00:00
libtooltip: improve auction item link handling
based on: https://github.com/shagu/ShaguTweaks/commit/2eace5ffd6ecda09d376969885aabcf247611b8e
This commit is contained in:
+4
-6
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user