Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/map/chat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down