summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--src/map/pc.c19
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);