Skip to content

Commit

Permalink
fix(filter): changed legendary rarity to <2% (was <1%) (gh#129)[#129]
Browse files Browse the repository at this point in the history
  • Loading branch information
exochron committed Aug 31, 2024
1 parent e4b2c2f commit 6722eb6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Filters.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
2 changes: 1 addition & 1 deletion UI/FilterDropdown/Legacy/Main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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%")
Expand Down
2 changes: 1 addition & 1 deletion UI/FilterDropdown/Main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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%")
Expand Down
4 changes: 2 additions & 2 deletions UI/RarityNames.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6722eb6

Please sign in to comment.