Skip to content

fix(gearscore): score every 3.3.5a item with the addon formula - #12

Merged
joaquinmuzzi merged 1 commit into
masterfrom
claude/project-thread-n6slwf
Oct 23, 2026
Merged

joaquinmuzzi merged 1 commit into
masterfrom
claude/project-thread-n6slwf

Conversation

@joaquinmuzzi

Copy link
Copy Markdown
Owner

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:

  • His off-hand, Tome of Salramm (37086), is a blue of ilvl 187. static/GS.json doesn'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.json also 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.py scores each item with the GearScore/GearScoreLite addon formula, from its item level, quality and inventory type. GS.json stays as the fallback for IDs that are missing from the new data.
  • static/item_levels.json holds 23,211 equippable items (green, blue, epic, legendary and heirloom) from AzerothCore's item_template, which is the 3.3.5a item DB. tools/build_item_levels.py regenerates the file; its docstring has the steps. Wowhead /wotlk can'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).
  • An unknown weapon now returns type 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.
  • README: explains how the GS is calculated and lists the new files.

Checks

  • The new data gives the same GS as GS.json for all 5,692 epics it lists and for both legendaries. A test (test_epics_match_the_old_table) keeps it that way.
  • Real characters from the live armory: Demmir 4427 → 4880. Veletriel 5896, Kuvez 5087 (Titan's Grip) and Kricsus 5666 don't change.
  • Regression tests use Demmir's and Kuvez's real gear. tests/test_build_item_levels.py covers the SQL parser.
  • python -m pytest -q: 160 passed. ruff check, ruff format --check and mypy all 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

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
@joaquinmuzzi joaquinmuzzi self-assigned this Oct 23, 2026
@joaquinmuzzi
joaquinmuzzi merged commit c762ab0 into master Oct 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants