Crossfire Server, Trunk
player Struct Reference

#include <player.h>

+ Collaboration diagram for player:

Data Fields

living applied_stats
 
int16_t bed_x
 
int16_t bed_y
 
int8_t blocked_los [MAP_CLIENT_X][MAP_CLIENT_Y]
 
bowtype_t bowtype
 
uint32_t braced:1
 
float character_load
 
uint32_t count
 
SockList ** delayed_buffers
 
uint8_t delayed_buffers_allocated
 
uint8_t delayed_buffers_used
 
int16_t digestion
 
uint32_t do_los:1
 
int16_t encumbrance
 
uint32_t fire_on:1
 
sstring followed_player
 
int16_t gen_grace
 
int16_t gen_hp
 
int16_t gen_sp
 
int16_t gen_sp_armour
 
uint32_t golem_count
 
uint32_t has_directory:1
 
uint32_t has_hit:1
 
uint32_t hidden:1
 
const char * invis_race
 
int16_t item_power
 
char killer [BIG_NAME]
 
language_t language
 
living last_applied_stats
 
uint32_t last_character_flags
 
float last_character_load
 
tag_t last_examined
 
objectlast_exit
 
uint16_t last_flags
 
int16_t last_golem_hp
 
int16_t last_golem_maxhp
 
uint16_t last_item_power
 
int8_t last_level
 
living last_orig_stats
 
uint32_t last_path_attuned
 
uint32_t last_path_denied
 
uint32_t last_path_repelled
 
living last_race_stats
 
int16_t last_resist [NROFATTACKS]
 
int64_t last_skill_exp [MAX_SKILLS]
 
objectlast_skill_ob [MAX_SKILLS]
 
float last_speed
 
living last_stats
 
char last_tell [MAX_NAME]
 
float last_weapon_sp
 
int32_t last_weight
 
int32_t last_weight_limit
 
int8_t levgrace [11]
 
int8_t levhp [11]
 
int8_t levsp [11]
 
uint8_t listening
 
char maplevel [MAX_BUF]
 
objectmark
 
uint32_t mark_count
 
uint32_t mode
 
uint32_t name_changed:1
 
char new_password [16]
 
playernext
 
uint32_t no_shout:1
 
objectob
 
living orig_stats
 
char own_title [MAX_NAME]
 
uint32_t partial_commands:1
 
partylistparty
 
partylistparty_to_join
 
char password [16]
 
uint32_t peaceful:1
 
petmode_t petmode
 
objectranges [range_size]
 
party_rejoin_mode rejoin_party
 
uint32_t run_on:1
 
char savebed_map [MAX_BUF]
 
char search_str [MAX_BUF]
 
rangetype shoottype
 
socket_structsocket
 
client_spellspell_state
 
char spellparam [MAX_BUF]
 
tag_tstack_items
 
int stack_position
 
uint8_t state
 
int swap_first
 
uint32_t ticks_played
 
char title [BIG_NAME]
 
uint32_t tmp_invis:1
 
objecttransport
 
unapplymode unapply
 
const char * unarmed_skill
 
usekeytype usekeys
 

Detailed Description

One player.

Definition at line 105 of file player.h.

Field Documentation

◆ applied_stats

living player::applied_stats

Stat changes due to gear or skills.

Definition at line 171 of file player.h.

◆ bed_x

int16_t player::bed_x

Definition at line 111 of file player.h.

Referenced by player_changer_type_process().

◆ bed_y

int16_t player::bed_y

x,y - coordinates of respawn (savebed).

Definition at line 111 of file player.h.

Referenced by player_changer_type_process().

◆ blocked_los

int8_t player::blocked_los[MAP_CLIENT_X][MAP_CLIENT_Y]

Array showing what spaces the player can see. For maps smaller than MAP_CLIENT_.., the upper left is used.

Definition at line 178 of file player.h.

Referenced by draw_client_map2().

◆ bowtype

bowtype_t player::bowtype

Which firemode?

Definition at line 114 of file player.h.

Referenced by get_player().

◆ braced

uint32_t player::braced

Will not move if braced, only attack.

Definition at line 139 of file player.h.

◆ character_load

float player::character_load

Value between 0 and 1 indicating how much the character is overloaded.

Definition at line 135 of file player.h.

◆ count

uint32_t player::count

Any numbers typed before a command.

Definition at line 122 of file player.h.

◆ delayed_buffers

SockList** player::delayed_buffers

Buffers which will be sent after the player's tick completes.

Definition at line 226 of file player.h.

◆ delayed_buffers_allocated

uint8_t player::delayed_buffers_allocated

Number of items in delayed_buffers_used.

Definition at line 224 of file player.h.

◆ delayed_buffers_used

uint8_t player::delayed_buffers_used

Used items in delayed_buffers_used.

Definition at line 225 of file player.h.

◆ digestion

int16_t player::digestion

Any bonuses/penalties to digestion.

Definition at line 125 of file player.h.

◆ do_los

uint32_t player::do_los

If true, need to call update_los() in draw(), and clear.

Definition at line 141 of file player.h.

Referenced by get_player().

◆ encumbrance

int16_t player::encumbrance

How much our player is encumbered.

Definition at line 196 of file player.h.

◆ fire_on

uint32_t player::fire_on

Player should fire object, not move.

Definition at line 142 of file player.h.

◆ followed_player

sstring player::followed_player

Player the DM is following.

Definition at line 218 of file player.h.

◆ gen_grace

int16_t player::gen_grace

Bonuses to regeneration speed of grace.

Definition at line 129 of file player.h.

◆ gen_hp

int16_t player::gen_hp

Bonuses to regeneration speed of hp.

Definition at line 126 of file player.h.

◆ gen_sp

int16_t player::gen_sp

Bonuses to regeneration speed of sp.

Definition at line 127 of file player.h.

◆ gen_sp_armour

int16_t player::gen_sp_armour

Penalty to sp regen from armour.

Definition at line 128 of file player.h.

Referenced by get_player().

◆ golem_count

uint32_t player::golem_count

To track the golem.

Definition at line 119 of file player.h.

Referenced by do_mood_floor(), kill_object(), and pets_move_golem().

◆ has_directory

uint32_t player::has_directory

If 0, the player was not yet saved, its directory doesn't exist.

Definition at line 149 of file player.h.

◆ has_hit

uint32_t player::has_hit

If set, weapon_sp instead of speed will count.

Definition at line 144 of file player.h.

Referenced by move_player_attack().

◆ hidden

uint32_t player::hidden

If True, player (DM) is hidden from view.

Definition at line 147 of file player.h.

Referenced by monster_can_detect_enemy().

◆ invis_race

const char* player::invis_race

What race invisible to?

Definition at line 151 of file player.h.

◆ item_power

int16_t player::item_power

Total item power of objects equipped.

Definition at line 130 of file player.h.

◆ killer

char player::killer[BIG_NAME]

Who killed this player.

Definition at line 190 of file player.h.

Referenced by deep_swamp_type_process(), and poison_type_apply().

◆ language

language_t player::language

The language the player wishes to use.

Definition at line 220 of file player.h.

Referenced by get_player().

◆ last_applied_stats

living player::last_applied_stats

Last applied stats sent to the client.

Definition at line 172 of file player.h.

Referenced by get_player().

◆ last_character_flags

uint32_t player::last_character_flags

Last character flags (CS_STAT_CHARACTER_FLAGS) sent to client.

Definition at line 163 of file player.h.

Referenced by get_player().

◆ last_character_load

float player::last_character_load

Last value sent to the client.

Definition at line 136 of file player.h.

◆ last_examined

tag_t player::last_examined

Tag of most recently 'examined object.

Definition at line 165 of file player.h.

◆ last_exit

object* player::last_exit

Last exit used by player or NULL

Definition at line 208 of file player.h.

Referenced by do_follow().

◆ last_flags

uint16_t player::last_flags

Fire/run on flags for last tick.

Definition at line 157 of file player.h.

◆ last_golem_hp

int16_t player::last_golem_hp

Last golem hp value sent to the client.

Definition at line 175 of file player.h.

◆ last_golem_maxhp

int16_t player::last_golem_maxhp

Last golem max hp value sent to the client.

Definition at line 176 of file player.h.

◆ last_item_power

uint16_t player::last_item_power

Last value for item_power.

Definition at line 164 of file player.h.

◆ last_level

int8_t player::last_level

Last level we sent to client.

Definition at line 134 of file player.h.

◆ last_orig_stats

living player::last_orig_stats

Last permanent stats sent to client.

Definition at line 169 of file player.h.

◆ last_path_attuned

uint32_t player::last_path_attuned

Last spell attunment sent to client.

Definition at line 160 of file player.h.

◆ last_path_denied

uint32_t player::last_path_denied

Last spell denied sent to client.

Definition at line 162 of file player.h.

◆ last_path_repelled

uint32_t player::last_path_repelled

Last spell repelled sent to client.

Definition at line 161 of file player.h.

◆ last_race_stats

living player::last_race_stats

Last race stats sent to the client.

Definition at line 170 of file player.h.

◆ last_resist

int16_t player::last_resist[NROFATTACKS]

last resist values sent to client.

Definition at line 174 of file player.h.

Referenced by get_player().

◆ last_skill_exp

int64_t player::last_skill_exp[MAX_SKILLS]

Last exp sent to client. If != exp. obj update client.

Definition at line 154 of file player.h.

Referenced by get_player().

◆ last_skill_ob

object* player::last_skill_ob[MAX_SKILLS]

Exp objects sent to client.

Definition at line 153 of file player.h.

Referenced by get_player().

◆ last_speed

float player::last_speed

Last speed as sent to client.

Definition at line 173 of file player.h.

Referenced by get_player().

◆ last_stats

living player::last_stats

Last stats as sent to client.

Definition at line 168 of file player.h.

Referenced by get_player().

◆ last_tell

char player::last_tell[MAX_NAME]

last player that told you something [mids 01/14/2002].

Definition at line 191 of file player.h.

◆ last_weapon_sp

float player::last_weapon_sp

if diff than weapon_sp, update client.

Definition at line 156 of file player.h.

Referenced by get_player().

◆ last_weight

int32_t player::last_weight

Last weight as sent to client; -1 means do not send weight.

Definition at line 158 of file player.h.

Referenced by get_player().

◆ last_weight_limit

int32_t player::last_weight_limit

Last weight limit transmitted to client.

Definition at line 159 of file player.h.

◆ levgrace

int8_t player::levgrace[11]

What grace bonus the player gained on that level.

Definition at line 188 of file player.h.

Referenced by potion_type_apply().

◆ levhp

int8_t player::levhp[11]

What hp bonus the player gained on that level.

Definition at line 186 of file player.h.

Referenced by potion_type_apply().

◆ levsp

int8_t player::levsp[11]

What sp bonus the player gained on that level.

Definition at line 187 of file player.h.

Referenced by potion_type_apply().

◆ listening

uint8_t player::listening

Which priority will be used in info_all.

Definition at line 133 of file player.h.

Referenced by get_player().

◆ maplevel

char player::maplevel[MAX_BUF]

On which level is the player?

Definition at line 109 of file player.h.

◆ mark

object* player::mark

Marked object.

Definition at line 213 of file player.h.

Referenced by lightable_type_apply().

◆ mark_count

uint32_t player::mark_count

Count of marked object.

Definition at line 212 of file player.h.

Referenced by lightable_type_apply().

◆ mode

uint32_t player::mode

Mode of player for pickup.

Definition at line 123 of file player.h.

◆ name_changed

uint32_t player::name_changed

If true, the player has set a name.

Definition at line 145 of file player.h.

◆ new_password

char player::new_password[16]

2 (seed) + 11 (crypted) + 1 (EOS) + 2 (safety) = 16

Definition at line 194 of file player.h.

◆ next

player* player::next

Pointer to next player, NULL if this is last.

Definition at line 106 of file player.h.

Referenced by cfapi_party_get_property(), check_login(), draw_ext_info(), free_player(), is_legal_2ways_exit(), and verify_player().

◆ no_shout

uint32_t player::no_shout

if True, player is *not *able to use shout command.

Definition at line 148 of file player.h.

Referenced by get_player().

◆ ob

◆ orig_stats

living player::orig_stats

Permanent real stats of player.

Definition at line 167 of file player.h.

◆ own_title

char player::own_title[MAX_NAME]

Title the player has chosen for themself. Note that for dragon players, this is filled in for them.

Definition at line 182 of file player.h.

◆ partial_commands

uint32_t player::partial_commands

If 1, then first letters of a command are enough if no ambiguity in name.

Definition at line 150 of file player.h.

◆ party

partylist* player::party

◆ party_to_join

partylist* player::party_to_join

Used when player wants to join a party but we will have to get password first so we have to remember which party to join.

Definition at line 204 of file player.h.

◆ password

char player::password[16]

2 (seed) + 11 (crypted) + 1 (EOS) + 2 (safety) = 16

Definition at line 193 of file player.h.

◆ peaceful

uint32_t player::peaceful

If set, won't attack friendly creatures.

Definition at line 146 of file player.h.

Referenced by friendly_fire(), get_player(), is_enemy(), and kill_object().

◆ petmode

petmode_t player::petmode

Which petmode?

Definition at line 115 of file player.h.

Referenced by get_player(), pets_get_enemy(), pets_move(), and pets_should_arena_attack().

◆ ranges

object* player::ranges[range_size]

Object for each range. Set up in fix_object(). Note That not all are used, it is just nice to map this 1:1 With the range names.

Definition at line 116 of file player.h.

Referenced by do_mood_floor(), kill_object(), and pets_move_golem().

◆ rejoin_party

party_rejoin_mode player::rejoin_party

Whether to rejoin or not party at login.

Definition at line 210 of file player.h.

Referenced by get_player().

◆ run_on

uint32_t player::run_on

Player should keep moving in dir until run is off.

Definition at line 143 of file player.h.

Referenced by push_ob().

◆ savebed_map

char player::savebed_map[MAX_BUF]

Map where player will respawn after death.

Definition at line 110 of file player.h.

Referenced by get_player(), and player_changer_type_process().

◆ search_str

char player::search_str[MAX_BUF]

Item we are looking for.

Definition at line 211 of file player.h.

◆ shoottype

rangetype player::shoottype

Which range-attack is being used by player.

Definition at line 112 of file player.h.

Referenced by get_player().

◆ socket

socket_struct* player::socket

Socket information for this player. See the page on the login process for a description of its use.

Definition at line 107 of file player.h.

Referenced by annotate_ob(), book_type_apply(), draw_client_map2(), kill_object(), push_ob(), set_player_socket(), spellbook_type_apply(), teleport(), and transport_type_apply().

◆ spell_state

client_spell* player::spell_state

Spell information sent to client.

Definition at line 215 of file player.h.

◆ spellparam

char player::spellparam[MAX_BUF]

What param to add to spells.

Definition at line 113 of file player.h.

◆ stack_items

tag_t* player::stack_items

Item stack for patch/dump/... commands.

Definition at line 217 of file player.h.

◆ stack_position

int player::stack_position

Current stack position, 0 for no item.

Definition at line 219 of file player.h.

◆ state

uint8_t player::state

Input state of the player (name, password, etc). See the page on the login process for a description of its use.

Definition at line 131 of file player.h.

◆ swap_first

int player::swap_first

First stat player has selected to swap.

Definition at line 166 of file player.h.

Referenced by get_player().

◆ ticks_played

uint32_t player::ticks_played

How many ticks this player has played

Definition at line 222 of file player.h.

Referenced by get_player().

◆ title

char player::title[BIG_NAME]

Default title, like fighter, wizard, etc.

Definition at line 184 of file player.h.

Referenced by get_player(), and kill_object().

◆ tmp_invis

uint32_t player::tmp_invis

Will invis go away when we attack?

Definition at line 140 of file player.h.

Referenced by monster_can_detect_enemy().

◆ transport

object* player::transport

Transport the player is in.

Definition at line 214 of file player.h.

Referenced by object_insert_in_map(), and transport_type_apply().

◆ unapply

unapplymode player::unapply

Method for auto unapply.

Definition at line 121 of file player.h.

Referenced by get_player().

◆ unarmed_skill

const char* player::unarmed_skill

Prefered skill to use in unarmed combat

Definition at line 221 of file player.h.

Referenced by get_player().

◆ usekeys

usekeytype player::usekeys

Method for finding keys for doors.

Definition at line 120 of file player.h.


The documentation for this struct was generated from the following file: