From 85975b753eca0f401f0ff4c58c81abe50c3ff813 Mon Sep 17 00:00:00 2001 From: Aaron Kimbrell Date: Wed, 11 Nov 2026 07:00:53 -0600 Subject: [PATCH] fix(trade): tell both players a trade is about to be performed Once both players had given their final accept, live sent each an empty ServerTradeUpdate with bAboutToPerform set, and the client shows the trade as complete (LWOTradeComponent::SendMessage, "SetTradeComplete"). The server only sent the accepts that close the window. It now sends the update first, before the items move. Co-Authored-By: Claude Opus 5.5 --- dGame/TradingManager.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dGame/TradingManager.cpp b/dGame/TradingManager.cpp index d103c07c0..364840a7e 100644 --- a/dGame/TradingManager.cpp +++ b/dGame/TradingManager.cpp @@ -150,6 +150,17 @@ void Trade::SetAccepted(LWOOBJID participant, bool value) { } if (m_AcceptedA && m_AcceptedB) { + // Live told the players the trade was about to be performed (an empty ServerTradeUpdate with + // bAboutToPerform); their clients show the trade as complete (LWOTradeComponent::SendMessage, + // "SetTradeComplete") + for (auto* const participant : { GetParticipantAEntity(), GetParticipantBEntity() }) { + if (!participant) continue; + GameMessages::ServerTradeUpdate aboutToPerform; + aboutToPerform.target = participant->GetObjectID(); + aboutToPerform.bAboutToPerform = true; + aboutToPerform.Send(participant->GetSystemAddress()); + } + auto* entityB = GetParticipantBEntity(); if (entityB != nullptr) {