summaryrefslogtreecommitdiff
path: root/src
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
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')
-rw-r--r--src/map/mob.h4
-rw-r--r--src/map/skill.c25
2 files changed, 21 insertions, 8 deletions
diff --git a/src/map/mob.h b/src/map/mob.h
index 8232b726a..8042c55b1 100644
--- a/src/map/mob.h
+++ b/src/map/mob.h
@@ -272,6 +272,8 @@ enum {
* Mob IDs
*/
enum mob_id {
+ MOBID_HORNET = 1004, ///< HORNET / Hornet
+
MOBID_RED_PLANT = 1078, ///< RED_PLANT / Red Plant
MOBID_BLUE_PLANT = 1079, ///< BLUE_PLANT / Blue Plant
MOBID_GREEN_PLANT = 1080, ///< GREEN_PLANT / Green Plant
@@ -285,6 +287,8 @@ enum mob_id {
MOBID_EMPELIUM = 1288, ///< EMPELIUM / Emperium
+ MOBID_GIANT_HONET = 1303, ///< GIANT_HONET / Giant Hornet
+
MOBID_TREASURE_BOX1 = 1324, ///< TREASURE_BOX1 / Treasure Chest
MOBID_TREASURE_BOX2 = 1325, ///< TREASURE_BOX2 / Treasure Chest
MOBID_TREASURE_BOX3 = 1326, ///< TREASURE_BOX3 / Treasure Chest
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);