summaryrefslogtreecommitdiff
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
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
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--src/map/map.c14
2 files changed, 10 insertions, 5 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 5041c57c2..5e92d2267 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -1,6 +1,7 @@
Date Added
2011/01/13
+ * Fixed mapflags 'restricted', 'nocommand', 'bexp' and 'jexp' still not getting completely initialized upon @reloadscript (bugreport:4710, follow up to r14548). [Ai4rei]
* Removed ladmin (remote administration tool), all related support code and the checkversion.pl tool with it's support code, which was shared with ladmin (topic:262934, related bugreport:1147, bugreport:1889, r9408 and r9610). [Ai4rei]
* Fixed chrif-packet processing considering free/unused packet IDs incorrectly as variable length packets (-1 = variable length, 0 = disabled packet). [Ai4rei]
* Added support for creating account through the console-plugin on login-server (replaces ladmin functionality unavailable through atcommands). [Ai4rei]
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);