diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2013-06-27 16:29:30 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2013-06-27 16:29:30 -0700 |
commit | 204bfb1822cadd6ff0bc20820e02f36af98f9c64 (patch) | |
tree | 0fe9e58b4f5696ec1ab1b8a4a5a2cbd383468992 /src/map | |
parent | b0e26d0318c5c5f39c06a6c4b5dfea8ec7ebd01c (diff) | |
download | tmwa-204bfb1822cadd6ff0bc20820e02f36af98f9c64.tar.gz tmwa-204bfb1822cadd6ff0bc20820e02f36af98f9c64.tar.bz2 tmwa-204bfb1822cadd6ff0bc20820e02f36af98f9c64.tar.xz tmwa-204bfb1822cadd6ff0bc20820e02f36af98f9c64.zip |
Hopefully fix the trade heisenbug
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/trade.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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<map_session_data> 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<map_session_data> 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 { |