summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-06-21 00:21:14 +0300
committerAndrei Karas <akaras@inbox.ru>2018-06-29 19:47:42 +0300
commit2170bf7c3cd95faf17030c5b458ab0d639e597fd (patch)
tree5f0ca6388601552375fb2fbaf96410dc76b76703
parent8ce6947f6754c797e0557e54af42223212028bb0 (diff)
downloadhercules-2170bf7c3cd95faf17030c5b458ab0d639e597fd.tar.gz
hercules-2170bf7c3cd95faf17030c5b458ab0d639e597fd.tar.bz2
hercules-2170bf7c3cd95faf17030c5b458ab0d639e597fd.tar.xz
hercules-2170bf7c3cd95faf17030c5b458ab0d639e597fd.zip
Update HPM hooks.
-rw-r--r--src/common/HPMDataCheck.h4
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc24
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.Hooks.inc38
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc12
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc3
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc104
8 files changed, 162 insertions, 28 deletions
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index 2370dfa8d..2f1de3585 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -214,6 +214,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "guild_storage", sizeof(struct guild_storage), SERVER_TYPE_ALL },
{ "hotkey", sizeof(struct hotkey), SERVER_TYPE_ALL },
{ "item", sizeof(struct item), SERVER_TYPE_ALL },
+ { "item_option", sizeof(struct item_option), SERVER_TYPE_ALL },
{ "mail_data", sizeof(struct mail_data), SERVER_TYPE_ALL },
{ "mail_message", sizeof(struct mail_message), SERVER_TYPE_ALL },
{ "mmo_charstatus", sizeof(struct mmo_charstatus), SERVER_TYPE_ALL },
@@ -493,12 +494,12 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "item_combo", sizeof(struct item_combo), SERVER_TYPE_MAP },
{ "item_data", sizeof(struct item_data), SERVER_TYPE_MAP },
{ "item_group", sizeof(struct item_group), SERVER_TYPE_MAP },
- { "item_option", sizeof(struct item_option), SERVER_TYPE_MAP },
{ "item_package", sizeof(struct item_package), SERVER_TYPE_MAP },
{ "item_package_must_entry", sizeof(struct item_package_must_entry), SERVER_TYPE_MAP },
{ "item_package_rand_entry", sizeof(struct item_package_rand_entry), SERVER_TYPE_MAP },
{ "item_package_rand_group", sizeof(struct item_package_rand_group), SERVER_TYPE_MAP },
{ "itemdb_interface", sizeof(struct itemdb_interface), SERVER_TYPE_MAP },
+ { "itemdb_option", sizeof(struct itemdb_option), SERVER_TYPE_MAP },
{ "itemlist", sizeof(struct itemlist), SERVER_TYPE_MAP },
{ "itemlist_entry", sizeof(struct itemlist_entry), SERVER_TYPE_MAP },
#else
@@ -629,6 +630,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "ZC_PROGRESS_ACTOR", sizeof(struct ZC_PROGRESS_ACTOR), SERVER_TYPE_MAP },
{ "mail_item", sizeof(struct mail_item), SERVER_TYPE_MAP },
{ "maillistinfo", sizeof(struct maillistinfo), SERVER_TYPE_MAP },
+ { "packet_ZC_REFUSE_LOGIN", sizeof(struct packet_ZC_REFUSE_LOGIN), SERVER_TYPE_MAP },
{ "packet_additem", sizeof(struct packet_additem), SERVER_TYPE_MAP },
{ "packet_authok", sizeof(struct packet_authok), SERVER_TYPE_MAP },
{ "packet_banking_check", sizeof(struct packet_banking_check), SERVER_TYPE_MAP },
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 6d184d082..8aa1c6512 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -622,8 +622,8 @@ typedef void (*HPMHOOK_pre_chr_send_account_id) (int *fd, int *account_id);
typedef void (*HPMHOOK_post_chr_send_account_id) (int fd, int account_id);
typedef void (*HPMHOOK_pre_chr_parse_char_connect) (int *fd, struct char_session_data **sd, uint32 *ipl);
typedef void (*HPMHOOK_post_chr_parse_char_connect) (int fd, struct char_session_data *sd, uint32 ipl);
-typedef void (*HPMHOOK_pre_chr_send_map_info) (int *fd, int *i, uint32 *subnet_map_ip, struct mmo_charstatus **cd);
-typedef void (*HPMHOOK_post_chr_send_map_info) (int fd, int i, uint32 subnet_map_ip, struct mmo_charstatus *cd);
+typedef void (*HPMHOOK_pre_chr_send_map_info) (int *fd, int *i, uint32 *subnet_map_ip, struct mmo_charstatus **cd, char **dnsHost);
+typedef void (*HPMHOOK_post_chr_send_map_info) (int fd, int i, uint32 subnet_map_ip, struct mmo_charstatus *cd, char *dnsHost);
typedef void (*HPMHOOK_pre_chr_send_wait_char_server) (int *fd);
typedef void (*HPMHOOK_post_chr_send_wait_char_server) (int fd);
typedef int (*HPMHOOK_pre_chr_search_default_maps_mapserver) (struct mmo_charstatus **cd);
@@ -988,6 +988,8 @@ typedef unsigned short (*HPMHOOK_pre_clif_decrypt_cmd) (int *cmd, struct map_ses
typedef unsigned short (*HPMHOOK_post_clif_decrypt_cmd) (unsigned short retVal___, int cmd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_authok) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_authok) (struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_auth_error) (int *fd, int *errorCode);
+typedef void (*HPMHOOK_post_clif_auth_error) (int fd, int errorCode);
typedef void (*HPMHOOK_pre_clif_authrefuse) (int *fd, uint8 *error_code);
typedef void (*HPMHOOK_post_clif_authrefuse) (int fd, uint8 error_code);
typedef void (*HPMHOOK_pre_clif_authfail_fd) (int *fd, int *type);
@@ -1102,6 +1104,8 @@ typedef bool (*HPMHOOK_pre_clif_spawn) (struct block_list **bl);
typedef bool (*HPMHOOK_post_clif_spawn) (bool retVal___, struct block_list *bl);
typedef void (*HPMHOOK_pre_clif_changemap) (struct map_session_data **sd, short *m, int *x, int *y);
typedef void (*HPMHOOK_post_clif_changemap) (struct map_session_data *sd, short m, int x, int y);
+typedef void (*HPMHOOK_pre_clif_changemap_airship) (struct map_session_data **sd, short *m, int *x, int *y);
+typedef void (*HPMHOOK_post_clif_changemap_airship) (struct map_session_data *sd, short m, int x, int y);
typedef void (*HPMHOOK_pre_clif_changemapcell) (int *fd, int16 *m, int *x, int *y, int *type, enum send_target *target);
typedef void (*HPMHOOK_post_clif_changemapcell) (int fd, int16 m, int x, int y, int type, enum send_target target);
typedef void (*HPMHOOK_pre_clif_map_property) (struct map_session_data **sd, enum map_property *property);
@@ -1118,6 +1122,8 @@ typedef void (*HPMHOOK_pre_clif_maptypeproperty2) (struct block_list **bl, enum
typedef void (*HPMHOOK_post_clif_maptypeproperty2) (struct block_list *bl, enum send_target t);
typedef void (*HPMHOOK_pre_clif_changemapserver) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, uint32 *ip, uint16 *port);
typedef void (*HPMHOOK_post_clif_changemapserver) (struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port);
+typedef void (*HPMHOOK_pre_clif_changemapserver_airship) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, uint32 *ip, uint16 *port);
+typedef void (*HPMHOOK_post_clif_changemapserver_airship) (struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port);
typedef void (*HPMHOOK_pre_clif_npcbuysell) (struct map_session_data **sd, int *id);
typedef void (*HPMHOOK_post_clif_npcbuysell) (struct map_session_data *sd, int id);
typedef void (*HPMHOOK_pre_clif_buylist) (struct map_session_data **sd, struct npc_data **nd);
@@ -3612,8 +3618,8 @@ typedef struct item_data* (*HPMHOOK_pre_itemdb_search) (int *nameid);
typedef struct item_data* (*HPMHOOK_post_itemdb_search) (struct item_data* retVal___, int nameid);
typedef struct item_data* (*HPMHOOK_pre_itemdb_exists) (int *nameid);
typedef struct item_data* (*HPMHOOK_post_itemdb_exists) (struct item_data* retVal___, int nameid);
-typedef struct item_option* (*HPMHOOK_pre_itemdb_option_exists) (int *idx);
-typedef struct item_option* (*HPMHOOK_post_itemdb_option_exists) (struct item_option* retVal___, int idx);
+typedef struct itemdb_option* (*HPMHOOK_pre_itemdb_option_exists) (int *idx);
+typedef struct itemdb_option* (*HPMHOOK_post_itemdb_option_exists) (struct itemdb_option* retVal___, int idx);
typedef bool (*HPMHOOK_pre_itemdb_in_group) (struct item_group **group, int *nameid);
typedef bool (*HPMHOOK_post_itemdb_in_group) (bool retVal___, struct item_group *group, int nameid);
typedef int (*HPMHOOK_pre_itemdb_group_item) (struct item_group **group);
@@ -3678,8 +3684,8 @@ typedef int (*HPMHOOK_pre_itemdb_gendercheck) (struct item_data **id);
typedef int (*HPMHOOK_post_itemdb_gendercheck) (int retVal___, struct item_data *id);
typedef int (*HPMHOOK_pre_itemdb_validate_entry) (struct item_data **entry, int *n, const char **source);
typedef int (*HPMHOOK_post_itemdb_validate_entry) (int retVal___, struct item_data *entry, int n, const char *source);
-typedef void (*HPMHOOK_pre_itemdb_readdb_options_additional_fields) (struct item_option **ito, struct config_setting_t **t, const char **source);
-typedef void (*HPMHOOK_post_itemdb_readdb_options_additional_fields) (struct item_option *ito, struct config_setting_t *t, const char *source);
+typedef void (*HPMHOOK_pre_itemdb_readdb_options_additional_fields) (struct itemdb_option **ito, struct config_setting_t **t, const char **source);
+typedef void (*HPMHOOK_post_itemdb_readdb_options_additional_fields) (struct itemdb_option *ito, struct config_setting_t *t, const char *source);
typedef void (*HPMHOOK_pre_itemdb_readdb_additional_fields) (int *itemid, struct config_setting_t **it, int *n, const char **source);
typedef void (*HPMHOOK_post_itemdb_readdb_additional_fields) (int itemid, struct config_setting_t *it, int n, const char *source);
typedef void (*HPMHOOK_pre_itemdb_readdb_job_sub) (struct item_data **id, struct config_setting_t **t);
@@ -6132,6 +6138,8 @@ typedef void (*HPMHOOK_pre_pincode_editstate) (int *fd, struct char_session_data
typedef void (*HPMHOOK_post_pincode_editstate) (int fd, struct char_session_data *sd, enum pincode_edit_response state);
typedef void (*HPMHOOK_pre_pincode_loginstate) (int *fd, struct char_session_data **sd, enum pincode_login_response *state);
typedef void (*HPMHOOK_post_pincode_loginstate) (int fd, struct char_session_data *sd, enum pincode_login_response state);
+typedef void (*HPMHOOK_pre_pincode_loginstate2) (int *fd, struct char_session_data **sd, enum pincode_login_response *state, enum pincode_login_response2 *flag);
+typedef void (*HPMHOOK_post_pincode_loginstate2) (int fd, struct char_session_data *sd, enum pincode_login_response state, enum pincode_login_response2 flag);
typedef void (*HPMHOOK_pre_pincode_setnew) (int *fd, struct char_session_data **sd);
typedef void (*HPMHOOK_post_pincode_setnew) (int fd, struct char_session_data *sd);
typedef void (*HPMHOOK_pre_pincode_change) (int *fd, struct char_session_data **sd);
@@ -6622,8 +6630,8 @@ typedef bool (*HPMHOOK_pre_searchstore_queryremote) (struct map_session_data **s
typedef bool (*HPMHOOK_post_searchstore_queryremote) (bool retVal___, struct map_session_data *sd, int account_id);
typedef void (*HPMHOOK_pre_searchstore_clearremote) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_searchstore_clearremote) (struct map_session_data *sd);
-typedef bool (*HPMHOOK_pre_searchstore_result) (struct map_session_data **sd, unsigned int *store_id, int *account_id, const char **store_name, unsigned short *nameid, unsigned short *amount, unsigned int *price, const short **card, unsigned char *refine);
-typedef bool (*HPMHOOK_post_searchstore_result) (bool retVal___, struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, unsigned short nameid, unsigned short amount, unsigned int price, const short *card, unsigned char refine);
+typedef bool (*HPMHOOK_pre_searchstore_result) (struct map_session_data **sd, unsigned int *store_id, int *account_id, const char **store_name, unsigned short *nameid, unsigned short *amount, unsigned int *price, const short **card, unsigned char *refine, const struct item_option **option);
+typedef bool (*HPMHOOK_post_searchstore_result) (bool retVal___, struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, unsigned short nameid, unsigned short amount, unsigned int price, const short *card, unsigned char refine, const struct item_option *option);
#endif // MAP_SEARCHSTORE_H
#ifdef COMMON_SHOWMSG_H /* showmsg */
typedef void (*HPMHOOK_pre_showmsg_init) (void);
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
index be39bf2ea..0f9e48287 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
@@ -1252,6 +1252,8 @@ struct {
struct HPMHookPoint *HP_pincode_editstate_post;
struct HPMHookPoint *HP_pincode_loginstate_pre;
struct HPMHookPoint *HP_pincode_loginstate_post;
+ struct HPMHookPoint *HP_pincode_loginstate2_pre;
+ struct HPMHookPoint *HP_pincode_loginstate2_post;
struct HPMHookPoint *HP_pincode_setnew_pre;
struct HPMHookPoint *HP_pincode_setnew_post;
struct HPMHookPoint *HP_pincode_change_pre;
@@ -2789,6 +2791,8 @@ struct {
int HP_pincode_editstate_post;
int HP_pincode_loginstate_pre;
int HP_pincode_loginstate_post;
+ int HP_pincode_loginstate2_pre;
+ int HP_pincode_loginstate2_post;
int HP_pincode_setnew_pre;
int HP_pincode_setnew_post;
int HP_pincode_change_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
index 3ba47102c..099bd1e81 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
@@ -668,6 +668,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(pincode->makestate, HP_pincode_makestate) },
{ HP_POP(pincode->editstate, HP_pincode_editstate) },
{ HP_POP(pincode->loginstate, HP_pincode_loginstate) },
+ { HP_POP(pincode->loginstate2, HP_pincode_loginstate2) },
{ HP_POP(pincode->setnew, HP_pincode_setnew) },
{ HP_POP(pincode->change, HP_pincode_change) },
{ HP_POP(pincode->isBlacklisted, HP_pincode_isBlacklisted) },
diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
index a15eccc0c..6ce1c5015 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
@@ -3182,14 +3182,14 @@ void HP_chr_parse_char_connect(int fd, struct char_session_data *sd, uint32 ipl)
}
return;
}
-void HP_chr_send_map_info(int fd, int i, uint32 subnet_map_ip, struct mmo_charstatus *cd) {
+void HP_chr_send_map_info(int fd, int i, uint32 subnet_map_ip, struct mmo_charstatus *cd, char *dnsHost) {
int hIndex = 0;
if (HPMHooks.count.HP_chr_send_map_info_pre > 0) {
- void (*preHookFunc) (int *fd, int *i, uint32 *subnet_map_ip, struct mmo_charstatus **cd);
+ void (*preHookFunc) (int *fd, int *i, uint32 *subnet_map_ip, struct mmo_charstatus **cd, char **dnsHost);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_map_info_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_chr_send_map_info_pre[hIndex].func;
- preHookFunc(&fd, &i, &subnet_map_ip, &cd);
+ preHookFunc(&fd, &i, &subnet_map_ip, &cd, &dnsHost);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -3197,13 +3197,13 @@ void HP_chr_send_map_info(int fd, int i, uint32 subnet_map_ip, struct mmo_charst
}
}
{
- HPMHooks.source.chr.send_map_info(fd, i, subnet_map_ip, cd);
+ HPMHooks.source.chr.send_map_info(fd, i, subnet_map_ip, cd, dnsHost);
}
if (HPMHooks.count.HP_chr_send_map_info_post > 0) {
- void (*postHookFunc) (int fd, int i, uint32 subnet_map_ip, struct mmo_charstatus *cd);
+ void (*postHookFunc) (int fd, int i, uint32 subnet_map_ip, struct mmo_charstatus *cd, char *dnsHost);
for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_map_info_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_chr_send_map_info_post[hIndex].func;
- postHookFunc(fd, i, subnet_map_ip, cd);
+ postHookFunc(fd, i, subnet_map_ip, cd, dnsHost);
}
}
return;
@@ -16405,6 +16405,32 @@ void HP_pincode_loginstate(int fd, struct char_session_data *sd, enum pincode_lo
}
return;
}
+void HP_pincode_loginstate2(int fd, struct char_session_data *sd, enum pincode_login_response state, enum pincode_login_response2 flag) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_pincode_loginstate2_pre > 0) {
+ void (*preHookFunc) (int *fd, struct char_session_data **sd, enum pincode_login_response *state, enum pincode_login_response2 *flag);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_loginstate2_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_pincode_loginstate2_pre[hIndex].func;
+ preHookFunc(&fd, &sd, &state, &flag);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pincode.loginstate2(fd, sd, state, flag);
+ }
+ if (HPMHooks.count.HP_pincode_loginstate2_post > 0) {
+ void (*postHookFunc) (int fd, struct char_session_data *sd, enum pincode_login_response state, enum pincode_login_response2 flag);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_loginstate2_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_pincode_loginstate2_post[hIndex].func;
+ postHookFunc(fd, sd, state, flag);
+ }
+ }
+ return;
+}
void HP_pincode_setnew(int fd, struct char_session_data *sd) {
int hIndex = 0;
if (HPMHooks.count.HP_pincode_setnew_pre > 0) {
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 671a9cb5c..803948d89 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -584,6 +584,8 @@ struct {
struct HPMHookPoint *HP_clif_decrypt_cmd_post;
struct HPMHookPoint *HP_clif_authok_pre;
struct HPMHookPoint *HP_clif_authok_post;
+ struct HPMHookPoint *HP_clif_auth_error_pre;
+ struct HPMHookPoint *HP_clif_auth_error_post;
struct HPMHookPoint *HP_clif_authrefuse_pre;
struct HPMHookPoint *HP_clif_authrefuse_post;
struct HPMHookPoint *HP_clif_authfail_fd_pre;
@@ -698,6 +700,8 @@ struct {
struct HPMHookPoint *HP_clif_spawn_post;
struct HPMHookPoint *HP_clif_changemap_pre;
struct HPMHookPoint *HP_clif_changemap_post;
+ struct HPMHookPoint *HP_clif_changemap_airship_pre;
+ struct HPMHookPoint *HP_clif_changemap_airship_post;
struct HPMHookPoint *HP_clif_changemapcell_pre;
struct HPMHookPoint *HP_clif_changemapcell_post;
struct HPMHookPoint *HP_clif_map_property_pre;
@@ -714,6 +718,8 @@ struct {
struct HPMHookPoint *HP_clif_maptypeproperty2_post;
struct HPMHookPoint *HP_clif_changemapserver_pre;
struct HPMHookPoint *HP_clif_changemapserver_post;
+ struct HPMHookPoint *HP_clif_changemapserver_airship_pre;
+ struct HPMHookPoint *HP_clif_changemapserver_airship_post;
struct HPMHookPoint *HP_clif_npcbuysell_pre;
struct HPMHookPoint *HP_clif_npcbuysell_post;
struct HPMHookPoint *HP_clif_buylist_pre;
@@ -6965,6 +6971,8 @@ struct {
int HP_clif_decrypt_cmd_post;
int HP_clif_authok_pre;
int HP_clif_authok_post;
+ int HP_clif_auth_error_pre;
+ int HP_clif_auth_error_post;
int HP_clif_authrefuse_pre;
int HP_clif_authrefuse_post;
int HP_clif_authfail_fd_pre;
@@ -7079,6 +7087,8 @@ struct {
int HP_clif_spawn_post;
int HP_clif_changemap_pre;
int HP_clif_changemap_post;
+ int HP_clif_changemap_airship_pre;
+ int HP_clif_changemap_airship_post;
int HP_clif_changemapcell_pre;
int HP_clif_changemapcell_post;
int HP_clif_map_property_pre;
@@ -7095,6 +7105,8 @@ struct {
int HP_clif_maptypeproperty2_post;
int HP_clif_changemapserver_pre;
int HP_clif_changemapserver_post;
+ int HP_clif_changemapserver_airship_pre;
+ int HP_clif_changemapserver_airship_post;
int HP_clif_npcbuysell_pre;
int HP_clif_npcbuysell_post;
int HP_clif_buylist_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 942693da8..2658bef00 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -315,6 +315,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->parse_cmd, HP_clif_parse_cmd) },
{ HP_POP(clif->decrypt_cmd, HP_clif_decrypt_cmd) },
{ HP_POP(clif->authok, HP_clif_authok) },
+ { HP_POP(clif->auth_error, HP_clif_auth_error) },
{ HP_POP(clif->authrefuse, HP_clif_authrefuse) },
{ HP_POP(clif->authfail_fd, HP_clif_authfail_fd) },
{ HP_POP(clif->charselectok, HP_clif_charselectok) },
@@ -372,6 +373,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->graffiti_entry, HP_clif_graffiti_entry) },
{ HP_POP(clif->spawn, HP_clif_spawn) },
{ HP_POP(clif->changemap, HP_clif_changemap) },
+ { HP_POP(clif->changemap_airship, HP_clif_changemap_airship) },
{ HP_POP(clif->changemapcell, HP_clif_changemapcell) },
{ HP_POP(clif->map_property, HP_clif_map_property) },
{ HP_POP(clif->pvpset, HP_clif_pvpset) },
@@ -380,6 +382,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->map_type, HP_clif_map_type) },
{ HP_POP(clif->maptypeproperty2, HP_clif_maptypeproperty2) },
{ HP_POP(clif->changemapserver, HP_clif_changemapserver) },
+ { HP_POP(clif->changemapserver_airship, HP_clif_changemapserver_airship) },
{ HP_POP(clif->npcbuysell, HP_clif_npcbuysell) },
{ HP_POP(clif->buylist, HP_clif_buylist) },
{ HP_POP(clif->selllist, HP_clif_selllist) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 5cd54ba22..497d1b646 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -7574,6 +7574,32 @@ void HP_clif_authok(struct map_session_data *sd) {
}
return;
}
+void HP_clif_auth_error(int fd, int errorCode) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_auth_error_pre > 0) {
+ void (*preHookFunc) (int *fd, int *errorCode);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_auth_error_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_auth_error_pre[hIndex].func;
+ preHookFunc(&fd, &errorCode);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.auth_error(fd, errorCode);
+ }
+ if (HPMHooks.count.HP_clif_auth_error_post > 0) {
+ void (*postHookFunc) (int fd, int errorCode);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_auth_error_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_auth_error_post[hIndex].func;
+ postHookFunc(fd, errorCode);
+ }
+ }
+ return;
+}
void HP_clif_authrefuse(int fd, uint8 error_code) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_authrefuse_pre > 0) {
@@ -9066,6 +9092,32 @@ void HP_clif_changemap(struct map_session_data *sd, short m, int x, int y) {
}
return;
}
+void HP_clif_changemap_airship(struct map_session_data *sd, short m, int x, int y) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_changemap_airship_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, short *m, int *x, int *y);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemap_airship_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_changemap_airship_pre[hIndex].func;
+ preHookFunc(&sd, &m, &x, &y);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.changemap_airship(sd, m, x, y);
+ }
+ if (HPMHooks.count.HP_clif_changemap_airship_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, short m, int x, int y);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemap_airship_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_changemap_airship_post[hIndex].func;
+ postHookFunc(sd, m, x, y);
+ }
+ }
+ return;
+}
void HP_clif_changemapcell(int fd, int16 m, int x, int y, int type, enum send_target target) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_changemapcell_pre > 0) {
@@ -9274,6 +9326,32 @@ void HP_clif_changemapserver(struct map_session_data *sd, unsigned short map_ind
}
return;
}
+void HP_clif_changemapserver_airship(struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_changemapserver_airship_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, uint32 *ip, uint16 *port);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemapserver_airship_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_changemapserver_airship_pre[hIndex].func;
+ preHookFunc(&sd, &map_index, &x, &y, &ip, &port);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.changemapserver_airship(sd, map_index, x, y, ip, port);
+ }
+ if (HPMHooks.count.HP_clif_changemapserver_airship_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemapserver_airship_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_changemapserver_airship_post[hIndex].func;
+ postHookFunc(sd, map_index, x, y, ip, port);
+ }
+ }
+ return;
+}
void HP_clif_npcbuysell(struct map_session_data *sd, int id) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_npcbuysell_pre > 0) {
@@ -38223,11 +38301,11 @@ struct item_data* HP_itemdb_exists(int nameid) {
}
return retVal___;
}
-struct item_option* HP_itemdb_option_exists(int idx) {
+struct itemdb_option* HP_itemdb_option_exists(int idx) {
int hIndex = 0;
- struct item_option* retVal___ = NULL;
+ struct itemdb_option* retVal___ = NULL;
if (HPMHooks.count.HP_itemdb_option_exists_pre > 0) {
- struct item_option* (*preHookFunc) (int *idx);
+ struct itemdb_option* (*preHookFunc) (int *idx);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_option_exists_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_itemdb_option_exists_pre[hIndex].func;
@@ -38242,7 +38320,7 @@ struct item_option* HP_itemdb_option_exists(int idx) {
retVal___ = HPMHooks.source.itemdb.option_exists(idx);
}
if (HPMHooks.count.HP_itemdb_option_exists_post > 0) {
- struct item_option* (*postHookFunc) (struct item_option* retVal___, int idx);
+ struct itemdb_option* (*postHookFunc) (struct itemdb_option* retVal___, int idx);
for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_option_exists_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_itemdb_option_exists_post[hIndex].func;
retVal___ = postHookFunc(retVal___, idx);
@@ -39121,10 +39199,10 @@ int HP_itemdb_validate_entry(struct item_data *entry, int n, const char *source)
}
return retVal___;
}
-void HP_itemdb_readdb_options_additional_fields(struct item_option *ito, struct config_setting_t *t, const char *source) {
+void HP_itemdb_readdb_options_additional_fields(struct itemdb_option *ito, struct config_setting_t *t, const char *source) {
int hIndex = 0;
if (HPMHooks.count.HP_itemdb_readdb_options_additional_fields_pre > 0) {
- void (*preHookFunc) (struct item_option **ito, struct config_setting_t **t, const char **source);
+ void (*preHookFunc) (struct itemdb_option **ito, struct config_setting_t **t, const char **source);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_options_additional_fields_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_itemdb_readdb_options_additional_fields_pre[hIndex].func;
@@ -39139,7 +39217,7 @@ void HP_itemdb_readdb_options_additional_fields(struct item_option *ito, struct
HPMHooks.source.itemdb.readdb_options_additional_fields(ito, t, source);
}
if (HPMHooks.count.HP_itemdb_readdb_options_additional_fields_post > 0) {
- void (*postHookFunc) (struct item_option *ito, struct config_setting_t *t, const char *source);
+ void (*postHookFunc) (struct itemdb_option *ito, struct config_setting_t *t, const char *source);
for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_options_additional_fields_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_itemdb_readdb_options_additional_fields_post[hIndex].func;
postHookFunc(ito, t, source);
@@ -69855,15 +69933,15 @@ void HP_searchstore_clearremote(struct map_session_data *sd) {
}
return;
}
-bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, unsigned short nameid, unsigned short amount, unsigned int price, const short *card, unsigned char refine) {
+bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, unsigned short nameid, unsigned short amount, unsigned int price, const short *card, unsigned char refine, const struct item_option *option) {
int hIndex = 0;
bool retVal___ = false;
if (HPMHooks.count.HP_searchstore_result_pre > 0) {
- bool (*preHookFunc) (struct map_session_data **sd, unsigned int *store_id, int *account_id, const char **store_name, unsigned short *nameid, unsigned short *amount, unsigned int *price, const short **card, unsigned char *refine);
+ bool (*preHookFunc) (struct map_session_data **sd, unsigned int *store_id, int *account_id, const char **store_name, unsigned short *nameid, unsigned short *amount, unsigned int *price, const short **card, unsigned char *refine, const struct item_option **option);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_result_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_searchstore_result_pre[hIndex].func;
- retVal___ = preHookFunc(&sd, &store_id, &account_id, &store_name, &nameid, &amount, &price, &card, &refine);
+ retVal___ = preHookFunc(&sd, &store_id, &account_id, &store_name, &nameid, &amount, &price, &card, &refine, &option);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -69871,13 +69949,13 @@ bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, i
}
}
{
- retVal___ = HPMHooks.source.searchstore.result(sd, store_id, account_id, store_name, nameid, amount, price, card, refine);
+ retVal___ = HPMHooks.source.searchstore.result(sd, store_id, account_id, store_name, nameid, amount, price, card, refine, option);
}
if (HPMHooks.count.HP_searchstore_result_post > 0) {
- bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, unsigned short nameid, unsigned short amount, unsigned int price, const short *card, unsigned char refine);
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, unsigned short nameid, unsigned short amount, unsigned int price, const short *card, unsigned char refine, const struct item_option *option);
for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_result_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_searchstore_result_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, store_id, account_id, store_name, nameid, amount, price, card, refine);
+ retVal___ = postHookFunc(retVal___, sd, store_id, account_id, store_name, nameid, amount, price, card, refine, option);
}
}
return retVal___;