diff options
author | Dennis Friis <peavey@placid.dk> | 2008-04-02 15:17:26 +0000 |
---|---|---|
committer | Dennis Friis <peavey@placid.dk> | 2008-04-02 15:17:26 +0000 |
commit | ee1220b0ca4b8d4e4b10ec1f758284bf79fe8061 (patch) | |
tree | 0b2cabf8217a20105d069a72db24ab218da33270 /src/map/pc.c | |
parent | 97bb21a79949779df76269b087f3bce7ef8179ee (diff) | |
download | tmwa-ee1220b0ca4b8d4e4b10ec1f758284bf79fe8061.tar.gz tmwa-ee1220b0ca4b8d4e4b10ec1f758284bf79fe8061.tar.bz2 tmwa-ee1220b0ca4b8d4e4b10ec1f758284bf79fe8061.tar.xz tmwa-ee1220b0ca4b8d4e4b10ec1f758284bf79fe8061.zip |
patch derived from stable ea, that fixes duping and zero stacking
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 4e702c0..f5458e4 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2908,6 +2908,12 @@ int pc_dropitem(struct map_session_data *sd,int n,int amount) { nullpo_retr(1, sd); + if(n < 0 || n >= MAX_INVENTORY) + return 0; + + if(amount <= 0) + return 0; + if (sd->status.inventory[n].nameid <= 0 || sd->status.inventory[n].amount < amount || sd->trade_partner != 0 || sd->vender_id != 0 || |