Skip to content

Implement command localization#97

Merged
billy1arm merged 1 commit into
mangoszero:masterfrom
Elmsroth:gm-commands-localization
May 22, 2020
Merged

Implement command localization#97
billy1arm merged 1 commit into
mangoszero:masterfrom
Elmsroth:gm-commands-localization

Conversation

@Elmsroth

@Elmsroth Elmsroth commented May 22, 2020

Copy link
Copy Markdown
Contributor

WARNING
New DB structure revision
This core update need latest Db Update : Rel21_20_001_GM_Commands_localization.sql

@billy1arm billy1arm merged commit f2ae3ed into mangoszero:master May 22, 2020
@Elmsroth Elmsroth deleted the gm-commands-localization branch May 22, 2020 15:48
yozora-hitagi pushed a commit to yozora-hitagi/sorazero that referenced this pull request May 29, 2020
Implement Localization for Commands.

(cherry picked from commit f2ae3ed)
billy1arm pushed a commit that referenced this pull request Dec 29, 2020
)

* Swapped 'dbscripts_on_creature_movement' warning with 'dbscripts' (creature_movement_template)

* Update WaypointManager.cpp
MadMaxMangos added a commit that referenced this pull request Jul 6, 2026
The companion SD3 and Eluna PRs were squash-merged to their masters, so
re-point from the (now-redundant) feature-branch tips to the canonical
master commits:
  SD3   7d62a5b (enhance/dbc) -> 052bd57 (mangos/ScriptDev3 master, PR #97)
  Eluna cc67c39 (enhance/dbc) -> f7a6e59 (MangosServer/Eluna master, PR #2)
Both squash commits were verified tree-identical to the feature-branch tips.
MadMaxMangos added a commit that referenced this pull request Jul 6, 2026
#428)

* CharStartOutfit: faithful DBC layout (4x uint8 identity, bbbb fmt, correct docs)

Model race/class/sex/outfit as four uint8 fields (was one packed uint32),
fmt 'dbbbb...' so file offsets match the 152-byte record, drop the phantom
Unknown1-3, and update the single Player.cpp consumer to match on the three
identity bytes. sizeof == GetFormatRecordSize == 52 (startup assert).

* SpellRadius: document server-unused DBC fields (comment-but-correct)

* Emotes: document server-unused DBC fields (comment-but-correct)

* Lock: document server-unused DBC fields (comment-but-correct)

* AuctionHouse: document server-unused DBC fields (comment-but-correct)

* ItemBagFamily: document server-unused DBC fields (comment-but-correct)

* MailTemplate: document server-unused DBC fields (comment-but-correct)

* SpellFocusObject: document server-unused DBC fields (comment-but-correct)

* WorldSafeLocs: document server-unused DBC fields (comment-but-correct)

* CreatureType: document server-unused DBC fields (comment-but-correct)

* CreatureDisplayInfoExtra: document server-unused DBC fields (comment-but-correct)

* SoundEntries: document server-unused DBC fields (comment-but-correct)

* DBC align Batch 2: 11 tables (renames + doc-unused) + consumers

Renames (struct field -> client-verified provenance name), consumers updated:
BankBagSlotPrices price->Price; TaxiNodes name->Name_lang;
SpellCastTimes CastTime->Base; ItemClass name->ClassName_lang;
CreatureSpellData spellId->SpellId; CinematicSequences Id->ID;
QuestSort id->ID; Talent DependsOnSpell->RequiredSpellID;
ItemRandomProperties enchant_id->Enchantment; CharStartOutfit ItemId->ItemID;
DurabilityCosts Itemlvl->ID, multiplier->WeaponSubClassCost.
Builds clean (mangosd links); server-unused fields documented (comment-but-correct).

* DBC align Batch 3: 11 tables (28 renames + doc-unused) + consumers

Renames (struct field -> client-verified provenance name; ~131 consumers updated):
LiquidType Id->ID SpellId->SpellID; CreatureDisplayInfo Displayid->ID scale->CreatureModelScale;
GameObjectDisplayInfo Displayid->ID filename->ModelName; SpellShapeshiftForm flags1->Flags creatureType->CreatureType;
TalentTab TalentTabID->ID tabpage->OrderIndex; EmotesText Id->ID textid->EmoteID;
SpellRange minRange->RangeMin maxRange->RangeMax; ChatChannels ChannelID->ID flags->Flags pattern->Name_lang;
SkillLine id->ID categoryId->CategoryID name->DisplayName_lang;
ChrClasses ClassID->ID powerType->DisplayPower name->Name_lang spellfamily->SpellClassSet;
Map map_type->InstanceType (incl. inline helpers) name->MapName_lang linked_zone->AreaTableID multimap_id->LoadingScreenID.
LiquidType.Name deferred (type-contested). Builds clean (mangosd links); server-unused fields documented.

* DBC align Batch 4: 11 tables (66 renames + doc-unused) + consumers

Aligns DBCStructure.h field names + docs to the client-verified schema
(reconciliation.json worklist) for 11 tables:
  AreaTrigger, SkillRaceClassInfo, WMOAreaTable, ItemSet, WorldMapArea,
  SpellItemEnchantment, Faction, ChrRaces, FactionTemplate, CreatureFamily,
  TaxiPathNode.

66 struct-field renames + comment-but-correct docs on server-unused fields.
Renames are compile-time only: same offset/bytes, sizeof unchanged, so the
startup sizeof==GetFormatRecordSize assert still holds; DBCfmt.h untouched.
287 consumer sites across 37 game/playerbot files updated (compiler-verified
complete: mangosd links clean). Submodule pointers advanced for the SD3
(AreaTrigger id->ID) and Eluna consumer fixes, each committed on its own
enhance/dbc branch in its own repo.

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

* DBC align Batch 5: AreaTable + SkillLineAbility (19 renames + doc-unused) + consumers

Final batch of the DBC field-name alignment campaign.
- AreaTable (8 renames): mapid/zone/exploreFlag/flags/area_level/area_name/team/LiquidTypeOverride
  -> ContinentID/ParentAreaID/AreaBit/Flags/ExplorationLevel/AreaName_lang/FactionGroupMask/LiquidTypeID_3
  + 9 document-unused fields (SoundProviderPref/AmbienceID/ZoneMusic/... /LiquidTypeID_0..2).
- SkillLineAbility (11 renames): id/skillId/spellId/racemask/classmask/req_skill_value/
  forward_spellid/learnOnGetSkill/max_value/min_value/reqtrainpoints
  -> ID/SkillLine/Spell/RaceMask/ClassMask/MinSkillLineRank/SupercededBySpell/AcquireMethod/
     TrivialSkillLineRankHigh/TrivialSkillLineRankLow/ReqTrainPoints + 4 document-unused.
- 129 consumer sites fixed across 30 game/playerbot files + 1 Eluna (submodule pointer bumped).
Renames + comment-but-correct docs only; no type/width/DBCfmt change. sizeof unchanged
(AreaTable 96B, SkillLineAbility 44B) so the boot size-assert still holds. Builds clean.

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

* LiquidType: field 1 is the Name string, not an int (fmt i->s, char* Name)

* Spell: rename SpellEntry fields to build-exact 1.12 .dbd names + doc unused (struct only)

* Spell: fix SpellEntry consumers for .dbd rename (align)

Compiler-driven consumer fan-out for the SpellEntry struct rename (Task 2):
- ~1100 member accesses across game lib + Bots + ChatCommands renamed to the
  build-exact 1.12 .dbd names (Id->ID, EffectApplyAuraName->EffectAura,
  SpellFamilyName->SpellClassSet, SpellFamilyFlags->SpellClassMask,
  EffectImplicitTargetA/B->ImplicitTargetA/B, SpellName->Name_lang, etc.).
- Header PCH-unblock: SpellAuras.h/Spell.h/GridNotifiersImpl.h/SpellMgr.h +
  Bots/ItemVisitors.h inline accessors.
- Explicit EffectAmplitude/EffectMultipleValue collision remap (name-swap by
  column the compiler cannot catch): original EffectAmplitude sites ->
  EffectAuraPeriod, original EffectMultipleValue sites -> EffectAmplitude.
- Submodule consumer companions committed on their own enhance/dbc branches
  (SD3, Eluna); parent tracks the pointers.

Builds clean (mangosd links). No runtime change (pure member renames).

* Spell: bump SD3/Eluna to expansion-guarded accessors (cross-fork safe)

Submodule consumer renames now route through expansion guards so merging the
SD3/Eluna enhance/dbc branches upstream keeps One/Two/Three/Four building
unchanged. SD3 4e6b444, Eluna 2d9a9a3.

* AreaTrigger + SpellRange: bump SD3 pointer to guarded accessors (cross-fork safe)

SD3 8f5b6ff wraps the campaign's earlier AreaTrigger id->ID and SpellRange
min/max->RangeMin/RangeMax renames in expansion-guarded accessors
(SD3_AreaTriggerId / SD3_SpellRangeMin / SD3_SpellRangeMax), matching the
Spell/Eluna guard pattern so the SD3 enhance/dbc branch stays upstream-safe
for One/Two/Three/Four. Verified by a real One/TBC mangosscript compile: all
DBC-rename cross-fork breaks resolved (only a pre-existing powerType base-drift
in a Karazhan script remains, unrelated to DBC alignment). SD3 8f5b6ff,
Eluna 2d9a9a3 (unchanged).

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

* Cross-fork: bump Eluna pointer to guarded Batch 3-5 consumer renames

Eluna cc67c39 wraps the previously-unguarded AreaTrigger/AreaTable/
TaxiPathNode/SkillLine/ChrClasses/ChrRaces consumer renames in
ELUNA_EXPANSION==EXP_CLASSIC guards (legacy token restored verbatim in
#else), so merging the Eluna enhance/dbc branch upstream keeps One/Two/
Three/Four building. Verified by real game-target compiles on One (TBC) and
Two (WotLK): both recompiled CreatureHooks/ServerHooks/Methods and linked
game.lib with 0 errors. SD3 8f5b6ff (unchanged), Eluna 2d9a9a3 -> cc67c39.

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

* fix(sd3): bump pointer to cross-core GetPowerType() fix (7d62a5b)

SD3 7d62a5b drops the `#if !defined(MISTS) m_creature->powerType #else
GetPowerType()` guard (a master 005a340f regression that breaks TBC/WotLK/
Cata, which lack the Creature powerType data member) for plain GetPowerType()
at boss_shade_of_aran + boss_deathbringer_saurfang. Verified by real
mangosscript compiles: One/TBC + Two/WotLK + Three/Cata all now link with 0
errors (previously 1-2 powerType errors, no link). Surfaced by this branch's
cross-fork sweep; unrelated to the DBC alignment. SD3 8f5b6ff -> 7d62a5b,
Eluna cc67c39 (unchanged).

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

* Rename SpellEntry consumers in merged-in SpellCooldownMgr (Id->ID)

master's [Decomp][Player] (bfaf638) extracted the spell-cooldown code out of
Player.cpp into src/game/Object/SpellCooldownMgr.cpp AFTER this branch had
renamed the SpellEntry consumers - so the extracted file still read the
pre-rename spellInfo->Id at 6 sites. Renamed them to spellInfo->ID
(SpellEntry::Id -> ID). PetMgr uses no renamed SpellEntry fields.

Post-merge validation: full mangosd build links clean (game.lib + mangosd.exe,
0 errors); SpellCooldownMgr.cpp and PetMgr.cpp now compiled into the build.

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

* Point SD3/Eluna submodules at squash-merged master commits

The companion SD3 and Eluna PRs were squash-merged to their masters, so
re-point from the (now-redundant) feature-branch tips to the canonical
master commits:
  SD3   7d62a5b (enhance/dbc) -> 052bd57 (mangos/ScriptDev3 master, PR #97)
  Eluna cc67c39 (enhance/dbc) -> f7a6e59 (MangosServer/Eluna master, PR #2)
Both squash commits were verified tree-identical to the feature-branch tips.

* docs(dbc): reference structs for the 103 unmodelled client DBCs (complete 154-table map)

Adds src/game/Server/DBCStructure_reference.h — inert, build-exact reference
structs for the 103 client 1.12 DBC tables the core does not model, plus a
catalogue of all 154 (ACTIVE in DBCStructure.h vs DOC here). Generated from the
client-verified schemas by CoreAlign/tools/gen_reference.py: every field carries
its .dbd name/type and a [dbd-only] flag where the schema is dbd-inferred rather
than decomp-confirmed. The header is NOT #included by any TU (zero build cost);
activating a table = move its struct into DBCStructure.h + add its fmt + a loader.
So the core now carries a complete map of every 1.12 client DBC.

Verified: valid C++ (MSVC cl /Zs, all 103 structs, 0 errors) and adversarially
checked struct-vs-schema across all 103 (coverage/types/names/confidence flags).

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

---------

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

Development

Successfully merging this pull request may close these issues.

2 participants