Skip to content

Fix multivendor_master build after upstream master merge#178

Merged
Rochet2 merged 1736 commits into
multivendor_masterfrom
fix/multivendor_master-upstream-merge
May 26, 2026
Merged

Fix multivendor_master build after upstream master merge#178
Rochet2 merged 1736 commits into
multivendor_masterfrom
fix/multivendor_master-upstream-merge

Conversation

@Rochet2

@Rochet2 Rochet2 commented May 25, 2026

Copy link
Copy Markdown
Owner

Summary

The scheduled merge workflow merges TrinityCore/TrinityCore master into multivendor_master and builds with -DWITH_WARNINGS_AS_ERRORS=1. The branch was failing at the merge step (unresolved conflict in GossipDef.h) and would not compile after upstream refactored player interaction state.

This PR merges the latest upstream master into multivendor_master, resolves the conflict, and adapts the multivendor virtual-vendor tracking to the new upstream InteractionData API.

What was wrong

Merge conflict

  1. GossipDef.h — Upstream split the old flat InteractionData struct into a variant-based design (TrainerData, PlayerChoiceData, …) and moved PlayerChoiceData to its own class. The multivendor branch still stored the gossip-selected vendor entry as a flat VendorId field on the old struct; Git left the two incompatible class definitions as a conflict.

Post-merge compile errors

  1. ItemHandler.cpp::SendListInventory — Multivendor passes an optional vendorEntry (from gossip ActionMenuID) and stores it for later buy validation. After the merge, code still referenced the removed VendorId field and also incorrectly called StartInteraction() and then immediately Reset() + manual field assignment.

  2. Player.cpp::BuyItemFromVendorSlot — Anti-cheat / item-list lookup still read GetInteractionData().VendorId to load the virtual vendor item list when buying from a gossip-selected multivendor window.

  3. cs_npc.cpp.npc add vendoritem with the multivendor flag still read .VendorId; .npc delete vendoritem with the flag incorrectly used .TrainerId instead of the active vendor entry.

What was fixed

File Fix
src/server/game/Entities/Creature/GossipDef.h Keep upstream PlayerChoiceData + variant InteractionData; add VendorData (mirroring TrainerData) with GetVendor() accessors.
src/server/game/Entities/Creature/GossipDef.cpp Emplace VendorData when StartInteraction(..., PlayerInteractionType::Vendor) is called.
src/server/game/Handlers/ItemHandler.cpp After StartInteraction, store gossip vendorEntry in GetVendor()->Id; keep loading items via GetNpcVendorItemList(vendorEntry) when set.
src/server/game/Entities/Player/Player.cpp Read the active virtual vendor entry from GetVendor()->Id when validating purchases.
src/server/scripts/Commands/cs_npc.cpp Use GetVendor()->Id for multivendor .npc add/delete vendoritem; fix delete path that used TrainerId.

Local verification

  • Re-ran CMake against the existing BUILD directory.
  • Built game.vcxproj and scripts.vcxproj (Debug) successfully with VS 2022 MSBuild after fixes.

Test plan

  • Merge this PR into multivendor_master.
  • Confirm the merge workflow _master (multivendor_master, …) jobs pass (merge + compile + DB update + custom SQL).
  • In-game: open a multivendor NPC via gossip, verify the correct vendor item list appears.
  • Purchase an item from a gossip-selected vendor tab; verify buy succeeds and uses the virtual vendor list.
  • GM: with a multivendor window open, .npc add vendoritem <item> 0 0 0 1 and .npc delete vendoritem <item> 1 — verify items are added/removed from the active virtual vendor entry.

Shauren and others added 30 commits February 26, 2026 10:53
… result of incorrect merge conflict resolution
… while still being teleported to a different map
Shauren and others added 25 commits May 11, 2026 11:02
…tly always printed before battleground starts and replaced its trinity_string entry with proper battleground status packet
by jildor, closes TrinityCore#28854

(cherry picked from commit fe81161)
@Rochet2 Rochet2 force-pushed the fix/multivendor_master-upstream-merge branch from 9384254 to 70bc037 Compare May 25, 2026 22:28
@Rochet2 Rochet2 force-pushed the fix/multivendor_master-upstream-merge branch from 70bc037 to da2b513 Compare May 25, 2026 22:34
@Rochet2 Rochet2 merged commit 8ce0b68 into multivendor_master May 26, 2026
10 checks passed
@Rochet2 Rochet2 deleted the fix/multivendor_master-upstream-merge branch May 26, 2026 00:07
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.