diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-09-24 14:33:37 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-09-24 15:27:07 +0300 |
commit | f94190251bc199582d819fefa448b32a662a297a (patch) | |
tree | 9da8729c5c2e7a20a5a355d520872897b5f7f9e2 /src/map/atcommand.c | |
parent | 6b135d6fbda3e033712ab2a5dafe0c97f536cf3c (diff) | |
download | hercules-f94190251bc199582d819fefa448b32a662a297a.tar.gz hercules-f94190251bc199582d819fefa448b32a662a297a.tar.bz2 hercules-f94190251bc199582d819fefa448b32a662a297a.tar.xz hercules-f94190251bc199582d819fefa448b32a662a297a.zip |
Add bl parameter to getcell functions.
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index fbd010e74..4e4cd8aa7 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -458,7 +458,7 @@ ACMD(mapmove) { return false; } - if ((x || y) && map->getcell(m, x, y, CELL_CHKNOPASS) && pc_get_group_level(sd) < battle_config.gm_ignore_warpable_area) { + if ((x || y) && map->getcell(m, &sd->bl, x, y, CELL_CHKNOPASS) && pc_get_group_level(sd) < battle_config.gm_ignore_warpable_area) { //This is to prevent the pc->setpos call from printing an error. clif->message(fd, msg_fd(fd,2)); if (!map->search_freecell(NULL, m, &x, &y, 10, 10, 1)) @@ -573,7 +573,7 @@ ACMD(jump) return false; } - if ((x || y) && map->getcell(sd->bl.m, x, y, CELL_CHKNOPASS)) { + if ((x || y) && map->getcell(sd->bl.m, &sd->bl, x, y, CELL_CHKNOPASS)) { //This is to prevent the pc->setpos call from printing an error. clif->message(fd, msg_fd(fd,2)); if (!map->search_freecell(NULL, sd->bl.m, &x, &y, 10, 10, 1)) @@ -2224,11 +2224,11 @@ ACMD(gat) { for (y = 2; y >= -2; y--) { safesnprintf(atcmd_output, sizeof(atcmd_output), "%s (x= %d, y= %d) %02X %02X %02X %02X %02X", map->list[sd->bl.m].name, sd->bl.x - 2, sd->bl.y + y, - map->getcell(sd->bl.m, sd->bl.x - 2, sd->bl.y + y, CELL_GETTYPE), - map->getcell(sd->bl.m, sd->bl.x - 1, sd->bl.y + y, CELL_GETTYPE), - map->getcell(sd->bl.m, sd->bl.x, sd->bl.y + y, CELL_GETTYPE), - map->getcell(sd->bl.m, sd->bl.x + 1, sd->bl.y + y, CELL_GETTYPE), - map->getcell(sd->bl.m, sd->bl.x + 2, sd->bl.y + y, CELL_GETTYPE)); + map->getcell(sd->bl.m, &sd->bl, sd->bl.x - 2, sd->bl.y + y, CELL_GETTYPE), + map->getcell(sd->bl.m, &sd->bl, sd->bl.x - 1, sd->bl.y + y, CELL_GETTYPE), + map->getcell(sd->bl.m, &sd->bl, sd->bl.x, sd->bl.y + y, CELL_GETTYPE), + map->getcell(sd->bl.m, &sd->bl, sd->bl.x + 1, sd->bl.y + y, CELL_GETTYPE), + map->getcell(sd->bl.m, &sd->bl, sd->bl.x + 2, sd->bl.y + y, CELL_GETTYPE)); clif->message(fd, atcmd_output); } @@ -7898,7 +7898,7 @@ ACMD(clone) { do { x = sd->bl.x + (rnd() % 10 - 5); y = sd->bl.y + (rnd() % 10 - 5); - } while (map->getcell(sd->bl.m,x,y,CELL_CHKNOPASS) && i++ < 10); + } while (map->getcell(sd->bl.m, &sd->bl, x, y, CELL_CHKNOPASS) && i++ < 10); if (i >= 10) { x = sd->bl.x; |