Crossfire Server, Trunk  1.75.0
Convenience macros to determine what kind of things we are dealing with.

Macros

#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)
 

Detailed Description

Macro Definition Documentation

◆ IS_ARMOR

#define IS_ARMOR (   op)
Value:
(op->type == ARMOUR || op->type == HELMET || \
op->type == BOOTS || op->type == GLOVES)

Definition at line 166 of file define.h.

◆ IS_ARROW

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

Definition at line 178 of file define.h.

◆ IS_LIVE

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

Definition at line 173 of file define.h.

◆ IS_SHIELD

#define IS_SHIELD (   op)    (op->type == SHIELD)

Definition at line 170 of file define.h.

◆ IS_WEAPON

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

Definition at line 163 of file define.h.

PLAYER
@ PLAYER
Definition: object.h:112
SP_MAGIC_MISSILE
#define SP_MAGIC_MISSILE
Definition: spells.h:85
GLOVES
@ GLOVES
Definition: object.h:218
QUERY_FLAG
#define QUERY_FLAG(xyz, p)
Definition: define.h:371
ARMOUR
@ ARMOUR
Definition: object.h:125
FLAG_ALIVE
#define FLAG_ALIVE
Object can fight (or be fought)
Definition: define.h:217
HELMET
@ HELMET
Definition: object.h:141
SP_BULLET
#define SP_BULLET
Definition: spells.h:79
FLAG_MONSTER
#define FLAG_MONSTER
Will attack players.
Definition: define.h:232
FLAG_IS_A_TEMPLATE
#define FLAG_IS_A_TEMPLATE
Object has no ingame life until instantiated.
Definition: define.h:353
ARROW
@ ARROW
Definition: object.h:122
FLAG_GENERATOR
#define FLAG_GENERATOR
Will generate type ob->stats.food.
Definition: define.h:235
SPELL_EFFECT
@ SPELL_EFFECT
Definition: object.h:220
DOOR
@ DOOR
Definition: object.h:131
BOOTS
@ BOOTS
Definition: object.h:217