mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-07 06:00:00 +00:00
no need to show count for unique items
This commit is contained in:
@@ -13,7 +13,7 @@ pfUI:RegisterModule("itemcount", function ()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function AddCounts(frame, id)
|
local function AddCounts(frame, id)
|
||||||
if not id then return end
|
if not id or id == HEARTHSTONE_ITEM_ID or C_Item.GetItemUniquenessByID(id) == 1 then return end
|
||||||
|
|
||||||
local total = C_Item.GetItemCount(id, true) -- bags + bank + equipped
|
local total = C_Item.GetItemCount(id, true) -- bags + bank + equipped
|
||||||
if total < 1 then return end
|
if total < 1 then return end
|
||||||
@@ -33,8 +33,6 @@ pfUI:RegisterModule("itemcount", function ()
|
|||||||
frame:Show()
|
frame:Show()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- GameTooltip: piggyback on its OnShow lifecycle. Each tooltip refresh
|
|
||||||
-- hides/shows the parent which propagates Show() to this child frame.
|
|
||||||
pfUI.itemcount = CreateFrame("Frame", "pfItemCountTooltip", GameTooltip)
|
pfUI.itemcount = CreateFrame("Frame", "pfItemCountTooltip", GameTooltip)
|
||||||
pfUI.itemcount:SetScript("OnShow", function()
|
pfUI.itemcount:SetScript("OnShow", function()
|
||||||
if GameTooltip:HasItem() then
|
if GameTooltip:HasItem() then
|
||||||
@@ -43,7 +41,6 @@ pfUI:RegisterModule("itemcount", function ()
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- ItemRefTooltip: persistent tooltip from chat link clicks.
|
|
||||||
hooksecurefunc("SetItemRef", function()
|
hooksecurefunc("SetItemRef", function()
|
||||||
if ItemRefTooltip:HasItem() then
|
if ItemRefTooltip:HasItem() then
|
||||||
local _, _, id = ItemRefTooltip:GetItem()
|
local _, _, id = ItemRefTooltip:GetItem()
|
||||||
|
|||||||
Reference in New Issue
Block a user