summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 9c74665a7..b2f6ce4ff 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1954,6 +1954,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
int i,temp,count,pnum=0,m=md->bl.m;
unsigned int mvp_damage, tick = gettick();
unsigned short flaghom = 1; // [Zephyrus] Does the mob only received damage from homunculus?
+ bool rebirth = ( md->sc.data[SC_KAIZEL] || (md->sc.data[SC_REBIRTH] && !md->state.rebirth) );
status = &md->status;
@@ -2370,7 +2371,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
//Emperium destroyed by script. Discard mvp character. [Skotlex]
mvp_sd = NULL;
- if( !md->sc.data[SC_KAIZEL] && !md->sc.data[SC_REBIRTH] )
+ if( !rebirth )
{ // Only trigger event on final kill
md->status.hp = 0; //So that npc_event invoked functions KNOW that mob is dead
if( src )
@@ -2424,8 +2425,9 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
if(!md->spawn) //Tell status_damage to remove it from memory.
return 5; // Note: Actually, it's 4. Oh well...
-
- mob_setdelayspawn(md); //Set respawning.
+
+ if( !rebirth )
+ mob_setdelayspawn(md); //Set respawning.
return 3; //Remove from map.
}