Ver Fonte

* Pending trade requests no longer prevent a character from trading someone else instead (official).
- This fixes trade window displaying wrong name when attempting to deal multiple characters (bugreport:344).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14645 54d463be-8e91-2dee-dedb-b68131a5f0ec

ai4rei há 14 anos atrás
pai
commit
bf53c4e2a8
2 ficheiros alterados com 5 adições e 1 exclusões
  1. 3 0
      Changelog-Trunk.txt
  2. 2 1
      src/map/trade.c

+ 3 - 0
Changelog-Trunk.txt

@@ -1,5 +1,8 @@
 Date	Added
 
+2010/12/31
+	* Pending trade requests no longer prevent a character from trading someone else instead (official). [Ai4rei]
+	- This fixes trade window displaying wrong name when attempting to deal multiple characters (bugreport:344).
 2010/12/30
 	* Fixed improper use of itemdb_search. It does not return NULL but a dummy item, if the item id is invalid. [Ai4rei]
 2010/12/29

+ 2 - 1
src/map/trade.c

@@ -56,7 +56,7 @@ void trade_traderequest(struct map_session_data *sd, struct map_session_data *ta
 		}
 	}
 
-	if ((target_sd->trade_partner != 0) || (sd->trade_partner != 0)) {
+	if (target_sd->trade_partner != 0) {
 		clif_tradestart(sd, 2); // person is in another trade
 		return;
 	}
@@ -110,6 +110,7 @@ void trade_tradeack(struct map_session_data *sd, int type)
 	if (tsd->state.trading || tsd->trade_partner != sd->bl.id)
 	{
 		clif_tradestart(sd, 2);
+		sd->trade_partner=0;
 		return; //Already trading or wrong partner.
 	}