diff options
author | Haru <haru@dotalux.com> | 2014-04-19 18:17:09 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2014-04-19 18:17:09 +0200 |
commit | 2eda4c20fec88ebefe0fbf74c2db33b0c83890e9 (patch) | |
tree | 717d69769e13ccafd33a1280f382f952807c0bcb /src/map | |
parent | 47e1e71c9ba917f288f96ff64f4533628188b921 (diff) | |
download | hercules-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')
-rw-r--r-- | src/map/atcommand.c | 19 | ||||
-rw-r--r-- | src/map/pc.c | 6 |
2 files changed, 10 insertions, 15 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; } diff --git a/src/map/pc.c b/src/map/pc.c index 9ee65d2d2..c6bab4cfc 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -7140,9 +7140,9 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) { } // Remove autotrade to prevent autotrading from save point - if( sd->state.standalone || sd->state.autotrade - && (map->list[sd->bl.m].flag.pvp || map->list[sd->bl.m].flag.gvg) - ) { + if( (sd->state.standalone || sd->state.autotrade) + && (map->list[sd->bl.m].flag.pvp || map->list[sd->bl.m].flag.gvg) + ) { sd->state.autotrade = 0; sd->state.standalone = 0; pc->autotrade_update(sd,PAUC_REMOVE); |