Crossfire Server, Trunk
pl Struct Reference

#include <player.h>

+ Collaboration diagram for pl:

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]
 
int language
 
living last_applied_stats
 
uint32_t last_character_flags
 
float last_character_load
 
struct objlast_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]
 
struct plnext
 
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 pl::applied_stats

Stat changes due to gear or skills.

Definition at line 170 of file player.h.

Referenced by esrv_update_stats().

◆ bed_x

int16_t pl::bed_x

◆ bed_y

int16_t pl::bed_y

x,y - coordinates of respawn (savebed).

Definition at line 111 of file player.h.

Referenced by apply_savebed(), check_login(), create_player_cmd(), monsterFight(), player_changer_type_process(), and save_player().

◆ blocked_los

int8_t pl::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 177 of file player.h.

Referenced by blinded_sight(), clear_los(), draw_client_map2(), look_at_cmd(), make_sure_seen(), player_can_view(), and set_wall().

◆ bowtype

bowtype_t pl::bowtype

Which firemode?

Definition at line 114 of file player.h.

Referenced by check_login(), get_player(), and save_player().

◆ braced

uint32_t pl::braced

Will not move if braced, only attack.

Definition at line 139 of file player.h.

◆ character_load

float pl::character_load

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

Definition at line 135 of file player.h.

Referenced by send_extra_stats().

◆ count

uint32_t pl::count

Any numbers typed before a command.

Definition at line 122 of file player.h.

Referenced by esrv_get_ob_from_count(), esrv_move_object(), new_player_cmd(), and object_matches_string().

◆ delayed_buffers

SockList** pl::delayed_buffers

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

Definition at line 225 of file player.h.

Referenced by clear_player(), player_get_delayed_buffer(), and send_delayed_buffers().

◆ delayed_buffers_allocated

uint8_t pl::delayed_buffers_allocated

Number of items in delayed_buffers_used.

Definition at line 223 of file player.h.

Referenced by clear_player(), and player_get_delayed_buffer().

◆ delayed_buffers_used

uint8_t pl::delayed_buffers_used

Used items in delayed_buffers_used.

Definition at line 224 of file player.h.

Referenced by clear_player(), player_get_delayed_buffer(), and send_delayed_buffers().

◆ digestion

int16_t pl::digestion

Any bonuses/penalties to digestion.

Definition at line 125 of file player.h.

Referenced by check_login(), and save_player().

◆ do_los

uint32_t pl::do_los

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

Definition at line 141 of file player.h.

Referenced by draw_client_map(), get_player(), make_sure_not_seen(), move_ob(), turn_one_transport(), update_all_los(), and update_all_map_los().

◆ encumbrance

int16_t pl::encumbrance

How much our player is encumbered.

Definition at line 195 of file player.h.

◆ fire_on

uint32_t pl::fire_on

Player should fire object, not move.

Definition at line 142 of file player.h.

Referenced by esrv_update_stats().

◆ followed_player

sstring pl::followed_player

Player the DM is following.

Definition at line 217 of file player.h.

Referenced by do_follow(), and process_players1().

◆ gen_grace

int16_t pl::gen_grace

Bonuses to regeneration speed of grace.

Definition at line 129 of file player.h.

Referenced by check_login(), and save_player().

◆ gen_hp

int16_t pl::gen_hp

Bonuses to regeneration speed of hp.

Definition at line 126 of file player.h.

Referenced by check_login(), and save_player().

◆ gen_sp

int16_t pl::gen_sp

Bonuses to regeneration speed of sp.

Definition at line 127 of file player.h.

Referenced by check_login(), and save_player().

◆ gen_sp_armour

int16_t pl::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 pl::golem_count

To track the golem.

Definition at line 119 of file player.h.

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

◆ has_directory

uint32_t pl::has_directory

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

Definition at line 149 of file player.h.

Referenced by check_login(), knowledge_give(), and quest_set_state().

◆ has_hit

uint32_t pl::has_hit

If set, weapon_sp instead of speed will count.

Definition at line 144 of file player.h.

Referenced by command_execute(), move_player_attack(), and process_players2().

◆ hidden

uint32_t pl::hidden

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

Definition at line 147 of file player.h.

Referenced by command_reply(), count_players(), do_tell(), find_player_options(), leave(), list_players(), monster_can_detect_enemy(), and players_on_map().

◆ invis_race

const char* pl::invis_race

What race invisible to?

Definition at line 151 of file player.h.

Referenced by makes_invisible_to().

◆ item_power

int16_t pl::item_power

Total item power of objects equipped.

Definition at line 130 of file player.h.

Referenced by send_extra_stats().

◆ killer

char pl::killer[BIG_NAME]

Who killed this player.

Definition at line 189 of file player.h.

Referenced by apply_savebed(), deep_swamp_type_process(), leave(), and poison_type_apply().

◆ language

int pl::language

The language the player wishes to use.

Definition at line 219 of file player.h.

Referenced by check_login(), get_player(), and save_player().

◆ last_applied_stats

living pl::last_applied_stats

Last applied stats sent to the client.

Definition at line 171 of file player.h.

Referenced by esrv_update_stats().

◆ last_character_flags

uint32_t pl::last_character_flags

Last character flags (CS_STAT_CHARACTER_FLAGS) sent to client.

Definition at line 163 of file player.h.

Referenced by send_extra_stats().

◆ last_character_load

float pl::last_character_load

Last value sent to the client.

Definition at line 136 of file player.h.

Referenced by send_extra_stats().

◆ last_exit

struct obj* pl::last_exit

Last exit used by player or NULL

Definition at line 207 of file player.h.

Referenced by clear_player(), and do_follow().

◆ last_flags

uint16_t pl::last_flags

Fire/run on flags for last tick.

Definition at line 157 of file player.h.

Referenced by esrv_update_stats().

◆ last_golem_hp

int16_t pl::last_golem_hp

Last golem hp value sent to the client.

Definition at line 174 of file player.h.

Referenced by esrv_update_stats().

◆ last_golem_maxhp

int16_t pl::last_golem_maxhp

Last golem max hp value sent to the client.

Definition at line 175 of file player.h.

Referenced by esrv_update_stats().

◆ last_item_power

uint16_t pl::last_item_power

Last value for item_power.

Definition at line 164 of file player.h.

Referenced by send_extra_stats().

◆ last_level

int8_t pl::last_level

Last level we sent to client.

Definition at line 134 of file player.h.

Referenced by esrv_update_stats().

◆ last_orig_stats

living pl::last_orig_stats

Last permanent stats sent to client.

Definition at line 168 of file player.h.

Referenced by esrv_update_stats().

◆ last_path_attuned

uint32_t pl::last_path_attuned

Last spell attunment sent to client.

Definition at line 160 of file player.h.

Referenced by esrv_update_stats().

◆ last_path_denied

uint32_t pl::last_path_denied

Last spell denied sent to client.

Definition at line 162 of file player.h.

Referenced by esrv_update_stats().

◆ last_path_repelled

uint32_t pl::last_path_repelled

Last spell repelled sent to client.

Definition at line 161 of file player.h.

Referenced by esrv_update_stats().

◆ last_race_stats

living pl::last_race_stats

Last race stats sent to the client.

Definition at line 169 of file player.h.

Referenced by esrv_update_stats().

◆ last_resist

int16_t pl::last_resist[NROFATTACKS]

last resist values sent to client.

Definition at line 173 of file player.h.

Referenced by esrv_update_stats(), and get_player().

◆ last_skill_exp

int64_t pl::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 esrv_update_stats(), and get_player().

◆ last_skill_ob

object* pl::last_skill_ob[MAX_SKILLS]

Exp objects sent to client.

Definition at line 153 of file player.h.

Referenced by esrv_update_stats(), and get_player().

◆ last_speed

float pl::last_speed

Last speed as sent to client.

Definition at line 172 of file player.h.

Referenced by esrv_update_stats(), and get_player().

◆ last_stats

living pl::last_stats

Last stats as sent to client.

Definition at line 167 of file player.h.

Referenced by esrv_update_stats(), and get_player().

◆ last_tell

char pl::last_tell[MAX_NAME]

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

Definition at line 190 of file player.h.

Referenced by command_reply(), and do_tell().

◆ last_weapon_sp

float pl::last_weapon_sp

if diff than weapon_sp, update client.

Definition at line 156 of file player.h.

Referenced by esrv_update_stats(), and get_player().

◆ last_weight

int32_t pl::last_weight

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

Definition at line 158 of file player.h.

Referenced by esrv_new_player(), get_player(), and send_updates().

◆ last_weight_limit

int32_t pl::last_weight_limit

Last weight limit transmitted to client.

Definition at line 159 of file player.h.

Referenced by esrv_update_stats().

◆ levgrace

int8_t pl::levgrace[11]

What grace bonus the player gained on that level.

Definition at line 187 of file player.h.

Referenced by check_login(), is_perfect(), potion_type_apply(), and save_player().

◆ levhp

int8_t pl::levhp[11]

What hp bonus the player gained on that level.

Definition at line 185 of file player.h.

Referenced by check_login(), is_perfect(), potion_type_apply(), and save_player().

◆ levsp

int8_t pl::levsp[11]

What sp bonus the player gained on that level.

Definition at line 186 of file player.h.

Referenced by check_login(), is_perfect(), potion_type_apply(), and save_player().

◆ listening

uint8_t pl::listening

Which priority will be used in info_all.

Definition at line 133 of file player.h.

Referenced by check_login(), do_tell(), draw_ext_info(), get_player(), and save_player().

◆ maplevel

char pl::maplevel[MAX_BUF]

On which level is the player?

Definition at line 109 of file player.h.

Referenced by account_char_add(), check_login(), emergency_save(), and START_TEST().

◆ mark

object* pl::mark

Marked object.

Definition at line 212 of file player.h.

Referenced by inscribe_scroll_cmd(), lightable_type_apply(), and mark_item_cmd().

◆ mark_count

uint32_t pl::mark_count

Count of marked object.

Definition at line 211 of file player.h.

Referenced by inscribe_scroll_cmd(), lightable_type_apply(), and mark_item_cmd().

◆ mode

uint32_t pl::mode

Mode of player for pickup.

Definition at line 123 of file player.h.

Referenced by check_login(), esrv_send_pickup(), and save_player().

◆ name_changed

uint32_t pl::name_changed

If true, the player has set a name.

Definition at line 145 of file player.h.

Referenced by check_login(), create_player_cmd(), and save_player().

◆ new_password

char pl::new_password[16]

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

Definition at line 193 of file player.h.

◆ next

◆ no_shout

uint32_t pl::no_shout

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

Definition at line 148 of file player.h.

Referenced by check_login(), command_toggle_shout(), get_player(), and save_player().

◆ ob

object* pl::ob

The object representing the player.

Definition at line 176 of file player.h.

Referenced by account_char_add(), account_play_cmd(), add_player(), append_spell(), apply_cmd(), basic_emote(), can_follow(), cfapi_object_get_property(), cfapi_object_move(), cfapi_object_set_property(), cflogger_globalEventListener(), cfpython_globalEventListener(), check_login(), command_abil(), command_addexp(), command_arrest(), command_banish(), command_follow(), command_freeze(), command_kick2(), command_possess(), command_quest(), command_reply(), command_reset(), command_stats(), command_summon(), command_teleport(), command_toggle_shout(), command_whereabouts(), count_players(), create_player_cmd(), Crossfire_Party_GetPlayers(), dm_stack_peek(), dm_stack_pop(), dm_stack_push(), do_follow(), do_server(), do_tell(), draw_ext_info(), emergency_save(), esrv_add_spells(), esrv_del_item(), esrv_new_player(), esrv_remove_spell(), esrv_update_spells(), esrv_update_stats(), examine_cmd(), ext_info_map(), ext_info_map_except(), ext_info_map_except2(), find_player_options(), findPlayer(), fix_luck(), fix_weight(), free_player(), get_dm_object(), get_nearest_criminal(), get_nearest_player(), get_or_create_quest(), get_other_player_from_name(), get_player(), get_quest(), get_who_escape_code_value(), globalEventListener(), handle_client(), inscribe_scroll_cmd(), is_legal_2ways_exit(), is_perfect(), knowledge_alchemy_attempt(), knowledge_first_player_save(), knowledge_get_or_create(), knowledge_give(), knowledge_process_incremental(), leave(), list_players(), lock_item_cmd(), look_at_cmd(), make_sure_not_seen(), make_sure_seen(), mark_item_cmd(), monsterFight(), move_cmd(), new_player_cmd(), object_decrease_nrof(), object_increase_nrof(), party_send_message(), play_sound_map(), play_sound_player_only(), players_on_map(), process_players1(), process_players2(), quest_display(), quest_info(), quest_list(), quest_set_state(), quest_start(), receive_play_again(), reply_cmd(), ring_bell(), save_and_kick_all_players(), save_player(), send_changed_object(), send_extra_stats(), send_updates(), set_up_cmd(), share_exp(), START_TEST(), swap_map(), update_all_los(), update_all_map_los(), and verify_player().

◆ orig_stats

living pl::orig_stats

Permanent real stats of player.

Definition at line 166 of file player.h.

Referenced by apply_changes_to_player(), check_login(), command_abil(), command_statistics(), esrv_update_stats(), and save_player().

◆ own_title

char pl::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 181 of file player.h.

Referenced by player_get_own_title(), player_get_title(), player_has_own_title(), player_set_dragon_title(), and player_set_own_title().

◆ partial_commands

uint32_t pl::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.

Referenced by check_login(), command_find(), and save_player().

◆ party

◆ party_to_join

partylist* pl::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 203 of file player.h.

◆ password

char pl::password[16]

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

Definition at line 192 of file player.h.

Referenced by check_login(), create_player_cmd(), and save_player().

◆ peaceful

uint32_t pl::peaceful

If set, won't attack friendly creatures.

Definition at line 146 of file player.h.

Referenced by check_login(), command_statistics(), friendly_fire(), get_player(), get_who_escape_code_value(), is_enemy(), kill_object(), save_player(), and send_extra_stats().

◆ petmode

petmode_t pl::petmode

Which petmode?

Definition at line 115 of file player.h.

Referenced by check_login(), get_player(), pets_get_enemy(), pets_move(), pets_should_arena_attack(), save_player(), and START_TEST().

◆ ranges

object* pl::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 apply_map_builder(), do_mood_floor(), esrv_update_stats(), inscribe_scroll_cmd(), kill_object(), pets_move_golem(), player_unready_range_ob(), rangetostring(), and write_scroll().

◆ rejoin_party

party_rejoin_mode pl::rejoin_party

Whether to rejoin or not party at login.

Definition at line 209 of file player.h.

Referenced by check_login(), get_player(), and save_player().

◆ run_on

uint32_t pl::run_on

Player should keep moving in dir until run is off.

Definition at line 143 of file player.h.

Referenced by esrv_update_stats(), and push_ob().

◆ savebed_map

char pl::savebed_map[MAX_BUF]

Map where player will respawn after death.

Definition at line 110 of file player.h.

Referenced by apply_savebed(), check_login(), create_player_cmd(), get_player(), monsterFight(), player_changer_type_process(), and save_player().

◆ search_str

char pl::search_str[MAX_BUF]

Item we are looking for.

Definition at line 210 of file player.h.

Referenced by check_login().

◆ shoottype

rangetype pl::shoottype

Which range-attack is being used by player.

Definition at line 112 of file player.h.

Referenced by check_login(), get_player(), player_unready_range_ob(), rangetostring(), and save_player().

◆ socket

socket_struct* pl::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 account_play_cmd(), append_spell(), apply_cmd(), apply_savebed(), attempt_jump(), blinded_sight(), book_type_apply(), check_login(), command_banish(), command_kick2(), command_passwd(), command_recollect(), count_players(), create_player_cmd(), do_follow(), do_server(), draw_client_map(), draw_client_map2(), draw_ext_info(), draw_magic_map(), esrv_add_spells(), esrv_del_item(), esrv_draw_look(), esrv_new_player(), esrv_remove_spell(), esrv_send_inventory(), esrv_send_item(), esrv_send_pickup(), esrv_update_item(), esrv_update_spells(), esrv_update_stats(), final_free_player(), find_player_socket(), get_who_escape_code_value(), kill_object(), knowledge_get_or_create(), knowledge_process_incremental(), knowledge_send_known(), leave(), list_players(), look_at_cmd(), make_perma_dead(), make_sure_not_seen(), make_sure_seen(), monsterFight(), move_ob(), new_player_cmd(), object_decrease_nrof(), object_increase_nrof(), object_update(), play_sound_player_only(), player_can_view(), process_players1(), push_ob(), quest_send_initial_states(), quest_set_state(), receive_play_again(), save_player(), send_background_music(), send_delayed_buffers(), send_extra_stats(), send_plugin_custom_message(), send_tick(), send_updates(), set_player_socket(), set_wall(), spellbook_type_apply(), START_TEST(), teleport(), transport_type_apply(), turn_one_transport(), update_all_los(), and update_players().

◆ spell_state

client_spell* pl::spell_state

Spell information sent to client.

Definition at line 214 of file player.h.

Referenced by clear_player(), esrv_update_spells(), and get_client_spell_state().

◆ spellparam

char pl::spellparam[MAX_BUF]

What param to add to spells.

Definition at line 113 of file player.h.

Referenced by check_login().

◆ stack_items

tag_t* pl::stack_items

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

Definition at line 216 of file player.h.

Referenced by clear_player(), command_stack_list(), dm_stack_peek(), dm_stack_pop(), dm_stack_push(), and get_dm_object().

◆ stack_position

int pl::stack_position

Current stack position, 0 for no item.

Definition at line 218 of file player.h.

Referenced by clear_player(), command_stack_list(), dm_stack_peek(), dm_stack_pop(), dm_stack_push(), and get_dm_object().

◆ state

uint8_t pl::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.

Referenced by account_play_cmd(), check_login(), count_players(), fix_luck(), get_other_player_from_name(), handle_client(), handle_cmd(), leave(), list_players(), new_player_cmd(), player_set_state(), process_players1(), reply_cmd(), save_player(), and update_players().

◆ swap_first

int pl::swap_first

First stat player has selected to swap.

Definition at line 165 of file player.h.

Referenced by get_player().

◆ ticks_played

uint32_t pl::ticks_played

How many ticks this player has played

Definition at line 221 of file player.h.

Referenced by check_login(), command_statistics(), get_player(), process_players1(), and save_player().

◆ title

char pl::title[BIG_NAME]

Default title, like fighter, wizard, etc.

Definition at line 183 of file player.h.

Referenced by check_login(), get_player(), kill_object(), player_get_title(), and player_set_dragon_title().

◆ tmp_invis

uint32_t pl::tmp_invis

Will invis go away when we attack?

Definition at line 140 of file player.h.

Referenced by monster_can_detect_enemy().

◆ transport

◆ unapply

unapplymode pl::unapply

Method for auto unapply.

Definition at line 121 of file player.h.

Referenced by check_login(), get_player(), and save_player().

◆ unarmed_skill

const char* pl::unarmed_skill

Prefered skill to use in unarmed combat

Definition at line 220 of file player.h.

Referenced by check_login(), clear_player(), get_player(), and save_player().

◆ usekeys

usekeytype pl::usekeys

Method for finding keys for doors.

Definition at line 120 of file player.h.

Referenced by check_login(), find_key(), and save_player().


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