summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-09-28 15:07:05 -0300
committershennetsind <ind@henn.et>2013-09-28 15:07:05 -0300
commit59f5e93505e888db5a3f2a44098c5fd4eaf7847d (patch)
treea071eeffa25b0b2da72f2a36dd104fb7e104ca70 /src
parent07eba3971b99c979949c6002109897c07234fc64 (diff)
downloadhercules-59f5e93505e888db5a3f2a44098c5fd4eaf7847d.tar.gz
hercules-59f5e93505e888db5a3f2a44098c5fd4eaf7847d.tar.bz2
hercules-59f5e93505e888db5a3f2a44098c5fd4eaf7847d.tar.xz
hercules-59f5e93505e888db5a3f2a44098c5fd4eaf7847d.zip
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 <ind@henn.et>
Diffstat (limited to 'src')
-rw-r--r--src/map/trade.c14
-rw-r--r--src/map/trade.h3
2 files changed, 9 insertions, 8 deletions
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 <stdio.h>
#include <string.h>
-
-//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 {