Follow up r15732, Fixed bug where a player killed by a method not passing thru pc_damage (e.g. poison/@die) would leave sitting icon active even while dead. Thanks to wildcard and epoque

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15733 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
shennetsind 2012-03-19 20:06:03 +00:00
parent 07d301cd6d
commit fcb46867e4

View File

@ -6039,11 +6039,9 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
sd->devotion[k] = 0;
}
if(sd->status.pet_id > 0 && sd->pd)
{
if(sd->status.pet_id > 0 && sd->pd) {
struct pet_data *pd = sd->pd;
if( !map[sd->bl.m].flag.noexppenalty )
{
if( !map[sd->bl.m].flag.noexppenalty ) {
pet_set_intimate(pd, pd->pet.intimate - pd->petDB->die);
if( pd->pet.intimate < 0 )
pd->pet.intimate = 0;
@ -6069,14 +6067,20 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
pc_setglobalreg(sd,"PC_DIE_COUNTER",sd->die_counter+1);
pc_setparam(sd, SP_KILLERRID, src?src->id:0);
if( sd->bg_id )
{
if( sd->bg_id ) {
struct battleground_data *bg;
if( (bg = bg_team_search(sd->bg_id)) != NULL && bg->die_event[0] )
npc_event(sd, bg->die_event, 0);
}
npc_script_event(sd,NPCE_DIE);
/* e.g. not killed thru pc_damage */
if( pc_issit(sd) ) {
clif_status_load(&sd->bl,SI_SITTING,0);
}
pc_setdead(sd);
//Reset menu skills/item skills
if (sd->skillitem)