summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-08-20 19:48:35 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-08-20 19:48:35 +0000
commit290e1d4e87da4b197d004f6855e26a9b634f4b3b (patch)
treefaaf4b2a347bcdf278bb691a237198b32df3961f /src
parent0854fa128b1c5f9a2ece3f4201a916d082e618c9 (diff)
downloadhercules-290e1d4e87da4b197d004f6855e26a9b634f4b3b.tar.gz
hercules-290e1d4e87da4b197d004f6855e26a9b634f4b3b.tar.bz2
hercules-290e1d4e87da4b197d004f6855e26a9b634f4b3b.tar.xz
hercules-290e1d4e87da4b197d004f6855e26a9b634f4b3b.zip
- Do not trigger event if killed by script at all.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13099 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/mob.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 0bd3c837f..4f90a7c2b 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2297,16 +2297,16 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
if( !md->sc.data[SC_KAIZEL] )
{ // Only trigger event on final kill
+ md->status.hp = 0; //So that npc_event invoked functions KNOW that mob is dead
+ if( src )
+ switch( src->type )
+ {
+ case BL_PET: sd = ((TBL_PET*)src)->msd; break;
+ case BL_HOM: sd = ((TBL_HOM*)src)->master; break;
+ }
+
if( md->npc_event[0] && !md->state.npc_killmonster )
{
- md->status.hp = 0; //So that npc_event invoked functions KNOW that I am dead.
- if( src )
- switch( src->type )
- {
- case BL_PET: sd = ((TBL_PET*)src)->msd; break;
- case BL_HOM: sd = ((TBL_HOM*)src)->master; break;
- }
-
if( sd && battle_config.mob_npc_event_type )
{
pc_setglobalreg(sd,"killerrid",sd->bl.id);
@@ -2319,14 +2319,14 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
}
else
npc_event_do(md->npc_event);
-
- md->status.hp = 1;
}
- else if( mvp_sd )
+ else if( mvp_sd && !md->state.npc_killmonster )
{
pc_setglobalreg(mvp_sd,"killedrid",md->class_);
npc_script_event(mvp_sd, NPCE_KILLNPC); // PCKillNPC [Lance]
}
+
+ md->status.hp = 1;
}
if(md->deletetimer!=-1) {