summaryrefslogtreecommitdiff
path: root/src/map/send.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-20 15:36:45 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-20 15:43:11 +0300
commit60097ba0d9a71ab575c89a3d0162bb4df1cdc0ff (patch)
tree5efde0a4146398172ec80273db1f3eba8a8d8e6e /src/map/send.c
parentc90ec19afcfc826a077ed300fc2a9f8347d9b1e6 (diff)
downloadevol-hercules-60097ba0d9a71ab575c89a3d0162bb4df1cdc0ff.tar.gz
evol-hercules-60097ba0d9a71ab575c89a3d0162bb4df1cdc0ff.tar.bz2
evol-hercules-60097ba0d9a71ab575c89a3d0162bb4df1cdc0ff.tar.xz
evol-hercules-60097ba0d9a71ab575c89a3d0162bb4df1cdc0ff.zip
Add support for online list packets.
Diffstat (limited to 'src/map/send.c')
-rw-r--r--src/map/send.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/map/send.c b/src/map/send.c
index 7471c1f..067ff5f 100644
--- a/src/map/send.c
+++ b/src/map/send.c
@@ -273,6 +273,7 @@ void send_pet_say(struct map_session_data *sd, const char *const message)
snprintf(buf, len, "%s : %s", name, message);
buf[len - 1] = 0;
clif->GlobalMessage(&sd->pd->bl, buf);
+ aFree(buf);
}
void send_pet_emote(struct map_session_data *sd, const int emote)
@@ -282,3 +283,14 @@ void send_pet_emote(struct map_session_data *sd, const int emote)
clif->emotion(&sd->pd->bl, emote);
}
+
+void send_online_list(int fd, const char *buf, unsigned size)
+{
+ const unsigned int len = size + 4 + 1;
+ WFIFOHEAD (fd, len);
+ WFIFOW (fd, 0) = 0xb10;
+ WFIFOW (fd, 2) = len;
+ memcpy (WFIFOP (fd, 4), buf, size);
+ WFIFOB (fd, size + 4) = 0;
+ WFIFOSET (fd, len);
+}