forked from kyonshi/grenzland-mud
Switch to using atoidx whenever we are handling an IDXTYPE. cleanup and linting of asciimap.c
This commit is contained in:
+8
-8
@@ -320,7 +320,7 @@ ACMD(do_mzoneecho)
|
||||
if (!*room_number || !*msg)
|
||||
mob_log(ch, "mzoneecho called with too few args");
|
||||
|
||||
else if ((zone = real_zone_by_thing(atoi(room_number))) == NOWHERE)
|
||||
else if ((zone = real_zone_by_thing(atoidx(room_number))) == NOWHERE)
|
||||
mob_log(ch, "mzoneecho called for nonexistant zone");
|
||||
|
||||
else {
|
||||
@@ -355,7 +355,7 @@ ACMD(do_mload)
|
||||
|
||||
target = two_arguments(argument, arg1, arg2);
|
||||
|
||||
if (!*arg1 || !*arg2 || !is_number(arg2) || ((number = atoi(arg2)) < 0)) {
|
||||
if (!*arg1 || !*arg2 || !is_number(arg2) || ((number = atoidx(arg2)) == NOBODY)) {
|
||||
mob_log(ch, "mload: bad syntax");
|
||||
return;
|
||||
}
|
||||
@@ -366,7 +366,7 @@ ACMD(do_mload)
|
||||
if (!target || !*target) {
|
||||
rnum = IN_ROOM(ch);
|
||||
} else {
|
||||
if (!isdigit(*target) || (rnum = real_room(atoi(target))) == NOWHERE) {
|
||||
if (!isdigit(*target) || (rnum = real_room(atoidx(target))) == NOWHERE) {
|
||||
mob_log(ch, "mload: room target vnum doesn't exist "
|
||||
"(loading mob vnum %d to room %s)", number, target);
|
||||
return;
|
||||
@@ -914,10 +914,10 @@ ACMD(do_mtransform)
|
||||
mob_log(ch, "mtransform: bad argument");
|
||||
else {
|
||||
if (isdigit(*arg))
|
||||
m = read_mobile(atoi(arg), VIRTUAL);
|
||||
m = read_mobile(atoidx(arg), VIRTUAL);
|
||||
else {
|
||||
keep_hp = 0;
|
||||
m = read_mobile(atoi(arg+1), VIRTUAL);
|
||||
m = read_mobile(atoidx(arg+1), VIRTUAL);
|
||||
}
|
||||
if (m==NULL) {
|
||||
mob_log(ch, "mtransform: bad mobile vnum");
|
||||
@@ -1070,7 +1070,7 @@ ACMD(do_mdoor)
|
||||
newexit->exit_info = (sh_int)asciiflag_conv(value);
|
||||
break;
|
||||
case 3: /* key */
|
||||
newexit->key = atoi(value);
|
||||
newexit->key = atoidx(value);
|
||||
break;
|
||||
case 4: /* name */
|
||||
if (newexit->keyword)
|
||||
@@ -1079,7 +1079,7 @@ ACMD(do_mdoor)
|
||||
strcpy(newexit->keyword, value);
|
||||
break;
|
||||
case 5: /* room */
|
||||
if ((to_room = real_room(atoi(value))) != NOWHERE)
|
||||
if ((to_room = real_room(atoidx(value))) != NOWHERE)
|
||||
newexit->to_room = to_room;
|
||||
else
|
||||
mob_log(ch, "mdoor: invalid door target");
|
||||
@@ -1176,5 +1176,5 @@ ACMD(do_mrecho)
|
||||
if (!*msg || !*start || !*finish || !is_number(start) || !is_number(finish))
|
||||
mob_log(ch, "mrecho called with too few args");
|
||||
else
|
||||
send_to_range(atoi(start), atoi(finish), "%s\r\n", msg);
|
||||
send_to_range(atoidx(start), atoidx(finish), "%s\r\n", msg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user