mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-17 17:25:27 +00:00
fix: a changed trade offer takes both accepts back
A player could change their offer after the other player gave the final accept, and the trade completed with the new offer on their own accept. Both clients drop their accepts when an offer changes, the one that changed it and the one that receives the update, so the trade now does the same and both players have to accept the offers as they are. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -256,6 +256,8 @@ namespace GameMessages {
|
||||
|
||||
trade->SetCoins(entity.GetObjectID(), i64Currency);
|
||||
trade->SetItems(entity.GetObjectID(), *resolvedItems);
|
||||
// Both clients take their accept back when an offer changes, so an accept only ever stands for the offers as they are
|
||||
trade->ResetAccepted();
|
||||
trade->SendUpdateToOther(entity.GetObjectID());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user