[OasisOLC]Item Extra Flags

From: Elric of Melnibone (elric@melnibone.org)
Date: 01/26/97

Hey all, 

	Quick question, I recently added races to my mud using the info
available off of the circlemud ftp site.  But I have run in to a rather
small problem. I increased the NUM_ITEM_FLAGS by four to accomodate the
four new races, but the oedit is not adding the appropriate flags, which
should be !HUMAN, !ELF, !GNOME, and !FAIRY.  The following is the
modifications that I made to the mud that should accomodate this:


int invalid_race(struct char_data *ch, struct obj_data *obj) {
  if ((IS_OBJ_STAT(obj, ITEM_ANTI_HUMAN) && IS_HUMAN(ch)) ||
      (IS_OBJ_STAT(obj, ITEM_ANTI_ELF)   && IS_ELF(ch)) ||
      (IS_OBJ_STAT(obj, ITEM_ANTI_GNOME) && IS_GNOME(ch)) ||
      (IS_OBJ_STAT(obj, ITEM_ANTI_FAIRY) && IS_FAIRY(ch)))
        return 1;
        return 0;

modified void equip_char(struct char_data * ch, struct obj_data * obj,
int pos)

added int invalid_race(struct char_data *ch, struct obj_data *obj);

if ((IS_OBJ_STAT(obj, ITEM_ANTI_EVIL) && IS_EVIL(ch)) ||
      (IS_OBJ_STAT(obj, ITEM_ANTI_GOOD) && IS_GOOD(ch)) ||
      invalid_class(ch, obj) || invalid_race(ch, obj)) {
added                           ^^^^^^^^^^^^^^^^^^^^^^

Is there something I am missing?  Yes, IS_<racetype> has been defined in
any help would be greatly appreciated.

| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |

This archive was generated by hypermail 2b30 : 12/18/00 PST