Forráskód Böngészése

* Fixed novending cell check using misleading error message (bugreport:2592, since r11572 and r14724, related r11580).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15000 54d463be-8e91-2dee-dedb-b68131a5f0ec
ai4rei 13 éve
szülő
commit
da76d5f271
4 módosított fájl, 23 hozzáadás és 6 törlés
  1. 1 0
      Changelog-Trunk.txt
  2. 1 1
      conf/msg_athena.conf
  3. 16 4
      src/map/buyingstore.c
  4. 5 1
      src/map/clif.c

+ 1 - 0
Changelog-Trunk.txt

@@ -1,6 +1,7 @@
 Date	Added
 
 2011/11/28
+	* Fixed novending cell check using misleading error message (bugreport:2592, since r11572 and r14724, related r11580). [Ai4rei]
 	* Fixed removing item scripts through script command *setitemscript not working the way it is stated in script_commands.txt (related r9831). [Ai4rei]
 2011/11/19
 	* Fixed wrong damage numbers being displayed when the damage source was disguised (bugreport:5093, since r14979). [Ai4rei]

+ 1 - 1
conf/msg_athena.conf

@@ -217,7 +217,7 @@
 201: You don't have this quest skill.
 202: This player has forgotten the skill.
 203: This player doesn't have this quest skill.
-//204: FREE
+204: You can't open a shop on this cell.
 //205: FREE
 206: '%s' skill points reset.
 207: '%s' stats points reset.

+ 16 - 4
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

+ 5 - 1
src/map/clif.c

@@ -11072,10 +11072,14 @@ void clif_parse_OpenVending(int fd, struct map_session_data* sd)
 
 	if( sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOROOM )
 		return;
-	if( map[sd->bl.m].flag.novending || map_getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKNOVENDING) ) {
+	if( map[sd->bl.m].flag.novending ) {
 		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) ) {
+		clif_displaymessage (sd->fd, msg_txt(204)); // "You can't open a shop on this cell."
+		return;
+	}
 	if( message[0] == '\0' ) // invalid input
 		return;