summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-12-15 00:42:40 +0100
committerHaru <haru@dotalux.com>2015-12-28 18:35:59 +0100
commitf469cad82f1ee643899130d935c6f4979bfb252d (patch)
tree5ff566e3aa2c22837a107f3dddb567d70a127bbe /src/map/skill.c
parent758fe288628bf13d3c45ac35d9c51199d35af652 (diff)
downloadhercules-f469cad82f1ee643899130d935c6f4979bfb252d.tar.gz
hercules-f469cad82f1ee643899130d935c6f4979bfb252d.tar.bz2
hercules-f469cad82f1ee643899130d935c6f4979bfb252d.tar.xz
hercules-f469cad82f1ee643899130d935c6f4979bfb252d.zip
Added Summon Legion-related monsters to the mob_id enum
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 260bc47db..ce6f2f367 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -9792,18 +9792,27 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
break;
case MH_SUMMON_LEGION:
{
- int summons[5] = {1004, 1303, 1303, 1994, 1994};
- int qty[5] = {3 , 3 , 4 , 4 , 5};
- struct mob_data *summon_md;
+ struct {
+ int mob_id;
+ int quantity;
+ } summons[5] = {
+ { MOBID_HORNET, 3 },
+ { MOBID_GIANT_HONET, 3 },
+ { MOBID_GIANT_HONET, 4 },
+ { MOBID_LUCIOLA_VESPA, 4 },
+ { MOBID_LUCIOLA_VESPA, 5 },
+ };
int i, dummy = 0;
+ Assert_retb(skill_lv < ARRAYLENGTH(summons));
- i = map->foreachinmap(skill->check_condition_mob_master_sub, src->m, BL_MOB, src->id, summons[skill_lv-1], skill_id, &dummy);
- if(i >= qty[skill_lv-1])
+ i = map->foreachinmap(skill->check_condition_mob_master_sub, src->m, BL_MOB, src->id, summons[skill_lv-1].mob_id, skill_id, &dummy);
+ if(i >= summons[skill_lv-1].quantity)
break;
- for(i=0; i<qty[skill_lv - 1]; i++){ //easy way
- summon_md = mob->once_spawn_sub(src, src->m, src->x, src->y, status->get_name(src), summons[skill_lv - 1], "", SZ_SMALL, AI_ATTACK);
- if (summon_md) {
+ for (i = 0; i < summons[skill_lv-1].quantity; i++) {
+ struct mob_data *summon_md = mob->once_spawn_sub(src, src->m, src->x, src->y, status->get_name(src),
+ summons[skill_lv-1].mob_id, "", SZ_SMALL, AI_ATTACK);
+ if (summon_md != NULL) {
summon_md->master_id = src->id;
if (summon_md->deletetimer != INVALID_TIMER)
timer->delete(summon_md->deletetimer, mob->timer_delete);