From 2449d2a6e7ddd1648d2e1fe446c97fe94378af28 Mon Sep 17 00:00:00 2001 From: skotlex Date: Tue, 18 Apr 2006 16:01:26 +0000 Subject: - 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 --- src/map/trade.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'src/map/trade.c') 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; - } } } } -- cgit v1.2.3-70-g09d2