Skip to content

Commit

Permalink
Profession List will only treat Things which are specifically tagged …
Browse files Browse the repository at this point in the history
…for that Profession as being collectible (fixes ATTWoWAddon#722)
  • Loading branch information
ImUnicke committed Oct 5, 2021
1 parent 50bbd85 commit 4e1a5ff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions AllTheThings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15322,11 +15322,12 @@ function app:BuildSearchResponse(groups, field, value)
response = app:BuildSearchResponse(group.g, field, value);
if response then
local groupCopy = {};
-- set the same metatable
setmetatable(groupCopy, getmetatable(group));
-- copy direct group values only
MergeProperties(groupCopy, group);
-- no need to clone response, since it is already cloned above
groupCopy.g = response;
-- if the group itself does not meet the field/value expectation, force it to be uncollectible
if groupCopy.field ~= value then groupCopy.collectible = false; end
if t then tinsert(t, groupCopy);
else t = { groupCopy }; end
end
Expand Down

0 comments on commit 4e1a5ff

Please sign in to comment.