From 529bcf15d5774ee357985b783c44e59eff9ebbb4 Mon Sep 17 00:00:00 2001 From: Spit <19otari98@gmail.com> Date: Wed, 14 May 2025 14:45:40 +0300 Subject: [PATCH] fix compatibility with vendor prices --- Core/Tooltip.lua | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/Core/Tooltip.lua b/Core/Tooltip.lua index 0dacd84..322479e 100644 --- a/Core/Tooltip.lua +++ b/Core/Tooltip.lua @@ -97,22 +97,21 @@ end local lastItemID, lastSourceStr local function ExtendTooltip(tooltip) - if not AtlasLootCharDB.ShowSource then - return - end - local itemID = tonumber(tooltip.itemID) - if itemID and itemID ~= 51217 then -- 51217 Fashion Coin - if itemID ~= lastItemID then - lastItemID = itemID - lastSourceStr = nil - local source = AtlasLoot_Data["AtlasLootSources"][itemID] - if source then - local str = GREY .. source .. "|r" - lastSourceStr = str + if AtlasLootCharDB.ShowSource then + local itemID = tonumber(tooltip.itemID) + if itemID and itemID ~= 51217 then -- 51217 Fashion Coin + if itemID ~= lastItemID then + lastItemID = itemID + lastSourceStr = nil + local source = AtlasLoot_Data["AtlasLootSources"][itemID] + if source then + local str = GREY .. source .. "|r" + lastSourceStr = str + end + end + if lastSourceStr then + AddSourceLine(tooltip, lastSourceStr) end - end - if lastSourceStr then - AddSourceLine(tooltip, lastSourceStr) end end if tooltipMoney > 0 then