diff --git a/ElvUI_SLE/skins/blizzard/merchantList.lua b/ElvUI_SLE/skins/blizzard/merchantList.lua index 259b146..e394cea 100644 --- a/ElvUI_SLE/skins/blizzard/merchantList.lua +++ b/ElvUI_SLE/skins/blizzard/merchantList.lua @@ -1,7 +1,6 @@ local SLE, T, E, L, V, P, G = unpack(select(2, ...)) local Sk = SLE:GetModule("Skins") local S = E:GetModule('Skins') -local LSM = LibStub("LibSharedMedia-3.0") --GLOBALS: CreateFrame, hooksecurefunc, ChatFontSmall, UIParent, INVSLOT_FIRST_EQUIPPED, INVSLOT_LAST_EQUIPPED --Rebuilding Merchant Frame as a scrollable list. Based on a code by Nils Ruesch (xMerchant addon) local _G = _G @@ -279,7 +278,11 @@ local function List_AltCurrencyFrame_Update(item, texture, cost, itemID, currenc if ( itemID ~= 0 or currencyName) then local currency = currencies[itemID] or currencies[currencyName]; if ( currency and currency < cost or not currency ) then - item.count:SetTextColor(1, 0, 0); + if T.GetItemCount(itemID, true) >= cost then + item.count:SetTextColor(1, 1, 0); + else + item.count:SetTextColor(1, 0, 0); + end else item.count:SetTextColor(1, 1, 1); end @@ -637,13 +640,13 @@ local function Create_ListButton(frame, i) local itemname = button:CreateFontString("ARTWORK", "$parentItemName") button.itemname = itemname; - itemname:SetFont(LSM:Fetch('font', E.db.sle.skins.merchant.list.nameFont), E.db.sle.skins.merchant.list.nameSize, E.db.sle.skins.merchant.list.nameOutline) + itemname:SetFont(E.LSM:Fetch('font', E.db.sle.skins.merchant.list.nameFont), E.db.sle.skins.merchant.list.nameSize, E.db.sle.skins.merchant.list.nameOutline) itemname:SetPoint("TOPLEFT", icon, "TOPRIGHT", 4, -3); itemname:SetJustifyH("LEFT"); local iteminfo = button:CreateFontString("ARTWORK", "$parentItemInfo") button.iteminfo = iteminfo; - iteminfo:SetFont(LSM:Fetch('font', E.db.sle.skins.merchant.list.subFont), E.db.sle.skins.merchant.list.subSize, E.db.sle.skins.merchant.list.subOutline) + iteminfo:SetFont(E.LSM:Fetch('font', E.db.sle.skins.merchant.list.subFont), E.db.sle.skins.merchant.list.subSize, E.db.sle.skins.merchant.list.subOutline) -- iteminfo:SetPoint("BOTTOMLEFT", 30.4, 3); iteminfo:SetPoint("BOTTOMLEFT", icon, "BOTTOMRIGHT", 4, -3); iteminfo:SetJustifyH("LEFT");