From f5211cd347e39ea4c97c354006811cd251961687 Mon Sep 17 00:00:00 2001 From: ai4rei Date: Sun, 28 Nov 2010 22:43:10 +0000 Subject: * Added emotion_type enumeration for clif_emotion constants. - Made clif_parse_Emotion use clif_emotion, rather than having it's code inlined. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14518 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/clif.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/map/clif.c') diff --git a/src/map/clif.c b/src/map/clif.c index c99dab0b2..85b7d8667 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -9063,10 +9063,8 @@ void clif_parse_ChangeDir(int fd, struct map_session_data *sd) *------------------------------------------*/ void clif_parse_Emotion(int fd, struct map_session_data *sd) { - unsigned char buf[64]; - if (battle_config.basic_skill_check == 0 || pc_checkskill(sd, NV_BASIC) >= 2) { - if (RFIFOB(fd,2) == 34) {// prevent use of the mute emote [Valaris] + if (RFIFOB(fd,2) == E_MUTE) {// prevent use of the mute emote [Valaris] clif_skill_fail(sd, 1, 0, 1); return; } @@ -9077,11 +9075,8 @@ void clif_parse_Emotion(int fd, struct map_session_data *sd) return; } sd->emotionlasttime = time(NULL) + 1; // not more than 1 per second (using /commands the client can spam it) - - WBUFW(buf,0) = 0xc0; - WBUFL(buf,2) = sd->bl.id; - WBUFB(buf,6) = RFIFOB(fd,2); - clif_send(buf, packet_len(0xc0), &sd->bl, AREA); + + clif_emotion(&sd->bl, RFIFOB(fd,2)); } else clif_skill_fail(sd, 1, 0, 1); } -- cgit v1.2.3-70-g09d2