summaryrefslogtreecommitdiff
path: root/src/map/parse.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-17 20:15:39 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-17 20:15:39 +0300
commite38b7606911d4763bd24dfa627f9ec6a7c1971d0 (patch)
treeb5448dd97e7d69761e4ad389af5ede20f4b34b83 /src/map/parse.c
parent1e21393782af0df7c528dba5a2f0a80ea0c7e4ab (diff)
downloadevol-hercules-e38b7606911d4763bd24dfa627f9ec6a7c1971d0.tar.gz
evol-hercules-e38b7606911d4763bd24dfa627f9ec6a7c1971d0.tar.bz2
evol-hercules-e38b7606911d4763bd24dfa627f9ec6a7c1971d0.tar.xz
evol-hercules-e38b7606911d4763bd24dfa627f9ec6a7c1971d0.zip
add pet emote packet.
Diffstat (limited to 'src/map/parse.c')
-rw-r--r--src/map/parse.c16
1 files changed, 16 insertions, 0 deletions
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));
+}