summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-12-06 02:56:12 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-12-06 02:56:12 +0000
commit42f21dfa8d25848945f2e34e230d9baced3270b8 (patch)
treea843a78e77b1da3d478bdd8d0cb589ff5a19450e /src/map
parent9fdee1294903724b3fb035fc700313942ce65b9f (diff)
downloadhercules-42f21dfa8d25848945f2e34e230d9baced3270b8.tar.gz
hercules-42f21dfa8d25848945f2e34e230d9baced3270b8.tar.bz2
hercules-42f21dfa8d25848945f2e34e230d9baced3270b8.tar.xz
hercules-42f21dfa8d25848945f2e34e230d9baced3270b8.zip
getmapflag() fix by Kenpachi (bugreport:5097)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15011 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/script.c223
1 files changed, 114 insertions, 109 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 452212a7d..755ce8bf9 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -9616,6 +9616,7 @@ BUILDIN_FUNC(getmapflag)
switch(i) {
case MF_NOMEMO: script_pushint(st,map[m].flag.nomemo); break;
case MF_NOTELEPORT: script_pushint(st,map[m].flag.noteleport); break;
+ case MF_NOSAVE: script_pushint(st,map[m].flag.nosave); break;
case MF_NOBRANCH: script_pushint(st,map[m].flag.nobranch); break;
case MF_NOPENALTY: script_pushint(st,map[m].flag.noexppenalty); break;
case MF_NOZENYPENALTY: script_pushint(st,map[m].flag.nozenypenalty); break;
@@ -9624,26 +9625,26 @@ BUILDIN_FUNC(getmapflag)
case MF_PVP_NOGUILD: script_pushint(st,map[m].flag.pvp_noguild); break;
case MF_GVG: script_pushint(st,map[m].flag.gvg); break;
case MF_GVG_NOPARTY: script_pushint(st,map[m].flag.gvg_noparty); break;
- case MF_GVG_DUNGEON: script_pushint(st,map[m].flag.gvg_dungeon); break;
- case MF_GVG_CASTLE: script_pushint(st,map[m].flag.gvg_castle); break;
case MF_NOTRADE: script_pushint(st,map[m].flag.notrade); break;
- case MF_NODROP: script_pushint(st,map[m].flag.nodrop); break;
case MF_NOSKILL: script_pushint(st,map[m].flag.noskill); break;
case MF_NOWARP: script_pushint(st,map[m].flag.nowarp); break;
+ case MF_PARTYLOCK: script_pushint(st,map[m].flag.partylock); break;
case MF_NOICEWALL: script_pushint(st,map[m].flag.noicewall); break;
case MF_SNOW: script_pushint(st,map[m].flag.snow); break;
- case MF_CLOUDS: script_pushint(st,map[m].flag.clouds); break;
- case MF_CLOUDS2: script_pushint(st,map[m].flag.clouds2); break;
case MF_FOG: script_pushint(st,map[m].flag.fog); break;
- case MF_FIREWORKS: script_pushint(st,map[m].flag.fireworks); break;
case MF_SAKURA: script_pushint(st,map[m].flag.sakura); break;
case MF_LEAVES: script_pushint(st,map[m].flag.leaves); break;
/**
* No longer available, keeping here just in case it's back someday. [Ind]
**/
//case MF_RAIN: script_pushint(st,map[m].flag.rain); break;
- case MF_NIGHTENABLED: script_pushint(st,map[m].flag.nightenabled); break;
case MF_NOGO: script_pushint(st,map[m].flag.nogo); break;
+ case MF_CLOUDS: script_pushint(st,map[m].flag.clouds); break;
+ case MF_CLOUDS2: script_pushint(st,map[m].flag.clouds2); break;
+ case MF_FIREWORKS: script_pushint(st,map[m].flag.fireworks); break;
+ case MF_GVG_CASTLE: script_pushint(st,map[m].flag.gvg_castle); break;
+ case MF_GVG_DUNGEON: script_pushint(st,map[m].flag.gvg_dungeon); break;
+ case MF_NIGHTENABLED: script_pushint(st,map[m].flag.nightenabled); break;
case MF_NOBASEEXP: script_pushint(st,map[m].flag.nobaseexp); break;
case MF_NOJOBEXP: script_pushint(st,map[m].flag.nojobexp); break;
case MF_NOMOBLOOT: script_pushint(st,map[m].flag.nomobloot); break;
@@ -9653,12 +9654,13 @@ BUILDIN_FUNC(getmapflag)
case MF_NIGHTMAREDROP: script_pushint(st,map[m].flag.pvp_nightmaredrop); break;
case MF_RESTRICTED: script_pushint(st,map[m].flag.restricted); break;
case MF_NOCOMMAND: script_pushint(st,map[m].nocommand); break;
+ case MF_NODROP: script_pushint(st,map[m].flag.nodrop); break;
case MF_JEXP: script_pushint(st,map[m].jexp); break;
case MF_BEXP: script_pushint(st,map[m].bexp); break;
case MF_NOVENDING: script_pushint(st,map[m].flag.novending); break;
case MF_LOADEVENT: script_pushint(st,map[m].flag.loadevent); break;
case MF_NOCHAT: script_pushint(st,map[m].flag.nochat); break;
- case MF_PARTYLOCK: script_pushint(st,map[m].flag.partylock); break;
+ case MF_NOEXPPENALTY: script_pushint(st,map[m].flag.noexppenalty ); break;
case MF_GUILDLOCK: script_pushint(st,map[m].flag.guildlock); break;
case MF_TOWN: script_pushint(st,map[m].flag.town); break;
case MF_AUTOTRADE: script_pushint(st,map[m].flag.autotrade); break;
@@ -9666,7 +9668,7 @@ BUILDIN_FUNC(getmapflag)
case MF_MONSTER_NOTELEPORT: script_pushint(st,map[m].flag.monster_noteleport); break;
case MF_PVP_NOCALCRANK: script_pushint(st,map[m].flag.pvp_nocalcrank); break;
case MF_BATTLEGROUND: script_pushint(st,map[m].flag.battleground); break;
- case MF_RESET: script_pushint(st,map[m].flag.reset); break;
+ case MF_RESET: script_pushint(st,map[m].flag.reset); break;
}
}
@@ -9687,59 +9689,61 @@ BUILDIN_FUNC(setmapflag)
m = map_mapname2mapid(str);
if(m >= 0) {
switch(i) {
- case MF_NOMEMO: map[m].flag.nomemo=1; break;
- case MF_NOTELEPORT: map[m].flag.noteleport=1; break;
- case MF_NOBRANCH: map[m].flag.nobranch=1; break;
- case MF_NOPENALTY: map[m].flag.noexppenalty=1; map[m].flag.nozenypenalty=1; break;
- case MF_NOZENYPENALTY: map[m].flag.nozenypenalty=1; break;
- case MF_PVP: map[m].flag.pvp=1; break;
- case MF_PVP_NOPARTY: map[m].flag.pvp_noparty=1; break;
- case MF_PVP_NOGUILD: map[m].flag.pvp_noguild=1; break;
- case MF_GVG: map[m].flag.gvg=1; break;
- case MF_GVG_NOPARTY: map[m].flag.gvg_noparty=1; break;
- case MF_GVG_DUNGEON: map[m].flag.gvg_dungeon=1; break;
- case MF_GVG_CASTLE: map[m].flag.gvg_castle=1; break;
- case MF_NOTRADE: map[m].flag.notrade=1; break;
- case MF_NODROP: map[m].flag.nodrop=1; break;
- case MF_NOSKILL: map[m].flag.noskill=1; break;
- case MF_NOWARP: map[m].flag.nowarp=1; break;
- case MF_NOICEWALL: map[m].flag.noicewall=1; break;
- case MF_SNOW: map[m].flag.snow=1; break;
- case MF_CLOUDS: map[m].flag.clouds=1; break;
- case MF_CLOUDS2: map[m].flag.clouds2=1; break;
- case MF_FOG: map[m].flag.fog=1; break;
- case MF_FIREWORKS: map[m].flag.fireworks=1; break;
- case MF_SAKURA: map[m].flag.sakura=1; break;
- case MF_LEAVES: map[m].flag.leaves=1; break;
+ case MF_NOMEMO: map[m].flag.nomemo = 1; break;
+ case MF_NOTELEPORT: map[m].flag.noteleport = 1; break;
+ case MF_NOSAVE: map[m].flag.nosave = 1; break;
+ case MF_NOBRANCH: map[m].flag.nobranch = 1; break;
+ case MF_NOPENALTY: map[m].flag.noexppenalty = 1; map[m].flag.nozenypenalty = 1; break;
+ case MF_NOZENYPENALTY: map[m].flag.nozenypenalty = 1; break;
+ case MF_PVP: map[m].flag.pvp = 1; break;
+ case MF_PVP_NOPARTY: map[m].flag.pvp_noparty = 1; break;
+ case MF_PVP_NOGUILD: map[m].flag.pvp_noguild = 1; break;
+ case MF_GVG: map[m].flag.gvg = 1; break;
+ case MF_GVG_NOPARTY: map[m].flag.gvg_noparty = 1; break;
+ case MF_NOTRADE: map[m].flag.notrade = 1; break;
+ case MF_NOSKILL: map[m].flag.noskill = 1; break;
+ case MF_NOWARP: map[m].flag.nowarp = 1; break;
+ case MF_PARTYLOCK: map[m].flag.partylock = 1; break;
+ case MF_NOICEWALL: map[m].flag.noicewall = 1; break;
+ case MF_SNOW: map[m].flag.snow = 1; break;
+ case MF_FOG: map[m].flag.fog = 1; break;
+ case MF_SAKURA: map[m].flag.sakura = 1; break;
+ case MF_LEAVES: map[m].flag.leaves = 1; break;
/**
* No longer available, keeping here just in case it's back someday. [Ind]
- **/
- //case MF_RAIN: map[m].flag.rain=1; break;
- case MF_NIGHTENABLED: map[m].flag.nightenabled=1; break;
- case MF_NOGO: map[m].flag.nogo=1; break;
- case MF_NOBASEEXP: map[m].flag.nobaseexp=1; break;
- case MF_NOJOBEXP: map[m].flag.nojobexp=1; break;
- case MF_NOMOBLOOT: map[m].flag.nomobloot=1; break;
- case MF_NOMVPLOOT: map[m].flag.nomvploot=1; break;
- case MF_NORETURN: map[m].flag.noreturn=1; break;
- case MF_NOWARPTO: map[m].flag.nowarpto=1; break;
- case MF_NIGHTMAREDROP: map[m].flag.pvp_nightmaredrop=1; break;
- case MF_RESTRICTED: map[m].flag.restricted=1; break;
+ **/
+ //case MF_RAIN: map[m].flag.rain = 1; break;
+ case MF_NOGO: map[m].flag.nogo = 1; break;
+ case MF_CLOUDS: map[m].flag.clouds = 1; break;
+ case MF_CLOUDS2: map[m].flag.clouds2 = 1; break;
+ case MF_FIREWORKS: map[m].flag.fireworks = 1; break;
+ case MF_GVG_CASTLE: map[m].flag.gvg_castle = 1; break;
+ case MF_GVG_DUNGEON: map[m].flag.gvg_dungeon = 1; break;
+ case MF_NIGHTENABLED: map[m].flag.nightenabled = 1; break;
+ case MF_NOBASEEXP: map[m].flag.nobaseexp = 1; break;
+ case MF_NOJOBEXP: map[m].flag.nojobexp = 1; break;
+ case MF_NOMOBLOOT: map[m].flag.nomobloot = 1; break;
+ case MF_NOMVPLOOT: map[m].flag.nomvploot = 1; break;
+ case MF_NORETURN: map[m].flag.noreturn = 1; break;
+ case MF_NOWARPTO: map[m].flag.nowarpto = 1; break;
+ case MF_NIGHTMAREDROP: map[m].flag.pvp_nightmaredrop = 1; break;
+ case MF_RESTRICTED: map[m].flag.restricted = 1; break;
case MF_NOCOMMAND: map[m].nocommand = (!val || atoi(val) <= 0) ? 100 : atoi(val); break;
+ case MF_NODROP: map[m].flag.nodrop = 1; break;
case MF_JEXP: map[m].jexp = (!val || atoi(val) < 0) ? 100 : atoi(val); break;
case MF_BEXP: map[m].bexp = (!val || atoi(val) < 0) ? 100 : atoi(val); break;
- case MF_NOVENDING: map[m].flag.novending=1; break;
- case MF_LOADEVENT: map[m].flag.loadevent=1; break;
- case MF_NOCHAT: map[m].flag.nochat=1; break;
- case MF_PARTYLOCK: map[m].flag.partylock=1; break;
- case MF_GUILDLOCK: map[m].flag.guildlock=1; break;
- case MF_TOWN: map[m].flag.town=1; break;
- case MF_AUTOTRADE: map[m].flag.autotrade=1; break;
- case MF_ALLOWKS: map[m].flag.allowks=1; break;
- case MF_MONSTER_NOTELEPORT: map[m].flag.monster_noteleport=1; break;
- case MF_PVP_NOCALCRANK: map[m].flag.pvp_nocalcrank=1; break;
- case MF_BATTLEGROUND: map[m].flag.battleground = (!val || atoi(val) < 0 || atoi(val) > 2) ? 1 : atoi(val); break;
- case MF_RESET: map[m].flag.reset=1; break;
+ case MF_NOVENDING: map[m].flag.novending = 1; break;
+ case MF_LOADEVENT: map[m].flag.loadevent = 1; break;
+ case MF_NOCHAT: map[m].flag.nochat = 1; break;
+ case MF_NOEXPPENALTY: map[m].flag.noexppenalty = 1; break;
+ case MF_GUILDLOCK: map[m].flag.guildlock = 1; break;
+ case MF_TOWN: map[m].flag.town = 1; break;
+ case MF_AUTOTRADE: map[m].flag.autotrade = 1; break;
+ case MF_ALLOWKS: map[m].flag.allowks = 1; break;
+ case MF_MONSTER_NOTELEPORT: map[m].flag.monster_noteleport = 1; break;
+ case MF_PVP_NOCALCRANK: map[m].flag.pvp_nocalcrank = 1; break;
+ case MF_BATTLEGROUND: (!val || atoi(val) < 0 || atoi(val) > 2) ? 1 : atoi(val); break;
+ case MF_RESET: map[m].flag.reset = 1; break;
}
}
@@ -9756,60 +9760,61 @@ BUILDIN_FUNC(removemapflag)
m = map_mapname2mapid(str);
if(m >= 0) {
switch(i) {
- case MF_NOMEMO: map[m].flag.nomemo=0; break;
- case MF_NOTELEPORT: map[m].flag.noteleport=0; break;
- case MF_NOSAVE: map[m].flag.nosave=0; break;
- case MF_NOBRANCH: map[m].flag.nobranch=0; break;
- case MF_NOPENALTY: map[m].flag.noexppenalty=0; map[m].flag.nozenypenalty=0; break;
- case MF_PVP: map[m].flag.pvp=0; break;
- case MF_PVP_NOPARTY: map[m].flag.pvp_noparty=0; break;
- case MF_PVP_NOGUILD: map[m].flag.pvp_noguild=0; break;
- case MF_GVG: map[m].flag.gvg=0; break;
- case MF_GVG_NOPARTY: map[m].flag.gvg_noparty=0; break;
- case MF_GVG_DUNGEON: map[m].flag.gvg_dungeon=0; break;
- case MF_GVG_CASTLE: map[m].flag.gvg_castle=0; break;
- case MF_NOZENYPENALTY: map[m].flag.nozenypenalty=0; break;
- case MF_NOTRADE: map[m].flag.notrade=0; break;
- case MF_NODROP: map[m].flag.nodrop=0; break;
- case MF_NOSKILL: map[m].flag.noskill=0; break;
- case MF_NOWARP: map[m].flag.nowarp=0; break;
- case MF_NOICEWALL: map[m].flag.noicewall=0; break;
- case MF_SNOW: map[m].flag.snow=0; break;
- case MF_CLOUDS: map[m].flag.clouds=0; break;
- case MF_CLOUDS2: map[m].flag.clouds2=0; break;
- case MF_FOG: map[m].flag.fog=0; break;
- case MF_FIREWORKS: map[m].flag.fireworks=0; break;
- case MF_SAKURA: map[m].flag.sakura=0; break;
- case MF_LEAVES: map[m].flag.leaves=0; break;
+ case MF_NOMEMO: map[m].flag.nomemo = 0; break;
+ case MF_NOTELEPORT: map[m].flag.noteleport = 0; break;
+ case MF_NOSAVE: map[m].flag.nosave = 0; break;
+ case MF_NOBRANCH: map[m].flag.nobranch = 0; break;
+ case MF_NOPENALTY: map[m].flag.noexppenalty = 0; map[m].flag.nozenypenalty = 0; break;
+ case MF_NOZENYPENALTY: map[m].flag.nozenypenalty = 0; break;
+ case MF_PVP: map[m].flag.pvp = 0; break;
+ case MF_PVP_NOPARTY: map[m].flag.pvp_noparty = 0; break;
+ case MF_PVP_NOGUILD: map[m].flag.pvp_noguild = 0; break;
+ case MF_GVG: map[m].flag.gvg = 0; break;
+ case MF_GVG_NOPARTY: map[m].flag.gvg_noparty = 0; break;
+ case MF_NOTRADE: map[m].flag.notrade = 0; break;
+ case MF_NOSKILL: map[m].flag.noskill = 0; break;
+ case MF_NOWARP: map[m].flag.nowarp = 0; break;
+ case MF_PARTYLOCK: map[m].flag.partylock = 0; break;
+ case MF_NOICEWALL: map[m].flag.noicewall = 0; break;
+ case MF_SNOW: map[m].flag.snow = 0; break;
+ case MF_FOG: map[m].flag.fog = 0; break;
+ case MF_SAKURA: map[m].flag.sakura = 0; break;
+ case MF_LEAVES: map[m].flag.leaves = 0; break;
/**
* No longer available, keeping here just in case it's back someday. [Ind]
- **/
- //case MF_RAIN: map[m].flag.rain=0; break;
- case MF_NIGHTENABLED: map[m].flag.nightenabled=0; break;
- case MF_NOGO: map[m].flag.nogo=0; break;
- case MF_NOBASEEXP: map[m].flag.nobaseexp=0; break;
- case MF_NOJOBEXP: map[m].flag.nojobexp=0; break;
- case MF_NOMOBLOOT: map[m].flag.nomobloot=0; break;
- case MF_NOMVPLOOT: map[m].flag.nomvploot=0; break;
- case MF_NORETURN: map[m].flag.noreturn=0; break;
- case MF_NOWARPTO: map[m].flag.nowarpto=0; break;
- case MF_NIGHTMAREDROP: map[m].flag.pvp_nightmaredrop=0; break;
- case MF_RESTRICTED: map[m].flag.restricted=0; break;
- case MF_NOCOMMAND: map[m].nocommand=0; break;
- case MF_JEXP: map[m].jexp=100; break;
- case MF_BEXP: map[m].bexp=100; break;
- case MF_NOVENDING: map[m].flag.novending=0; break;
- case MF_LOADEVENT: map[m].flag.loadevent=0; break;
- case MF_NOCHAT: map[m].flag.nochat=0; break;
- case MF_PARTYLOCK: map[m].flag.partylock=0; break;
- case MF_GUILDLOCK: map[m].flag.guildlock=0; break;
- case MF_TOWN: map[m].flag.town=0; break;
- case MF_AUTOTRADE: map[m].flag.autotrade=0; break;
- case MF_ALLOWKS: map[m].flag.allowks=0; break;
- case MF_MONSTER_NOTELEPORT: map[m].flag.monster_noteleport=0; break;
- case MF_PVP_NOCALCRANK: map[m].flag.pvp_nocalcrank=0; break;
- case MF_BATTLEGROUND: map[m].flag.battleground=0; break;
- case MF_RESET: map[m].flag.reset=0; break;
+ **/
+ //case MF_RAIN: map[m].flag.rain = 0; break;
+ case MF_NOGO: map[m].flag.nogo = 0; break;
+ case MF_CLOUDS: map[m].flag.clouds = 0; break;
+ case MF_CLOUDS2: map[m].flag.clouds2 = 0; break;
+ case MF_FIREWORKS: map[m].flag.fireworks = 0; break;
+ case MF_GVG_CASTLE: map[m].flag.gvg_castle = 0; break;
+ case MF_GVG_DUNGEON: map[m].flag.gvg_dungeon = 0; break;
+ case MF_NIGHTENABLED: map[m].flag.nightenabled = 0; break;
+ case MF_NOBASEEXP: map[m].flag.nobaseexp = 0; break;
+ case MF_NOJOBEXP: map[m].flag.nojobexp = 0; break;
+ case MF_NOMOBLOOT: map[m].flag.nomobloot = 0; break;
+ case MF_NOMVPLOOT: map[m].flag.nomvploot = 0; break;
+ case MF_NORETURN: map[m].flag.noreturn = 0; break;
+ case MF_NOWARPTO: map[m].flag.nowarpto = 0; break;
+ case MF_NIGHTMAREDROP: map[m].flag.pvp_nightmaredrop = 0; break;
+ case MF_RESTRICTED: map[m].flag.restricted = 0; break;
+ case MF_NOCOMMAND: map[m].nocommand = 0; break;
+ case MF_NODROP: map[m].flag.nodrop = 0; break;
+ case MF_JEXP: map[m].jexp = 0; break;
+ case MF_BEXP: map[m].bexp = 0; break;
+ case MF_NOVENDING: map[m].flag.novending = 0; break;
+ case MF_LOADEVENT: map[m].flag.loadevent = 0; break;
+ case MF_NOCHAT: map[m].flag.nochat = 0; break;
+ case MF_NOEXPPENALTY: map[m].flag.noexppenalty = 0; break;
+ case MF_GUILDLOCK: map[m].flag.guildlock = 0; break;
+ case MF_TOWN: map[m].flag.town = 0; break;
+ case MF_AUTOTRADE: map[m].flag.autotrade = 0; break;
+ case MF_ALLOWKS: map[m].flag.allowks = 0; break;
+ case MF_MONSTER_NOTELEPORT: map[m].flag.monster_noteleport = 0; break;
+ case MF_PVP_NOCALCRANK: map[m].flag.pvp_nocalcrank = 0; break;
+ case MF_BATTLEGROUND: map[m].flag.battleground = 0; break;
+ case MF_RESET: map[m].flag.reset = 0; break;
}
}