diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/clif.c | 6 | ||||
-rw-r--r-- | src/map/clif.h | 2 | ||||
-rw-r--r-- | src/map/mob.c | 9 | ||||
-rw-r--r-- | src/map/unit.c | 7 |
4 files changed, 16 insertions, 8 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index b8feb6746..3c1851309 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -738,17 +738,17 @@ int clif_clearunit_area(struct block_list* bl, clr_type type) static int clif_clearunit_delayed_sub(int tid, unsigned int tick, int id, intptr_t data) { struct block_list *bl = (struct block_list *)data; - clif_clearunit_area(bl, CLR_OUTSIGHT); + clif_clearunit_area(bl, (clr_type) id); aFree(bl); return 0; } -int clif_clearunit_delayed(struct block_list* bl, unsigned int tick) +int clif_clearunit_delayed(struct block_list* bl, clr_type type, unsigned int tick) { struct block_list *tbl; tbl = (struct block_list*)aMalloc(sizeof (struct block_list)); memcpy (tbl, bl, sizeof (struct block_list)); - add_timer(tick, clif_clearunit_delayed_sub, 0, (intptr_t)tbl); + add_timer(tick, clif_clearunit_delayed_sub, (int)type, (intptr_t)tbl); return 0; } diff --git a/src/map/clif.h b/src/map/clif.h index 5217d3b63..c06c40ee6 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -231,7 +231,7 @@ int clif_clearflooritem(struct flooritem_data *,int); int clif_clearunit_single(int id, clr_type type, int fd); int clif_clearunit_area(struct block_list* bl, clr_type type); -int clif_clearunit_delayed(struct block_list* bl, unsigned int tick); +int clif_clearunit_delayed(struct block_list* bl, clr_type type, unsigned int tick); int clif_spawn(struct block_list*); //area int clif_walkok(struct map_session_data*); // self void clif_move(struct unit_data *ud); //area diff --git a/src/map/mob.c b/src/map/mob.c index 97592d32b..740f67226 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2458,8 +2458,13 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) if(pcdb_checkid(md->vd->class_)) { //Player mobs are not removed automatically by the client. - clif_clearunit_delayed(&md->bl, tick+3000); - } + clif_clearunit_delayed(&md->bl, CLR_OUTSIGHT,tick+3000); + } else + /** + * We give the client some time to breath and this allows it to display anything it'd like with the dead corpose + * For example, this delay allows it to display soul drain effect + **/ + clif_clearunit_delayed(&md->bl, CLR_DEAD, tick+250); if(!md->spawn) //Tell status_damage to remove it from memory. return 5; // Note: Actually, it's 4. Oh well... diff --git a/src/map/unit.c b/src/map/unit.c index 6ca85aba1..e7f7fffce 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -2107,8 +2107,11 @@ int unit_remove_map_(struct block_list *bl, clr_type clrtype, const char* file, } default: ;// do nothing } - - clif_clearunit_area(bl,clrtype); + /** + * BL_MOB is handled by mob_dead + **/ + if( bl->type != BL_MOB ) + clif_clearunit_area(bl,clrtype); map_delblock(bl); map_freeblock_unlock(); return 1; |