summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-02-12 20:48:51 +0300
committerAndrei Karas <akaras@inbox.ru>2019-02-12 20:48:51 +0300
commit3ec34a184f0bedd71c529be06eccd0b882d2d25a (patch)
treed0d6d9d2393c116c72720b15d0cb05ee6a3a8a02
parent3c0e3838f77a62a69130d7b2674e21e2133a7f83 (diff)
downloadplugin-3ec34a184f0bedd71c529be06eccd0b882d2d25a.tar.gz
plugin-3ec34a184f0bedd71c529be06eccd0b882d2d25a.tar.bz2
plugin-3ec34a184f0bedd71c529be06eccd0b882d2d25a.tar.xz
plugin-3ec34a184f0bedd71c529be06eccd0b882d2d25a.zip
Update from hercules.
-rw-r--r--src/echar/char.c9
-rw-r--r--src/echar/char.h2
-rw-r--r--src/echar/init.c1
3 files changed, 11 insertions, 1 deletions
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);