summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2020-03-08 19:05:14 +0100
committerGitHub <noreply@github.com>2020-03-08 19:05:14 +0100
commitc391e8ce0dbf1c3e88a94afe8225865ef74e2711 (patch)
tree0e7aca7324d1d0197597e15baf047ed38332147b /src
parentf1ad12235f4d8a3c552d66f231225eeb9186572c (diff)
parentdcf5a51298916308ecb161911439365b27205c3e (diff)
downloadhercules-c391e8ce0dbf1c3e88a94afe8225865ef74e2711.tar.gz
hercules-c391e8ce0dbf1c3e88a94afe8225865ef74e2711.tar.bz2
hercules-c391e8ce0dbf1c3e88a94afe8225865ef74e2711.tar.xz
hercules-c391e8ce0dbf1c3e88a94afe8225865ef74e2711.zip
Merge pull request #2612 from skyleo/basilica_target_check
Fix Basilica unintentionally restraining boss mobs
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 40e7d3161..c057ad81a 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -6601,10 +6601,6 @@ static int battle_check_target(struct block_list *src, struct block_list *target
m = target->m;
- if (flag & BCT_ENEMY && (map->getcell(m, src, src->x, src->y, CELL_CHKBASILICA) || map->getcell(m, src, target->x, target->y, CELL_CHKBASILICA))) {
- return -1;
- }
-
//t_bl/s_bl hold the 'master' of the attack, while src/target are the actual
//objects involved.
if( (t_bl = battle->get_master(target)) == NULL )
@@ -6613,6 +6609,11 @@ static int battle_check_target(struct block_list *src, struct block_list *target
if( (s_bl = battle->get_master(src)) == NULL )
s_bl = src;
+ if ((flag & BCT_ENEMY) != 0 && (status_get_mode(s_bl) & MD_BOSS) == 0 && (map->getcell(m, src, src->x, src->y, CELL_CHKBASILICA) != 0
+ || map->getcell(m, src, target->x, target->y, CELL_CHKBASILICA) != 0)) {
+ return -1;
+ }
+
if (s_bl->type == BL_PC) {
const struct map_session_data *s_sd = BL_UCCAST(BL_PC, s_bl);
switch (t_bl->type) {