summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-11-27 02:35:17 +0000
committerInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-11-27 02:35:17 +0000
commit1dbfe55e921d79c745925b549c5903ce1595b02a (patch)
treec288e11c4a3d0e934f2d19df25ec86c06dc5a931 /src/map/pc.c
parent476222257ace810a1e69d552c969f36c4687f4d9 (diff)
downloadhercules-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
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c19
1 files changed, 9 insertions, 10 deletions
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);