Code:
if (((retval = sscanf(line, "%s %s %s %s %s %s %s %s %d %c", f1, f2, f3, f4, f5, f6, f7, f8, t + 2, &letter)) != 10) && (bitwarning == TRUE)) {
/* Let's make the implementor read some, before converting his world files. */
log("WARNING: Conventional mobile files detected. See config.c.");
exit(1);
} else if ((retval == 4) && (bitwarning == FALSE)) {
log("Converting mobile #%d to 128bits..", nr);
MOB_FLAGS(mob_proto + i)[0] = asciiflag_conv(f1);
MOB_FLAGS(mob_proto + i)[1] = 0;
MOB_FLAGS(mob_proto + i)[2] = 0;
MOB_FLAGS(mob_proto + i)[3] = 0;
check_bitvector_names(MOB_FLAGS(mob_proto + i)[0], action_bits_count, buf2, "mobile");
AFF_FLAGS(mob_proto + i)[0] = asciiflag_conv_aff(f2);
AFF_FLAGS(mob_proto + i)[1] = 0;
AFF_FLAGS(mob_proto + i)[2] = 0;
AFF_FLAGS(mob_proto + i)[3] = 0;
GET_ALIGNMENT(mob_proto + i) = atoi(f3);
/* Make some basic checks. */
REMOVE_BIT_AR(AFF_FLAGS(mob_proto + i), AFF_CHARM);
REMOVE_BIT_AR(AFF_FLAGS(mob_proto + i), AFF_POISON);
REMOVE_BIT_AR(AFF_FLAGS(mob_proto + i), AFF_GROUP);
REMOVE_BIT_AR(AFF_FLAGS(mob_proto + i), AFF_SLEEP);
if (MOB_FLAGGED(mob_proto + i, MOB_AGGRESSIVE) && MOB_FLAGGED(mob_proto + i, MOB_AGGR_GOOD))
REMOVE_BIT_AR(MOB_FLAGS(mob_proto + i), MOB_AGGR_GOOD);
if (MOB_FLAGGED(mob_proto + i, MOB_AGGRESSIVE) && MOB_FLAGGED(mob_proto + i, MOB_AGGR_NEUTRAL))
REMOVE_BIT_AR(MOB_FLAGS(mob_proto + i), MOB_AGGR_NEUTRAL);
if (MOB_FLAGGED(mob_proto + i, MOB_AGGRESSIVE) && MOB_FLAGGED(mob_proto + i, MOB_AGGR_EVIL))
REMOVE_BIT_AR(MOB_FLAGS(mob_proto + i), MOB_AGGR_EVIL);
check_bitvector_names(AFF_FLAGS(mob_proto + i)[0], affected_bits_count, buf2, "mobile affect");
/* This is necessary, since if we have conventional world files, &letter is
* loaded into f4 instead of the letter characters. So what we do, is copy
* f4 into letter. Disadvantage is that &letter cannot be longer then 128
* characters, but this shouldn't occur anyway. */
letter = *f4;
if(bitsavetodisk) {
add_to_save_list(zone_table[real_zone_by_thing(nr)].number, 0);
converting =TRUE;
}
log(" done.");
Code:
.. parse mobile code
if (version != CURRENT_MOB_VERSION) {
int former_version = version;
switch (version) {
case 1: version = upgrade_to_version_2(mob);
case 2: version = upgrade_to_version_3(mob);
case 3: version = upgrade_to_version_4(mob);
break;
}
mudlog(CMP, TRUE, LVL_GOD, "Upgraded vnum %d from version %d to version %d.", vnum, former_version, version);
}