summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2019-08-26 18:55:44 -0400
committergumi <git@gumi.ca>2019-08-26 18:55:44 -0400
commit84d2758d2f343d0493eae16adc5e80ebfefb0b14 (patch)
tree8528b912cd731cd9a04e1930df74d70a78269064
parentac0d6abbcce17a9e2ed51a82271a618433e450e5 (diff)
downloadtmwa-84d2758d2f343d0493eae16adc5e80ebfefb0b14.tar.gz
tmwa-84d2758d2f343d0493eae16adc5e80ebfefb0b14.tar.bz2
tmwa-84d2758d2f343d0493eae16adc5e80ebfefb0b14.tar.xz
tmwa-84d2758d2f343d0493eae16adc5e80ebfefb0b14.zip
allow summoned mobs to also have slaves
-rw-r--r--src/map/mob.cpp5
-rw-r--r--src/map/skill.cpp7
2 files changed, 6 insertions, 6 deletions
diff --git a/src/map/mob.cpp b/src/map/mob.cpp
index 4c689d9..ea9ec34 100644
--- a/src/map/mob.cpp
+++ b/src/map/mob.cpp
@@ -1863,7 +1863,7 @@ void mob_ai_sub_hard(dumb_ptr<block_list> bl, tick_t tick)
if (((bl = map_id2bl(md->last_master_id)) != nullptr && md->bl_m != bl->bl_m) || (bl = map_id2bl(md->last_master_id)) == nullptr)
{
md->last_master_id = BlockId();
- md->parent_id = BlockId();
+ md->master_id = BlockId();
md->mode = get_mob_db(md->mob_class).mode;
md->target_id = BlockId();
md->attacked_id = BlockId();
@@ -3320,9 +3320,6 @@ int mobskill_use(dumb_ptr<mob_data> md, tick_t tick,
if (battle_config.mob_skill_use == 0 || md->skilltimer)
return 0;
- if (md->master_id && md->parent_id) // slaves of summoned mobs
- return 0;
-
for (mob_skill& msii : ms)
{
tick_t& sdii = md->skilldelayup[&msii - &ms.front()];
diff --git a/src/map/skill.cpp b/src/map/skill.cpp
index 789dd8a..05399c2 100644
--- a/src/map/skill.cpp
+++ b/src/map/skill.cpp
@@ -532,7 +532,7 @@ int skill_castend_nodamage_id(dumb_ptr<block_list> src, dumb_ptr<block_list> bl,
switch (skillid)
{
case SkillID::NPC_SUMMONSLAVE:
- if (md && !md->parent_id)
+ if (md)
{
mob_summonslave(md,
md->skillidx->val,
@@ -542,7 +542,10 @@ int skill_castend_nodamage_id(dumb_ptr<block_list> src, dumb_ptr<block_list> bl,
break;
case SkillID::NPC_EMOTION:
- if (md)
+ if (dstsd)
+ clif_emotion(dstsd,
+ md->skillidx->val[0]);
+ else if (md)
clif_emotion(md,
md->skillidx->val[0]);
break;