summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-01-30 19:40:17 -0200
committershennetsind <ind@henn.et>2013-01-30 19:40:17 -0200
commit3ed04f57c71a0b3486bb96b8319f852028dc8c7e (patch)
tree4698275bdd93ab2ad4ffba35394187149dc49f4b /src/map
parent87a965fa2950ccd5b4653311800a13437564ef0e (diff)
downloadhercules-3ed04f57c71a0b3486bb96b8319f852028dc8c7e.tar.gz
hercules-3ed04f57c71a0b3486bb96b8319f852028dc8c7e.tar.bz2
hercules-3ed04f57c71a0b3486bb96b8319f852028dc8c7e.tar.xz
hercules-3ed04f57c71a0b3486bb96b8319f852028dc8c7e.zip
Fixing skill_trap_type bug, special thanks to exneval
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/unit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 148a35782..b7da5629f 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -350,7 +350,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->data[SC_ANKLE] ) // Ankle disallows you from changing your path
+ if( !battle_config.skill_trap_type && sc && 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
@@ -427,7 +427,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->data[SC_ANKLE] ) // Ankle disallows you from changing your path
+ if( !battle_config.skill_trap_type && sc && sc->data[SC_ANKLE] ) // Ankle disallows you from changing your path
return 0;
ud->state.change_walk_target = 1;
set_mobstate(bl, flag&2);