summaryrefslogtreecommitdiff
path: root/src/map/parse.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-17 13:33:56 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-17 13:33:56 +0300
commit1e21393782af0df7c528dba5a2f0a80ea0c7e4ab (patch)
tree3ff648f4638426b6401bd8a62d5d0babc65bde30 /src/map/parse.c
parentc7a03f4a20ae7a39277417ee566211f7dd94130a (diff)
downloadplugin-1e21393782af0df7c528dba5a2f0a80ea0c7e4ab.tar.gz
plugin-1e21393782af0df7c528dba5a2f0a80ea0c7e4ab.tar.bz2
plugin-1e21393782af0df7c528dba5a2f0a80ea0c7e4ab.tar.xz
plugin-1e21393782af0df7c528dba5a2f0a80ea0c7e4ab.zip
add pet talk packet.
Changed server version to 5.
Diffstat (limited to 'src/map/parse.c')
-rw-r--r--src/map/parse.c12
1 files changed, 12 insertions, 0 deletions
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);
+}