Skip to content

Commit

Permalink
Adjustment to skill_trap_type battle/skill config
Browse files Browse the repository at this point in the history
The effect of the config is now restricted to GvG.
http://hercules.ws/board/tracker/issue-4832-hunter-ht-anklesnare-serious-bug/

Signed-off-by: shennetsind <ind@henn.et>
  • Loading branch information
shennetsind committed Feb 8, 2013
1 parent 54d0583 commit 4c9bfed
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions conf/battle/skill.conf
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ invincible.nodamage: no
// Default: yes
dancing_weaponswitch_fix: yes

// Skill Trap Type
// 0: (official) traps only makes player unable to move after its walk path is complete, and it activates other traps on the way.
// 1: trap makes player stop moving right when stepping over it.
// Skill Trap Type (GvG)
// 0: (official) traps in GvG only makes player unable to move after its walk path is complete, and it activates other traps on the way.
// 1: trap in GvG makes player stop moving right when stepping over it.
skill_trap_type: 0
2 changes: 1 addition & 1 deletion src/map/skill.c
Original file line number Diff line number Diff line change
Expand Up @@ -11459,7 +11459,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
const struct TimerData* td = tsc->data[type]?get_timer(tsc->data[type]->timer):NULL;
if( td )
sec = DIFF_TICK(td->tick, tick);
if( sg->unit_id == UNT_MANHOLE || battle_config.skill_trap_type ) {
if( sg->unit_id == UNT_MANHOLE || battle_config.skill_trap_type || !map_flag_gvg(src->bl.m) ) {
unit_movepos(bl, src->bl.x, src->bl.y, 0, 0);
clif_fixpos(bl);
}
Expand Down
2 changes: 1 addition & 1 deletion src/map/status.c
Original file line number Diff line number Diff line change
Expand Up @@ -8663,7 +8663,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
unit_stop_walking(bl,1);
break;
case SC_ANKLE:
if( battle_config.skill_trap_type )
if( battle_config.skill_trap_type || !map_flag_gvg(bl->m) )
unit_stop_walking(bl,1);
break;
case SC_HIDING:
Expand Down
6 changes: 3 additions & 3 deletions src/map/unit.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ 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 && sc->data[SC_ANKLE] ) // Ankle disallows you from changing your path
if( !battle_config.skill_trap_type && sc && map_flag_gvg(bl->m) && 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
Expand Down Expand Up @@ -430,7 +430,7 @@ 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 && sc->data[SC_ANKLE] ) // Ankle disallows you from changing your path
if( !battle_config.skill_trap_type && sc && map_flag_gvg(bl->m) && sc->data[SC_ANKLE] ) // Ankle disallows you from changing your path
return 0;
ud->state.change_walk_target = 1;
set_mobstate(bl, flag&2);
Expand Down Expand Up @@ -938,7 +938,7 @@ int unit_can_move(struct block_list *bl) {
)
return 0;

if( sc->data[SC_ANKLE] && ( battle_config.skill_trap_type || !unit_is_walking(bl) ) ) // Ankle only stops you after you're done moving
if( sc->data[SC_ANKLE] && ( battle_config.skill_trap_type || ( !map_flag_gvg(bl->m) && !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))
Expand Down

0 comments on commit 4c9bfed

Please sign in to comment.