From a65674510e5a622be892d55da7939b4ffed9a7bf Mon Sep 17 00:00:00 2001 From: Parnic Date: Mon, 12 Sep 2022 13:14:24 -0500 Subject: [PATCH] Add option to always show Enchanting breakables If the user really wants to bypass the level check (or the mod is misbehaving), this allows them to show everything. --- Breakables.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Breakables.lua b/Breakables.lua index 8d15020..64ad571 100644 --- a/Breakables.lua +++ b/Breakables.lua @@ -811,6 +811,25 @@ function Breakables:GetOptions() order = 22, } end + + if not IgnoreEnchantingSkillLevelForDisenchant then + opts.args.ignoreEnchantingSkillLevel = { + type = "toggle", + name = L["Ignore Enchanting skill level"], + desc = L["If checked, items won't be hidden if Breakables thinks you don't have the appropriate skill level to disenchant it."], + get = function(info) + return self.settings.ignoreEnchantingSkillLevel + end, + set = function(info, v) + self.settings.ignoreEnchantingSkillLevel = v + self:FindBreakables() + if info.uiType == "cmd" then + print("|cff33ff99Breakables|r: set |cffffff78ignoreEnchantingSkillLevel|r to " .. tostring(self.settings.ignoreEnchantingSkillLevel)) + end + end, + order = 10, + } + end end if UnitCanPetBattle then @@ -1457,6 +1476,10 @@ function Breakables:BreakableIsDisenchantable(itemType, itemLevel, itemRarity, i return true end + if self.settings.ignoreEnchantingSkillLevel then + return true + end + -- if we couldn't figure out the player's enchanting skill level, err on the side of showing stuff if self.EnchantingLevel == 0 then return true