ALL THE THINGS

ALL THE THINGS

31M Downloads

Option to hide BOP items that are not part of the personal loot

MKoep opened this issue · 7 comments

commented

Hi, is there an option to hide BOP items (from rares) that are not part of the personal loot table?
This feature would be nice to hide rares from the mini list dropping learnable items but not for any available spec of the current class.

commented

leading to an empty result

Shouldn't it rather have the item there despite it not being available and maybe vanishing later?

Apparently not. Maybe a weird interaction with Cataclysm having personal loot but after entering "personal loot rules" being active, but my list was empty, then after reloading it showed items again. I guess having this as a hard filter is not a good idea without the mentioned better data source or some kind of "no data yet" protection. Guess I'll try to make it an icon as a warning instead.

commented

leading to an empty result

Shouldn't it rather have the item there despite it not being available and maybe vanishing later?

Apparently not. Maybe a weird interaction with Cataclysm having personal loot but after entering "personal loot rules" being active, but my list was empty, then after reloading it showed items again. I guess having this as a hard filter is not a good idea without the mentioned better data source or some kind of "no data yet" protection. Guess I'll try to make it an icon as a warning instead.

Yup! This was exactly the problem we encountered in addition to extremely bad lag. Even though our computational tech has been massively improved, the incapability of the endpoint provided by Blizzard meant that the data was unreliable. I wouldn’t be opposed to providing an addon extension with explicit item role assignments the ability to provide secondary filtering, but as far as baking that information into ATT with our current code base, I’d have to decline as it would significantly increase that data footprint.

commented

Since I was missing this feature as well, I quickly hacked it in for me:

diff --git a/Settings.lua b/Settings.lua
index 23c789e..f405b17 100644
--- a/Settings.lua
+++ b/Settings.lua
@@ -1395,4 +1395,5 @@ settings.UpdateMode = function(self, doRefresh)
 		filterSet.CompletedThings(true)
 	end
+	filterSet.NotNotAvailableInPersonalLoot(true)
 	if self.AccountWide.Achievements then
 		app.AchievementFilter = 4
diff --git a/src/Modules/Filter.lua b/src/Modules/Filter.lua
index cd1d815..58cfcc2 100644
--- a/src/Modules/Filter.lua
+++ b/src/Modules/Filter.lua
@@ -131,4 +131,9 @@ function(item)
 end);
 
+DefineToggleFilter("NotNotAvailableInPersonalLoot", CharacterFilters,
+function(item)
+	return not (item.itemID and item.s and not item.specs);
+end);
+
 -- MinReputation
 local ExclusiveFactions = {

I am aware that #1218 claims this to be bad performance-wise, but I don't see any issue in my limited testing.

commented

Since I was missing this feature as well, I quickly hacked it in for me:

So you're right in that this works for Items which accurately indicate your character spec icons but the underlying problem for all concerns of the Personal Loot filtering, is that those icons are NOT a sure representation of whether an Item is actually available to be obtained by the corresponding specialization.
Additionally the specs field is actually generated from Blizzard's in-game API data

	["specs"] = function(t)
		return t.itemID and GetFixedItemSpecInfo(t.itemID);
	end,

which is built by a complex function against Blizzard's API data

-- Filters a specs table to only those which the current Character class can choose
local function FilterSpecs(specs)
	if specs and #specs > 0 then
		local name, class, _;
		for i=#specs,1,-1 do
			_, name, _, _, _, class = GetSpecializationInfoByID(specs[i]);
			if class ~= app.Class or not name or name == "" then
				tremove(specs, i);
			end
		end
		app.Sort(specs, app.SortDefaults.Value);
	end
end
GetFixedItemSpecInfo = function(itemID)
	if itemID then
		local specs = GetItemSpecInfo(itemID);
		if not specs or #specs < 1 then
			specs = {};
			-- Starting with Legion items, the API seems to return no spec information when the item is in fact lootable by ANY spec
			local _, _, _, _, _, _, _, _, itemEquipLoc, _, _, itemClassID, itemSubClassID, _, expacID, _, _ = GetItemInfo(itemID);
			-- only Armor items
			if itemClassID and itemClassID == 4 then
				-- unable to distinguish between Trinkets usable by all specs (Font of Power) and Role-Specific trinkets which do not apply to any Role of the current Character
				if expacID >= 6 and (itemEquipLoc == "INVTYPE_NECK" or itemEquipLoc == "INVTYPE_FINGER") then
					local numSpecializations = GetNumSpecializations();
					if numSpecializations and numSpecializations > 0 then
						for i=1,numSpecializations,1 do
							local specID = GetSpecializationInfo(i);
							tinsert(specs, specID);
						end
					end
				end
			end
			app.Sort(specs, app.SortDefaults.Value);
		else
			FilterSpecs(specs);
		end
		if #specs > 0 then
			return specs;
		end
	end
end

Hence, we cannot add a Personal Loot filter without manually adding the data for tens of thousands of Items because we can't 100% trust the data from Blizzard because their GetItemSpecInfo API doesn't correspond with "Will this Item drop for my current character"

I am aware that #1218 claims this to be bad performance-wise, but I don't see any issue in my limited testing.

The Filtering logic has been greatly improved, but the underlying calls do still require Item data from API information in-game, which also may not be available in the client on the first attempt if this filtering logic was applied prior to the Item specifically being referenced somewhere prior, leading to an empty result on an Item which actually might be available in PL. While you personally may not have noticed an issue with that option enabled for yourself, it would definitely affect the overall performance of ATT for anyone using it especially if opening the Main list directly when logging into the game. (Looking at this again, I could add some caching for the specs field since that probably wasn't tech we supported when it was first added. It actually is cached for Items, I was looking at a different object Type)

TL;DR: The underlying problem for the whole "Personal Loot Filter" is just that we don't have any way to get completely accurate data for said filter. (And we're not going to manually add and fix it over each expansion/patch/hotfix as Blizzard changes data for every possible dropped item in the game)

commented

which is built by a complex function against Blizzard's API data

Yeah, I found those functions and was happy there already was a field ;)

we can't 100% trust the data from Blizzard

Yeah, I do see that being an issue, but I guess it outweighs wasting time, to me. I kept farming rares I didn't need to and only later realised the little line within the tooltip.

An alternative to this would be an icon indicating "this probably doesn't drop for you" in the list using that same condition (it is the one used in the tooltip).

leading to an empty result

Shouldn't it rather have the item there despite it not being available and maybe vanishing later?

accuracy

I'm happy to opt in to the risk, personally, even if I have to click a few red buttons.

commented

Thank you.
How could this be bad? I don't see any API function calls here. It seems that all information are already available.

Is this "personal loot" filter even valid for BOE items?

commented

Yeah, I do see that being an issue, but I guess it outweighs wasting time, to me. I kept farming rares I didn't need to and only later realised the little line within the tooltip.

Quick hint, if on an intellect character and its a strength weapon, probably not gonna drop for ya and its already in the tool tip.