diff options
author | momacabu <momacabu@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-11-11 19:30:24 +0000 |
---|---|---|
committer | momacabu <momacabu@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-11-11 19:30:24 +0000 |
commit | 20e444cce123f97b5e2d60cfb4c134c08479fb41 (patch) | |
tree | 29d77b688c4ae95293c25774b20e1bf5501d34d4 /src/map | |
parent | 0a9185c28d74e04d751fc27ec4c55901cc0d9a73 (diff) | |
download | hercules-20e444cce123f97b5e2d60cfb4c134c08479fb41.tar.gz hercules-20e444cce123f97b5e2d60cfb4c134c08479fb41.tar.bz2 hercules-20e444cce123f97b5e2d60cfb4c134c08479fb41.tar.xz hercules-20e444cce123f97b5e2d60cfb4c134c08479fb41.zip |
Follow up to r16912 (bugreport:6435), the fix wasn't working because I was mistakenly reproducing the bug -_-
Now I hope I did everything right.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16913 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/chat.c | 10 | ||||
-rw-r--r-- | src/map/skill.c | 1 | ||||
-rw-r--r-- | src/map/skill.h | 1 |
3 files changed, 10 insertions, 2 deletions
diff --git a/src/map/chat.c b/src/map/chat.c index 38d255034..dfeb16cad 100644 --- a/src/map/chat.c +++ b/src/map/chat.c @@ -13,6 +13,7 @@ #include "map.h" #include "npc.h" // npc_event_do() #include "pc.h" +#include "skill.h" // ext_skill_unit_onplace() #include "chat.h" #include <stdio.h> @@ -202,14 +203,19 @@ int chat_leavechat(struct map_session_data* sd, bool kicked) if( cd->users == 0 && cd->owner->type == BL_PC ) { // Delete empty chatroom + struct skill_unit* unit = NULL; + struct skill_unit_group* group = NULL; + clif_clearchat(cd, 0); db_destroy(cd->kick_list); map_deliddb(&cd->bl); map_delblock(&cd->bl); map_freeblock(&cd->bl); - if (map_find_skill_unit_oncell(&sd->bl,sd->bl.x,sd->bl.y,AL_WARP,NULL,0) != NULL) - clif_changeoption(&sd->bl); // We tell the client that something has changed... + unit = map_find_skill_unit_oncell(&sd->bl, sd->bl.x, sd->bl.y, AL_WARP, NULL, 0); + group = (unit != NULL) ? unit->group : NULL; + if (group != NULL) + ext_skill_unit_onplace(unit, &sd->bl, group->tick); return 1; } diff --git a/src/map/skill.c b/src/map/skill.c index 577a6539c..65ea0b600 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -10784,6 +10784,7 @@ struct skill_unit_group* skill_unitsetting (struct block_list *src, short skilli /*========================================== * *------------------------------------------*/ +void ext_skill_unit_onplace(struct skill_unit *src, struct block_list *bl, unsigned int tick){skill_unit_onplace(src, bl, tick);} static int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, unsigned int tick) { struct skill_unit_group *sg; diff --git a/src/map/skill.h b/src/map/skill.h index 78d83e100..a1ca832a3 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -299,6 +299,7 @@ int skill_delunitgroup_(struct skill_unit_group *group, const char* file, int li #define skill_delunitgroup(group) skill_delunitgroup_(group,__FILE__,__LINE__,__func__) int skill_clear_unitgroup(struct block_list *src); int skill_clear_group(struct block_list *bl, int flag); +void ext_skill_unit_onplace(struct skill_unit *src, struct block_list *bl, unsigned int tick); int skill_unit_ondamaged(struct skill_unit *src,struct block_list *bl,int damage,unsigned int tick); |