- Oh, forgot to make unitwarp support the mapname "this"
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14934 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
a3d1ad027f
commit
81ce878498
@ -13452,9 +13452,10 @@ BUILDIN_FUNC(unitwarp)
|
|||||||
short x;
|
short x;
|
||||||
short y;
|
short y;
|
||||||
struct block_list* bl;
|
struct block_list* bl;
|
||||||
|
const char *mapname;
|
||||||
|
|
||||||
unit_id = script_getnum(st,2);
|
unit_id = script_getnum(st,2);
|
||||||
map = map_mapname2mapid(script_getstr(st, 3));
|
mapname = script_getstr(st, 3);
|
||||||
x = (short)script_getnum(st,4);
|
x = (short)script_getnum(st,4);
|
||||||
y = (short)script_getnum(st,5);
|
y = (short)script_getnum(st,5);
|
||||||
|
|
||||||
@ -13462,6 +13463,12 @@ BUILDIN_FUNC(unitwarp)
|
|||||||
bl = map_id2bl(st->rid);
|
bl = map_id2bl(st->rid);
|
||||||
else
|
else
|
||||||
bl = map_id2bl(unit_id);
|
bl = map_id2bl(unit_id);
|
||||||
|
|
||||||
|
if( strcmp(mapname,"this") == 0 )
|
||||||
|
map = bl?bl->m:-1;
|
||||||
|
else
|
||||||
|
map = map_mapname2mapid(mapname);
|
||||||
|
|
||||||
if( map >= 0 && bl != NULL )
|
if( map >= 0 && bl != NULL )
|
||||||
script_pushint(st, unit_warp(bl,map,x,y,CLR_OUTSIGHT));
|
script_pushint(st, unit_warp(bl,map,x,y,CLR_OUTSIGHT));
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user