From f8129b91cb6e0592523f8d1e51a5cb358d9799f3 Mon Sep 17 00:00:00 2001 From: Jade Date: Sat, 26 Dec 2020 20:13:23 +0100 Subject: [PATCH] Zero both players' moneyInTrade when initiating a trade --- src/ItemManager.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ItemManager.cpp b/src/ItemManager.cpp index dd12d18..d9b88b4 100644 --- a/src/ItemManager.cpp +++ b/src/ItemManager.cpp @@ -428,6 +428,9 @@ void ItemManager::itemTradeOfferAcceptHandler(CNSocket* sock, CNPacketData* data plr->isTradeConfirm = false; plr2->isTradeConfirm = false; + plr->moneyInTrade = 0; + plr2->moneyInTrade = 0; + memset(&plr->Trade, 0, sizeof(plr->Trade)); memset(&plr2->Trade, 0, sizeof(plr2->Trade));