Crossfire Server, Trunk  R20763
player.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  client_spell
 
struct  pl
 

Macros

#define ADD_PLAYER_NEW   0x1
 
#define ADD_PLAYER_NO_MAP   0x2
 
#define ADD_PLAYER_NO_STATS_ROLL   0x4
 
#define FIND_PLAYER_NO_HIDDEN_DM   0x2
 
#define FIND_PLAYER_PARTIAL_NAME   0x1
 

Typedefs

typedef enum _bowtype bowtype_t
 
typedef struct client_spell client_spell
 
typedef enum party_rejoin_mode party_rejoin_mode
 
typedef enum _petmode petmode_t
 
typedef struct pl player
 
typedef enum rangetype rangetype
 
typedef enum unapplymode unapplymode
 
typedef enum usekeytype usekeytype
 

Enumerations

enum  _bowtype {
  bow_normal = 0, bow_threewide = 1, bow_spreadshot = 2, bow_n = 3,
  bow_ne = 4, bow_e = 5, bow_se = 6, bow_s = 7,
  bow_sw = 8, bow_w = 9, bow_nw = 10, bow_bestarrow = 11
}
 
enum  _petmode { pet_normal = 0, pet_sad = 1, pet_defend = 2, pet_arena = 3 }
 
enum  party_rejoin_mode { party_rejoin_no = 0, party_rejoin_if_exists = 1, party_rejoin_always = 2 }
 
enum  rangetype {
  range_bottom = -1, range_none = 0, range_bow = 1, range_magic = 2,
  range_misc = 3, range_golem = 4, range_skill = 5, range_builder = 6,
  range_size = 7
}
 
enum  unapplymode { unapply_nochoice = 0, unapply_never = 1, unapply_always = 2 }
 
enum  usekeytype { key_inventory = 0, keyrings = 1, containers = 2 }
 

Detailed Description

Player-specific structures.

Definition in file player.h.

Typedef Documentation

◆ bowtype_t

typedef enum _bowtype bowtype_t

Bow firing mode.

◆ client_spell

typedef struct client_spell client_spell

This stores, for a spell a player knows, the last sp/gr/dam information sent to client.

◆ party_rejoin_mode

Whether to rejoin party at login or not.

◆ petmode_t

typedef enum _petmode petmode_t

Petmode.

◆ player

typedef struct pl player

One player.

◆ rangetype

typedef enum rangetype rangetype

What range is currently selected by the player.

Wand/rod/horn rolled into range_misc. They all use the same body location anyways.

◆ unapplymode

typedef enum unapplymode unapplymode

This is used to control what to do when we need to unapply an object before we can apply another one.

◆ usekeytype

typedef enum usekeytype usekeytype

How to use keys.

Enumeration Type Documentation

◆ _bowtype

enum _bowtype

Bow firing mode.

Enumerator
bow_normal 

Standard mode, one random arrow.

bow_threewide 

Fire three arrows in the same direction.

bow_spreadshot 

Fire three arrows in a cone.

bow_n 

Fire north whatever the facing direction. Must stay at 3.

bow_ne 

Fire north-east whatever the facing direction.

bow_e 

Fire east whatever the facing direction.

bow_se 

Fire south-east whatever the facing direction.

bow_s 

Fire south whatever the facing direction.

bow_sw 

Fire south-west whatever the facing direction.

bow_w 

Fire west whatever the facing direction.

bow_nw 

Fire north-west whatever the facing direction.

bow_bestarrow 

Try to find an arrow matching the target.

Definition at line 28 of file player.h.

◆ _petmode

enum _petmode

Petmode.

Enumerator
pet_normal 

Standard mode/

pet_sad 

Try to find enemies.

pet_defend 

Stay close to the owner.

pet_arena 

Attack other players in arena.

Definition at line 44 of file player.h.

◆ party_rejoin_mode

Whether to rejoin party at login or not.

Enumerator
party_rejoin_no 

Don't rejoin.

party_rejoin_if_exists 

Rejoin if party exists.

party_rejoin_always 

If party doesn't exist, form it.

Definition at line 85 of file player.h.

◆ rangetype

enum rangetype

What range is currently selected by the player.

Wand/rod/horn rolled into range_misc. They all use the same body location anyways.

Enumerator
range_bottom 

Minimum, exclusive, value.

range_none 

No range selected.

range_bow 

Bow.

range_magic 

Spells.

range_misc 

Misc items.

range_golem 

Control golem.

range_skill 

Use skill.

range_builder 

Map builder.

range_size 

Maximum, exclusive, value.

Definition at line 15 of file player.h.

◆ unapplymode

This is used to control what to do when we need to unapply an object before we can apply another one.

Enumerator
unapply_nochoice 

Will unapply objects when there no choice to unapply.

unapply_never 

Will not unapply objects automatically.

unapply_always 

Will unapply whatever is necessary - this goes beyond no choice - if there are multiple ojbect of the same type that need to be unapplied, there is no way for the player to control which of these will be unapplied.

Definition at line 62 of file player.h.

◆ usekeytype

enum usekeytype

How to use keys.

Enumerator
key_inventory 

Only use keys in inventory.

keyrings 

Use keys in inventory and active key rings.

containers 

Use keys in inventory and active containers.

Definition at line 52 of file player.h.