Re: [Code] New Eq Positions

From: Johan Dustler (Johan.Dustler@epk.ericsson.se)
Date: 10/24/96


The easy way to fix this is to not rearrange where, equipment_types,
wear_bitvectors or already_wearing, just add at the end of the lists.
Otherwise you will have to go in and edit all zone files.

Then you can use a wear_pos[] array in the look at function to let the
new eq positions show up where you want them to be.

constants.c
const int wear_pos[] = {
  WEAR_FINGER_R,
  WEAR_FINGER_L,
  WEAR_NECK_1,
  WEAR_NECK_2,
  WEAR_FACE,
  WEAR_EAR_R,
  WEAR_EAR_L,
  WEAR_BODY,
  WEAR_HEAD,
  WEAR_LEGS,
  WEAR_FEET,
  WEAR_HANDS,
  WEAR_ARMS,
  WEAR_SHIELD,
  WEAR_WAIST,
  WEAR_WRIST_R,
  WEAR_WRIST_L,
  WIELD_PRIM,
  WIELD_SEC,
  WEAR_HOLD
};

act.informative.c
look_at_char()
{
<snip>

  if (found) {
    act("\r\n$n is using:", FALSE, i, 0, ch, TO_VICT);
    for (j = 0; j < (NUM_WEARS - 1); j++)
      if (GET_EQ(i, wear_pos[j]) && CAN_SEE_OBJ(ch, GET_EQ(i, wear_pos[j]))) {
        send_to_char(where[wear_pos[j]], ch);
        show_obj_to_char(GET_EQ(i, wear_pos[j]), ch, 1);
      }
  }

<snip>
}

-Johan


> From: Leonard Burns IV <lburns@continet.com>
> 
> Ok, I add new eq positions, ears, ankles, shoulders, and face.  I 
> rearranged the WEAR_X *where[] and *equipment_types. I got it all worked 
> out, when you equip an anklet it says 'You put a chrome anklet on your 
> left ankle'. blah blah. that all works fine, but when you look at a mob 
> they're screwed up, like wearing a sword on their face and an anklet 
> around their head. I have a feeling this deals with where the eq is 
> loaded in the zone file, has anyone dealt with this sort of problem? Is 
> there an easy way to fix this?
> 
> Thanks in advance!
> -- 
> Leonard Burns IV
> lburns@continet.com
+-----------------------------------------------------------+
| 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