Browse Source

Fixed bugreport:5835 vendings are no longer broken when character moves map or is recalled by a gm.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16181 54d463be-8e91-2dee-dedb-b68131a5f0ec
shennetsind 13 years ago
parent
commit
166e32999d
3 changed files with 6 additions and 3 deletions
  1. 1 2
      src/map/atcommand.c
  2. 5 0
      src/map/clif.c
  3. 0 1
      src/map/unit.c

+ 1 - 2
src/map/atcommand.c

@@ -2954,8 +2954,7 @@ ACMD_FUNC(petrename)
 /*==========================================
  *
  *------------------------------------------*/
-ACMD_FUNC(recall)
-{
+ACMD_FUNC(recall) {
 	struct map_session_data *pl_sd = NULL;
 
 	nullpo_retr(-1, sd);

+ 5 - 0
src/map/clif.c

@@ -9285,6 +9285,11 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
 		guild_guildaura_refresh(sd,GD_HAWKEYES,guild_checkskill(sd->state.gmaster_flag,GD_HAWKEYES));
 	}
 
+	if( sd->state.vending ) { /* show we have a vending */
+		clif_openvending(sd,sd->bl.id,sd->vending);
+		clif_showvendingboard(&sd->bl,sd->message,0);
+	}
+	
 	if(map[sd->bl.m].flag.loadevent) // Lance
 		npc_script_event(sd, NPCE_LOADMAP);
 

+ 0 - 1
src/map/unit.c

@@ -2021,7 +2021,6 @@ int unit_remove_map_(struct block_list *bl, clr_type clrtype, const char* file,
 				chat_leavechat(sd,0);
 			if(sd->trade_partner)
 				trade_tradecancel(sd);
-			vending_closevending(sd);
 			buyingstore_close(sd);
 			searchstore_close(sd);
 			if(sd->state.storage_flag == 1)