summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-30 22:56:05 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-30 22:56:05 +0000
commitd6f695749fb3ef591a39f6f328d37a81b9a763d1 (patch)
tree5a4ff25a431a71826d757fcf8d5c4e9845ca20bb /src/map
parentb275d5f9e515f15b4c0c4edb670335435f21273b (diff)
downloadhercules-d6f695749fb3ef591a39f6f328d37a81b9a763d1.tar.gz
hercules-d6f695749fb3ef591a39f6f328d37a81b9a763d1.tar.bz2
hercules-d6f695749fb3ef591a39f6f328d37a81b9a763d1.tar.xz
hercules-d6f695749fb3ef591a39f6f328d37a81b9a763d1.zip
- Added a check to prevent equipped items from being traded.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7433 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/trade.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/map/trade.c b/src/map/trade.c
index b9c142332..1e0486356 100644
--- a/src/map/trade.c
+++ b/src/map/trade.c
@@ -324,6 +324,9 @@ void trade_tradeadditem(struct map_session_data *sd, int index, int amount) {
if (amount < 0 || amount > sd->status.inventory[index].amount)
return;
+ if (sd->status.inventory[index].equip)
+ return; //must not be able to trade equipped items.
+
nameid = sd->inventory_data[index]->nameid;
if (!itemdb_cantrade(nameid, pc_isGM(sd), pc_isGM(target_sd)) && //Can't trade