summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-08 15:07:29 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-08 15:07:29 +0000
commitbc5f5bce06657ed1899f9635d7d4b353a033569e (patch)
treed02e5d2e1476a542b9f6e35aaa2c06157ed59a95 /src/map/unit.c
parent98112951df16e14ac20a683d3b207dec002e9097 (diff)
downloadhercules-bc5f5bce06657ed1899f9635d7d4b353a033569e.tar.gz
hercules-bc5f5bce06657ed1899f9635d7d4b353a033569e.tar.bz2
hercules-bc5f5bce06657ed1899f9635d7d4b353a033569e.tar.xz
hercules-bc5f5bce06657ed1899f9635d7d4b353a033569e.zip
- 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
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c10
1 files changed, 10 insertions, 0 deletions
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)