diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/status.c | 4 | ||||
-rw-r--r-- | src/map/status.h | 2 | ||||
-rw-r--r-- | src/map/unit.c | 9 |
3 files changed, 8 insertions, 7 deletions
diff --git a/src/map/status.c b/src/map/status.c index 397319d72..802a16473 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1633,7 +1633,9 @@ int status_calc_pc(struct map_session_data* sd,int first) //FIXME: Most of these stuff should be calculated once, but how do I fix the malloc_set above to do that? [Skotlex] status->speed = DEFAULT_WALK_SPEED; - status->mode = MD_CANMOVE|MD_CANATTACK|MD_LOOTER|MD_ASSIST|MD_AGGRESSIVE|MD_CASTSENSOR_MELEE|MD_CASTSENSOR_CHASE; + //Give them all modes except these (useful for clones) + status->mode = MD_MASK&~(MD_BOSS|MD_PLANT|MD_DETECTOR|MD_ANGRY); + status->size = (sd->class_&JOBL_BABY)?0:1; if (battle_config.character_size && pc_isriding(sd)) { //[Lupus] if (sd->class_&JOBL_BABY) { diff --git a/src/map/status.h b/src/map/status.h index 9986ad9a0..fd73b98af 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -412,7 +412,7 @@ extern int percentrefinery[5][MAX_REFINE+1]; //The last slot always has a 0% suc #define MD_LOOTER 0x0002 #define MD_AGGRESSIVE 0x0004 #define MD_ASSIST 0x0008 -#define MD_CASTSENSOR_MELEE 0x0010 +#define MD_CASTSENSOR_IDLE 0x0010 #define MD_BOSS 0x0020 #define MD_PLANT 0x0040 #define MD_CANATTACK 0x0080 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; } } } |