summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-09-12 13:15:54 -0300
committerJesusaves <cpntb1@ymail.com>2020-09-12 13:15:54 -0300
commita087ad9e45ac64f2ae6258f729a68bcc224fe305 (patch)
treee5faa695f9f0173f73d220da332d5cbd7a8876b2 /src/map/unit.c
parent1443f47ca63972f737bd9cc0322f77dc416ff2a0 (diff)
downloadhercules-r12.5_BUGGY.tar.gz
hercules-r12.5_BUGGY.tar.bz2
hercules-r12.5_BUGGY.tar.xz
hercules-r12.5_BUGGY.zip
This is Hercules v2019.10.20r12.5_BUGGY
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c13
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