Selaa lähdekoodia

Notify players involved in a trade that it has been canceled when one player changes maps/logs out or otherwise becomes unable to participate in the trade.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/renewal@14452 54d463be-8e91-2dee-dedb-b68131a5f0ec
Paradox924X 14 vuotta sitten
vanhempi
commit
187aa99cbf
2 muutettua tiedostoa jossa 6 lisäystä ja 1 poistoa
  1. 1 0
      Changelog-Renewal.txt
  2. 5 1
      src/map/trade.c

+ 1 - 0
Changelog-Renewal.txt

@@ -1,6 +1,7 @@
 Date	Added
 
 2010/11/08
+	* Notify players involved in a trade that it has been canceled when one player changes maps/logs out or otherwise becomes unable to participate in the trade. [Paradox924X]
 	* Send the actual level of the person you're trading with rather than limiting it by the max_lv/aura_lv settings. [Paradox924X]
 2010/11/07
 	* 'Exp gained' packets are now sent regardless of @showexp. @showexp can be enabled regardless of PACKETVER. [Gepard]

+ 5 - 1
src/map/trade.c

@@ -455,8 +455,12 @@ void trade_tradecancel(struct map_session_data *sd)
 
 	if(!sd->state.trading)
 	{ // Not trade acepted
-		if( target_sd ) target_sd->trade_partner = 0;
+		if( target_sd ) {
+			target_sd->trade_partner = 0;
+			clif_tradecancelled(target_sd);
+		}
 		sd->trade_partner = 0;
+		clif_tradecancelled(sd);
 		return;
 	}