Skip to content

Feat/wotlk dbc align - #5

Merged
MadMaxMangos merged 1 commit into
masterfrom
feat/wotlk-dbc-align
Jul 9, 2026
Merged

Feat/wotlk dbc align#5
MadMaxMangos merged 1 commit into
masterfrom
feat/wotlk-dbc-align

Conversation

@MadMaxMangos

@MadMaxMangos MadMaxMangos commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

WOTLK: guard DBC field reads for mangos-two DBC alignment

Guards the mangos-Eluna DBC field reads with #if defined(WOTLK) build-exact arms for the mangos-two (WotLK 3.3.5.12340) DBC core-alignment. Companion to mangostwo/server enhance/dbc.

What

  • SpellEntry->Id reads guarded to the build-exact ID (aligned CLASSIC/TBC/WOTLK).
  • 27 methods/Mangos/ + hooks/ sites reading fields renamed by the deferred-table alignment guarded to build-exact names: AreaTrigger.id, AreaTable.area_name, ChrClasses/ChrRaces.name, ItemRandom{Properties,Suffix}.nameSuffix, SkillLine.id/categoryId, Vehicle.m_ID, and the TaxiPath/TaxiPathNode/TaxiNodes custom-taxi construction block in GlobalMethods.h.

Cross-fork safety (additive-beside)

Pure additions — 0 lines removed. Each change wraps an existing read as #if defined(WOTLK) <new> #else <original> #endif, so the non-WOTLK paths (CLASSIC/TBC/CATA/MISTS) are byte-identical to baseline. ServerHooks.cpp inserts the WOTLK arm before the existing mangos #else in the emulator guard (ELUNA_TRINITY / ELUNA_AZEROTHCORE / mangos).

🤖 Generated with Claude Code


This change is Reviewable

…ignment)

Rebased onto current master (which added the CLASSIC #2 and TBC #4 alignment
arms). Adds mangos-two's WOTLK build-exact field reads beside the existing
CLASSIC/TBC arms, in the same `ELUNA_MANGOS && ELUNA_EXPANSION == EXP_*`
convention:
- Extends the aligned arm of 16 guards to include EXP_WOTLK: Spell.Id->ID,
  AreaTrigger.id->ID, AreaTable.area_name->AreaName_lang, ChrClasses/ChrRaces.
  name->Name_lang, SkillLine.id/categoryId->ID/CategoryID, ItemRandom{Properties,
  Suffix}.nameSuffix->Name_lang, and the TaxiPathNode/TaxiNodes taxi-construction
  block in GlobalMethods.h.
- New WOTLK arms where master had none: Vehicle.m_ID->ID (VehicleMethods) and
  TaxiPath.from/to/price->FromTaxiNode/ToTaxiNode/Cost (GlobalMethods).
AuctionHouse (houseId) is left alone -- mangos-two did not align it.
Additive-beside: CLASSIC/TBC/CATA/MISTS code paths are byte-for-byte unchanged.
mangos-two builds clean + boot-assert PASS.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@MadMaxMangos
MadMaxMangos force-pushed the feat/wotlk-dbc-align branch from 6d8b229 to 4e03842 Compare July 9, 2026 15:46
@MadMaxMangos

Copy link
Copy Markdown
Contributor Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4e03842582

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread hooks/ServerHooks.cpp
#elif defined ELUNA_AZEROTHCORE
HookPush(pTrigger->entry);
#elif defined(ELUNA_MANGOS) && ELUNA_EXPANSION == EXP_CLASSIC
#elif defined(ELUNA_MANGOS) && (ELUNA_EXPANSION == EXP_CLASSIC || ELUNA_EXPANSION == EXP_WOTLK)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Gate aligned DBC fields behind a feature macro

When building Eluna against the current/released MaNGOS WOTLK core rather than the separate DBC-alignment branch, this expansion-only condition sends all WOTLK builds to pTrigger->ID, but that core still exposes AreaTriggerEntry::id; the same pattern is applied to the other renamed DBC fields in this commit. This makes ordinary WOTLK builds fail unless the companion core changes are present, so the new layout should be guarded by a layout/feature macro instead of EXP_WOTLK alone.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intended — this is the established cross-fork DBC-alignment pattern in this repo,
not an oversight.

The aligned reads are gated on ELUNA_EXPANSION == EXP_WOTLK deliberately,
matching the already-merged CLASSIC (#2) and TBC (#4) arms on these same files,
which gate on EXP_CLASSIC / EXP_TBC rather than a separate feature macro. The
WOTLK arm just extends that same ladder.

The coupling to the renamed core layout is enforced by the companion PR, not left
to chance: mangos-two/server#239 renames the DBC fields and bumps this Eluna
submodule to this exact commit in the same change, so mangos-two always builds
aligned-core + WOTLK-Eluna-arms together. There is no released configuration where
one is present without the other — the "un-aligned WOTLK core + this Eluna" case
only arises if the submodule is hand-bumped past this PR without applying the core
change, which the pin prevents. Other cores are unaffected (EXP_WOTLK is false
for them).

A layout/feature macro would decouple it further, but it would diverge from the
CLASSIC/TBC arms already on master; keeping WOTLK consistent with them is the
intent here. Merging in lockstep with the core PR.

@MadMaxMangos
MadMaxMangos merged commit 18ff8fb into master Jul 9, 2026
12 of 24 checks passed
@MadMaxMangos
MadMaxMangos deleted the feat/wotlk-dbc-align branch July 9, 2026 16:30
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