Ver código fonte

* Fixed using @refresh while having vending or buyingstore open would stuck the character (bugreport:156 , since r1307).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14857 54d463be-8e91-2dee-dedb-b68131a5f0ec
ai4rei 14 anos atrás
pai
commit
cdd5ade6f0
2 arquivos alterados com 6 adições e 0 exclusões
  1. 1 0
      Changelog-Trunk.txt
  2. 5 0
      src/map/clif.c

+ 1 - 0
Changelog-Trunk.txt

@@ -1,6 +1,7 @@
 Date	Added
 
 2011/06/18
+	* Fixed using @refresh while having vending or buyingstore open would stuck the character (bugreport:156 , since r1307). [Ai4rei]
 	* Fixed missing strlib.h include for compilers without own 'strnlen' implementation (since r14853). [Ai4rei]
 2011/06/16
 	* Slight speedup on most strdb operations [ultramage]

+ 5 - 0
src/map/clif.c

@@ -7664,6 +7664,8 @@ int clif_refresh(struct map_session_data *sd)
 	clif_weather_check(sd);
 	if( sd->chatID )
 		chat_leavechat(sd,0);
+	if( sd->state.vending )
+		clif_openvending(sd, sd->bl.id, sd->vending);
 	if( pc_issit(sd) )
 		clif_sitting(&sd->bl); // FIXME: just send to self, not area
 	if( pc_isdead(sd) ) //When you refresh, resend the death packet.
@@ -7671,6 +7673,9 @@ int clif_refresh(struct map_session_data *sd)
 	else
 		clif_changed_dir(&sd->bl, SELF);
 
+	// unlike vending, resuming buyingstore crashes the client.
+	buyingstore_close(sd);
+
 #ifndef TXT_ONLY
 	mail_clear(sd);
 #endif