diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-06 02:21:11 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-06 02:21:11 +0000 |
commit | 6351693cac9fa5394afcdc784c380946f14d1e56 (patch) | |
tree | 70d373162afa59814cf90dd50771c316eeebfde4 | |
parent | 1f3fb6e24ba2cf2a790f743ed55cd003ffae922f (diff) | |
download | hercules-6351693cac9fa5394afcdc784c380946f14d1e56.tar.gz hercules-6351693cac9fa5394afcdc784c380946f14d1e56.tar.bz2 hercules-6351693cac9fa5394afcdc784c380946f14d1e56.tar.xz hercules-6351693cac9fa5394afcdc784c380946f14d1e56.zip |
- Small fix in the pet_ai
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5918 54d463be-8e91-2dee-dedb-b68131a5f0ec
-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);
+ }
}
// ペットによるルート
|