Fix systematically misaligned enchant/gem/consumable ID databases - #11
Merged
Merged
Conversation
A TBC Fresh user reported wrong enchant and consumable identification. Verification against actual game client data (wago.tools dumps of SpellItemEnchantment/SpellEffect/SpellName/ItemSparse/GemProperties) showed the hand-maintained ID->name maps in cla-constants.ts were systematically shifted in every era section: - 88 of 106 verifiable enchant IDs had the wrong name (e.g. glove enchant 684 shown as "Major Agility" but is +15 Strength; all TBC head glyphs / shoulder inscriptions / leg armors rotated by one) - Gem maps pointed at wrong items (some "gems" were cloaks, formulas, or Monster placeholder items); GEM_STAT_DB's shifted IDs produced false "bad gem for your role" flags on correct gems - 28093/28095 (Mongoose/enchant proc buffs) were listed as weapon oils, crediting enchant users with a phantom weapon enhancement - Scroll buff IDs shifted; rank-V scrolls flagged "use VIII instead" though VIII doesn't exist in TBC; two "food" IDs were mage Refreshment; Cata elixirs rotated; a few flask names wrong Fix: regenerated ENCHANT_NAME_DB, GEM_NAME_DB and GEM_STAT_DB from era-matched client data (Classic/TBC = 2.5.6.69546 TBC Anniversary, WotLK = 3.4.5.63697, Cata = 4.4.2.60895, MoP = 5.5.4.69585), applied surgical consumable fixes, and added a regression test suite locking in known-good pairings. Co-Authored-By: Claude Fable 5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Context
A TBC Fresh user reported that enchant detection "seems to be wrong" and some consumables are "wrongly identified... maybe the ids are not of the right version of the game." They were right — and it was worse than it looked.
Root cause
The hand-maintained ID→name databases in
lib/cla-constants.tswere systematically misaligned — whole sections shifted/rotated by one row, in every era section (Classic through MoP). Verified against actual game client data (wago.tools dumps ofSpellItemEnchantment/SpellEffect/SpellName/ItemSparse/GemProperties), era-matched to the clients WCL logs come from:Findings
684displayed as "Major Agility (+15 Agi)" but is +15 Strength; every TBC head glyph, shoulder inscription, leg armor and spellthread was rotated (Glyph of Ferocity is3003not2999, Nethercobra Leg Armor is3012not2747, …). Same pattern in WotLK/Cata/MoP sections.Monster - Daggerplaceholder items.GEM_STAT_DB(drives "bad gem for your role" flags) had the same shifted IDs → false flags on correct gems.28093("Lightning Speed") /28095are Mongoose/enchant proc buffs, listed as weapon oils — on TBC Fresh anyone with the Mongoose enchant was credited a phantom "weapon enhancement".57362/58067counted as food buffs but are mage Refreshment.79474is Naga,79477is Cobra,79480is Deep Earth — a guardian elixir, not battle).28519is Flask of Mighty Restoration ("Versatility" doesn't exist);53752is Lesser Flask of Toughness, not Elixir of Mighty Defense;54452is a dead spell ID (removed).Fix
ENCHANT_NAME_DB,GEM_NAME_DB,GEM_STAT_DBmechanically from the client data above. Enchant names come from the applying spell (e.g.Enchant Gloves - Major Strength) plus the enchantment's actual stat text; gem stat types are derived from each gem's real enchantment text (kept as a trailing comment per entry for reviewability).CONSUMABLE_DB+ the ID sets inlib/constants.ts(proc buffs removed fromWEAPON_ENHANCEMENT_IDS, Refreshment removed fromFOOD_BUFF_IDS,53752moved toFLASK_BUFF_IDS).lib/cla-constants.test.ts(10 tests) locking in known-good pairings.Verification
npx tsc --noEmit✓npm run lint✓ (no new findings)npm test— 34/34 ✓ (10 new)Notes / residual limitations
3606) aren't representable in the dumped tables and kept their original names.vercel deploy --prod) after merge — this PR does not self-deploy.🤖 Generated with Claude Code