From 4c5b768b6ac5a561e96b492d66d44042227fb856 Mon Sep 17 00:00:00 2001 From: ai4rei Date: Sat, 19 Feb 2011 12:59:36 +0000 Subject: * Implemented buying store system (aka. reverse vending, purchase shop) together with related skill and items, without NPCs. - For SQL apply upgrade_svn14713_log.sql to upgrade tables `picklog` and `zenylog`; for TXT no action is necessary. - Requires 2010-04-20aRagexeRE or later and can be disabled in 'conf/battle/feature.conf'. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14713 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/buyingstore.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/map/buyingstore.h (limited to 'src/map/buyingstore.h') diff --git a/src/map/buyingstore.h b/src/map/buyingstore.h new file mode 100644 index 000000000..473fdb01a --- /dev/null +++ b/src/map/buyingstore.h @@ -0,0 +1,29 @@ +// Copyright (c) Athena Dev Teams - Licensed under GNU GPL +// For more information, see LICENCE in the main folder + +#ifndef _BUYINGSTORE_H_ +#define _BUYINGSTORE_H_ + +#define MAX_BUYINGSTORE_SLOTS 5 + +struct s_buyingstore_item +{ + int price; + unsigned short amount; + unsigned short nameid; +}; + +struct s_buyingstore +{ + struct s_buyingstore_item items[MAX_BUYINGSTORE_SLOTS]; + int zenylimit; + unsigned char slots; +}; + +bool buyingstore_setup(struct map_session_data* sd, unsigned char slots); +void buyingstore_create(struct map_session_data* sd, int zenylimit, unsigned char result, const char* storename, const uint8* itemlist, unsigned int count); +void buyingstore_close(struct map_session_data* sd); +void buyingstore_open(struct map_session_data* sd, int account_id); +void buyingstore_trade(struct map_session_data* sd, int account_id, unsigned int buyer_id, const uint8* itemlist, unsigned int count); + +#endif // _BUYINGSTORE_H_ -- cgit v1.2.3-60-g2f50