PHP код:
GameTooltip:HookScript("OnTooltipCleared", function(self) self.TukuiItemTooltip=nil end)
GameTooltip:HookScript("OnTooltipSetItem", function(self)
local item, link = self:GetItem()
local num = GetItemCount(link)
local left = ""
local right = ""
if link ~= nil then
left = "|cFFCA3C3CID|r "..link:match(":(%w+)")
end
if num > 1 then
right = "|cFFCA3C3C".."Count".."|r "..num
end
self:AddLine(" ")
self:AddDoubleLine(left, right)
self.TukuiItemTooltip = 1
end)
local f = CreateFrame("Frame")
f:RegisterEvent("ADDON_LOADED")
f:SetScript("OnEvent", function(_, _, name)
if name ~= "defUI" then return end
f:UnregisterEvent("ADDON_LOADED")
f:SetScript("OnEvent", nil)
TukuiItemTooltip = TukuiItemTooltip or {count=true,id=true}
end)
Попробуй.