- Cleaned up and used mob_skill_event function when hit by a ground-skill.

- Added one grace range in the mob_loot search function which should fix mob_can_reach failing when invoked with the same distance that distance_bl returned.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6475 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2006-05-04 20:19:03 +00:00
parent 0003ede9a6
commit 96bafcccea
3 changed files with 6 additions and 13 deletions

View File

@ -4,6 +4,9 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/05/04 2006/05/04
* Added one grace range in the mob_loot search function which should fix
mob_can_reach failing when invoked with the same distance that distance_bl
returned. [Skotlex]
* Stun time for using ES magic on non-mobs reduced to 0.5 secs. [Skotlex] * Stun time for using ES magic on non-mobs reduced to 0.5 secs. [Skotlex]
* Eska is now usable on bosses. [Skotlex] * Eska is now usable on bosses. [Skotlex]
* Swoo will stun you if attempted on an already 'swooned' enemy. [Skotlex] * Swoo will stun you if attempted on an already 'swooned' enemy. [Skotlex]

View File

@ -864,7 +864,7 @@ static int mob_ai_sub_hard_lootsearch(struct block_list *bl,va_list ap)
target= va_arg(ap,struct block_list**); target= va_arg(ap,struct block_list**);
if((dist=distance_bl(&md->bl, bl)) < md->db->range2 && if((dist=distance_bl(&md->bl, bl)) < md->db->range2 &&
mob_can_reach(md,bl,dist, MSS_LOOT) && mob_can_reach(md,bl,dist+1, MSS_LOOT) &&
((*target) == NULL || !check_distance_bl(&md->bl, *target, dist)) //New target closer than previous one. ((*target) == NULL || !check_distance_bl(&md->bl, *target, dist)) //New target closer than previous one.
) { ) {
(*target) = bl; (*target) = bl;

View File

@ -7096,18 +7096,8 @@ int skill_unit_onplace_timer(struct skill_unit *src,struct block_list *bl,unsign
sc->data[SC_MAGICPOWER].timer = -1; sc->data[SC_MAGICPOWER].timer = -1;
} }
if (bl->type == BL_MOB && ss != bl) { /* ƒXƒLƒŽg—p?Œ?ÌMOBƒXƒLƒ */ if (bl->type == BL_MOB && ss != bl)
struct mob_data *md = (struct mob_data *)bl; mobskill_event((TBL_MOB*)bl, ss, tick, MSC_SKILLUSED|(skillid<<16));
if (!md) return 0;
if (battle_config.mob_changetarget_byskill == 1) {
int target = md->target_id;
if (ss->type == BL_PC)
md->target_id = ss->id;
mobskill_use(md, tick, MSC_SKILLUSED|(skillid << 16));
md->target_id = target;
} else
mobskill_use(md, tick, MSC_SKILLUSED|(skillid << 16));
}
return skillid; return skillid;
} }