From 6722eb6875fe40e80312d1b19878e29aa0b4ddb1 Mon Sep 17 00:00:00 2001 From: exochron Date: Sat, 31 Aug 2024 11:23:04 +0200 Subject: [PATCH] fix(filter): changed legendary rarity to <2% (was <1%) (gh#129)[https://github.com/exochron/MountJournalEnhanced/issues/129] --- Filters.lua | 4 ++-- UI/FilterDropdown/Legacy/Main.lua | 2 +- UI/FilterDropdown/Main.lua | 2 +- UI/RarityNames.lua | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Filters.lua b/Filters.lua index d960f82..088985d 100644 --- a/Filters.lua +++ b/Filters.lua @@ -324,8 +324,8 @@ local function FilterByRarity(mountID, allSettings) return allSettings == false end - return (rarity < 1.0 and ADDON.settings.filter.rarity[Enum.ItemQuality.Legendary]) - or (rarity >= 1.0 and rarity < 10.0 and ADDON.settings.filter.rarity[Enum.ItemQuality.Epic]) + return (rarity < 2.0 and ADDON.settings.filter.rarity[Enum.ItemQuality.Legendary]) + or (rarity >= 2.0 and rarity < 10.0 and ADDON.settings.filter.rarity[Enum.ItemQuality.Epic]) or (rarity >= 10.0 and rarity < 20.0 and ADDON.settings.filter.rarity[Enum.ItemQuality.Rare]) or (rarity >= 20.0 and rarity < 50.0 and ADDON.settings.filter.rarity[Enum.ItemQuality.Uncommon]) or (rarity >= 50.0 and ADDON.settings.filter.rarity[Enum.ItemQuality.Common]) diff --git a/UI/FilterDropdown/Legacy/Main.lua b/UI/FilterDropdown/Legacy/Main.lua index 4f8aca3..96160e7 100644 --- a/UI/FilterDropdown/Legacy/Main.lua +++ b/UI/FilterDropdown/Legacy/Main.lua @@ -365,7 +365,7 @@ local function InitializeFilterDropDown(frame, level) local text = "|c"..select(4, GetItemQualityColor(quality)).._G["ITEM_QUALITY"..quality.."_DESC"].."|r".." ("..suffix..")" UIDropDownMenu_AddButton(CreateFilterInfo(text, quality, settings, true), level) end - addButton(Enum.ItemQuality.Legendary, "<1%") + addButton(Enum.ItemQuality.Legendary, "<2%") addButton(Enum.ItemQuality.Epic, "<10%") addButton(Enum.ItemQuality.Rare, "<20%") addButton(Enum.ItemQuality.Uncommon, "<50%") diff --git a/UI/FilterDropdown/Main.lua b/UI/FilterDropdown/Main.lua index 418d958..549053b 100644 --- a/UI/FilterDropdown/Main.lua +++ b/UI/FilterDropdown/Main.lua @@ -207,7 +207,7 @@ local function setupRarityMenu(root) local text = "|c"..select(4, GetItemQualityColor(quality)).._G["ITEM_QUALITY"..quality.."_DESC"].."|r".." ("..suffix..")" ADDON.UI.FDD:CreateFilter(root, text, quality, settings, true) end - addButton(Enum.ItemQuality.Legendary, "<1%") + addButton(Enum.ItemQuality.Legendary, "<2%") addButton(Enum.ItemQuality.Epic, "<10%") addButton(Enum.ItemQuality.Rare, "<20%") addButton(Enum.ItemQuality.Uncommon, "<50%") diff --git a/UI/RarityNames.lua b/UI/RarityNames.lua index 3295422..8de5de1 100644 --- a/UI/RarityNames.lua +++ b/UI/RarityNames.lua @@ -14,10 +14,10 @@ local function RestoreOriginalColor(collected, button) end local function DetermineQuality(rarity) - if rarity < 1.0 then + if rarity < 2.0 then return Enum.ItemQuality.Legendary end - if rarity >= 1.0 and rarity < 10.0 then + if rarity >= 2.0 and rarity < 10.0 then return Enum.ItemQuality.Epic end if rarity >= 10.0 and rarity < 20.0 then