Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change obtainable filter to default obtainable instead of any source #5491

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Classes/ItemDBControl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ local ItemDBClass = newClass("ItemDBControl", "ListControl", function(self, anch
self.controls.requirement = new("DropDownControl", {"LEFT",self.controls.sort,"BOTTOMLEFT"}, 0, 11, 179, 18, { "Any requirements", "Current level", "Current attributes", "Current useable" }, function(index, value)
self.listBuildFlag = true
end)
self.controls.obtainable = new("DropDownControl", {"LEFT",self.controls.requirement,"RIGHT"}, 2, 0, 179, 18, { "Any source", "Obtainable", "Unobtainable", "Vendor Recipe", "Upgraded", "Boss Item", "Corruption"}, function(index, value)
self.controls.obtainable = new("DropDownControl", {"LEFT",self.controls.requirement,"RIGHT"}, 2, 0, 179, 18, { "Obtainable", "Any source", "Unobtainable", "Vendor Recipe", "Upgraded", "Boss Item", "Corruption"}, function(index, value)
self.listBuildFlag = true
end)
end
Expand Down Expand Up @@ -114,10 +114,10 @@ function ItemDBClass:DoesItemMatchFilters(item)
return false
end
end
if self.dbType == "UNIQUE" and self.controls.obtainable.selIndex > 1 then
if self.dbType == "UNIQUE" and self.controls.obtainable.selIndex ~= 2 then
local source = item.source or ""
local obtainable = not (source == "No longer obtainable")
if (self.controls.obtainable.selIndex == 2 and not obtainable) or (self.controls.obtainable.selIndex == 3 and obtainable) then
if (self.controls.obtainable.selIndex == 1 and not obtainable) or (self.controls.obtainable.selIndex == 3 and obtainable) then
return false
elseif (self.controls.obtainable.selIndex == 4 and not (source == "Vendor Recipe")) then
return false
Expand Down