summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorhemagx <hemagx2@gmail.com>2015-12-12 12:52:28 +0200
committerHaru <haru@dotalux.com>2015-12-17 04:15:53 +0100
commitbb407e4e657c80115af8a8f5717e1f6f6dc61043 (patch)
tree63ae925756971fb7a6a840d40788c682714b48a4 /src/map/pc.c
parent478776d998e0fb48d87cd4c49229a1cf1b8cc203 (diff)
downloadhercules-bb407e4e657c80115af8a8f5717e1f6f6dc61043.tar.gz
hercules-bb407e4e657c80115af8a8f5717e1f6f6dc61043.tar.bz2
hercules-bb407e4e657c80115af8a8f5717e1f6f6dc61043.tar.xz
hercules-bb407e4e657c80115af8a8f5717e1f6f6dc61043.zip
Change all chat mute checks to use pc->can_talk instead of direct check.
Put new macro pc_ismuted and change all other kind of mutes to use it Closes #937 as merged Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index d5d68d299..567348d20 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4884,7 +4884,7 @@ int pc_useitem(struct map_session_data *sd,int n) {
sd->sc.data[SC_DEEP_SLEEP] ||
sd->sc.data[SC_SATURDAY_NIGHT_FEVER] ||
sd->sc.data[SC_COLD] ||
- (sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOITEM)
+ pc_ismuted(&sd->sc, MANNER_NOITEM)
))
return 0;
@@ -8875,7 +8875,7 @@ bool pc_can_talk( struct map_session_data *sd ) {
if( sd->sc.data[SC_BERSERK] ||
(sd->sc.data[SC_DEEP_SLEEP] && sd->sc.data[SC_DEEP_SLEEP]->val2) ||
- (sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOCHAT) )
+ pc_ismuted(&sd->sc, MANNER_NOCHAT) )
return false;
return true;