diff options
author | brianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-11-09 00:02:18 +0000 |
---|---|---|
committer | brianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-11-09 00:02:18 +0000 |
commit | 75a1caf2f0ad4d61feb2fa3791d700b58c3283b2 (patch) | |
tree | 3fc147fb1cbe180277554d2ebcb00e33405a970a /src/map | |
parent | 165ae5d91f798d754db9513da0e2f453f9feeb56 (diff) | |
download | hercules-75a1caf2f0ad4d61feb2fa3791d700b58c3283b2.tar.gz hercules-75a1caf2f0ad4d61feb2fa3791d700b58c3283b2.tar.bz2 hercules-75a1caf2f0ad4d61feb2fa3791d700b58c3283b2.tar.xz hercules-75a1caf2f0ad4d61feb2fa3791d700b58c3283b2.zip |
- Vending shops are now closed when warping to novending maps/cells. (bugreport:6871)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16879 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/pc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index cd4c9c125..a3324fa71 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4658,6 +4658,12 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y bg_send_dot_remove(sd); if (sd->regen.state.gc) sd->regen.state.gc = 0; + // make sure vending is allowed here + if (sd->state.vending && map[m].flag.novending) { + clif_displaymessage (sd->fd, msg_txt(276)); // "You can't open a shop on this map" + vending_closevending(sd); + } + } } if( m < 0 ) @@ -4700,6 +4706,11 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y } while(map_getcell(m,x,y,CELL_CHKNOPASS)); } + if (sd->state.vending && map_getcell(m,x,y,CELL_CHKNOVENDING)) { + clif_displaymessage (sd->fd, msg_txt(204)); // "You can't open a shop on this cell." + vending_closevending(sd); + } + if(sd->bl.prev != NULL){ unit_remove_map_pc(sd,clrtype); clif_changemap(sd,map[m].index,x,y); // [MouseJstr] |