From 75a1caf2f0ad4d61feb2fa3791d700b58c3283b2 Mon Sep 17 00:00:00 2001 From: brianluau Date: Fri, 9 Nov 2012 00:02:18 +0000 Subject: - 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 --- src/map/pc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/map/pc.c') 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] -- cgit v1.2.3-60-g2f50