From 07e9df123a3352a712fb801893eabdbf0f0e442a Mon Sep 17 00:00:00 2001 From: ultramage Date: Mon, 24 Mar 2008 13:51:19 +0000 Subject: Fixed a problem in the new trade window implementation (from r11830) where no trade acknowledgement messages would get sent (bugreport:1217). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12427 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/trade.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/map') diff --git a/src/map/trade.c b/src/map/trade.c index f60f7370b..f65827f2f 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -101,8 +101,8 @@ void trade_tradeack(struct map_session_data *sd, int type) return; //Already trading or no partner set. if ((tsd = map_id2sd(sd->trade_partner)) == NULL) { - sd->trade_partner=0; clif_tradestart(sd, 1); // character does not exist + sd->trade_partner=0; return; } @@ -113,12 +113,12 @@ void trade_tradeack(struct map_session_data *sd, int type) } if (type == 4) { // Cancel + clif_tradestart(tsd, type); + clif_tradestart(sd, type); sd->state.deal_locked = 0; sd->trade_partner = 0; tsd->state.deal_locked = 0; tsd->trade_partner = 0; - clif_tradestart(tsd, type); - clif_tradestart(sd, type); return; } @@ -129,9 +129,9 @@ void trade_tradeack(struct map_session_data *sd, int type) if (pc_isGM(tsd) < lowest_gm_level && (sd->bl.m != tsd->bl.m || !check_distance_bl(&sd->bl, &tsd->bl, TRADE_DISTANCE) )) { + clif_tradestart(sd, 0); // too far sd->trade_partner=0; tsd->trade_partner = 0; - clif_tradestart(sd, 0); // too far return; } @@ -139,12 +139,12 @@ void trade_tradeack(struct map_session_data *sd, int type) if (sd->npc_id || sd->vender_id || sd->state.storage_flag || tsd->npc_id || tsd->vender_id || tsd->state.storage_flag) { //Fail + clif_tradestart(sd, 2); + clif_tradestart(tsd, 2); sd->state.deal_locked = 0; sd->trade_partner = 0; tsd->state.deal_locked = 0; tsd->trade_partner = 0; - clif_tradestart(sd, 2); - clif_tradestart(tsd, 2); return; } -- cgit v1.2.3-70-g09d2