summaryrefslogtreecommitdiff
path: root/src/map/npc.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-01-15 23:57:23 +0000
committerGitHub <noreply@github.com>2019-01-15 23:57:23 +0000
commit85690028a05b76c3423ff5777fd545d7af04cf6d (patch)
tree77c994f19cbd2d1a887e0a711df580048b52d16f /src/map/npc.h
parent21edafad0f74e85c408336274dd1e59db2fe3880 (diff)
parent828cbdc9e761499ba1336a2bb68267a161053d19 (diff)
downloadhercules-85690028a05b76c3423ff5777fd545d7af04cf6d.tar.gz
hercules-85690028a05b76c3423ff5777fd545d7af04cf6d.tar.bz2
hercules-85690028a05b76c3423ff5777fd545d7af04cf6d.tar.xz
hercules-85690028a05b76c3423ff5777fd545d7af04cf6d.zip
Merge pull request #2339 from 4144/updatepackets
Update packet up to 2019-01-09
Diffstat (limited to 'src/map/npc.h')
-rw-r--r--src/map/npc.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/map/npc.h b/src/map/npc.h
index ed5f4138d..d455a395b 100644
--- a/src/map/npc.h
+++ b/src/map/npc.h
@@ -41,10 +41,11 @@ enum npc_parse_options {
};
enum npc_shop_types {
- NST_ZENY,/* default */
- NST_CASH,/* official npc cash shop */
- NST_MARKET,/* official npc market type */
+ NST_ZENY, /* default */
+ NST_CASH, /* official npc cash shop */
+ NST_MARKET, /* official npc market type */
NST_CUSTOM,
+ NST_BARTER, /* official npc barter type */
/* */
NST_MAX,
};
@@ -56,11 +57,14 @@ struct npc_label_list {
char name[NAME_LENGTH];
int pos;
};
+
struct npc_item_list {
int nameid;
- unsigned int value;
+ unsigned int value; // price or barter currency item id
+ int value2; // barter currency item amount
unsigned int qty;
};
+
struct npc_shop_data {
unsigned char type;/* what am i */
struct npc_item_list *item;/* list */
@@ -306,11 +310,16 @@ struct npc_interface {
bool (*trader_pay) (struct npc_data *nd, struct map_session_data *sd, int price, int points);
void (*trader_update) (int master);
int (*market_buylist) (struct map_session_data *sd, struct itemlist *item_list);
+ int (*barter_buylist) (struct map_session_data *sd, struct barteritemlist *item_list);
bool (*trader_open) (struct map_session_data *sd, struct npc_data *nd);
void (*market_fromsql) (void);
- void (*market_tosql) (struct npc_data *nd, unsigned short index);
- void (*market_delfromsql) (struct npc_data *nd, unsigned short index);
- void (*market_delfromsql_sub) (const char *npcname, unsigned short index);
+ void (*market_tosql) (struct npc_data *nd, int index);
+ void (*market_delfromsql) (struct npc_data *nd, int index);
+ void (*market_delfromsql_sub) (const char *npcname, int index);
+ void (*barter_fromsql) (void);
+ void (*barter_tosql) (struct npc_data *nd, int index);
+ void (*barter_delfromsql) (struct npc_data *nd, int index);
+ void (*barter_delfromsql_sub) (const char *npcname, int itemId, int itemId2, int amount2);
bool (*db_checkid) (const int id);
void (*refresh) (struct npc_data* nd);
/**