Skip to content

TBC: expansion-guard raw Mangos-method DBC field reads (mangos-one DBC alignment) - #4

Merged
MadMaxMangos merged 4 commits into
masterfrom
tbc/dbc-align-guards
Jul 8, 2026
Merged

TBC: expansion-guard raw Mangos-method DBC field reads (mangos-one DBC alignment)#4
MadMaxMangos merged 4 commits into
masterfrom
tbc/dbc-align-guards

Conversation

@MadMaxMangos

@MadMaxMangos MadMaxMangos commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

mangos-one (WoW TBC 2.4.3.8606) is aligning its DBC structs to build-exact .dbd names. The raw DBC field reads in methods/Mangos/ (and two cross-emulator hooks) need a TBC arm. All changes are additive: the existing EXP_CLASSIC branches are unchanged, and each new TBC arm is gated by defined(ELUNA_MANGOS) && ELUNA_EXPANSION == EXP_TBC, so cmangos / vmangos / TrinityCore and all non-TBC expansions are unaffected. The pattern is #if ELUNA_EXPANSION == EXP_CLASSIC || (defined(ELUNA_MANGOS) && ELUNA_EXPANSION == EXP_TBC) → build-exact name, #else → the old name.

Four commits:

  1. methods/Mangos: TBC guards for AuctionHouse.houseId→ID, ItemRandom(Suffix/Properties).nameSuffix→Name_lang, TaxiPath.ID→Id.
  2. ChrClasses/ChrRaces.name→Name_lang, TaxiNodes.map_id→ContinentID (incl. the GlobalMethods CreateTaxiPath 3-way arm with a nested map_idContinentID guard).
  3. TaxiPathNode (path/index/mapid/x/y/z/actionFlag/delay), AreaTable.area_name→AreaName_lang, SkillLine.categoryId→CategoryID / id→ID.
  4. SpellEntry.Id→ID reads in SpellMethods.h and the two cross-emulator CreatureHooks.cpp sites (SpellHit/SpellHitTarget) — the TBC clause is ELUNA_MANGOS-gated so non-mangos cores are untouched.

Note for future reviewers: the Lua-facing registered method-name strings (e.g. GetSpellFamilyFlags, GetStackAmount) intentionally keep their old spellings for Lua API stability — do not rename them to match the C++ struct-field renames.


This change is Reviewable

MadMaxMangos and others added 4 commits July 8, 2026 13:46
…uffix/Properties).nameSuffix->Name_lang, TaxiPath.ID->Id (One DBC align)
…mangos-TBC

DBC alignment renames ChrClasses.name/ChrRaces.name -> Name_lang and
TaxiNodes.map_id -> ContinentID on mangos-one (TBC). Extend the existing
per-expansion guards additively:
  - ChrClasses/ChrRaces name: EXP_CLASSIC branch now also covers
    (ELUNA_MANGOS && EXP_TBC) -> Name_lang; #else keeps name (other forks).
  - TaxiNodes map_id: nested (ELUNA_MANGOS && EXP_TBC) -> ContinentID in the
    shared non-CLASSIC #else; #else keeps map_id (Wrath+/cmangos/vmangos).

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

DBC alignment renames on mangos-one (TBC): TaxiPathNode path/index/mapid/
x/y/z/actionFlag/delay, AreaTable area_name, SkillLine categoryId/id.
Extend the per-expansion guards additively:
  - GlobalMethods CreateTaxiPath: promote mangos-TBC into the aligned
    (EXP_CLASSIC) arm (PathID/NodeIndex/LocX/Y/Z/Flags/Delay), with a nested
    (ELUNA_MANGOS && EXP_TBC) branch for nodeEntry->ContinentID vs map_id;
    #else keeps old names for Wrath+/cmangos/vmangos.
  - GetAreaName area_name and PlayerMethods SkillLine categoryId/id: EXP_CLASSIC
    arm now also covers (ELUNA_MANGOS && EXP_TBC).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…s + SpellMethods)

Extend the existing EXP_CLASSIC guards to also cover (ELUNA_MANGOS && EXP_TBC) so
mangos-one reads SpellEntry->ID; #else keeps ->Id for Wrath+/cmangos/vmangos/Trinity.
CreatureHooks SpellHit/SpellHitTarget TBC clause is ELUNA_MANGOS-gated (cross-emulator safe).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@MadMaxMangos
MadMaxMangos merged commit 8161967 into master Jul 8, 2026
11 of 24 checks passed
MadMaxMangos added a commit that referenced this pull request Jul 9, 2026
…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 mentioned this pull request Jul 9, 2026
MadMaxMangos added a commit that referenced this pull request Jul 9, 2026
…ignment) (#5)

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>
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