Files
WoW-Hybrid-gateway/ops/source_required_tool_category.py
praxisandClaude Fable 5.2 8a24c445b0 Content pipeline and operator tools
367 files, from working commit b1a079a.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 01:32:48 +02:00

34 lines
1.6 KiB
Python

"""Source tools with independently matched original 70334 spell categories.
Source Spell.dbc SHA256 7d9f83e7a6a3ae642d23597a1a0bc4216fa3d688d00428dd3b5d1f47465af27f;
original 70334 SpellTotems.db2 SHA256 04a0ed57a4f6a05b406ccdc81b61958d9c1175e6afa6796b497fffac54d556f0.
Each item is a Source exact totem-item requirement for named spells whose
original 70334 equivalent requires the paired category. Item identity and
Source base type must agree. Enchanting rods are deliberately held: category
masks permit substitution of stronger rods while Source requires exact IDs.
This is client metadata only; Source remains authoritative for item checks.
"""
# entry: (name, Source class, subclass, inventory type, native category)
PROFILES = {
2901: ('Mining Pick', 2, 14, 21, 165),
7005: ('Skinning Knife', 2, 14, 13, 166),
5956: ('Blacksmith Hammer', 2, 14, 21, 162),
6219: ('Arclight Spanner', 2, 14, 21, 14),
10498: ('Gyromatic Micro-Adjustor', 7, 1, 0, 15),
9149: ("Philosopher's Stone", 7, 0, 0, 12),
5175: ('Earth Totem', 5, 0, 0, 2),
5176: ('Fire Totem', 5, 0, 0, 4),
5177: ('Water Totem', 5, 0, 0, 5),
5178: ('Air Totem', 5, 0, 0, 3),
}
def category_for(proto):
"""Return a proven category, zero for unprofiled items; reject drift."""
profile = PROFILES.get(proto.get('entry'))
if profile is None:
return 0
name, cls, subclass, inventory, category = profile
if (proto.get('name'), proto.get('class'), proto.get('subclass'), proto.get('inventory_type')) != (name, cls, subclass, inventory):
raise ValueError('Source required-tool identity changed')
return category