mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-17 02:00:49 +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
|
local pfHookSetAuctionItem = GameTooltip.SetAuctionItem
|
||||||
function GameTooltip.SetAuctionItem(self, atype, index)
|
function GameTooltip.SetAuctionItem(self, atype, index)
|
||||||
local itemName, _, itemCount = GetAuctionItemInfo(atype, index)
|
_, libtooltip.itemCount = GetAuctionItemInfo(atype, index)
|
||||||
libtooltip.itemCount = itemCount
|
libtooltip.itemLink = GetAuctionItemLink(atype, index)
|
||||||
libtooltip.itemLink = GetItemLinkByName(itemName)
|
|
||||||
return pfHookSetAuctionItem(self, atype, index)
|
return pfHookSetAuctionItem(self, atype, index)
|
||||||
end
|
end
|
||||||
|
|
||||||
local pfHookSetAuctionSellItem = GameTooltip.SetAuctionSellItem
|
local pfHookSetAuctionSellItem = GameTooltip.SetAuctionSellItem
|
||||||
function GameTooltip.SetAuctionSellItem(self)
|
function GameTooltip.SetAuctionSellItem(self)
|
||||||
local itemName, _, itemCount = GetAuctionSellItemInfo()
|
_, libtooltip.itemCount = GetAuctionSellItemInfo()
|
||||||
libtooltip.itemCount = itemCount
|
libtooltip.itemLink = GetAuctionSellItemLink()
|
||||||
libtooltip.itemLink = GetItemLinkByName(itemName)
|
|
||||||
return pfHookSetAuctionSellItem(self)
|
return pfHookSetAuctionSellItem(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ pfUI:RegisterModule("sellvalue", "vanilla:tbc", function ()
|
|||||||
pfUI.sellvalue:SetScript("OnShow", function()
|
pfUI.sellvalue:SetScript("OnShow", function()
|
||||||
if libtooltip:GetItemLink() then
|
if libtooltip:GetItemLink() then
|
||||||
local id = libtooltip:GetItemID()
|
local id = libtooltip:GetItemID()
|
||||||
local count = libtooltip:GetItemCount() or 1
|
local count = tonumber(libtooltip:GetItemCount()) or 1
|
||||||
AddVendorPrices(GameTooltip, id, math.max(count, 1))
|
AddVendorPrices(GameTooltip, id, math.max(count, 1))
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|||||||
Reference in New Issue
Block a user