Crossfire Server, Trunk
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  player
 

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
 

Enumerations

enum  bowtype_t {
  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  party_rejoin_mode { party_rejoin_no = 0, party_rejoin_if_exists = 1, party_rejoin_always = 2 }
 
enum  petmode_t { pet_normal = 0, pet_sad = 1, pet_defend = 2, pet_arena = 3 }
 
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 }
 

Functions

void commit_crime (object *op, const char *description)
 
bool is_criminal (object *op)
 

Detailed Description

Player-specific structures.

Definition in file player.h.

Macro Definition Documentation

◆ ADD_PLAYER_NEW

#define ADD_PLAYER_NEW   0x1

Name/password provided, so skip to roll stats

Definition at line 245 of file player.h.

◆ ADD_PLAYER_NO_MAP

#define ADD_PLAYER_NO_MAP   0x2

Do not set the first map

Definition at line 246 of file player.h.

◆ ADD_PLAYER_NO_STATS_ROLL

#define ADD_PLAYER_NO_STATS_ROLL   0x4

Stats provided from client

Definition at line 247 of file player.h.

◆ FIND_PLAYER_NO_HIDDEN_DM

#define FIND_PLAYER_NO_HIDDEN_DM   0x2

Don't find hidden DMs.

Definition at line 236 of file player.h.

◆ FIND_PLAYER_PARTIAL_NAME

#define FIND_PLAYER_PARTIAL_NAME   0x1

Find on partial name.

Definition at line 235 of file player.h.

Enumeration Type Documentation

◆ bowtype_t

enum bowtype_t

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 41 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 98 of file player.h.

◆ petmode_t

enum petmode_t

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 57 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 28 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 75 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 65 of file player.h.

Function Documentation

◆ commit_crime()

void commit_crime ( object op,
const char *  description 
)

Definition at line 307 of file player.cpp.

References add_force(), dragon_attune::force, object_set_msg(), and give::op.

Referenced by save_throw_object().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_criminal()

bool is_criminal ( object op)

Definition at line 312 of file player.cpp.

References find_force(), and give::op.

Referenced by attack_ob_simple(), and get_nearest_criminal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: