summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-29 21:58:33 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-29 21:58:33 +0300
commit1cff2f51e9fded09e6e090a41f60af9ea188d134 (patch)
tree899bcbd2a35fb7a936389ddc272b113eca4d018a /src
parentec1653bc2561565da6750493ea56495c63824456 (diff)
downloadevol-hercules-1cff2f51e9fded09e6e090a41f60af9ea188d134.tar.gz
evol-hercules-1cff2f51e9fded09e6e090a41f60af9ea188d134.tar.bz2
evol-hercules-1cff2f51e9fded09e6e090a41f60af9ea188d134.tar.xz
evol-hercules-1cff2f51e9fded09e6e090a41f60af9ea188d134.zip
For pet and homun talks check is player allowed to talk.
Diffstat (limited to 'src')
-rw-r--r--src/emap/parse.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/emap/parse.c b/src/emap/parse.c
index 7e45c5a..f034334 100644
--- a/src/emap/parse.c
+++ b/src/emap/parse.c
@@ -117,6 +117,9 @@ void map_parse_pet_say(int fd)
if (!sd || !sd->pd)
return;
+ if (!pc->can_talk(sd))
+ return;
+
const int len = RFIFOW(fd, 2);
if (len > 500 || len < 6)
return;
@@ -181,6 +184,8 @@ void map_parse_homun_say(int fd)
TBL_PC* sd = (TBL_PC*)sockt->session[fd]->session_data;
if (!sd)
return;
+ if (!pc->can_talk(sd))
+ return;
const int len = RFIFOW(fd, 2);
if (len > 500 || len < 6)
return;