From 3ec34a184f0bedd71c529be06eccd0b882d2d25a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 12 Feb 2019 20:48:51 +0300 Subject: Update from hercules. --- src/echar/char.c | 9 ++++++++- src/echar/char.h | 2 ++ src/echar/init.c | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/echar/char.c b/src/echar/char.c index 037aa05..c0d80ba 100644 --- a/src/echar/char.c +++ b/src/echar/char.c @@ -177,11 +177,18 @@ void echar_parse_login_password_change_ack(int charFd) } } -void echar_send_HC_ACK_CHARINFO_PER_PAGE_post(int fd, struct char_session_data *sd) +void echar_send_HC_ACK_CHARINFO_PER_PAGE_post(int fd, + struct char_session_data *sd) { send_additional_slots(fd, sd); } +void echar_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre(int *fdPtr __attribute__ ((unused)), + struct char_session_data **sdPtr __attribute__ ((unused))) +{ + hookStop(); +} + int echar_mmo_char_send_characters_post(int retVal, int fd, struct char_session_data* sd) diff --git a/src/echar/char.h b/src/echar/char.h index 708a558..23a9a4d 100644 --- a/src/echar/char.h +++ b/src/echar/char.h @@ -15,6 +15,8 @@ void echar_parse_login_password_change_ack(int charFd); void echar_send_HC_ACK_CHARINFO_PER_PAGE_post(int fd, struct char_session_data *sd); +void echar_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre(int *fdPtr, struct char_session_data **sdPtr); + int echar_mmo_char_send_characters_post(int retVal, int fd, struct char_session_data *sd); void send_additional_slots(int fd, struct char_session_data* sd); diff --git a/src/echar/init.c b/src/echar/init.c index 4e9faa6..5d55735 100644 --- a/src/echar/init.c +++ b/src/echar/init.c @@ -60,6 +60,7 @@ HPExport void plugin_init (void) addHookPre(chr, parse_char_create_new_char, echar_parse_char_create_new_char); addHookPre(chr, creation_failed, echar_creation_failed); addHookPre(chr, parse_char_connect, echar_parse_char_connect_pre); + addHookPre(chr, send_HC_ACK_CHARINFO_PER_PAGE_tail, echar_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre); addHookPost(chr, send_HC_ACK_CHARINFO_PER_PAGE, echar_send_HC_ACK_CHARINFO_PER_PAGE_post); addHookPost(chr, mmo_char_send_characters, echar_mmo_char_send_characters_post); -- cgit v1.2.3-70-g09d2