diff --git a/ElvUI/Modules/Misc/Misc.lua b/ElvUI/Modules/Misc/Misc.lua index 2781ee8..a592b77 100644 --- a/ElvUI/Modules/Misc/Misc.lua +++ b/ElvUI/Modules/Misc/Misc.lua @@ -83,13 +83,13 @@ function M:MERCHANT_SHOW() if IsShiftKeyDown() or autoRepair == "NONE" or not CanMerchantRepair() then return end local cost, possible = GetRepairAllCost() - if cost > 0 then - if possible then - RepairAllItems(autoRepair == "PLAYER") - E:Print(L["Your items have been repaired for: "]..E:FormatMoney(cost, "BLIZZARD")) - else - E:Print(L["You don't have enough money to repair."]) - end + local money = GetMoney() + + if cost > 0 and money >= cost and possible then + RepairAllItems(autoRepair == "PLAYER") + E:Print(L["Your items have been repaired for: "]..E:FormatMoney(cost, "BLIZZARD")) + else + E:Print(L["You don't have enough money to repair."]) end end