summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/vending.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/map/vending.c b/src/map/vending.c
index bc3b1c73f..f5d46e25d 100644
--- a/src/map/vending.c
+++ b/src/map/vending.c
@@ -70,6 +70,13 @@ void vending_purchasereq(struct map_session_data *sd,int len,int id,unsigned cha
return;
if (vsd->vender_id == sd->bl.id)
return;
+ if (sd->bl.m != vsd->bl.m || !check_distance_bl(&sd->bl, &vsd->bl, TRADE_DISTANCE)
+ ) {
+ clif_buyvending(sd, 0, 32767, 4); // too far [Lupus]
+ //probably... we should add either a hack log / or a proper message. But normal player won't see ie anyway
+ return;
+ }
+
// check number of buying items
if (len < 8 + 4 || len > 8 + 4 * MAX_VENDING) {