Sfoglia il codice sorgente

Fix for Issue #2143 False Duplication of Items (#2157)

* Fixes #2143.
* Resolves the inventory looking like there are duplicate items when players use atcommand refresh during trades.
Ninja 8 anni fa
parent
commit
6b8dbf9a82
1 ha cambiato i file con 8 aggiunte e 2 eliminazioni
  1. 8 2
      src/map/clif.c

+ 8 - 2
src/map/clif.c

@@ -9386,8 +9386,14 @@ void clif_refresh(struct map_session_data *sd)
 		clif_changed_dir(&sd->bl, SELF);
 	clif_efst_status_change_sub(sd,&sd->bl,SELF);
 
-	// unlike vending, resuming buyingstore crashes the client.
-	buyingstore_close(sd);
+	//Issue #2143
+	//Cancel Trading State 
+	if (sd->state.trading)
+		trade_tradecancel(sd);
+	//Cancel Buying/Selling State
+	if (sd->state.buyingstore)
+		buyingstore_close(sd);
+
 
 	mail_clear(sd);