summaryrefslogtreecommitdiff
path: root/src/map/trade.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-18 16:01:26 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-18 16:01:26 +0000
commit2449d2a6e7ddd1648d2e1fe446c97fe94378af28 (patch)
treece6f82d036029d2954764b2fc7119f538e0347fa /src/map/trade.c
parentbb0bd9d290f6dd1f3a455da7d4cd4ae58e8e49a2 (diff)
downloadhercules-2449d2a6e7ddd1648d2e1fe446c97fe94378af28.tar.gz
hercules-2449d2a6e7ddd1648d2e1fe446c97fe94378af28.tar.bz2
hercules-2449d2a6e7ddd1648d2e1fe446c97fe94378af28.tar.xz
hercules-2449d2a6e7ddd1648d2e1fe446c97fe94378af28.zip
- Removed message 592 from trade.c
- Removed mapflag nopvp - Added support for disabling mapflags on a mapflag line: comodo.gat mapflag nomemo <- turns on nomemo mapflag comodo.gat mapflag nomemo off <- turns off nomemo mapflag - Cleaned up and optimized the restricted/zones mapflag. Restricted cards will just not work in disallowed maps rather than blocking the compounded equipement from being used. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6159 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/trade.c')
-rw-r--r--src/map/trade.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/map/trade.c b/src/map/trade.c
index 15f99b9c4..eb870418d 100644
--- a/src/map/trade.c
+++ b/src/map/trade.c
@@ -204,11 +204,8 @@ int trade_check(struct map_session_data *sd) {
if (inventory2[i].nameid == inventory[n].nameid &&
inventory2[i].card[0] == inventory[n].card[0] && inventory2[i].card[1] == inventory[n].card[1] &&
inventory2[i].card[2] == inventory[n].card[2] && inventory2[i].card[3] == inventory[n].card[3]) {
- if (inventory2[i].amount + amount > MAX_AMOUNT) {
- clif_displaymessage(sd->fd, msg_txt(592)); // Trade can not be done, because one of your doesn't have enough free slots in its inventory.
- clif_displaymessage(target_sd->fd, msg_txt(592)); // Trade can not be done, because one of your doesn't have enough free slots in its inventory.
+ if (inventory2[i].amount + amount > MAX_AMOUNT)
return 0;
- }
inventory2[i].amount += amount;
inventory[n].amount -= amount;
if (inventory[n].amount <= 0)
@@ -228,11 +225,8 @@ int trade_check(struct map_session_data *sd) {
break;
}
}
- if (i == MAX_INVENTORY) {
- clif_displaymessage(sd->fd, msg_txt(592)); // Trade can not be done, because one of your doesn't have enough free slots in its inventory.
- clif_displaymessage(target_sd->fd, msg_txt(592)); // Trade can not be done, because one of your doesn't have enough free slots in its inventory.
+ if (i == MAX_INVENTORY)
return 0;
- }
}
}
}
@@ -251,11 +245,8 @@ int trade_check(struct map_session_data *sd) {
if (inventory[i].nameid == inventory2[n].nameid &&
inventory[i].card[0] == inventory2[n].card[0] && inventory[i].card[1] == inventory2[n].card[1] &&
inventory[i].card[2] == inventory2[n].card[2] && inventory[i].card[3] == inventory2[n].card[3]) {
- if (inventory[i].amount + amount > MAX_AMOUNT) {
- clif_displaymessage(sd->fd, msg_txt(592)); // Trade can not be done, because one of your doesn't have enough free slots in its inventory.
- clif_displaymessage(target_sd->fd, msg_txt(592)); // Trade can not be done, because one of your doesn't have enough free slots in its inventory.
+ if (inventory[i].amount + amount > MAX_AMOUNT)
return 0;
- }
inventory[i].amount += amount;
inventory2[n].amount -= amount;
if (inventory2[n].amount <= 0)
@@ -274,11 +265,8 @@ int trade_check(struct map_session_data *sd) {
break;
}
}
- if (i == MAX_INVENTORY) {
- clif_displaymessage(sd->fd, msg_txt(592)); // Trade can not be done, because one of your doesn't have enough free slots in its inventory.
- clif_displaymessage(target_sd->fd, msg_txt(592)); // Trade can not be done, because one of your doesn't have enough free slots in its inventory.
+ if (i == MAX_INVENTORY)
return 0;
- }
}
}
}