From 1e21393782af0df7c528dba5a2f0a80ea0c7e4ab Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 17 Feb 2015 13:33:56 +0300 Subject: add pet talk packet. Changed server version to 5. --- src/map/parse.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/map/parse.c') diff --git a/src/map/parse.c b/src/map/parse.c index 2e145dc..b2d66c0 100644 --- a/src/map/parse.c +++ b/src/map/parse.c @@ -96,3 +96,15 @@ void map_parse_part_channel(int fd) channel->leave(sd->channels[k], sd); } } + +void map_parse_pet_say(int fd) +{ + char message[500]; + + struct map_session_data* sd = (struct map_session_data*)session[fd]->session_data; + const int len = RFIFOW(fd, 2); + if (len > 500 || len < 6) + return; + safestrncpy(message, (char*)RFIFOP(fd, 4), len - 4); + send_pet_say(sd, message); +} -- cgit v1.2.3-70-g09d2