Crossfire Server, Branch 1.12  R12190
Defines
Convenience macros to determine what kind of things we are dealing with.

Defines

#define IS_ARMOR(op)
#define IS_ARROW(op)
#define IS_LIVE(op)
#define IS_SHIELD(op)   (op->type == SHIELD)
#define IS_WEAPON(op)   (op->type == ARROW || op->type == BOW || op->type == WEAPON)

Define Documentation

#define IS_ARMOR (   op)
#define IS_ARROW (   op)
Value:
(op->type == ARROW || \
        (op->type == SPELL_EFFECT && (op->subtype == SP_BULLET || op->subtype == SP_MAGIC_MISSILE)))

Definition at line 427 of file define.h.

Referenced by attack_message(), and is_special_equipment().

#define IS_LIVE (   op)
Value:
((op->type == PLAYER || QUERY_FLAG(op, FLAG_MONSTER) || \
        (QUERY_FLAG(op, FLAG_ALIVE) && !QUERY_FLAG(op, FLAG_GENERATOR) && \
        !op->type == DOOR)) && (!QUERY_FLAG(op, FLAG_IS_A_TEMPLATE)))

Definition at line 422 of file define.h.

Referenced by attack_message(), and decay_objects().

#define IS_SHIELD (   op)    (op->type == SHIELD)
#define IS_WEAPON (   op)    (op->type == ARROW || op->type == BOW || op->type == WEAPON)