summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorLupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-27 05:55:23 +0000
committerLupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-27 05:55:23 +0000
commit3dc2a55dcdf7b3919b6024d7a9aeec26a7416b6f (patch)
tree0a80608974a2a2151121f9afe8d8ee7da07fdb41 /src/map
parent51b1d5af470c1f34d9ba99c3f2c8c9b8dbb3e5af (diff)
downloadhercules-3dc2a55dcdf7b3919b6024d7a9aeec26a7416b6f.tar.gz
hercules-3dc2a55dcdf7b3919b6024d7a9aeec26a7416b6f.tar.bz2
hercules-3dc2a55dcdf7b3919b6024d7a9aeec26a7416b6f.tar.xz
hercules-3dc2a55dcdf7b3919b6024d7a9aeec26a7416b6f.zip
updated 'setmapflag' script command
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6304 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/script.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 81b98fa55..40cb81e93 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -607,7 +607,7 @@ struct {
{buildin_detachrid,"detachrid",""},
{buildin_isloggedin,"isloggedin","i"},
{buildin_setmapflagnosave,"setmapflagnosave","ssii"},
- {buildin_setmapflag,"setmapflag","si"},
+ {buildin_setmapflag,"setmapflag","si*"},
{buildin_removemapflag,"removemapflag","si"},
{buildin_pvpon,"pvpon","s"},
{buildin_pvpoff,"pvpoff","s"},
@@ -6629,7 +6629,7 @@ enum { MF_NOMEMO,MF_NOTELEPORT,MF_NOSAVE,MF_NOBRANCH,MF_NOPENALTY,MF_NOZENYPENA
MF_NOWARP,MF_FREE,MF_NOICEWALL,MF_SNOW,MF_FOG,MF_SAKURA,MF_LEAVES,MF_RAIN,
MF_INDOORS,MF_NOGO,MF_CLOUDS,MF_CLOUDS2,MF_FIREWORKS,MF_GVG_CASTLE,MF_GVG_DUNGEON,MF_NIGHTENABLED,
MF_NOBASEEXP, MF_NOJOBEXP, MF_NOMOBLOOT, MF_NOMVPLOOT, MF_NORETURN, MF_NOWARPTO, MF_NIGHTMAREDROP,
- MF_RESTRICTED, MF_NOCOMMAND, MF_NODROP };
+ MF_RESTRICTED, MF_NOCOMMAND, MF_NODROP, MF_JEXP, MF_BEXP };
int buildin_setmapflagnosave(struct script_state *st)
{
@@ -6658,9 +6658,13 @@ int buildin_setmapflag(struct script_state *st)
{
int m,i;
char *str;
+ char *val;
str=conv_str(st,& (st->stack->stack_data[st->start+2]));
i=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ if(st->end>st->start+4){
+ val=conv_str(st,& (st->stack->stack_data[st->start+4]));
+ }
m = map_mapname2mapid(str);
if(m >= 0) {
switch(i) {
@@ -6775,6 +6779,12 @@ int buildin_setmapflag(struct script_state *st)
case MF_NOCOMMAND:
map[m].flag.nocommand=1;
break;
+ case MF_JEXP:
+ map[m].jexp = (atoi(val) < 0) ? 100 : atoi(val);
+ break;
+ case MF_BEXP:
+ map[m].bexp = (atoi(val) < 0) ? 100 : atoi(val);
+ break;
}
}
@@ -6905,6 +6915,12 @@ int buildin_removemapflag(struct script_state *st)
case MF_NOCOMMAND:
map[m].flag.nocommand=0;
break;
+ case MF_JEXP:
+ map[m].jexp=100;
+ break;
+ case MF_BEXP:
+ map[m].bexp=100;
+ break;
}
}