summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-01-23 22:33:42 +0300
committerAndrei Karas <akaras@inbox.ru>2019-02-05 01:16:49 +0300
commit020392fd8a9958dcdc58c98e26d34c0d5d72d6ac (patch)
treea5ba9638470def39a017a78e4676a809a8e49277 /src
parent89fe666e4a067c8721c37692ab5726a23c143307 (diff)
downloadhercules-020392fd8a9958dcdc58c98e26d34c0d5d72d6ac.tar.gz
hercules-020392fd8a9958dcdc58c98e26d34c0d5d72d6ac.tar.bz2
hercules-020392fd8a9958dcdc58c98e26d34c0d5d72d6ac.tar.xz
hercules-020392fd8a9958dcdc58c98e26d34c0d5d72d6ac.zip
Split function char_send_HC_ACK_CHARINFO_PER_PAGE
Diffstat (limited to 'src')
-rw-r--r--src/char/char.c16
-rw-r--r--src/char/char.h1
2 files changed, 12 insertions, 5 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 750f5fd69..5edacff20 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -2141,15 +2141,20 @@ static void char_send_HC_ACK_CHARINFO_PER_PAGE(int fd, struct char_session_data
WFIFOSET(fd, p->packetLen);
// send empty packet if chars count is 3, for trigger final code in client
if (count == 3) {
- WFIFOHEAD(fd, sizeof(struct PACKET_HC_ACK_CHARINFO_PER_PAGE));
- p = WFIFOP(fd, 0);
- p->packetId = HEADER_HC_ACK_CHARINFO_PER_PAGE;
- p->packetLen = sizeof(struct PACKET_HC_ACK_CHARINFO_PER_PAGE);
- WFIFOSET(fd, p->packetLen);
+ chr->send_HC_ACK_CHARINFO_PER_PAGE_tail(fd, sd);
}
#endif
}
+static void char_send_HC_ACK_CHARINFO_PER_PAGE_tail(int fd, struct char_session_data *sd)
+{
+ WFIFOHEAD(fd, sizeof(struct PACKET_HC_ACK_CHARINFO_PER_PAGE));
+ struct PACKET_HC_ACK_CHARINFO_PER_PAGE *p = WFIFOP(fd, 0);
+ p->packetId = HEADER_HC_ACK_CHARINFO_PER_PAGE;
+ p->packetLen = sizeof(struct PACKET_HC_ACK_CHARINFO_PER_PAGE);
+ WFIFOSET(fd, p->packetLen);
+}
+
/* Sends character ban list */
/* Made Possible by Yommy~! <3 */
static void char_mmo_char_send_ban_list(int fd, struct char_session_data *sd)
@@ -6484,6 +6489,7 @@ void char_defaults(void)
chr->count_users = char_count_users;
chr->mmo_char_tobuf = char_mmo_char_tobuf;
chr->send_HC_ACK_CHARINFO_PER_PAGE = char_send_HC_ACK_CHARINFO_PER_PAGE;
+ chr->send_HC_ACK_CHARINFO_PER_PAGE_tail = char_send_HC_ACK_CHARINFO_PER_PAGE_tail;
chr->mmo_char_send_ban_list = char_mmo_char_send_ban_list;
chr->mmo_char_send_slots_info = char_mmo_char_send_slots_info;
chr->mmo_char_send_characters = char_mmo_char_send_characters;
diff --git a/src/char/char.h b/src/char/char.h
index 914530537..632695ca4 100644
--- a/src/char/char.h
+++ b/src/char/char.h
@@ -154,6 +154,7 @@ struct char_interface {
int (*count_users) (void);
int (*mmo_char_tobuf) (uint8* buffer, struct mmo_charstatus* p);
void (*send_HC_ACK_CHARINFO_PER_PAGE) (int fd, struct char_session_data *sd);
+ void (*send_HC_ACK_CHARINFO_PER_PAGE_tail) (int fd, struct char_session_data *sd);
void (*mmo_char_send_ban_list) (int fd, struct char_session_data *sd);
void (*mmo_char_send_slots_info) (int fd, struct char_session_data* sd);
int (*mmo_char_send_characters) (int fd, struct char_session_data* sd);