diff options
author | Lupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-02-25 21:29:33 +0000 |
---|---|---|
committer | Lupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-02-25 21:29:33 +0000 |
commit | 9448065cbfa1377f4f58c6442a90f895d5514d92 (patch) | |
tree | ea9e00f69e6e51959863d2c67db40bfbed10740d /src | |
parent | 20102af2e1496b6c46acc314d91f994a99d58ef3 (diff) | |
download | hercules-9448065cbfa1377f4f58c6442a90f895d5514d92.tar.gz hercules-9448065cbfa1377f4f58c6442a90f895d5514d92.tar.bz2 hercules-9448065cbfa1377f4f58c6442a90f895d5514d92.tar.xz hercules-9448065cbfa1377f4f58c6442a90f895d5514d92.zip |
added vender <-> buyer map & distance check
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9920 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/vending.c | 7 |
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) { |