diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-03-19 20:06:03 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-03-19 20:06:03 +0000 |
commit | 53ea174bd7c6f584ba78ab5b7201eec5ce5e5967 (patch) | |
tree | b1bee28bab04ecd083579a2d70fb24108add8a4b /src/map | |
parent | 02019804bf350fa760eaf4bfa6452091d67364c0 (diff) | |
download | hercules-53ea174bd7c6f584ba78ab5b7201eec5ce5e5967.tar.gz hercules-53ea174bd7c6f584ba78ab5b7201eec5ce5e5967.tar.bz2 hercules-53ea174bd7c6f584ba78ab5b7201eec5ce5e5967.tar.xz hercules-53ea174bd7c6f584ba78ab5b7201eec5ce5e5967.zip |
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15733 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/pc.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index bea0b2941..a91340bf8 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -6032,18 +6032,16 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) unsigned int tick = gettick(); for(k = 0; k < 5; k++) - if (sd->devotion[k]){ - struct map_session_data *devsd = map_id2sd(sd->devotion[k]); - if (devsd) - status_change_end(&devsd->bl, SC_DEVOTION, INVALID_TIMER); - sd->devotion[k] = 0; - } + if (sd->devotion[k]){ + struct map_session_data *devsd = map_id2sd(sd->devotion[k]); + if (devsd) + status_change_end(&devsd->bl, SC_DEVOTION, INVALID_TIMER); + 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) |