Code:
<constants.c> file
413 /** Describes the wear flags set on an item.
414 * @pre Must be in the same order as the defines.
415 * Must end array with a single newline. */
416 const char *wear_bits[] = {
417 "TAKE",
418 "FINGER",
419 "NECK",
420 "BODY",
421 "HEAD",
422 "LEGS",
423 "FEET",
424 "HANDS",
425 "ARMS",
426 "SHIELD",
427 "ABOUT",
428 "WAIST",
429 "WRIST",
430 "WIELD",
431 "HOLD",
432 "DUALWIELD"
433 "\n"
434 };
Code:
<act.item.c>
1240 static void perform_wear(struct char_data *ch, struct obj_data *obj, int where)
1241 {
1242 /*
1243 * ITEM_WEAR_TAKE is used for objects that do not require special bits
1244 * to be put into that position (e.g. you can hold any object, not just
1245 * an object with a HOLD bit.)
1246 */
1247
1248 int wear_bitvectors[] = {
1249 ITEM_WEAR_TAKE,
1250 ITEM_WEAR_FINGER,
1251 ITEM_WEAR_FINGER,
1252 ITEM_WEAR_NECK,
1253 ITEM_WEAR_NECK,
1254 ITEM_WEAR_BODY,
1255 ITEM_WEAR_HEAD,
1256 ITEM_WEAR_LEGS,
1257 ITEM_WEAR_FEET,
1258 ITEM_WEAR_HANDS,
1259 ITEM_WEAR_ARMS,
1260 ITEM_WEAR_SHIELD,
1261 ITEM_WEAR_ABOUT,
1262 ITEM_WEAR_WAIST,
1263 ITEM_WEAR_WRIST,
1264 ITEM_WEAR_WRIST,
1265 ITEM_WEAR_WIELD,
1266 ITEM_WEAR_TAKE,
1267 ITEM_WEAR_DUALWIELD
1268 };
1269
Code:
<structs.h>
356 #define WEAR_LIGHT 0 /**< Equipment Location Light */
357 #define WEAR_FINGER_R 1 /**< Equipment Location Right Finger */
358 #define WEAR_FINGER_L 2 /**< Equipment Location Left Finger */
359 #define WEAR_NECK_1 3 /**< Equipment Location Neck #1 */
360 #define WEAR_NECK_2 4 /**< Equipment Location Neck #2 */
361 #define WEAR_BODY 5 /**< Equipment Location Body */
362 #define WEAR_HEAD 6 /**< Equipment Location Head */
363 #define WEAR_LEGS 7 /**< Equipment Location Legs */
364 #define WEAR_FEET 8 /**< Equipment Location Feet */
365 #define WEAR_HANDS 9 /**< Equipment Location Hands */
366 #define WEAR_ARMS 10 /**< Equipment Location Arms */
367 #define WEAR_SHIELD 11 /**< Equipment Location Shield */
368 #define WEAR_ABOUT 12 /**< Equipment Location about body (like a cape)*/
369 #define WEAR_WAIST 13 /**< Equipment Location Waist */
370 #define WEAR_WRIST_R 14 /**< Equipment Location Right Wrist */
371 #define WEAR_WRIST_L 15 /**< Equipment Location Left Wrist */
372 #define WEAR_WIELD 16 /**< Equipment Location Weapon */
373 #define WEAR_HOLD 17 /**< Equipment Location held in offhand */
374 #define WEAR_DUALWIELD 18 /**< Equipment Location held in offhand */
375 #define NUM_WEARS 19 /**< Total Number of Wear Locations */
Later down in structs.h file.
405 /* Take/Wear flags: used by obj_data.obj_flags.wear_flags */
406 #define ITEM_WEAR_TAKE 0 /**< Item can be taken */
407 #define ITEM_WEAR_FINGER 1 /**< Item can be worn on finger */
408 #define ITEM_WEAR_NECK 2 /**< Item can be worn around neck */
409 #define ITEM_WEAR_BODY 3 /**< Item can be worn on body */
410 #define ITEM_WEAR_HEAD 4 /**< Item can be worn on head */
411 #define ITEM_WEAR_LEGS 5 /**< Item can be worn on legs */
412 #define ITEM_WEAR_FEET 6 /**< Item can be worn on feet */
413 #define ITEM_WEAR_HANDS 7 /**< Item can be worn on hands */
414 #define ITEM_WEAR_ARMS 8 /**< Item can be worn on arms */
415 #define ITEM_WEAR_SHIELD 9 /**< Item can be used as a shield */
416 #define ITEM_WEAR_ABOUT 10 /**< Item can be worn about body */
417 #define ITEM_WEAR_WAIST 11 /**< Item can be worn around waist */
418 #define ITEM_WEAR_WRIST 12 /**< Item can be worn on wrist */
419 #define ITEM_WEAR_WIELD 13 /**< Item can be wielded */
420 #define ITEM_WEAR_HOLD 14 /**< Item can be held */
421 #define ITEM_WEAR_DUALWIELD 15 /**< Item can be dual wielded */
422 #define NUM_ITEM_WEARS 16 /**< Total number of wears */
423
I'm probably missing something simple, sometimes you just need another set of eyes looking at the code.