diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-10-05 18:10:54 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-10-05 18:10:54 +0000 |
commit | 2e6cfd109a8800433bca0d9060d47eadd0cb8734 (patch) | |
tree | 2f31b30e5f415d9d6403176911dc6a9dbe85cc07 /src/map/trade.c | |
parent | 63efe8b1c659a3b1491321bbfbd0d1731daf8e74 (diff) | |
download | hercules-2e6cfd109a8800433bca0d9060d47eadd0cb8734.tar.gz hercules-2e6cfd109a8800433bca0d9060d47eadd0cb8734.tar.bz2 hercules-2e6cfd109a8800433bca0d9060d47eadd0cb8734.tar.xz hercules-2e6cfd109a8800433bca0d9060d47eadd0cb8734.zip |
- skill_blown will now trigger on-touch npcs on the landing tile.
- Max trade distance has been reduced from 5 to 2.
- Undisguising will now resend the cart-contents.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8940 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/trade.c')
-rw-r--r-- | src/map/trade.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/map/trade.c b/src/map/trade.c index 23be27700..4d8f4200d 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -19,6 +19,8 @@ #include "log.h"
#include "../common/malloc.h"
+//Max distance from traders to enable a trade to take place.
+#define TRADE_DISTANCE 2
/*==========================================
* Initiates a trade request.
@@ -61,8 +63,8 @@ void trade_traderequest(struct map_session_data *sd, struct map_session_data *ta //Fixed. Only real GMs can request trade from far away! [Lupus]
if (level < lowest_gm_level && (sd->bl.m != target_sd->bl.m ||
- (sd->bl.x - target_sd->bl.x <= -5 || sd->bl.x - target_sd->bl.x >= 5) ||
- (sd->bl.y - target_sd->bl.y <= -5 || sd->bl.y - target_sd->bl.y >= 5))) {
+ !check_distance_bl(&sd->bl, &target_sd->bl, TRADE_DISTANCE)
+ )) {
clif_tradestart(sd, 0); // too far
return ;
}
@@ -93,9 +95,8 @@ void trade_tradeack(struct map_session_data *sd, int type) { //Copied here as well since the original character could had warped.
if (type == 3 && pc_isGM(target_sd) < lowest_gm_level && (sd->bl.m != target_sd->bl.m ||
- (sd->bl.x - target_sd->bl.x <= -5 || sd->bl.x - target_sd->bl.x >= 5) ||
- (sd->bl.y - target_sd->bl.y <= -5 || sd->bl.y - target_sd->bl.y >= 5)))
- {
+ !check_distance_bl(&sd->bl, &target_sd->bl, TRADE_DISTANCE)
+ )) {
sd->trade_partner=0;
target_sd->trade_partner = 0;
clif_tradestart(sd, 0); // too far
|