summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index ef60579b6..f48f4a951 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -951,7 +951,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, int skill_num, int
TBL_MOB *md = (TBL_MOB*)target;
mobskill_event(md, src, tick, -1); //Cast targetted skill event.
//temp: used to store mob's mode now.
- if (tstatus->mode&(MD_CASTSENSOR_MELEE|MD_CASTSENSOR_CHASE) &&
+ if (tstatus->mode&(MD_CASTSENSOR_IDLE|MD_CASTSENSOR_CHASE) &&
battle_check_target(target, src, BCT_ENEMY) > 0)
{
switch (md->state.skillstate) {
@@ -963,15 +963,14 @@ int unit_skilluse_id2(struct block_list *src, int target_id, int skill_num, int
md->state.aggressive = (temp&MD_ANGRY)?1:0;
md->min_chase = md->db->range3;
break;
- case MSS_ANGRY:
- case MSS_BERSERK:
- if (!(tstatus->mode&MD_CASTSENSOR_MELEE))
- break;
case MSS_IDLE:
case MSS_WALK:
+ if (!(tstatus->mode&MD_CASTSENSOR_IDLE))
+ break;
md->target_id = src->id;
md->state.aggressive = (temp&MD_ANGRY)?1:0;
md->min_chase = md->db->range3;
+ break;
}
}
}