summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c11
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]