summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-04-19 18:17:09 +0200
committerHaru <haru@dotalux.com>2014-04-19 18:17:09 +0200
commit2eda4c20fec88ebefe0fbf74c2db33b0c83890e9 (patch)
tree717d69769e13ccafd33a1280f382f952807c0bcb /src/map/atcommand.c
parent47e1e71c9ba917f288f96ff64f4533628188b921 (diff)
downloadhercules-2eda4c20fec88ebefe0fbf74c2db33b0c83890e9.tar.gz
hercules-2eda4c20fec88ebefe0fbf74c2db33b0c83890e9.tar.bz2
hercules-2eda4c20fec88ebefe0fbf74c2db33b0c83890e9.tar.xz
hercules-2eda4c20fec88ebefe0fbf74c2db33b0c83890e9.zip
Corrected some issues in 69ca0aa and 446ce4a
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index e9b00cce6..5fd0faf86 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -466,17 +466,12 @@ ACMD(where) {
*------------------------------------------*/
ACMD(jumpto) {
struct map_session_data *pl_sd = NULL;
-
+
if (!message || !*message) {
clif->message(fd, msg_txt(911)); // Please enter a player name (usage: @jumpto/@warpto/@goto <char name/ID>).
return false;
}
- if( message == sd->status.name || (atoi(message)) == sd->status.char_id ) {
- clif->message(fd, msg_txt(253)); // You already are at your destination!
- return false;
- }
-
if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif->message(fd, msg_txt(248)); // You are not authorized to warp from your current map.
return false;
@@ -486,7 +481,7 @@ ACMD(jumpto) {
clif->message(fd, msg_txt(864)); // "You cannot use this command when dead."
return false;
}
-
+
if((pl_sd=map->nick2sd((char *)message)) == NULL && (pl_sd=map->charid2sd(atoi(message))) == NULL) {
clif->message(fd, msg_txt(3)); // Character not found.
return false;
@@ -499,13 +494,13 @@ ACMD(jumpto) {
if( pl_sd->bl.m == sd->bl.m && pl_sd->bl.x == sd->bl.x && pl_sd->bl.y == sd->bl.y ) {
clif->message(fd, msg_txt(253)); // You already are at your destination!
- return false;
- }
-
+ return false;
+ }
+
pc->setpos(sd, pl_sd->mapindex, pl_sd->bl.x, pl_sd->bl.y, CLR_TELEPORT);
sprintf(atcmd_output, msg_txt(4), pl_sd->status.name); // Jumped to %s
- clif->message(fd, atcmd_output);
-
+ clif->message(fd, atcmd_output);
+
return true;
}