Skip to content

DBC: add legacy-name breadcrumbs to renamed struct fields#429

Merged
MadMaxMangos merged 1 commit into
masterfrom
enhance/dbc-friendly-names
Jul 6, 2026
Merged

DBC: add legacy-name breadcrumbs to renamed struct fields#429
MadMaxMangos merged 1 commit into
masterfrom
enhance/dbc-friendly-names

Conversation

@MadMaxMangos

@MadMaxMangos MadMaxMangos commented Jul 6, 2026

Copy link
Copy Markdown
Member

Summary

Follow-up to #428. The build-exact rename in #428 aligned some DBCStructure.h
members to their client-schema names, which occasionally read more generically
than the old mangos names (e.g. SpellNameName_lang, RankNameSubtext_lang).
As @Antz noted in review, that makes a field harder to hunt down a year later —
grepping the familiar old name no longer finds it.

This appends a (was <legacyName>) breadcrumb to each renamed field's comment, so
the old name stays greppable. Comment-only — no code change.

Example

// Spell (the case raised in review)
char*   Name_lang[8];        // 120-127  (was SpellName)
char*   NameSubtext_lang[8]; // 129-136  (was Rank)

// mechanical tables append to the existing comment
uint32  ContinentID;         // 1  m_ContinentID - ID of the Continent... (was mapid)

<!-- Reviewable:start -->
- - -
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/mangoszero/server/429)
<!-- Reviewable:end -->

Post-#428 review follow-up (antz): the build-exact rename made some members
read generically (e.g. SpellName -> Name_lang), so a `git grep` for the old
mangos field name no longer found the field. Append a `(was <legacyName>)`
breadcrumb to each renamed active member's comment so the old name stays
greppable and the field remains easy to hunt down a year from now.

Comment-only, no code change: 117 fields across 30 structs, every one a pure
trailing-comment append (verified: 0 declaration/type/name edits). The legacy
names are generated from the campaign's authoritative rename maps
(reconciliation.json + spell-rename-map.json) and every one was validated as a
real pre-#428 active member. Pure case reformats (findable by case-insensitive
grep) are intentionally skipped.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@MadMaxMangos MadMaxMangos merged commit abeb969 into master Jul 6, 2026
7 of 8 checks passed
@MadMaxMangos MadMaxMangos deleted the enhance/dbc-friendly-names branch July 6, 2026 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant