summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKenpachi Developer <Kenpachi.Developer@gmx.de>2020-06-28 00:47:39 +0200
committerKenpachi Developer <Kenpachi.Developer@gmx.de>2020-06-28 00:47:39 +0200
commitc2d9356edfcc8985a6eaf36319e9cc770ffc2739 (patch)
tree91485342b044825baff94195d8e6d29f91a2a3ef /src
parent3635ef96887de748ac053e1ebd51f0deed7f9b6c (diff)
downloadhercules-c2d9356edfcc8985a6eaf36319e9cc770ffc2739.tar.gz
hercules-c2d9356edfcc8985a6eaf36319e9cc770ffc2739.tar.bz2
hercules-c2d9356edfcc8985a6eaf36319e9cc770ffc2739.tar.xz
hercules-c2d9356edfcc8985a6eaf36319e9cc770ffc2739.zip
Call unit->bl2ud2() instead of unit->bl2ud() in skill_initunitgroup() if src is of type BL_NPC
Diffstat (limited to 'src')
-rw-r--r--src/map/skill.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 25d10b825..2f429c1d6 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -17766,13 +17766,20 @@ static int skill_get_new_group_id(void)
static struct skill_unit_group *skill_initunitgroup(struct block_list *src, int count, uint16 skill_id, uint16 skill_lv, int unit_id, int limit, int interval)
{
- struct unit_data* ud = unit->bl2ud( src );
struct skill_unit_group* group;
int i;
if(!(skill_id && skill_lv)) return 0;
nullpo_retr(NULL, src);
+
+ struct unit_data *ud;
+
+ if (src->type == BL_NPC)
+ ud = unit->bl2ud2(src);
+ else
+ ud = unit->bl2ud(src);
+
nullpo_retr(NULL, ud);
// find a free spot to store the new unit group