summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKenpachi Developer <Kenpachi.Developer@gmx.de>2020-10-31 06:11:26 +0100
committerJesusaves <cpntb1@ymail.com>2021-02-14 15:55:30 -0300
commit8a05507c7ac9cf9e5c6beed10286102346166299 (patch)
treee23f14a34eab7ab6ebeb63d38d83570a9c1a574e /src
parent62b161fdb13bf6336d919ff9088548b652761e05 (diff)
downloadhercules-8a05507c7ac9cf9e5c6beed10286102346166299.tar.gz
hercules-8a05507c7ac9cf9e5c6beed10286102346166299.tar.bz2
hercules-8a05507c7ac9cf9e5c6beed10286102346166299.tar.xz
hercules-8a05507c7ac9cf9e5c6beed10286102346166299.zip
Fix summoned monsters wont follow masters of type BL_PC
Diffstat (limited to 'src')
-rw-r--r--src/map/mob.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index ca1ce3585..8b5609824 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1366,7 +1366,7 @@ static int mob_ai_sub_hard_slavemob(struct mob_data *md, int64 tick)
mob_stop_attack(md);
const struct mob_data *m_md = BL_CCAST(BL_MOB, bl); // Can be NULL due to master being BL_PC
// If master is BL_MOB and in battle, lock & chase to master's target instead, unless configured not to.
- if ((battle_config.slave_chase_masters_chasetarget == 0 || (m_md != NULL && !mob->is_in_battle_state(m_md)))
+ if ((bl->type == BL_PC || battle_config.slave_chase_masters_chasetarget == 0 || (m_md != NULL && !mob->is_in_battle_state(m_md)))
&& map->search_freecell(&md->bl, bl->m, &x, &y, MOB_SLAVEDISTANCE, MOB_SLAVEDISTANCE, 1)
&& unit->walktoxy(&md->bl, x, y, 0))
return 1;