summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/mob.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index dc2533672..6fe109536 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -3070,6 +3070,9 @@ int mobskill_event(struct mob_data *md, struct block_list *src, unsigned int tic
{
int target_id, res = 0;
+ if(md->bl.prev == NULL || md->status.hp <= 0)
+ return 0;
+
target_id = md->target_id;
if (!target_id || battle_config.mob_changetarget_byskill)
md->target_id = src->id;
@@ -3289,7 +3292,7 @@ int mob_clone_delete(struct mob_data *md)
aFree(mob_db_data[class_]);
mob_db_data[class_]=NULL;
//Clear references to the db
- md->db = NULL;
+ md->db = mob_dummy;
md->vd = NULL;
return 1;
}