diff options
author | Haru <haru@dotalux.com> | 2019-10-19 16:28:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-19 16:28:11 +0200 |
commit | 088547f831aa0cfe007b744c5b967d67e59e9858 (patch) | |
tree | a5921c7b0747f32c6544b13b27eef979b88f43e5 /src/map/unit.c | |
parent | 1f6eebe5421534c0d2a29e793ae8ce0328913c7c (diff) | |
parent | b2e1879cc22faeda1511108e912d915c90d30b6e (diff) | |
download | hercules-088547f831aa0cfe007b744c5b967d67e59e9858.tar.gz hercules-088547f831aa0cfe007b744c5b967d67e59e9858.tar.bz2 hercules-088547f831aa0cfe007b744c5b967d67e59e9858.tar.xz hercules-088547f831aa0cfe007b744c5b967d67e59e9858.zip |
Merge pull request #2556 from skyleo/homunculus_fixes
Homunculus skill fixes
Diffstat (limited to 'src/map/unit.c')
-rw-r--r-- | src/map/unit.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index 45cb7dffd..1e9433eaf 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1328,6 +1328,12 @@ static int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill if (src->type==BL_HOM) switch(skill_id) { //Homun-auto-target skills. + case HVAN_CHAOTIC: + target_id = ud->target; // Choose attack target for now + target = map->id2bl(target_id); + if (target != NULL) + break; + FALLTHROUGH // Attacking nothing, choose master as default target instead case HLIF_HEAL: case HLIF_AVOID: case HAMI_DEFENCE: @@ -1410,13 +1416,6 @@ static int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill } } - if (src->type == BL_HOM) { - // In case of homunuculus, set the sd to the homunculus' master, as needed below - struct block_list *master = battle->get_master(src); - if (master) - sd = map->id2sd(master->id); - } - if (sd) { /* temporarily disabled, awaiting for kenpachi to detail this so we can make it work properly */ #if 0 |