diff options
author | Inkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-11-27 02:35:17 +0000 |
---|---|---|
committer | Inkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-11-27 02:35:17 +0000 |
commit | 1dbfe55e921d79c745925b549c5903ce1595b02a (patch) | |
tree | c288e11c4a3d0e934f2d19df25ec86c06dc5a931 | |
parent | 476222257ace810a1e69d552c969f36c4687f4d9 (diff) | |
download | hercules-1dbfe55e921d79c745925b549c5903ce1595b02a.tar.gz hercules-1dbfe55e921d79c745925b549c5903ce1595b02a.tar.bz2 hercules-1dbfe55e921d79c745925b549c5903ce1595b02a.tar.xz hercules-1dbfe55e921d79c745925b549c5903ce1595b02a.zip |
Fixed warping in OnPCDieEvent revives people with 0 hp.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14174 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 1 | ||||
-rw-r--r-- | src/map/pc.c | 19 |
2 files changed, 10 insertions, 10 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 426fe6bb6..54c11eaed 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -10,6 +10,7 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. - removed the 'feature' that events only trigger when the player is in the OnTouch area IF it's specified. It's never documented and breaks official scripts. - some cleanups and bug fixes to OnTouch_. + * Fixed warping in OnPCDieEvent revives people with 0 hp. 2009/11/25 * Fixed strnpcinfo(1) returning blank strings when NPC names did not have a hidden portion of the display name. (bugreport:3758) [Paradox924X] 2009/11/23 diff --git a/src/map/pc.c b/src/map/pc.c index 8b118270b..b2db9858d 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5481,15 +5481,6 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) duel_reject(sd->duel_invite, sd); } - pc_setdead(sd); - //Reset menu skills/item skills - if (sd->skillitem) - sd->skillitem = sd->skillitemlv = 0; - if (sd->menuskill_id) - sd->menuskill_id = sd->menuskill_val = 0; - //Reset ticks. - sd->hp_loss.tick = sd->sp_loss.tick = sd->hp_regen.tick = sd->sp_regen.tick = 0; - pc_setglobalreg(sd,"PC_DIE_COUNTER",sd->die_counter+1); pc_setglobalreg(sd,"killerrid",src?src->id:0); if( sd->state.bg_id ) @@ -5498,9 +5489,17 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) if( (bg = bg_team_search(sd->state.bg_id)) != NULL && bg->die_event[0] ) npc_event(sd, bg->die_event, 0); } - npc_script_event(sd,NPCE_DIE); + pc_setdead(sd); + //Reset menu skills/item skills + if (sd->skillitem) + sd->skillitem = sd->skillitemlv = 0; + if (sd->menuskill_id) + sd->menuskill_id = sd->menuskill_val = 0; + //Reset ticks. + sd->hp_loss.tick = sd->sp_loss.tick = sd->hp_regen.tick = sd->sp_regen.tick = 0; + if ( sd && sd->spiritball ) pc_delspiritball(sd,sd->spiritball,0); |