summaryrefslogtreecommitdiff
path: root/src/map/chat.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-05-03 01:37:55 +0300
committerAndrei Karas <akaras@inbox.ru>2019-05-05 22:24:25 +0300
commit7923cecc16aad3ff6fb80070240e99e667af1d6c (patch)
tree62c6a1e813eb5794ea91e970f5aac0cb355cae37 /src/map/chat.c
parent19a162b61f14883ae0a2e25b6252796cc4c77cb9 (diff)
downloadhercules-7923cecc16aad3ff6fb80070240e99e667af1d6c.tar.gz
hercules-7923cecc16aad3ff6fb80070240e99e667af1d6c.tar.bz2
hercules-7923cecc16aad3ff6fb80070240e99e667af1d6c.tar.xz
hercules-7923cecc16aad3ff6fb80070240e99e667af1d6c.zip
Add missing checks for prevend flag
Diffstat (limited to 'src/map/chat.c')
-rw-r--r--src/map/chat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/chat.c b/src/map/chat.c
index 77a12a560..b650ff029 100644
--- a/src/map/chat.c
+++ b/src/map/chat.c
@@ -102,7 +102,7 @@ static bool chat_createpcchat(struct map_session_data *sd, const char *title, co
if (sd->chat_id != 0)
return false; //Prevent people abusing the chat system by creating multiple chats, as pointed out by End of Exam. [Skotlex]
- if( sd->state.vending || sd->state.buyingstore )
+ if (sd->state.vending || sd->state.prevend || sd->state.buyingstore)
{// not chat, when you already have a store open
return false;
}
@@ -147,7 +147,7 @@ static bool chat_joinchat(struct map_session_data *sd, int chatid, const char *p
cd = map->id2cd(chatid);
if (cd == NULL || cd->bl.type != BL_CHAT || cd->bl.m != sd->bl.m
- || sd->state.vending || sd->state.buyingstore || sd->chat_id != 0
+ || sd->state.vending || sd->state.prevend || sd->state.buyingstore || sd->chat_id != 0
|| ((cd->owner->type == BL_NPC) ? cd->users+1 : cd->users) >= cd->limit
) {
clif->joinchatfail(sd,0); // room full