From e38b7606911d4763bd24dfa627f9ec6a7c1971d0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 17 Feb 2015 20:15:39 +0300 Subject: add pet emote packet. --- src/map/parse.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/map/parse.c') diff --git a/src/map/parse.c b/src/map/parse.c index b2d66c0..bf3f296 100644 --- a/src/map/parse.c +++ b/src/map/parse.c @@ -108,3 +108,19 @@ void map_parse_pet_say(int fd) safestrncpy(message, (char*)RFIFOP(fd, 4), len - 4); send_pet_say(sd, message); } + +void map_parse_pet_emote(int fd) +{ + struct map_session_data* sd = (struct map_session_data*)session[fd]->session_data; + if (!sd) + return; + const time_t t = time(NULL); + if (sd->emotionlasttime + 1 >= t) + { // not more than 1 per second + sd->emotionlasttime = t; + return; + } + + sd->emotionlasttime = t; + send_pet_emote(sd, RFIFOB(fd, 2)); +} -- cgit v1.2.3-70-g09d2