From 59f5e93505e888db5a3f2a44098c5fd4eaf7847d Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sat, 28 Sep 2013 15:07:05 -0300 Subject: HPM: Trade.c Completed Already was about complete, just moved the definition to the .h so that plugins may rely on the value, also updated the trade.c header given the file had been previously modified (when the trade interface was implemented) Signed-off-by: shennetsind --- src/map/trade.c | 14 ++++++-------- src/map/trade.h | 3 +++ 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'src/map') diff --git a/src/map/trade.c b/src/map/trade.c index e137f7105..b3082515a 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -1,13 +1,15 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena Dev Teams #include "../common/nullpo.h" #include "../common/socket.h" + +#include "trade.h" #include "clif.h" #include "itemdb.h" #include "map.h" #include "path.h" -#include "trade.h" #include "pc.h" #include "npc.h" #include "battle.h" @@ -20,10 +22,6 @@ #include #include - -//Max distance from traders to enable a trade to take place. -#define TRADE_DISTANCE 2 - struct trade_interface trade_s; /*========================================== @@ -517,7 +515,7 @@ void trade_tradecommit(struct map_session_data *sd) { return; if ((tsd = map->id2sd(sd->trade_partner)) == NULL) { - trade_tradecancel(sd); + trade->cancel(sd); return; } diff --git a/src/map/trade.h b/src/map/trade.h index e8ac4a8c4..d0b900504 100644 --- a/src/map/trade.h +++ b/src/map/trade.h @@ -5,6 +5,9 @@ #ifndef _TRADE_H_ #define _TRADE_H_ +//Max distance from traders to enable a trade to take place. +#define TRADE_DISTANCE 2 + struct map_session_data; struct trade_interface { -- cgit v1.2.3-60-g2f50