Repository navigation
fix(gearscore): score every 3.3.5a item with the addon formula - #12
Merged
Merged
Conversation
Demmir (Priest, Lordaeron) showed 4427 in /p while the player sees 4.8k in game. His off-hand, Tome of Salramm (37086), is a blue of ilvl 187 that GS.json does not list, so it scored 0. On top of that, get_weapon_GS() returned the type "two_hand" for any item it could not find, so main() took the unknown off-hand for a Titan's Grip two-hander and halved the main hand too (Constellus 422 -> 211). GS.json only lists epics of ilvl 200 and up, and it scores the ilvl-200 blues it does list as if they were epics (310 instead of 271 for a head). Instead of growing that table, each item is now scored with the GearScore/GearScoreLite addon formula from its item level, quality and inventory type. Those come from static/item_levels.json, which tools/build_item_levels.py builds from AzerothCore's item_template (the 3.3.5a item DB). Wowhead /wotlk can't be used for this: it is Wrath Classic, where several Ulduar items have a higher item level. The new data agrees with GS.json on all 5,692 epics it lists and on the two legendaries, so characters in epics keep their score. Veletriel (5896), Kuvez (5087) and Kricsus (5666) were checked against their live armory and did not change. Demmir now gets 4880. GS.json stays as the fallback for IDs missing from the new file. Like the addon, Titan's Grip now also halves a two-hander paired with a one-hander. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0154sYmTKvv8jxoEn38hcyXS
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.
Requested by Joaquín · project thread
Why
Demmir (Priest, Lordaeron) showed 4427 in
/p, but the player sees 4.8k in game. The gear in the live armory (fetched 2026-10-23 00:05 UTC) matched what the bot had cached, so the armory wasn't stale. Two things were wrong:static/GS.jsondoesn't list it, so it scored 0.get_weapon_GS()returned the type"two_hand"for any item it couldn't find.main()then treated the unknown off-hand as a Titan's Grip two-hander and halved the main hand too (Constellus 422 → 211).GS.jsonalso lists only epics of ilvl 200 and up, and it scores the ~367 ilvl-200 blues it does list as if they were epics (310 instead of 271 for a head).What changes
gearscore.pyscores each item with the GearScore/GearScoreLite addon formula, from its item level, quality and inventory type.GS.jsonstays as the fallback for IDs that are missing from the new data.static/item_levels.jsonholds 23,211 equippable items (green, blue, epic, legendary and heirloom) from AzerothCore'sitem_template, which is the 3.3.5a item DB.tools/build_item_levels.pyregenerates the file; its docstring has the steps. Wowhead/wotlkcan't be used here: it shows Wrath Classic, where several Ulduar items have a different item level (Constellus is 252 there and 239 in 3.3.5a).None, so it never triggers the Titan's Grip halving. Like in the addon, a two-hander paired with any off-hand item counts half.Checks
GS.jsonfor all 5,692 epics it lists and for both legendaries. A test (test_epics_match_the_old_table) keeps it that way.tests/test_build_item_levels.pycovers the SQL parser.python -m pytest -q: 160 passed.ruff check,ruff format --checkandmypyall pass.Expected side effects: characters wearing ilvl-200 blues lose a bit of GS (the blue value is what the addon gives). Items that used to score 0 (blues, greens, ilvl < 200) now add their GS.
Generated by Claude Code