diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/pet.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/pet.c b/src/map/pet.c index d9dddbf2f..25f8274c9 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -977,9 +977,12 @@ static int pet_ai_sub_hard(struct pet_data *pd,unsigned int tick) if (pd->target_id) {
target= map_id2bl(pd->target_id);
- if (!target || pd->bl.m != target->m || target->prev == NULL ||
+ if (!target || pd->bl.m != target->m || status_isdead(target) ||
!check_distance_bl(&pd->bl, target, pd->db->range3))
+ {
+ target = NULL;
pet_unlocktarget(pd);
+ }
}
// ペットによるルート
|