From 204bfb1822cadd6ff0bc20820e02f36af98f9c64 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Thu, 27 Jun 2013 16:29:30 -0700 Subject: Hopefully fix the trade heisenbug --- src/map/trade.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/map/trade.cpp b/src/map/trade.cpp index c0f8c46..785a4da 100644 --- a/src/map/trade.cpp +++ b/src/map/trade.cpp @@ -125,6 +125,7 @@ void trade_tradeadditem(dumb_ptr sd, int index, int amount) clif_tradeadditem(sd, target_sd, 0, amount); } } + // note: amount is overridden below! else if (amount <= sd->status.inventory[index - 2].amount && amount > 0) { @@ -166,10 +167,12 @@ void trade_tradeadditem(dumb_ptr sd, int index, int amount) target_sd->max_weight) { clif_tradeitemok(sd, index, 0, 1); //fail to add item -- the player was over weighted. + amount = 0; // [MouseJstr] } else if (free_ <= 0) { clif_tradeitemok(sd, index, 0, 2); //fail to add item -- no free slots at receiver + amount = 0; // peavey } else { -- cgit v1.2.3-60-g2f50