diff options
author | shennetsind <ind@henn.et> | 2013-12-09 20:28:19 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-12-09 20:28:19 -0200 |
commit | b4136dd3d4779d80df18f84929c576c8080cd7b8 (patch) | |
tree | d38885e73698210ea2411093db594f8f2ebd42ea /src/map/script.c | |
parent | 4727cc95528be094cd2c1c3fbb3c92b7873c809b (diff) | |
download | hercules-b4136dd3d4779d80df18f84929c576c8080cd7b8.tar.gz hercules-b4136dd3d4779d80df18f84929c576c8080cd7b8.tar.bz2 hercules-b4136dd3d4779d80df18f84929c576c8080cd7b8.tar.xz hercules-b4136dd3d4779d80df18f84929c576c8080cd7b8.zip |
Fixed some logic errors
Special Thanks to Haru
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/map/script.c b/src/map/script.c index 764ae743a..1da6fb1c2 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -10669,13 +10669,14 @@ BUILDIN(setmapflag) { case MF_NORETURN: map->list[m].flag.noreturn = 1; break; case MF_NOWARPTO: map->list[m].flag.nowarpto = 1; break; case MF_NIGHTMAREDROP: map->list[m].flag.pvp_nightmaredrop = 1; break; - case MF_ZONE: { - char zone[6] = "zone\0"; - char empty[1] = "\0"; - char params[MAP_ZONE_MAPFLAG_LENGTH]; - memcpy(params, val2, MAP_ZONE_MAPFLAG_LENGTH); - npc->parse_mapflag(map->list[m].name, empty, zone, params, empty, empty, empty); - } + case MF_ZONE: + if( val2 ) { + char zone[6] = "zone\0"; + char empty[1] = "\0"; + char params[MAP_ZONE_MAPFLAG_LENGTH]; + memcpy(params, val2, MAP_ZONE_MAPFLAG_LENGTH); + npc->parse_mapflag(map->list[m].name, empty, zone, params, empty, empty, empty); + } break; case MF_NOCOMMAND: map->list[m].nocommand = (val <= 0) ? 100 : val; break; case MF_NODROP: map->list[m].flag.nodrop = 1; break; |