diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-18 13:25:21 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-18 13:25:21 +0000 |
commit | ff6317b65b37c6439076afd810193baf893b3611 (patch) | |
tree | 90117e8581813a31fd9ffefa858fc1a0543debe0 /src/map/mob.c | |
parent | 625630e64fe10dd9d46b87c742efbf47bff497da (diff) | |
download | hercules-ff6317b65b37c6439076afd810193baf893b3611.tar.gz hercules-ff6317b65b37c6439076afd810193baf893b3611.tar.bz2 hercules-ff6317b65b37c6439076afd810193baf893b3611.tar.xz hercules-ff6317b65b37c6439076afd810193baf893b3611.zip |
- Added a proper check to make aggressive mobs never override homun targets regardless of distance.
- Removed a bunch of homun-related variables that are not needed at all. The alive condition is removed, now the code checks for the hp value to know if the homun is alive or not.
- Cleaned up a bit the skill-id function, homun skill checks (such as delay and skill-lv learned) should be correct now.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7727 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index 72d0a8aaa..1f70c6e5b 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -789,8 +789,10 @@ static int mob_ai_sub_hard_activesearch(struct block_list *bl,va_list ap) !(status_get_mode(&md->bl)&MD_BOSS)) return 0; //Gangster paradise protection. } - case BL_HOMUNCULUS: //[orn] - case BL_MOB: + default: + if ((*target) && (*target)->type == BL_HOMUNCULUS && bl->type != BL_HOMUNCULUS) + return 0; //For some reason Homun targets are never overriden. + if((dist=distance_bl(&md->bl, bl)) < md->db->range2 && ((*target) == NULL || !check_distance_bl(&md->bl, *target, dist)) && battle_check_range(&md->bl,bl,md->db->range2) |