> > I ran out of MOB_FLAGS and added MOB2_FLAGS, my problem is how do I get > > the new bit into the #.mob files, besides editting every one. > > -- > > > Just code it so that parse_simple_mob can load the mob either the old way > or the new way, kind of like this: > > if ((sscanf(file, "%s %s"), flags, flags2) == 2) { > mob_flags = asciiconv(flags); > mob2_flags = asciiconv(flags2); > } else if ((sscanf(file, "%s", flags) == 1) { > mob_flags = asciiconv(flags); > mob2_flags = 0; > } else { > log("Error in parse_simple_mob, mobflag assigns."); > exit (1); > } > > This is really pseudo-code, don't attempt to copy it in because it won't > work :), I just wanted to get the idea across :) Another way of doing it is to put another CASE() in the interpret_espec function in db.c, something like: CASE("MobFlags2") { mob_proto[i].mob_specials.mob_flags2 = num_arg; } If you want to use asciiflagconv in that, you'll have to change interpret_espec slightly so it won't do num_arg = atoi(value) by default, so you can parse the value parameter as a string to asciiflagconv, then you just atoi(value) seperately in each CASE. At least that's the way I'd do it, a bit less elegant, I agree ;-) Chris +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/08/00 PST