summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking/HPMHooking.Defs.inc
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking.Defs.inc')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc104
1 files changed, 63 insertions, 41 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 0a186939e..7cc5ef2b1 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2018 Hercules Dev Team
+ * Copyright (C) 2013-2019 Hercules Dev Team
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -552,8 +552,8 @@ typedef bool (*HPMHOOK_pre_chr_name_exists) (const char **name, const char **esc
typedef bool (*HPMHOOK_post_chr_name_exists) (bool retVal___, const char *name, const char *esc_name);
typedef int (*HPMHOOK_pre_chr_check_char_name) (const char **name, const char **esc_name);
typedef int (*HPMHOOK_post_chr_check_char_name) (int retVal___, const char *name, const char *esc_name);
-typedef int (*HPMHOOK_pre_chr_make_new_char_sql) (struct char_session_data **sd, const char **name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style, short *starting_job, uint8 *sex);
-typedef int (*HPMHOOK_post_chr_make_new_char_sql) (int retVal___, struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, short starting_job, uint8 sex);
+typedef int (*HPMHOOK_pre_chr_make_new_char_sql) (struct char_session_data **sd, const char **name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style, int *starting_job, uint8 *sex);
+typedef int (*HPMHOOK_post_chr_make_new_char_sql) (int retVal___, struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, int starting_job, uint8 sex);
typedef int (*HPMHOOK_pre_chr_divorce_char_sql) (int *partner_id1, int *partner_id2);
typedef int (*HPMHOOK_post_chr_divorce_char_sql) (int retVal___, int partner_id1, int partner_id2);
typedef int (*HPMHOOK_pre_chr_count_users) (void);
@@ -562,6 +562,8 @@ typedef int (*HPMHOOK_pre_chr_mmo_char_tobuf) (uint8 **buffer, struct mmo_charst
typedef int (*HPMHOOK_post_chr_mmo_char_tobuf) (int retVal___, uint8 *buffer, struct mmo_charstatus *p);
typedef void (*HPMHOOK_pre_chr_send_HC_ACK_CHARINFO_PER_PAGE) (int *fd, struct char_session_data **sd);
typedef void (*HPMHOOK_post_chr_send_HC_ACK_CHARINFO_PER_PAGE) (int fd, struct char_session_data *sd);
+typedef void (*HPMHOOK_pre_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail) (int *fd, struct char_session_data **sd);
+typedef void (*HPMHOOK_post_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail) (int fd, struct char_session_data *sd);
typedef void (*HPMHOOK_pre_chr_mmo_char_send_ban_list) (int *fd, struct char_session_data **sd);
typedef void (*HPMHOOK_post_chr_mmo_char_send_ban_list) (int fd, struct char_session_data *sd);
typedef void (*HPMHOOK_pre_chr_mmo_char_send_slots_info) (int *fd, struct char_session_data **sd);
@@ -2560,8 +2562,8 @@ typedef void (*HPMHOOK_pre_clif_pRodexOpenMailbox) (int *fd, struct map_session_
typedef void (*HPMHOOK_post_clif_pRodexOpenMailbox) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_pRodexCheckName) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pRodexCheckName) (int fd, struct map_session_data *sd);
-typedef void (*HPMHOOK_pre_clif_rodex_checkname_result) (struct map_session_data **sd, int *char_id, short *class_, int *base_level, const char **name);
-typedef void (*HPMHOOK_post_clif_rodex_checkname_result) (struct map_session_data *sd, int char_id, short class_, int base_level, const char *name);
+typedef void (*HPMHOOK_pre_clif_rodex_checkname_result) (struct map_session_data **sd, int *char_id, int *class_, int *base_level, const char **name);
+typedef void (*HPMHOOK_post_clif_rodex_checkname_result) (struct map_session_data *sd, int char_id, int class_, int base_level, const char *name);
typedef void (*HPMHOOK_pre_clif_pRodexDeleteMail) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pRodexDeleteMail) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_rodex_delete_mail) (struct map_session_data **sd, int8 *opentype, int64 *mail_id);
@@ -2658,6 +2660,14 @@ typedef bool (*HPMHOOK_pre_clif_enchant_equipment) (struct map_session_data **sd
typedef bool (*HPMHOOK_post_clif_enchant_equipment) (bool retVal___, struct map_session_data *sd, enum equip_pos pos, int cardSlot, int cardId);
typedef void (*HPMHOOK_pre_clif_pReqRemainTime) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pReqRemainTime) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_npc_barter_open) (struct map_session_data **sd, struct npc_data **nd);
+typedef void (*HPMHOOK_post_clif_npc_barter_open) (struct map_session_data *sd, struct npc_data *nd);
+typedef void (*HPMHOOK_pre_clif_pNPCBarterClosed) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pNPCBarterClosed) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_pNPCBarterPurchase) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pNPCBarterPurchase) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_pClientVersion) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pClientVersion) (int fd, struct map_session_data *sd);
#endif // MAP_CLIF_H
#ifdef COMMON_CORE_H /* cmdline */
typedef void (*HPMHOOK_pre_cmdline_init) (void);
@@ -2922,8 +2932,8 @@ typedef int (*HPMHOOK_pre_guild_check_alliance) (int *guild_id1, int *guild_id2,
typedef int (*HPMHOOK_post_guild_check_alliance) (int retVal___, int guild_id1, int guild_id2, int flag);
typedef int (*HPMHOOK_pre_guild_send_memberinfoshort) (struct map_session_data **sd, int *online);
typedef int (*HPMHOOK_post_guild_send_memberinfoshort) (int retVal___, struct map_session_data *sd, int online);
-typedef int (*HPMHOOK_pre_guild_recv_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class, uint32 *last_login);
-typedef int (*HPMHOOK_post_guild_recv_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class, uint32 last_login);
+typedef int (*HPMHOOK_pre_guild_recv_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class, uint32 *last_login);
+typedef int (*HPMHOOK_post_guild_recv_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class, uint32 last_login);
typedef int (*HPMHOOK_pre_guild_change_memberposition) (int *guild_id, int *account_id, int *char_id, short *idx);
typedef int (*HPMHOOK_post_guild_change_memberposition) (int retVal___, int guild_id, int account_id, int char_id, short idx);
typedef int (*HPMHOOK_pre_guild_memberposition_changed) (struct guild **g, int *idx, int *pos);
@@ -3082,8 +3092,8 @@ typedef void (*HPMHOOK_pre_homun_skillup) (struct homun_data **hd, uint16 *skill
typedef void (*HPMHOOK_post_homun_skillup) (struct homun_data *hd, uint16 skill_id);
typedef bool (*HPMHOOK_pre_homun_levelup) (struct homun_data **hd);
typedef bool (*HPMHOOK_post_homun_levelup) (bool retVal___, struct homun_data *hd);
-typedef int (*HPMHOOK_pre_homun_change_class) (struct homun_data **hd, short *class_);
-typedef int (*HPMHOOK_post_homun_change_class) (int retVal___, struct homun_data *hd, short class_);
+typedef int (*HPMHOOK_pre_homun_change_class) (struct homun_data **hd, int *class_);
+typedef int (*HPMHOOK_post_homun_change_class) (int retVal___, struct homun_data *hd, int class_);
typedef bool (*HPMHOOK_pre_homun_evolve) (struct homun_data **hd);
typedef bool (*HPMHOOK_post_homun_evolve) (bool retVal___, struct homun_data *hd);
typedef bool (*HPMHOOK_pre_homun_mutate) (struct homun_data **hd, int *homun_id);
@@ -3296,8 +3306,8 @@ typedef bool (*HPMHOOK_pre_inter_guild_add_member) (int *guild_id, const struct
typedef bool (*HPMHOOK_post_inter_guild_add_member) (bool retVal___, int guild_id, const struct guild_member *member, int map_fd);
typedef bool (*HPMHOOK_pre_inter_guild_leave) (int *guild_id, int *account_id, int *char_id, int *flag, const char **mes, int *map_fd);
typedef bool (*HPMHOOK_post_inter_guild_leave) (bool retVal___, int guild_id, int account_id, int char_id, int flag, const char *mes, int map_fd);
-typedef bool (*HPMHOOK_pre_inter_guild_update_member_info_short) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class);
-typedef bool (*HPMHOOK_post_inter_guild_update_member_info_short) (bool retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class);
+typedef bool (*HPMHOOK_pre_inter_guild_update_member_info_short) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class);
+typedef bool (*HPMHOOK_post_inter_guild_update_member_info_short) (bool retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class);
typedef bool (*HPMHOOK_pre_inter_guild_update_member_info) (int *guild_id, int *account_id, int *char_id, int *type, const char **data, int *len);
typedef bool (*HPMHOOK_post_inter_guild_update_member_info) (bool retVal___, int guild_id, int account_id, int char_id, int type, const char *data, int len);
typedef bool (*HPMHOOK_pre_inter_guild_disband) (int *guild_id);
@@ -3490,8 +3500,8 @@ typedef int (*HPMHOOK_pre_inter_pet_delete_) (int *pet_id);
typedef int (*HPMHOOK_post_inter_pet_delete_) (int retVal___, int pet_id);
typedef int (*HPMHOOK_pre_inter_pet_parse_frommap) (int *fd);
typedef int (*HPMHOOK_post_inter_pet_parse_frommap) (int retVal___, int fd);
-typedef struct s_pet* (*HPMHOOK_pre_inter_pet_create) (int *account_id, int *char_id, short *pet_class, short *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char **pet_name);
-typedef struct s_pet* (*HPMHOOK_post_inter_pet_create) (struct s_pet* retVal___, int account_id, int char_id, short pet_class, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name);
+typedef struct s_pet* (*HPMHOOK_pre_inter_pet_create) (int *account_id, int *char_id, int *pet_class, int *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char **pet_name);
+typedef struct s_pet* (*HPMHOOK_post_inter_pet_create) (struct s_pet* retVal___, int account_id, int char_id, int pet_class, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name);
typedef struct s_pet* (*HPMHOOK_pre_inter_pet_load) (int *account_id, int *char_id, int *pet_id);
typedef struct s_pet* (*HPMHOOK_post_inter_pet_load) (struct s_pet* retVal___, int account_id, int char_id, int pet_id);
#endif // CHAR_INT_PET_H
@@ -3520,8 +3530,8 @@ typedef int (*HPMHOOK_pre_inter_rodex_fromsql) (int *char_id, int *account_id, i
typedef int (*HPMHOOK_post_inter_rodex_fromsql) (int retVal___, int char_id, int account_id, int8 opentype, int64 mail_id, struct rodex_maillist *mails);
typedef bool (*HPMHOOK_pre_inter_rodex_hasnew) (int *char_id, int *account_id);
typedef bool (*HPMHOOK_post_inter_rodex_hasnew) (bool retVal___, int char_id, int account_id);
-typedef bool (*HPMHOOK_pre_inter_rodex_checkname) (const char **name, int **target_char_id, short **target_class, int **target_level);
-typedef bool (*HPMHOOK_post_inter_rodex_checkname) (bool retVal___, const char *name, int *target_char_id, short *target_class, int *target_level);
+typedef bool (*HPMHOOK_pre_inter_rodex_checkname) (const char **name, int **target_char_id, int **target_class, int **target_level);
+typedef bool (*HPMHOOK_post_inter_rodex_checkname) (bool retVal___, const char *name, int *target_char_id, int *target_class, int *target_level);
typedef int64 (*HPMHOOK_pre_inter_rodex_savemessage) (struct rodex_message **msg);
typedef int64 (*HPMHOOK_post_inter_rodex_savemessage) (int64 retVal___, struct rodex_message *msg);
typedef bool (*HPMHOOK_pre_inter_rodex_updatemail) (int64 *mail_id, int8 *flag);
@@ -3552,8 +3562,8 @@ typedef bool (*HPMHOOK_post_inter_storage_retrieve_bound_items) (bool retVal___,
#ifdef MAP_INTIF_H /* intif */
typedef int (*HPMHOOK_pre_intif_parse) (int *fd);
typedef int (*HPMHOOK_post_intif_parse) (int retVal___, int fd);
-typedef int (*HPMHOOK_pre_intif_create_pet) (int *account_id, int *char_id, short *pet_type, short *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char **pet_name);
-typedef int (*HPMHOOK_post_intif_create_pet) (int retVal___, int account_id, int char_id, short pet_type, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name);
+typedef int (*HPMHOOK_pre_intif_create_pet) (int *account_id, int *char_id, int *pet_type, int *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char **pet_name);
+typedef int (*HPMHOOK_post_intif_create_pet) (int retVal___, int account_id, int char_id, int pet_type, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name);
typedef int (*HPMHOOK_pre_intif_broadcast) (const char **mes, int *len, int *type);
typedef int (*HPMHOOK_post_intif_broadcast) (int retVal___, const char *mes, int len, int type);
typedef int (*HPMHOOK_pre_intif_broadcast2) (const char **mes, int *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY);
@@ -3602,8 +3612,8 @@ typedef int (*HPMHOOK_pre_intif_guild_addmember) (int *guild_id, struct guild_me
typedef int (*HPMHOOK_post_intif_guild_addmember) (int retVal___, int guild_id, struct guild_member *m);
typedef int (*HPMHOOK_pre_intif_guild_leave) (int *guild_id, int *account_id, int *char_id, int *flag, const char **mes);
typedef int (*HPMHOOK_post_intif_guild_leave) (int retVal___, int guild_id, int account_id, int char_id, int flag, const char *mes);
-typedef int (*HPMHOOK_pre_intif_guild_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class);
-typedef int (*HPMHOOK_post_intif_guild_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class);
+typedef int (*HPMHOOK_pre_intif_guild_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class);
+typedef int (*HPMHOOK_post_intif_guild_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class);
typedef int (*HPMHOOK_pre_intif_guild_break) (int *guild_id);
typedef int (*HPMHOOK_post_intif_guild_break) (int retVal___, int guild_id);
typedef int (*HPMHOOK_pre_intif_guild_message) (int *guild_id, int *account_id, const char **mes, int *len);
@@ -4040,6 +4050,8 @@ typedef bool (*HPMHOOK_pre_itemdb_lookup_const) (const struct config_setting_t *
typedef bool (*HPMHOOK_post_itemdb_lookup_const) (bool retVal___, const struct config_setting_t *it, const char *name, int *value);
typedef bool (*HPMHOOK_pre_itemdb_lookup_const_mask) (const struct config_setting_t **it, const char **name, int **value);
typedef bool (*HPMHOOK_post_itemdb_lookup_const_mask) (bool retVal___, const struct config_setting_t *it, const char *name, int *value);
+typedef int (*HPMHOOK_pre_itemdb_addname_sub) (union DBKey *key, struct DBData **data, va_list ap);
+typedef int (*HPMHOOK_post_itemdb_addname_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap);
#endif // MAP_ITEMDB_H
#ifdef LOGIN_LOGIN_H /* lchrif */
typedef void (*HPMHOOK_pre_lchrif_server_init) (int *id);
@@ -4870,8 +4882,8 @@ typedef int (*HPMHOOK_pre_mapif_parse_GuildAddMember) (int *fd, int *guild_id, c
typedef int (*HPMHOOK_post_mapif_parse_GuildAddMember) (int retVal___, int fd, int guild_id, const struct guild_member *m);
typedef int (*HPMHOOK_pre_mapif_parse_GuildLeave) (int *fd, int *guild_id, int *account_id, int *char_id, int *flag, const char **mes);
typedef int (*HPMHOOK_post_mapif_parse_GuildLeave) (int retVal___, int fd, int guild_id, int account_id, int char_id, int flag, const char *mes);
-typedef int (*HPMHOOK_pre_mapif_parse_GuildChangeMemberInfoShort) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class);
-typedef int (*HPMHOOK_post_mapif_parse_GuildChangeMemberInfoShort) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class);
+typedef int (*HPMHOOK_pre_mapif_parse_GuildChangeMemberInfoShort) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class);
+typedef int (*HPMHOOK_post_mapif_parse_GuildChangeMemberInfoShort) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int class);
typedef int (*HPMHOOK_pre_mapif_parse_BreakGuild) (int *fd, int *guild_id);
typedef int (*HPMHOOK_post_mapif_parse_BreakGuild) (int retVal___, int fd, int guild_id);
typedef int (*HPMHOOK_pre_mapif_parse_GuildMessage) (int *fd, int *guild_id, int *account_id, const char **mes, int *len);
@@ -5036,8 +5048,8 @@ typedef void (*HPMHOOK_pre_mapif_rodex_send) (int *fd, int *sender_id, int *rece
typedef void (*HPMHOOK_post_mapif_rodex_send) (int fd, int sender_id, int receiver_id, int receiver_accountid, bool result);
typedef void (*HPMHOOK_pre_mapif_parse_rodex_checkname) (int *fd);
typedef void (*HPMHOOK_post_mapif_parse_rodex_checkname) (int fd);
-typedef void (*HPMHOOK_pre_mapif_rodex_checkname) (int *fd, int *reqchar_id, int *target_char_id, short *target_class, int *target_level, char **name);
-typedef void (*HPMHOOK_post_mapif_rodex_checkname) (int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name);
+typedef void (*HPMHOOK_pre_mapif_rodex_checkname) (int *fd, int *reqchar_id, int *target_char_id, int *target_class, int *target_level, char **name);
+typedef void (*HPMHOOK_post_mapif_rodex_checkname) (int fd, int reqchar_id, int target_char_id, int target_class, int target_level, char *name);
typedef int (*HPMHOOK_pre_mapif_load_guild_storage) (int *fd, int *account_id, int *guild_id, char *flag);
typedef int (*HPMHOOK_post_mapif_load_guild_storage) (int retVal___, int fd, int account_id, int guild_id, char flag);
typedef int (*HPMHOOK_pre_mapif_save_guild_storage_ack) (int *fd, int *account_id, int *guild_id, int *fail);
@@ -5604,8 +5616,8 @@ typedef int (*HPMHOOK_pre_npc_parseview) (const char **w4, const char **start, c
typedef int (*HPMHOOK_post_npc_parseview) (int retVal___, const char *w4, const char *start, const char *buffer, const char *filepath);
typedef bool (*HPMHOOK_pre_npc_viewisid) (const char **viewid);
typedef bool (*HPMHOOK_post_npc_viewisid) (bool retVal___, const char *viewid);
-typedef struct npc_data* (*HPMHOOK_pre_npc_create_npc) (enum npc_subtype *subtype, int *m, int *x, int *y, uint8 *dir, int16 *class_);
-typedef struct npc_data* (*HPMHOOK_post_npc_create_npc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, uint8 dir, int16 class_);
+typedef struct npc_data* (*HPMHOOK_pre_npc_create_npc) (enum npc_subtype *subtype, int *m, int *x, int *y, uint8 *dir, int *class_);
+typedef struct npc_data* (*HPMHOOK_post_npc_create_npc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_);
typedef struct npc_data* (*HPMHOOK_pre_npc_add_warp) (char **name, short *from_mapid, short *from_x, short *from_y, short *xs, short *ys, unsigned short *to_mapindex, short *to_x, short *to_y);
typedef struct npc_data* (*HPMHOOK_post_npc_add_warp) (struct npc_data* retVal___, char *name, short from_mapid, short from_x, short from_y, short xs, short ys, unsigned short to_mapindex, short to_x, short to_y);
typedef const char* (*HPMHOOK_pre_npc_parse_warp) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval);
@@ -5644,8 +5656,8 @@ typedef void (*HPMHOOK_pre_npc_movenpc) (struct npc_data **nd, int16 *x, int16 *
typedef void (*HPMHOOK_post_npc_movenpc) (struct npc_data *nd, int16 x, int16 y);
typedef void (*HPMHOOK_pre_npc_setdisplayname) (struct npc_data **nd, const char **newname);
typedef void (*HPMHOOK_post_npc_setdisplayname) (struct npc_data *nd, const char *newname);
-typedef void (*HPMHOOK_pre_npc_setclass) (struct npc_data **nd, short *class_);
-typedef void (*HPMHOOK_post_npc_setclass) (struct npc_data *nd, short class_);
+typedef void (*HPMHOOK_pre_npc_setclass) (struct npc_data **nd, int *class_);
+typedef void (*HPMHOOK_post_npc_setclass) (struct npc_data *nd, int class_);
typedef int (*HPMHOOK_pre_npc_do_atcmd_event) (struct map_session_data **sd, const char **command, const char **message, const char **eventname);
typedef int (*HPMHOOK_post_npc_do_atcmd_event) (int retVal___, struct map_session_data *sd, const char *command, const char *message, const char *eventname);
typedef const char* (*HPMHOOK_pre_npc_parse_function) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval);
@@ -5686,16 +5698,26 @@ typedef void (*HPMHOOK_pre_npc_trader_update) (int *master);
typedef void (*HPMHOOK_post_npc_trader_update) (int master);
typedef int (*HPMHOOK_pre_npc_market_buylist) (struct map_session_data **sd, struct itemlist **item_list);
typedef int (*HPMHOOK_post_npc_market_buylist) (int retVal___, struct map_session_data *sd, struct itemlist *item_list);
+typedef int (*HPMHOOK_pre_npc_barter_buylist) (struct map_session_data **sd, struct barteritemlist **item_list);
+typedef int (*HPMHOOK_post_npc_barter_buylist) (int retVal___, struct map_session_data *sd, struct barteritemlist *item_list);
typedef bool (*HPMHOOK_pre_npc_trader_open) (struct map_session_data **sd, struct npc_data **nd);
typedef bool (*HPMHOOK_post_npc_trader_open) (bool retVal___, struct map_session_data *sd, struct npc_data *nd);
typedef void (*HPMHOOK_pre_npc_market_fromsql) (void);
typedef void (*HPMHOOK_post_npc_market_fromsql) (void);
-typedef void (*HPMHOOK_pre_npc_market_tosql) (struct npc_data **nd, unsigned short *index);
-typedef void (*HPMHOOK_post_npc_market_tosql) (struct npc_data *nd, unsigned short index);
-typedef void (*HPMHOOK_pre_npc_market_delfromsql) (struct npc_data **nd, unsigned short *index);
-typedef void (*HPMHOOK_post_npc_market_delfromsql) (struct npc_data *nd, unsigned short index);
-typedef void (*HPMHOOK_pre_npc_market_delfromsql_sub) (const char **npcname, unsigned short *index);
-typedef void (*HPMHOOK_post_npc_market_delfromsql_sub) (const char *npcname, unsigned short index);
+typedef void (*HPMHOOK_pre_npc_market_tosql) (struct npc_data **nd, int *index);
+typedef void (*HPMHOOK_post_npc_market_tosql) (struct npc_data *nd, int index);
+typedef void (*HPMHOOK_pre_npc_market_delfromsql) (struct npc_data **nd, int *index);
+typedef void (*HPMHOOK_post_npc_market_delfromsql) (struct npc_data *nd, int index);
+typedef void (*HPMHOOK_pre_npc_market_delfromsql_sub) (const char **npcname, int *index);
+typedef void (*HPMHOOK_post_npc_market_delfromsql_sub) (const char *npcname, int index);
+typedef void (*HPMHOOK_pre_npc_barter_fromsql) (void);
+typedef void (*HPMHOOK_post_npc_barter_fromsql) (void);
+typedef void (*HPMHOOK_pre_npc_barter_tosql) (struct npc_data **nd, int *index);
+typedef void (*HPMHOOK_post_npc_barter_tosql) (struct npc_data *nd, int index);
+typedef void (*HPMHOOK_pre_npc_barter_delfromsql) (struct npc_data **nd, int *index);
+typedef void (*HPMHOOK_post_npc_barter_delfromsql) (struct npc_data *nd, int index);
+typedef void (*HPMHOOK_pre_npc_barter_delfromsql_sub) (const char **npcname, int *itemId, int *itemId2, int *amount2);
+typedef void (*HPMHOOK_post_npc_barter_delfromsql_sub) (const char *npcname, int itemId, int itemId2, int amount2);
typedef bool (*HPMHOOK_pre_npc_db_checkid) (const int *id);
typedef bool (*HPMHOOK_post_npc_db_checkid) (bool retVal___, const int id);
typedef void (*HPMHOOK_pre_npc_refresh) (struct npc_data **nd);
@@ -6152,10 +6174,10 @@ typedef void (*HPMHOOK_pre_pc_setstand) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_pc_setstand) (struct map_session_data *sd);
typedef int (*HPMHOOK_pre_pc_candrop) (struct map_session_data **sd, struct item **item);
typedef int (*HPMHOOK_post_pc_candrop) (int retVal___, struct map_session_data *sd, struct item *item);
-typedef int (*HPMHOOK_pre_pc_jobid2mapid) (int16 *class);
-typedef int (*HPMHOOK_post_pc_jobid2mapid) (int retVal___, int16 class);
-typedef int (*HPMHOOK_pre_pc_mapid2jobid) (unsigned short *class_, int *sex);
-typedef int (*HPMHOOK_post_pc_mapid2jobid) (int retVal___, unsigned short class_, int sex);
+typedef int (*HPMHOOK_pre_pc_jobid2mapid) (int *class);
+typedef int (*HPMHOOK_post_pc_jobid2mapid) (int retVal___, int class);
+typedef int (*HPMHOOK_pre_pc_mapid2jobid) (unsigned int *class_, int *sex);
+typedef int (*HPMHOOK_post_pc_mapid2jobid) (int retVal___, unsigned int class_, int sex);
typedef const char* (*HPMHOOK_pre_pc_job_name) (int *class);
typedef const char* (*HPMHOOK_post_pc_job_name) (const char* retVal___, int class);
typedef void (*HPMHOOK_pre_pc_setinvincibletimer) (struct map_session_data **sd, int *val);
@@ -6396,8 +6418,8 @@ typedef int (*HPMHOOK_pre_pet_catch_process1) (struct map_session_data **sd, int
typedef int (*HPMHOOK_post_pet_catch_process1) (int retVal___, struct map_session_data *sd, int target_class);
typedef int (*HPMHOOK_pre_pet_catch_process2) (struct map_session_data **sd, int *target_id);
typedef int (*HPMHOOK_post_pet_catch_process2) (int retVal___, struct map_session_data *sd, int target_id);
-typedef bool (*HPMHOOK_pre_pet_get_egg) (int *account_id, short *pet_class, int *pet_id);
-typedef bool (*HPMHOOK_post_pet_get_egg) (bool retVal___, int account_id, short pet_class, int pet_id);
+typedef bool (*HPMHOOK_pre_pet_get_egg) (int *account_id, int *pet_class, int *pet_id);
+typedef bool (*HPMHOOK_post_pet_get_egg) (bool retVal___, int account_id, int pet_class, int pet_id);
typedef int (*HPMHOOK_pre_pet_unequipitem) (struct map_session_data **sd, struct pet_data **pd);
typedef int (*HPMHOOK_post_pet_unequipitem) (int retVal___, struct map_session_data *sd, struct pet_data *pd);
typedef int (*HPMHOOK_pre_pet_food) (struct map_session_data **sd, struct pet_data **pd);
@@ -6570,8 +6592,8 @@ typedef void (*HPMHOOK_pre_rodex_add_item) (struct map_session_data **sd, int16
typedef void (*HPMHOOK_post_rodex_add_item) (struct map_session_data *sd, int16 idx, int16 amount);
typedef void (*HPMHOOK_pre_rodex_remove_item) (struct map_session_data **sd, int16 *idx, int16 *amount);
typedef void (*HPMHOOK_post_rodex_remove_item) (struct map_session_data *sd, int16 idx, int16 amount);
-typedef void (*HPMHOOK_pre_rodex_check_player) (struct map_session_data **sd, const char **name, int **base_level, int **char_id, short **class);
-typedef void (*HPMHOOK_post_rodex_check_player) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, short *class);
+typedef void (*HPMHOOK_pre_rodex_check_player) (struct map_session_data **sd, const char **name, int **base_level, int **char_id, int **class);
+typedef void (*HPMHOOK_post_rodex_check_player) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, int *class);
typedef int (*HPMHOOK_pre_rodex_send_mail) (struct map_session_data **sd, const char **receiver_name, const char **body, const char **title, int64 *zeny);
typedef int (*HPMHOOK_post_rodex_send_mail) (int retVal___, struct map_session_data *sd, const char *receiver_name, const char *body, const char *title, int64 zeny);
typedef void (*HPMHOOK_pre_rodex_send_mail_result) (struct map_session_data **ssd, struct map_session_data **rsd, bool *result);