Fixed soul drain visual effect not being displayed to mobs, bugreport:2980
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15193 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
77d02f16bb
commit
f0e3ef3e2e
@ -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)
|
static int clif_clearunit_delayed_sub(int tid, unsigned int tick, int id, intptr_t data)
|
||||||
{
|
{
|
||||||
struct block_list *bl = (struct block_list *)data;
|
struct block_list *bl = (struct block_list *)data;
|
||||||
clif_clearunit_area(bl, CLR_OUTSIGHT);
|
clif_clearunit_area(bl, (clr_type) id);
|
||||||
aFree(bl);
|
aFree(bl);
|
||||||
return 0;
|
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;
|
struct block_list *tbl;
|
||||||
tbl = (struct block_list*)aMalloc(sizeof (struct block_list));
|
tbl = (struct block_list*)aMalloc(sizeof (struct block_list));
|
||||||
memcpy (tbl, bl, 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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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_single(int id, clr_type type, int fd);
|
||||||
int clif_clearunit_area(struct block_list* bl, clr_type type);
|
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_spawn(struct block_list*); //area
|
||||||
int clif_walkok(struct map_session_data*); // self
|
int clif_walkok(struct map_session_data*); // self
|
||||||
void clif_move(struct unit_data *ud); //area
|
void clif_move(struct unit_data *ud); //area
|
||||||
|
@ -2458,8 +2458,13 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
|
|||||||
|
|
||||||
if(pcdb_checkid(md->vd->class_))
|
if(pcdb_checkid(md->vd->class_))
|
||||||
{ //Player mobs are not removed automatically by the client.
|
{ //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.
|
if(!md->spawn) //Tell status_damage to remove it from memory.
|
||||||
return 5; // Note: Actually, it's 4. Oh well...
|
return 5; // Note: Actually, it's 4. Oh well...
|
||||||
|
@ -2107,8 +2107,11 @@ int unit_remove_map_(struct block_list *bl, clr_type clrtype, const char* file,
|
|||||||
}
|
}
|
||||||
default: ;// do nothing
|
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_delblock(bl);
|
||||||
map_freeblock_unlock();
|
map_freeblock_unlock();
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user