As requested by some people, here is all the code we changed to allow an additional set of PRF_FLAGS that we call PRF2_FLAGS. The code changes are relatively simple once you find all of the occurences. I imagine that you could also do this same thing with PLR_FLAGS and ITEM_FLAGS if you added a field to db.c, but then again, you may have to modify every object in your mud. Anyway, this did not require us to player wipe, so maybe you can use this. If not, no skin off my back :-) Here it is. __structs.h__ 1. After the #defines for PRF_FLAGS: /* pref 2 flags added for additional preferences */ #define PRF_EXAMPLE1 (1 << 1) #define PRF_EXAMPLE2 (1 << 2) 2. Replace "int spare17" with "long pref2" /* at least that's where we put it */ __utils.h__ 1. After the line: #define PRF2_FLAGS(ch) ((ch)->player_specials.saved.pref) Add a new line which is identical except that ".pref" should be ".pref2" 2. After the line: #define PRF_FLAGGED(ch, flag) (IS_SET(PRF_FLAGS(ch), (flag))) Add a new identical line but replace both "PRF" occurences with "PRF2" 3. After the line: #define PRF_TOG_CHK(ch, flag) ((TOGGLE_BIT(PRF_FLAGS(ch), (flag))) (flag))) As above, add a new line replacing both occurences of "PRF" with "PRF2" __act.wizard.c__ Add a new "sprintbit" line in do_stat_character with "preference2_bits" instead of "preference_bits" and add "extern char *preference2_bits[]" at the top with the other external variables. __constants.c__ Add a new array: const char *preference2_bits[]={ "", "Example1", "Example2", "\n" }; And that's it. Enjoy. -Brian
This archive was generated by hypermail 2b30 : 12/18/00 PST