summaryrefslogtreecommitdiff
path: root/src/map/chat.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-05 19:49:38 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-05 19:49:38 +0000
commit0fb0df3a0fa3ac24f9f068d0c1ac664beec03354 (patch)
treedb71917a103760aab874f5ff37c4546f0124d04f /src/map/chat.c
parentb6e528890886089169555661a769fc14361dddb0 (diff)
downloadhercules-0fb0df3a0fa3ac24f9f068d0c1ac664beec03354.tar.gz
hercules-0fb0df3a0fa3ac24f9f068d0c1ac664beec03354.tar.bz2
hercules-0fb0df3a0fa3ac24f9f068d0c1ac664beec03354.tar.xz
hercules-0fb0df3a0fa3ac24f9f068d0c1ac664beec03354.zip
- 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
Diffstat (limited to 'src/map/chat.c')
-rw-r--r--src/map/chat.c11
1 files changed, 7 insertions, 4 deletions
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);