summaryrefslogtreecommitdiff
path: root/src/map/clif.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/clif.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/clif.c')
-rw-r--r--src/map/clif.c82
1 files changed, 78 insertions, 4 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 0765b8665..14b7aa16e 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -11391,10 +11391,11 @@ void clif_parse_GMKickAll(int fd, struct map_session_data* sd)
}
/*==========================================
- * /shift <name>
+ * /remove <account name>
+ * /shift <char name>
*------------------------------------------*/
void clif_parse_GMShift(int fd, struct map_session_data *sd)
-{
+{// FIXME: remove is supposed to receive account name for clients prior 20100803RE
char *player_name;
int lv;
@@ -11413,11 +11414,47 @@ void clif_parse_GMShift(int fd, struct map_session_data *sd)
}
}
+
+/// Warps oneself to the location of the character given by account id ( /remove <account id> ).
+/// R 0843 <account id>.L
+void clif_parse_GMRemove2(int fd, struct map_session_data* sd)
+{
+ int account_id, lv;
+ struct map_session_data* pl_sd;
+
+ if( battle_config.atc_gmonly && !pc_isGM(sd) )
+ {
+ return;
+ }
+
+ if( pc_isGM(sd) < ( lv = get_atcommand_level(atcommand_jumpto) ) )
+ {
+ return;
+ }
+
+ account_id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]);
+
+ if( ( pl_sd = map_id2sd(account_id) ) != NULL && pc_isGM(sd) >= pc_isGM(pl_sd) )
+ {
+ pc_warpto(sd, pl_sd);
+ }
+
+ if( log_config.gm && lv >= log_config.gm )
+ {
+ char message[32];
+
+ sprintf(message, "/remove %d", account_id);
+ log_atcommand(sd, message);
+ }
+}
+
+
/*==========================================
- * /recall <name>
+ * /recall <account name>
+ * /summon <char name>
*------------------------------------------*/
void clif_parse_GMRecall(int fd, struct map_session_data *sd)
-{
+{// FIXME: recall is supposed to receive account name for clients prior 20100803RE
char *player_name;
int lv;
@@ -11437,6 +11474,41 @@ void clif_parse_GMRecall(int fd, struct map_session_data *sd)
}
}
+
+/// Summons a character given by account id to one's own position ( /recall <account id> )
+/// R 0842 <account id>.L
+void clif_parse_GMRecall2(int fd, struct map_session_data* sd)
+{
+ int account_id, lv;
+ struct map_session_data* pl_sd;
+
+ if( battle_config.atc_gmonly && !pc_isGM(sd) )
+ {
+ return;
+ }
+
+ if( pc_isGM(sd) < ( lv = get_atcommand_level(atcommand_recall) ) )
+ {
+ return;
+ }
+
+ account_id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]);
+
+ if( ( pl_sd = map_id2sd(account_id) ) != NULL && pc_isGM(sd) >= pc_isGM(pl_sd) )
+ {
+ pc_recall(sd, pl_sd);
+ }
+
+ if( log_config.gm && lv >= log_config.gm )
+ {
+ char message[32];
+
+ sprintf(message, "/recall %d", account_id);
+ log_atcommand(sd, message);
+ }
+}
+
+
/*==========================================
* /monster /item
* R 01F3 <name>.24B
@@ -14444,6 +14516,8 @@ static int packetdb_readdb(void)
{clif_parse_GMShift,"shift"},
{clif_parse_GMChangeMapType,"changemaptype"},
{clif_parse_GMRc,"rc"},
+ {clif_parse_GMRecall2,"recall2"},
+ {clif_parse_GMRemove2,"remove2"},
{clif_parse_NoviceDoriDori,"sndoridori"},
{clif_parse_NoviceExplosionSpirits,"snexplosionspirits"},