Atrinik Server 2.5
Defines
Item types
Flags Structure

Defines

#define IS_WEAPON(op)   (op->type == ARROW || op->type == BOW || op->type == WEAPON)
#define IS_ARMOR(op)   (op->type == ARMOUR || op->type == SHIELD || op->type == HELMET || op->type == CLOAK || op->type == BOOTS || op->type == GLOVES || op->type == BRACERS || op->type == GIRDLE)
#define IS_LIVE(op)   ((op)->type == PLAYER || QUERY_FLAG((op), FLAG_MONSTER) || QUERY_FLAG((op), FLAG_ALIVE))
#define IS_ARROW(op)   (op->type == ARROW || op->type == MMISSILE || op->type == BULLET)
#define IS_ATTACK_SPELL(op)   ((op)->type == MMISSILE || (op)->type == BULLET || (op)->type == CONE || (op)->type == LIGHTNING)

Detailed Description

Convenience macros to determine what kind of things we are dealing with.


Define Documentation

#define IS_ARMOR (   op)    (op->type == ARMOUR || op->type == SHIELD || op->type == HELMET || op->type == CLOAK || op->type == BOOTS || op->type == GLOVES || op->type == BRACERS || op->type == GIRDLE)

Is this some kind of armor (shield, helmet, cloak, etc)?

Definition at line 892 of file define.h.

#define IS_ARROW (   op)    (op->type == ARROW || op->type == MMISSILE || op->type == BULLET)

Is it an arrow?

Definition at line 896 of file define.h.

#define IS_ATTACK_SPELL (   op)    ((op)->type == MMISSILE || (op)->type == BULLET || (op)->type == CONE || (op)->type == LIGHTNING)

Determine whether the object is an attack spell.

Definition at line 898 of file define.h.

#define IS_LIVE (   op)    ((op)->type == PLAYER || QUERY_FLAG((op), FLAG_MONSTER) || QUERY_FLAG((op), FLAG_ALIVE))

Is this object alive?

Definition at line 894 of file define.h.

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

Is this a weapon?

Definition at line 890 of file define.h.