From a75856b2ff2aa87f676960cff891d1f02ca8ef3f Mon Sep 17 00:00:00 2001 From: ai4rei Date: Thu, 13 Jan 2011 20:09:22 +0000 Subject: * Fixed mapflags 'restricted', 'nocommand', 'bexp' and 'jexp' still not getting completely initialized upon @reloadscript (bugreport:4710, follow up to r14548). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14668 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/map.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/map/map.c b/src/map/map.c index b1e92a62d..d6d8dd657 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -2804,8 +2804,16 @@ void map_flags_init(void) for( i = 0; i < map_num; i++ ) { + // mapflags memset(&map[i].flag, 0, sizeof(map[i].flag)); + // additional mapflag data + map[i].zone = 0; // restricted mapflag zone + map[i].nocommand = 0; // nocommand mapflag level + map[i].bexp = 100; // per map base exp multiplicator + map[i].jexp = 100; // per map job exp multiplicator + + // adjustments if( battle_config.pk_mode ) map[i].flag.pvp = 1; // make all maps pvp for pk_mode [Valaris] } @@ -2975,11 +2983,7 @@ int map_readallmaps (void) map[i].bxs = (map[i].xs + BLOCK_SIZE - 1) / BLOCK_SIZE; map[i].bys = (map[i].ys + BLOCK_SIZE - 1) / BLOCK_SIZE; - - // default experience multiplicators - map[i].jexp = 100; - map[i].bexp = 100; - + size = map[i].bxs * map[i].bys * sizeof(struct block_list*); map[i].block = (struct block_list**)aCalloc(size, 1); map[i].block_mob = (struct block_list**)aCalloc(size, 1); -- cgit v1.2.3-60-g2f50