Skip to content

Implement 12.0.0 transmog system#31721

Open
Olcadoom wants to merge 1 commit intoTrinityCore:masterfrom
Olcadoom:transmog-outfit-system
Open

Implement 12.0.0 transmog system#31721
Olcadoom wants to merge 1 commit intoTrinityCore:masterfrom
Olcadoom:transmog-outfit-system

Conversation

@Olcadoom
Copy link

Implements outfit-based transmogrification (12.0.1+) across server code and DB.

Key changes:

  • Add SQL migration: character_transmog_outfits table for persisting outfit presets.
  • CollectionMgr: populate AccountTransmogUpdate.NewAppearances so the client Items tab is filled.
  • Player: add ACTION_BUTTON_TRANSMOG_OUTFIT action type, expose equipment sets getter, set HasTransmog/HasIllusion update fields when updating visible item slots, and fully implement _LoadTransmogOutfits to initialize default/viewed outfits, populate 30-slot layout, and restore saved outfits into update fields.
  • Handlers: force transmog-related game rule/vars for client UI in AuthHandler/CharacterHandler; implement transmogrification handlers in TransmogrificationHandler (HandleTransmogOutfitUpdateSlots, HandleTransmogOutfitNew, HandleTransmogOutfitUpdateInfo, HandleClearNewAppearance) to validate NPC, apply/reset appearances & illusions, charge cost, update UpdateFields and _equipmentSets, persist new outfits, and send confirmations.
  • Packets: add serialization for TransmogOutfitSlot, reading/writing outfit packets and response packets.
  • Spells: implement EffectEquipTransmogOutfit (effect 347) for quick-applying outfits via action bar spell cast.

Purpose: bring server support for retail-style transmogrification outfits (creation, editing, applying, persistence, and client UI compatibility) so clients can use the outfit UI and the server can store and apply outfit presets.

Changes proposed:

  • Add character_transmog_outfits SQL migration table for persisting outfit slot data per character
  • Implement _LoadTransmogOutfits in Player to initialize default Outfit 1, restore saved outfits into UpdateFields with full 30-slot layout (armor + weapon sub-slots), and populate situations
  • Add ACTION_BUTTON_TRANSMOG_OUTFIT (0x90) enum and validation so outfit icons persist on the action bar across relogs
  • Expose GetEquipmentSets() public getter on Player for spell effect access
  • Set HasTransmog/HasIllusion update fields in SetVisibleItemSlot for correct client rendering
  • Populate AccountTransmogUpdate.NewAppearances in CollectionMgr so the client's Items tab displays collected appearances
  • Force transmog-related GameRules and MirrorVars in AuthHandler/CharacterHandler to enable the client outfit UI
  • Implement HandleTransmogOutfitUpdateSlots: validates NPC, maps outfit slots to equipment slots, applies/resets appearances and illusions with cost checks, updates UpdateFields and _equipmentSets for DB persistence, sends confirmation packet and visual effect
  • Implement HandleTransmogOutfitNew: creates new outfit presets with current gear appearances, initializes situations, persists to _equipmentSets
  • Implement HandleTransmogOutfitUpdateInfo: handles outfit rename/icon changes
  • Implement HandleClearNewAppearance: handles clearing the "new" flag on collected appearances
  • Add packet serialization for TransmogOutfitSlot, TransmogOutfitUpdateSlots, TransmogOutfitSlotsUpdated, TransmogOutfitNew, TransmogOutfitNewEntryAdded, TransmogOutfitUpdateInfo, TransmogOutfitInfoUpdated, and ClearNewAppearance
  • Register all new opcodes (CMSG + SMSG) in Opcodes.cpp and handler declarations in WorldSession.h
  • Implement EffectEquipTransmogOutfit spell effect handler (effect 347) for quick-applying outfits via action bar spell cast, reading outfit SetID from m_misc.Raw.Data[1]

Issues addressed:

Closes # N/A - new feature implementation

Tests performed:

  • Builds successfully with Visual Studio (no compile errors or warnings)
  • Tested in-game: created multiple outfit presets via transmog NPC UI
  • Verified outfit quick-apply via action bar spell cast (spell 1247613) switches between outfits correctly
  • Confirmed outfit icons persist on action bar after relog (action type 144 fix)
  • Verified appearances, secondary shoulders, and illusions apply and reset correctly
  • Confirmed outfits persist across server restarts via DB save/load
  • Validated against retail sniff data for packet structure correctness

Known issues and TODO list:

  • Weapon sub-slots (SlotOption 3-11) are skipped during outfit apply - only primary weapon appearances (SlotOption 1/2) are processed
  • Outfit deletion handler not yet implemented

Implements outfit-based transmogrification (12.0.1+) across server code and DB.

Key changes:
- Add SQL migration: character_transmog_outfits table for persisting outfit presets.
- CollectionMgr: populate AccountTransmogUpdate.NewAppearances so the client Items tab is filled.
- Player: add ACTION_BUTTON_TRANSMOG_OUTFIT action type, expose equipment sets getter, set HasTransmog/HasIllusion update fields when updating visible item slots, and fully implement _LoadTransmogOutfits to initialize default/viewed outfits, populate 30-slot layout, and restore saved outfits into update fields.
- Handlers: force transmog-related game rule/vars for client UI in AuthHandler/CharacterHandler; implement transmogrification handlers in TransmogrificationHandler (HandleTransmogOutfitUpdateSlots, HandleTransmogOutfitNew, HandleTransmogOutfitUpdateInfo, HandleClearNewAppearance) to validate NPC, apply/reset appearances & illusions, charge cost, update UpdateFields and _equipmentSets, persist new outfits, and send confirmations.
- Packets: add serialization for TransmogOutfitSlot, reading/writing outfit packets and response packets.

Purpose: bring server support for retail-style transmogrification outfits (creation, editing, applying, persistence, and client UI compatibility) so clients can use the outfit UI and the server can store and apply outfit presets.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant