summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-12-25 01:40:35 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-12-25 01:40:35 +0000
commitc8ff72c09f9c763912d7c1d953638b5f32cb40aa (patch)
tree1fdd119d878b1c62ac050b6472b51e72abc3fb88 /src/map/pc.c
parent75e1895d3ffa6dfbd29c16d613995af7d6917385 (diff)
downloadhercules-c8ff72c09f9c763912d7c1d953638b5f32cb40aa.tar.gz
hercules-c8ff72c09f9c763912d7c1d953638b5f32cb40aa.tar.bz2
hercules-c8ff72c09f9c763912d7c1d953638b5f32cb40aa.tar.xz
hercules-c8ff72c09f9c763912d7c1d953638b5f32cb40aa.zip
* Added support for new /remove and /recall packets for 2010-08-03aRagexeRE and newer.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14620 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 45064794b..b22a365e0 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4239,6 +4239,45 @@ int pc_randomwarp(struct map_session_data *sd, clr_type type)
return 0;
}
+
+/// Warps one player to another.
+/// @param sd player to warp.
+/// @param pl_sd player to warp to.
+int pc_warpto(struct map_session_data* sd, struct map_session_data* pl_sd)
+{
+ if( map[sd->bl.m].flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd) )
+ {
+ return -2;
+ }
+
+ if( map[pl_sd->bl.m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd) )
+ {
+ return -3;
+ }
+
+ return pc_setpos(sd, pl_sd->mapindex, pl_sd->bl.x, pl_sd->bl.y, CLR_TELEPORT);
+}
+
+
+/// Recalls one player to another.
+/// @param sd player to warp to.
+/// @param pl_sd player to warp.
+int pc_recall(struct map_session_data* sd, struct map_session_data* pl_sd)
+{
+ if( map[pl_sd->bl.m].flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd) )
+ {
+ return -2;
+ }
+
+ if( map[sd->bl.m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd) )
+ {
+ return -3;
+ }
+
+ return pc_setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, CLR_RESPAWN);
+}
+
+
/*==========================================
* Records a memo point at sd's current position
* pos - entry to replace, (-1: shift oldest entry out)