diff options
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 f527b3b00..05cb112e3 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1330,6 +1330,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: @@ -1412,13 +1418,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 |