Skip to content

Add .transmog check diagnostic command#233

Merged
Nyeriah merged 1 commit into
azerothcore:masterfrom
Nyeriah:checkcmd
May 22, 2026
Merged

Add .transmog check diagnostic command#233
Nyeriah merged 1 commit into
azerothcore:masterfrom
Nyeriah:checkcmd

Conversation

@Nyeriah
Copy link
Copy Markdown
Member

@Nyeriah Nyeriah commented May 22, 2026

Summary

  • Adds .transmog check <player> <destItem> <srcItem> — a GM/console command that audits whether a given destination/source item pair could be transmogged for a target player, and reports which rules fail.
  • Works for offline characters and from the console: the handler resolves the target through CharacterCache and falls back to direct character_skills / character_spell reads when no Player* is available. The collection check uses the account-keyed collectionCache, which is loaded regardless of who's online.
  • Output is grouped into three sections (Pair / Per-item / Collection) plus a final verdict. Each section prints one line: [+] all checks passed, [-] one or more failures (semicolon-separated), or [~] whitelisted/disabled-system skip. Plain text — no color codes — so it stays readable on the worldserver console.

What's covered by the checks

  • Pair: same ItemId, same DisplayInfoID, item-class match, forbidden inventory types (bag/relic/ring/trinket/ammo/quiver), ranged-vs-melee mismatch, subclass/inv-type mismatch via the existing IsSubclassMismatchAllowed / IsInvTypeMismatchAllowed helpers.
  • Per-item (run for both src and dest): whitelist short-circuit, valid armor/weapon class, blacklist, allowed quality, fishing-pole flag, holiday/event gate, zero-stat rejection, proficiency / required-skill / class / race / level / required-spell, all honoring the matching IgnoreReq* and AllowLowerTiers config toggles.
  • Collection: respects GetUseCollectionSystem(); looks up the source ItemId in the account's collectionCache.

Strings

All new diagnostic strings (IDs 46–80, English + 8 locales: koKR/frFR/deDE/zhCN/zhTW/esES/esMX/ruRU) are appended to the existing data/sql/db-world/updates/2026_05_09_migrate_strings_to_module_string.sql migration, alongside the command table entry registering the subcommand at security level 2.

Known limitation

IsSubclassMismatchAllowed internally calls TierAvailable(player, 0, ...). For an offline target, player is null and playerGuid=0, so the AllowLowerTiers armor-mismatch path short-circuits to false. This can yield a false-negative "Subclass mismatch — not allowed" verdict in the narrow case of armor pairs with different subclasses where the offline player actually owns higher-tier armor. Easy to address in a follow-up by threading the guid through, but didn't want to widen the touched API surface in this PR.

Test plan

  • .transmog check <online-name> <destId> <srcId> from chat: known-good pair returns === RESULT: CAN transmog ===.
  • Same command via worldserver console for an offline player: produces a readable, color-free report.
  • Each failure path triggers the correct section + message (e.g. ring as dest → forbidden inv type; ranged onto melee → ranged mismatch; level-locked item below the target's level → level fail line).
  • Whitelisted source item: per-item section shows [~] Whitelisted — all requirement checks are bypassed.
  • UseCollectionSystem=0: collection section shows [~] Collection system disabled; otherwise verifies presence in the account collection cache.
  • AI tool usage disclosed: drafted with Claude Code assistance.

Adds a GM/console command that audits whether a given destination/source
item pair can be transmogged for a target player, working for both online
and offline characters via CharacterCache and direct character_skills /
character_spell lookups. Output is split into Pair, per-Item, and
Collection sections with one summary line each.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Nyeriah Nyeriah merged commit 33ac64b into azerothcore:master May 22, 2026
1 check passed
@Nyeriah Nyeriah deleted the checkcmd branch May 22, 2026 22:41
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.

1 participant