From 7459695a68ecf942bf44c57ddbb6397bbf5e7d84 Mon Sep 17 00:00:00 2001 From: Crum Date: Thu, 19 Jul 2018 00:09:27 -0500 Subject: [PATCH] update Tooltip --- ElvUI/Modules/Tooltip/Tooltip.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ElvUI/Modules/Tooltip/Tooltip.lua b/ElvUI/Modules/Tooltip/Tooltip.lua index 68571e0..b7b06c5 100644 --- a/ElvUI/Modules/Tooltip/Tooltip.lua +++ b/ElvUI/Modules/Tooltip/Tooltip.lua @@ -287,20 +287,20 @@ function TT:SetPrice(tt, id, count) end end -function TT:SetAction(tt, id) +function TT:SetAction(tt, buttonID) if GameTooltipTextRight1:IsShown() then return end local itemName = GameTooltipTextLeft1:GetText() if not itemName then return end local item, link = GetItemInfoByName(itemName) if not link then return end - + local id = tonumber(match(link, "item:(%d+)")) - + if E.db.tooltip.itemPrice then local count = 1 - if IsConsumableAction(id) then - local actionCount = GetActionCount(id) + if IsConsumableAction(buttonID) then + local actionCount = GetActionCount(buttonID) if actionCount and actionCount == GetItemCount(item) then count = actionCount end @@ -348,7 +348,7 @@ function TT:SetBagItem(tt, bag, slot) if not link then return end local id = tonumber(match(link, "item:(%d+)")) - + if E.db.tooltip.itemPrice then local _, count = GetContainerItemInfo(bag, slot) self:SetPrice(tt, id, count) @@ -542,7 +542,7 @@ function TT:SetTradePlayerItem(tt, index) if not link then return end local id = tonumber(match(link, "item:(%d+)")) - + if E.db.tooltip.itemPrice then local _, _, count = GetTradePlayerItemInfo(index) self:SetPrice(tt, id, count) @@ -577,7 +577,7 @@ function TT:SetTradeTargetItem(tt, index) if not link then return end local id = tonumber(match(link, "item:(%d+)")) - + if E.db.tooltip.itemPrice then local _, _, count = GetTradeTargetItemInfo(index) self:SetPrice(tt, id, count)