summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index be68a399e..da89f0008 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -375,7 +375,7 @@ ACMD(send)
*------------------------------------------*/
ACMD(mapmove) {
char map_name[MAP_NAME_LENGTH_EXT];
- unsigned short mapindex;
+ unsigned short map_index;
short x = 0, y = 0;
int16 m = -1;
@@ -389,11 +389,11 @@ ACMD(mapmove) {
return false;
}
- mapindex = mapindex_name2id(map_name);
- if (mapindex)
- m = map->mapindex2mapid(mapindex);
+ map_index = mapindex->name2id(map_name);
+ if (map_index)
+ m = map->mapindex2mapid(map_index);
- if (!mapindex || m < 0) { // m < 0 means on different server or that map is disabled! [Kevin]
+ if (!map_index || m < 0) { // m < 0 means on different server or that map is disabled! [Kevin]
clif->message(fd, msg_txt(1)); // Map not found.
return false;
}
@@ -412,7 +412,7 @@ ACMD(mapmove) {
clif->message(fd, msg_txt(248));
return false;
}
- if (pc->setpos(sd, mapindex, x, y, CLR_TELEPORT) != 0) {
+ if (pc->setpos(sd, map_index, x, y, CLR_TELEPORT) != 0) {
clif->message(fd, msg_txt(1)); // Map not found.
return false;
}
@@ -1865,7 +1865,7 @@ ACMD(go)
clif->message(fd, msg_txt(248));
return false;
}
- if (pc->setpos(sd, mapindex_name2id(data[town].map), data[town].x, data[town].y, CLR_TELEPORT) == 0) {
+ if (pc->setpos(sd, mapindex->name2id(data[town].map), data[town].x, data[town].y, CLR_TELEPORT) == 0) {
clif->message(fd, msg_txt(0)); // Warped.
} else {
clif->message(fd, msg_txt(1)); // Map not found.
@@ -3708,7 +3708,7 @@ ACMD(mapinfo) {
clif->message(fd, msg_txt(1)); // Map not found.
return false;
}
- m_index = mapindex_name2id(mapname); //This one shouldn't fail since the previous seek did not.
+ m_index = mapindex->name2id(mapname); //This one shouldn't fail since the previous seek did not.
clif->message(fd, msg_txt(1039)); // ------ Map Info ------
@@ -4402,12 +4402,12 @@ ACMD(jail) {
switch(rnd() % 2) { //Jail Locations
case 0:
- m_index = mapindex_name2id(MAP_JAIL);
+ m_index = mapindex->name2id(MAP_JAIL);
x = 24;
y = 75;
break;
default:
- m_index = mapindex_name2id(MAP_JAIL);
+ m_index = mapindex->name2id(MAP_JAIL);
x = 49;
y = 75;
break;
@@ -4554,11 +4554,11 @@ ACMD(jailfor) {
switch(rnd()%2)
{
case 1: //Jail #1
- m_index = mapindex_name2id(MAP_JAIL);
+ m_index = mapindex->name2id(MAP_JAIL);
x = 49; y = 75;
break;
default: //Default Jail
- m_index = mapindex_name2id(MAP_JAIL);
+ m_index = mapindex->name2id(MAP_JAIL);
x = 24; y = 75;
break;
}
@@ -5010,7 +5010,7 @@ ACMD(addwarp)
return false;
}
- m = mapindex_name2id(mapname);
+ m = mapindex->name2id(mapname);
if( m == 0 )
{
sprintf(atcmd_output, msg_txt(1157), mapname); // Unknown map '%s'.