From 0fb0df3a0fa3ac24f9f068d0c1ac664beec03354 Mon Sep 17 00:00:00 2001 From: skotlex Date: Tue, 5 Sep 2006 19:49:38 +0000 Subject: - Corrected SC_INTRAVISION not starting. - Small cleanups (line terminators, indenting) - Fixed crash when attempting to read a Label as a string on a script (thanks to End of Exam) - Fixed possible crash when changing a chat-room's owner (thanks to End of Exam) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8639 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/chat.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/map/chat.c') diff --git a/src/map/chat.c b/src/map/chat.c index 6d84aca4c..a1bb7a293 100644 --- a/src/map/chat.c +++ b/src/map/chat.c @@ -145,16 +145,18 @@ int chat_leavechat(struct map_session_data *sd) pc_setchatid(sd,0); if(cd->users == 0 && (*cd->owner)->type==BL_PC){ - // 全員居なくなった&PCのチャットなので消す + //Delete empty chatroom clif_clearchat(cd,0); - map_delobject(cd->bl.id); // freeまでしてくれる + map_delobject(cd->bl.id); } else { for(i=leavechar;i < cd->users;i++) cd->usersd[i] = cd->usersd[i+1]; if(leavechar==0 && (*cd->owner)->type==BL_PC){ - // PCのチャットなので所有者が抜けたので位置変更 + //Adjust Chat location after owner has been changed. + map_delblock( &cd->bl ); cd->bl.x=cd->usersd[0]->bl.x; cd->bl.y=cd->usersd[0]->bl.y; + map_addblock( &cd->bl ); } clif_dispchat(cd,0); } @@ -197,9 +199,10 @@ int chat_changechatowner(struct map_session_data *sd,char *nextownername) cd->usersd[0] = cd->usersd[nextowner]; cd->usersd[nextowner] = tmp_sd; - // 新しい所有者の位置へ変更 + map_delblock( &cd->bl ); cd->bl.x=cd->usersd[0]->bl.x; cd->bl.y=cd->usersd[0]->bl.y; + map_addblock( &cd->bl ); // 再度表示 clif_dispchat(cd,0); -- cgit v1.2.3-70-g09d2