From bc5f5bce06657ed1899f9635d7d4b353a033569e Mon Sep 17 00:00:00 2001 From: skotlex Date: Tue, 8 Aug 2006 15:07:29 +0000 Subject: - Fixed yet again AS_SPLASHER doing full damage on all characters. Now you can use the NK split damage value in the skill_db if you want damage divided by the amount of targets rather than by 2. - Fixed crash on the battle_drain functions. - Cleaned up HAMI_CASTLE, HLIF_AVOID, HAMI_DEFENCE so that it's usable by other types of objects other than Homunculus. - Cleaned up the Asura Strike code so that the SP/Spheres/States is not consumed when the skill fails due to Fog of Wall. - When a negative delay for a skill is specified, this delay is now added on top of the character's amotion rather than adelay - Modified main.sql to make the guild table allow NULL on the emblem data. - Added file conf-tmpl/Changelog.txt git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8185 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/unit.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/map/unit.c') diff --git a/src/map/unit.c b/src/map/unit.c index 7eace7b06..c9a7c5176 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -786,6 +786,16 @@ int unit_skilluse_id2(struct block_list *src, int target_id, int skill_num, int if (target) target_id = target->id; } + if (src->type==BL_HOM) + switch(skill_num) + { //Homun-auto-target skills. + case HLIF_AVOID: + case HAMI_DEFENCE: + case HAMI_CASTLE: + target = battle_get_master(src); + if (!target) return 0; + } + if(!target && (target=map_id2bl(target_id)) == NULL ) return 0; if(src->m != target->m) -- cgit v1.2.3-70-g09d2