summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorTAW Dev <tawdev@taw>2009-07-21 05:10:36 -0400
committerTAW Dev <tawdev@taw>2009-07-21 05:10:36 -0400
commita626960e74117bad7b906fa51b3b311b1f4972a0 (patch)
treedcbe031c4b4a7036f6f45f1139ea55ce44bf7d95 /src/map
parent6bf003a2fe176a36f5a752a9cc53379875282b85 (diff)
parent987d06fb3a6eafe1ade14269874b37170570cde9 (diff)
downloadtmwa-a626960e74117bad7b906fa51b3b311b1f4972a0.tar.gz
tmwa-a626960e74117bad7b906fa51b3b311b1f4972a0.tar.bz2
tmwa-a626960e74117bad7b906fa51b3b311b1f4972a0.tar.xz
tmwa-a626960e74117bad7b906fa51b3b311b1f4972a0.zip
Merge branch 'master' of git://gitorious.org/tmw-eathena/mainline
Diffstat (limited to 'src/map')
-rw-r--r--src/map/pc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 2e75294..570ceb6 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -2951,12 +2951,15 @@ int pc_dropitem(struct map_session_data *sd,int n,int amount)
int i;
nullpo_retr(1, sd);
+ if (sd->trade_partner != 0 || sd->npc_id != 0 || sd->state.storage_flag)
+ return 0; // no dropping while trading/npc/storage
+
if(n < 0 || n >= MAX_INVENTORY)
return 0;
if(amount <= 0)
return 0;
-
+
for (i = 0; i < 11; i++) {
if (equip_pos[i] > 0 && sd->equip_index[i] == n) { //Slot taken, remove item from there.
pc_unequipitem(sd, sd->equip_index[i], 1);