From cba3bef47e8758ab1db43bd5ee3b6fcc5f9a498b Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 28 Jan 2013 18:42:25 -0200 Subject: New skill config After due consideration we thought it'd be in the best interest of the community to provide a switch to this official feature since it drastically change the way traps can be used Signed-off-by: shennetsind --- src/map/unit.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/map/unit.c') diff --git a/src/map/unit.c b/src/map/unit.c index 5d2a6c794..148a35782 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -350,6 +350,8 @@ int unit_walktoxy( struct block_list *bl, short x, short y, int flag) map_random_dir(bl, &ud->to_x, &ud->to_y); if(ud->walktimer != INVALID_TIMER) { + if( !battle_config.skill_trap_type && sc->data[SC_ANKLE] ) // Ankle disallows you from changing your path + return 0; // When you come to the center of the grid because the change of destination while you're walking right now // Call a function from a timer unit_walktoxy_sub ud->state.change_walk_target = 1; @@ -425,6 +427,8 @@ int unit_walktobl(struct block_list *bl, struct block_list *tbl, int range, int map_random_dir(bl, &ud->to_x, &ud->to_y); if(ud->walktimer != INVALID_TIMER) { + if( !battle_config.skill_trap_type && sc->data[SC_ANKLE] ) // Ankle disallows you from changing your path + return 0; ud->state.change_walk_target = 1; set_mobstate(bl, flag&2); return 1; @@ -931,7 +935,7 @@ int unit_can_move(struct block_list *bl) { ) return 0; - if( sc->data[SC_ANKLE] && !unit_is_walking(bl) ) // Ankle only stops you after you're done moving + if( sc->data[SC_ANKLE] && ( battle_config.skill_trap_type || !unit_is_walking(bl) ) ) // Ankle only stops you after you're done moving return 0; if (sc->opt1 > 0 && sc->opt1 != OPT1_STONEWAIT && sc->opt1 != OPT1_BURNING && (sc->opt1 != OPT1_CRYSTALIZE && bl->type != BL_MOB)) -- cgit v1.2.3-70-g09d2