summaryrefslogtreecommitdiff
path: root/src/map/script-fun.cpp
diff options
context:
space:
mode:
authorWushin <pasekei@gmail.com>2015-05-06 13:02:40 -0500
committerWushin <pasekei@gmail.com>2015-05-06 13:02:40 -0500
commit85edc4773feebcf492be2c7e7684fab57f49b465 (patch)
tree5bc966846769799fb715155f56dd3180513e2c14 /src/map/script-fun.cpp
parentf9f5d7d036d9419e2953fe30873c754e07dd7df5 (diff)
parent9f78807e495e22606440c92b63b916354c0c0524 (diff)
downloadtmwa-85edc4773feebcf492be2c7e7684fab57f49b465.tar.gz
tmwa-85edc4773feebcf492be2c7e7684fab57f49b465.tar.bz2
tmwa-85edc4773feebcf492be2c7e7684fab57f49b465.tar.xz
tmwa-85edc4773feebcf492be2c7e7684fab57f49b465.zip
Merge pull request #57 from mekolat/patch-1
remove special warp names
Diffstat (limited to 'src/map/script-fun.cpp')
-rw-r--r--src/map/script-fun.cpp19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp
index 7fafd91..3291cfc 100644
--- a/src/map/script-fun.cpp
+++ b/src/map/script-fun.cpp
@@ -338,22 +338,10 @@ void builtin_warp(ScriptState *st)
{
int x, y;
dumb_ptr<map_session_data> sd = script_rid2sd(st);
-
MapName str = stringish<MapName>(ZString(conv_str(st, &AARG(0))));
x = conv_num(st, &AARG(1));
y = conv_num(st, &AARG(2));
- if (str == "Random"_s)
- pc_randomwarp(sd, BeingRemoveWhy::WARPED);
- else if (str == "SavePoint"_s or str == "Save"_s)
- {
- if (sd->bl_m->flag.get(MapFlag::NORETURN))
- return;
-
- pc_setpos(sd, sd->status.save_point.map_, sd->status.save_point.x, sd->status.save_point.y,
- BeingRemoveWhy::WARPED);
- }
- else
- pc_setpos(sd, str, x, y, BeingRemoveWhy::GONE);
+ pc_setpos(sd, str, x, y, BeingRemoveWhy::GONE);
}
/*==========================================
@@ -364,10 +352,7 @@ static
void builtin_areawarp_sub(dumb_ptr<block_list> bl, MapName mapname, int x, int y)
{
dumb_ptr<map_session_data> sd = bl->is_player();
- if (mapname == "Random"_s)
- pc_randomwarp(sd, BeingRemoveWhy::WARPED);
- else
- pc_setpos(sd, mapname, x, y, BeingRemoveWhy::GONE);
+ pc_setpos(sd, mapname, x, y, BeingRemoveWhy::GONE);
}
static