Add(Bags): profession category split and crafting type grouping - #1961
Open
dfrisone wants to merge 2 commits into
Open
Add(Bags): profession category split and crafting type grouping#1961dfrisone wants to merge 2 commits into
dfrisone wants to merge 2 commits into
Conversation
Split by Profession replaces the Trade Goods, Professions and Reagent Bag categories with a single Professions category holding one child per profession, nested the way equipment sets nest under Item Set Gear. Raw materials file under the profession that gathers them, so ore lands in Mining rather than under the craft that consumes it, and profession knowledge items file with their profession. Group Crafting by Type adds item-type sub-headers inside the crafting-side category views, the counterpart to the existing Group Armory by Slot. It takes precedence over Nest by Expansion in those categories and adds no sidebar views. Both are new profile keys defaulting false. The Reagent Bag also becomes a sidebar view alongside OneBag and MultiBag, gated on actually having one equipped; like those two it carries no toggle, since it is a location rather than a category and its contents still classify normally. Knowledge-item to profession mapping is a static 392-ID snapshot covering TWW and Midnight. Item class 19 subclass numbering is unverified on Midnight, so those items are deliberately left unmapped rather than misfiled, and raw fish sit under Cooking because the client gives them the same subclass as meat.
Profession children were modelled on equipment-set children but only about half the isEquipSet call sites gained an isProfession counterpart, so the paths that were not exercised in testing misbehaved. Grouping the Professions category dropped its items entirely: the group fold-in built its child set from isEquipSet alone, so profession items matched neither a group member nor a child and were skipped while the sidebar still counted them. The fold-in now maps each child to its own anchor and handles both kinds. Profession children inherited the anchor's types without the type-walk exclusion that isSetGear gives set children, so once the anchor sorted below them every unmapped trade good filed under the first profession. Disabling the Professions category left its children enabled, though the sibling guard for Item Set Gear sits one line above. The Enabled Categories dropdown offered the 13 runtime-only profession entries and wrote Prof:* keys into the shared profile. Toggling the split rebuilt categories without re-resolving the selection, and the indices shift by 12. Also: profession children no longer offer a context menu or start a drag, since both were no-ops; the Reagent Bag view reports its own slot counts rather than the whole inventory and no longer triggers the blocked-swap tooltip; its sidebar count uses the free-slot API instead of walking 39 slots on every rebuild; the profession name cache no longer stores the English fallback permanently; and the unreachable Reagent Bag entry in TYPE_NEST_CATEGORIES is removed along with its stale comment. Reformats the knowledge-ID tables, which carried a blank line between every row. All 392 IDs verified unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Two new Bags options, both defaulting off.
Split by Profession replaces the Trade Goods, Professions and Reagent Bag categories with a single Professions category holding one child per profession, nested the way equipment sets nest under Item Set Gear. Raw materials file under the profession that gathers them, so ore lands in Mining and hides in Skinning rather than under the craft that consumes them, and profession knowledge items file with their profession. Professions with nothing in your bags are hidden unless Hide Categories with 0 Items is off.
Group Crafting by Type adds item-type sub-headers inside the Trade Goods, Professions, Consumables, Gear Enhancements and Miscellaneous category views. It is the counterpart to the existing Group Armory by Slot, takes precedence over Nest by Expansion in those categories, and adds no sidebar views.
Separately, the Reagent Bag becomes a sidebar view alongside OneBag and MultiBag, gated on actually having one equipped. Like those two it carries no toggle: it is a location rather than a category, and its contents still classify into normal categories, so a stack of ore shows under both the Reagent Bag view and Mining.
Known limits, stated up front: the knowledge-item to profession map is a static 392-ID snapshot covering TWW and Midnight, so a later patch needs it extended or those items sit on the Professions anchor. Item class 19 subclass numbering is unverified on Midnight, so those items are deliberately left unmapped rather than misfiled. Raw fish sit under Cooking because the client gives them the same subclass as meat.
How was it tested?
Tested in game on live: Split by Profession including the profession sub-tabs and the Professions anchor view, Group Crafting by Type, and the Reagent Bag view.
The second commit came out of a review pass and was verified separately: grouping the Professions category, disabling it, and reordering the anchor below its own children (the three paths those fixes address), plus profession children being inert to right-click and drag, the Enabled Categories list showing one Professions entry rather than thirteen, the selection surviving a split toggle, and the Reagent Bag view reporting its own slot counts. Equipment-set splitting and grouping were re-checked too, since the group fold-in is shared with that path.
Screenshots
Split by Profession on, showing the Professions anchor with one child per profession and the unmapped remainder under Other. Without the option the same items sit under Trade Goods, Professions and Reagent Bag as before.
Checklist
HookScript/hooksecurefunconly, neverSetScripton Blizzard framesBoth features sit behind
ProfessionSplitEnabled()/TypeGroupingEnabled(), checked before any work, and the diff registers no events, timers,OnUpdatehandlers or hooks of any kind. The one deliberate exception to "no behavior change without opt-in" is the Reagent Bag view described above.