diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-03 22:05:14 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-03 22:05:14 +0000 |
commit | dbbea5bb4ba3c60db95b7a0ccd98304ede6ab7e0 (patch) | |
tree | 93e48df08b6cb2211c0a68e082b32f429aea8fd4 /src/map/script.c | |
parent | 610430033b7529776cdbd59cb9327fab3252309f (diff) | |
download | hercules-dbbea5bb4ba3c60db95b7a0ccd98304ede6ab7e0.tar.gz hercules-dbbea5bb4ba3c60db95b7a0ccd98304ede6ab7e0.tar.bz2 hercules-dbbea5bb4ba3c60db95b7a0ccd98304ede6ab7e0.tar.xz hercules-dbbea5bb4ba3c60db95b7a0ccd98304ede6ab7e0.zip |
- Fixed script command mapwarp.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5895 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/map/script.c b/src/map/script.c index 874a99840..fba57bcaf 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -7467,13 +7467,8 @@ int buildin_mapwarp(struct script_state *st) // Added by RoVeRT int x,y,m;
char *str;
char *mapname;
- int x0,y0,x1,y1;
-
+ unsigned int index;
mapname=conv_str(st,& (st->stack->stack_data[st->start+2]));
- x0=0;
- y0=0;
- x1=map[map_mapname2mapid(mapname)].xs;
- y1=map[map_mapname2mapid(mapname)].ys;
str=conv_str(st,& (st->stack->stack_data[st->start+3]));
x=conv_num(st,& (st->stack->stack_data[st->start+4]));
y=conv_num(st,& (st->stack->stack_data[st->start+5]));
@@ -7481,8 +7476,10 @@ int buildin_mapwarp(struct script_state *st) // Added by RoVeRT if( (m=map_mapname2mapid(mapname))< 0)
return 0;
- map_foreachinarea(buildin_areawarp_sub,
- m,x0,y0,x1,y1,BL_PC, map_mapname2mapid(str),x,y );
+ if(!(index=mapindex_name2id(str)))
+ return 0;
+ map_foreachinmap(buildin_areawarp_sub,
+ m,BL_PC,index,x,y);
return 0;
}
|