diff options
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 82 |
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"}, |