summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorIbrahem Zidan <brahem@aotsw.com>2019-04-29 05:37:39 +0200
committerGitHub <noreply@github.com>2019-04-29 05:37:39 +0200
commita99d988be4d469c1ab60d860aac57ff3a6f24cac (patch)
tree76f93b2d37318abeaf0a6003ecdc7a3979ab7c68 /src/map
parentc972b89f82015d2efa7724e3acd4480245b74f56 (diff)
parent5495b64907b0c5987ef8efeffbf7e559c49c2cf9 (diff)
downloadhercules-a99d988be4d469c1ab60d860aac57ff3a6f24cac.tar.gz
hercules-a99d988be4d469c1ab60d860aac57ff3a6f24cac.tar.bz2
hercules-a99d988be4d469c1ab60d860aac57ff3a6f24cac.tar.xz
hercules-a99d988be4d469c1ab60d860aac57ff3a6f24cac.zip
Merge pull request #2443 from Emistry/issue_1569
Disable chatroom creation if cell_chknochat
Diffstat (limited to 'src/map')
-rw-r--r--src/map/chat.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/map/chat.c b/src/map/chat.c
index d9b642219..77a12a560 100644
--- a/src/map/chat.c
+++ b/src/map/chat.c
@@ -255,6 +255,14 @@ static int chat_leavechat(struct map_session_data *sd, bool kicked)
}
if( leavechar == 0 && cd->owner->type == BL_PC ) {
+
+ // check if new location are CELL_CHKNOCHAT
+ if (map->getcell(cd->usersd[0]->bl.m, NULL, cd->usersd[0]->bl.x, cd->usersd[0]->bl.y, CELL_CHKNOCHAT)) {
+ for (i = (cd->users - 1); i >= 0; i--)
+ chat->leave(cd->usersd[i], false);
+ return 2;
+ }
+
// Set and announce new owner
cd->owner = &cd->usersd[0]->bl;
clif->changechatowner(cd, cd->usersd[0]);