summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
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 /src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
parent8ce6947f6754c797e0557e54af42223212028bb0 (diff)
downloadhercules-2170bf7c3cd95faf17030c5b458ab0d639e597fd.tar.gz
hercules-2170bf7c3cd95faf17030c5b458ab0d639e597fd.tar.bz2
hercules-2170bf7c3cd95faf17030c5b458ab0d639e597fd.tar.xz
hercules-2170bf7c3cd95faf17030c5b458ab0d639e597fd.zip
Update HPM hooks.
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_char.Hooks.inc')
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.Hooks.inc38
1 files changed, 32 insertions, 6 deletions
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) {