summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-01-13 20:09:22 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-01-13 20:09:22 +0000
commita75856b2ff2aa87f676960cff891d1f02ca8ef3f (patch)
tree6c56327638e33ec0ffdb5ff6162adc2e7db95ac0 /src/map
parent129002e2da0595c164839a2ea7d07aab1b806e69 (diff)
downloadhercules-a75856b2ff2aa87f676960cff891d1f02ca8ef3f.tar.gz
hercules-a75856b2ff2aa87f676960cff891d1f02ca8ef3f.tar.bz2
hercules-a75856b2ff2aa87f676960cff891d1f02ca8ef3f.tar.xz
hercules-a75856b2ff2aa87f676960cff891d1f02ca8ef3f.zip
* 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
Diffstat (limited to 'src/map')
-rw-r--r--src/map/map.c14
1 files changed, 9 insertions, 5 deletions
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);