summaryrefslogtreecommitdiff
path: root/src/map/trade.h
diff options
context:
space:
mode:
authorMatheus Macabu <mkbu95@gmail.com>2013-06-15 03:25:38 -0300
committerMatheus Macabu <mkbu95@gmail.com>2013-06-15 03:25:38 -0300
commitb745cb176a16e771bf5bbae43a7445cf160d1342 (patch)
tree48bc1d0fb831d679c4666f70e3acd92e6ed01ddd /src/map/trade.h
parent634bcc63b7adff53d817c19195c4060170eeecfc (diff)
downloadhercules-b745cb176a16e771bf5bbae43a7445cf160d1342.tar.gz
hercules-b745cb176a16e771bf5bbae43a7445cf160d1342.tar.bz2
hercules-b745cb176a16e771bf5bbae43a7445cf160d1342.tar.xz
hercules-b745cb176a16e771bf5bbae43a7445cf160d1342.zip
- HPM: Added trade interface;
- Moved PARTY_RECRUIT definition to mmo.h to avoid segfault; - Check if item is already at maximum refine; - Fixed that @reloadscript with one npc bug (thanks to akinari). Signed-off-by: Matheus Macabu <mkbu95@gmail.com>
Diffstat (limited to 'src/map/trade.h')
-rw-r--r--src/map/trade.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/map/trade.h b/src/map/trade.h
index 6bb39936e..6bcefdb96 100644
--- a/src/map/trade.h
+++ b/src/map/trade.h
@@ -7,12 +7,19 @@
//#include "map.h"
struct map_session_data;
-void trade_traderequest(struct map_session_data *sd, struct map_session_data *target_sd);
-void trade_tradeack(struct map_session_data *sd,int type);
-void trade_tradeadditem(struct map_session_data *sd,short index,short amount);
-void trade_tradeaddzeny(struct map_session_data *sd,int amount);
-void trade_tradeok(struct map_session_data *sd);
-void trade_tradecancel(struct map_session_data *sd);
-void trade_tradecommit(struct map_session_data *sd);
+struct trade_interface {
+ void (*request) (struct map_session_data *sd, struct map_session_data *target_sd);
+ void (*ack) (struct map_session_data *sd,int type);
+ int (*check_impossible) (struct map_session_data *sd);
+ int (*check) (struct map_session_data *sd, struct map_session_data *tsd);
+ void (*additem) (struct map_session_data *sd,short index,short amount);
+ void (*addzeny) (struct map_session_data *sd,int amount);
+ void (*ok) (struct map_session_data *sd);
+ void (*cancel) (struct map_session_data *sd);
+ void (*commit) (struct map_session_data *sd);
+} trade_s;
+
+struct trade_interface *trade;
+void trade_interface(void);
#endif /* _TRADE_H_ */