summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/trade.c12
1 files changed, 6 insertions, 6 deletions
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;
}