From 0e7d4327dd2d8b2ad7aadd9ef02ed7d913dd96a6 Mon Sep 17 00:00:00 2001 From: ai4rei Date: Mon, 28 Nov 2011 20:25:33 +0000 Subject: * Fixed novending cell check using misleading error message (bugreport:2592, since r11572 and r14724, related r11580). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15000 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/buyingstore.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src/map/buyingstore.c') diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c index 94f390c10..8d3179745 100644 --- a/src/map/buyingstore.c +++ b/src/map/buyingstore.c @@ -56,12 +56,18 @@ bool buyingstore_setup(struct map_session_data* sd, unsigned char slots) return false; } - if( map[sd->bl.m].flag.novending || map_getcell(sd->bl.m, sd->bl.x, sd->bl.y, CELL_CHKNOVENDING) ) - {// custom: no vending maps/cells + if( map[sd->bl.m].flag.novending ) + {// custom: no vending maps clif_displaymessage(sd->fd, msg_txt(276)); // "You can't open a shop on this map" return false; } + if( map_getcell(sd->bl.m, sd->bl.x, sd->bl.y, CELL_CHKNOVENDING) ) + {// custom: no vending cells + clif_displaymessage(sd->fd, msg_txt(204)); // "You can't open a shop on this cell." + return false; + } + if( slots > MAX_BUYINGSTORE_SLOTS ) { ShowWarning("buyingstore_setup: Requested %d slots, but server supports only %d slots.\n", (int)slots, MAX_BUYINGSTORE_SLOTS); @@ -105,12 +111,18 @@ void buyingstore_create(struct map_session_data* sd, int zenylimit, unsigned cha return; } - if( map[sd->bl.m].flag.novending || map_getcell(sd->bl.m, sd->bl.x, sd->bl.y, CELL_CHKNOVENDING) ) - {// custom: no vending maps/cells + if( map[sd->bl.m].flag.novending ) + {// custom: no vending maps clif_displaymessage(sd->fd, msg_txt(276)); // "You can't open a shop on this map" return; } + if( map_getcell(sd->bl.m, sd->bl.x, sd->bl.y, CELL_CHKNOVENDING) ) + {// custom: no vending cells + clif_displaymessage(sd->fd, msg_txt(204)); // "You can't open a shop on this cell." + return; + } + weight = sd->weight; // check item list -- cgit v1.2.3-70-g09d2