Crossfire Server, Trunk  R20513
Data Fields
pl Struct Reference

One player. More...

#include <player.h>

Collaboration diagram for pl:
Collaboration graph

Data Fields

living applied_stats
 Stat changes due to gear or skills. More...
 
int16_t bed_x
 
int16_t bed_y
 x,y - coordinates of respawn (savebed). More...
 
int8_t blocked_los [MAP_CLIENT_X][MAP_CLIENT_Y]
 Array showing what spaces the player can see. More...
 
bowtype_t bowtype
 Which firemode? More...
 
uint32_t braced:1
 Will not move if braced, only attack. More...
 
uint32_t count
 Any numbers typed before a command. More...
 
int16_t digestion
 Any bonuses/penalties to digestion. More...
 
uint32_t do_los:1
 If true, need to call update_los() in draw(), and clear. More...
 
int16_t encumbrance
 How much our player is encumbered. More...
 
uint32_t fire_on:1
 Player should fire object, not move. More...
 
sstring followed_player
 Player the DM is following. More...
 
int16_t gen_grace
 Bonuses to regeneration speed of grace. More...
 
int16_t gen_hp
 Bonuses to regeneration speed of hp. More...
 
int16_t gen_sp
 Bonuses to regeneration speed of sp. More...
 
int16_t gen_sp_armour
 Penalty to sp regen from armour. More...
 
uint32_t golem_count
 To track the golem. More...
 
uint32_t has_directory:1
 If 0, the player was not yet saved, its directory doesn't exist. More...
 
uint32_t has_hit:1
 If set, weapon_sp instead of speed will count. More...
 
uint32_t hidden:1
 If True, player (DM) is hidden from view. More...
 
char input_buf [MAX_BUF]
 Holds command to run. More...
 
const char * invis_race
 What race invisible to? More...
 
int16_t item_power
 Total item power of objects equipped. More...
 
char killer [BIG_NAME]
 Who killed this player. More...
 
int language
 The language the player wishes to use. More...
 
living last_applied_stats
 Last applied stats sent to the client. More...
 
uint16_t last_flags
 Fire/run on flags for last tick. More...
 
int16_t last_golem_hp
 Last golem hp value sent to the client. More...
 
int16_t last_golem_maxhp
 Last golem max hp value sent to the client. More...
 
int8_t last_level
 Last level we sent to client. More...
 
living last_orig_stats
 Last permanent stats sent to client. More...
 
uint32_t last_path_attuned
 Last spell attunment sent to client. More...
 
uint32_t last_path_denied
 Last spell denied sent to client. More...
 
uint32_t last_path_repelled
 Last spell repelled sent to client. More...
 
living last_race_stats
 Last race stats sent to the client. More...
 
int16_t last_resist [NROFATTACKS]
 last resist values sent to client. More...
 
int64_t last_skill_exp [NUM_SKILLS]
 Last exp sent to client. More...
 
objectlast_skill_ob [NUM_SKILLS]
 Exp objects sent to client. More...
 
float last_speed
 Last speed as sent to client. More...
 
living last_stats
 Last stats as sent to client. More...
 
char last_tell [MAX_NAME]
 last player that told you something [mids 01/14/2002]. More...
 
float last_weapon_sp
 if diff than weapon_sp, update client. More...
 
int32_t last_weight
 Last weight as sent to client; -1 means do not send weight. More...
 
int32_t last_weight_limit
 Last weight limit transmitted to client. More...
 
int8_t levgrace [11]
 What grace bonus the player gained on that level. More...
 
int8_t levhp [11]
 What hp bonus the player gained on that level. More...
 
int8_t levsp [11]
 What sp bonus the player gained on that level. More...
 
uint8_t listening
 Which priority will be used in info_all. More...
 
char maplevel [MAX_BUF]
 On which level is the player? More...
 
objectmark
 Marked object. More...
 
uint32_t mark_count
 Count of marked object. More...
 
uint32_t mode
 Mode of player for pickup. More...
 
uint32_t name_changed:1
 If true, the player has set a name. More...
 
char new_password [16]
 2 (seed) + 11 (crypted) + 1 (EOS) + 2 (safety) = 16 More...
 
struct plnext
 Pointer to next player, NULL if this is last. More...
 
uint32_t no_shout:1
 if True, player is *not *able to use shout command. More...
 
objectob
 The object representing the player. More...
 
living orig_stats
 Permanent real stats of player. More...
 
char own_title [MAX_NAME]
 Title the player has chosen for themself. More...
 
partylistparty
 Party this player is part of. More...
 
partylistparty_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. More...
 
char password [16]
 2 (seed) + 11 (crypted) + 1 (EOS) + 2 (safety) = 16 More...
 
uint32_t peaceful:1
 If set, won't attack friendly creatures. More...
 
petmode_t petmode
 Which petmode? More...
 
objectranges [range_size]
 Object for each range. More...
 
party_rejoin_mode rejoin_party
 Whether to rejoin or not party at login. More...
 
uint32_t run_on:1
 Player should keep moving in dir until run is off. More...
 
char savebed_map [MAX_BUF]
 Map where player will respawn after death. More...
 
char search_str [MAX_BUF]
 Item we are looking for. More...
 
rangetype shoottype
 Which range-attack is being used by player. More...
 
socket_struct socket
 Socket information for this player. More...
 
client_spellspell_state
 Spell information sent to client. More...
 
char spellparam [MAX_BUF]
 What param to add to spells. More...
 
tag_tstack_items
 Item stack for patch/dump/... More...
 
int stack_position
 Current stack position, 0 for no item. More...
 
uint8_t state
 Input state of the player (name, password, etc). More...
 
int swap_first
 First stat player has selected to swap. More...
 
uint32_t ticks_played
 How many ticks this player has played. More...
 
char title [BIG_NAME]
 Default title, like fighter, wizard, etc. More...
 
uint32_t tmp_invis:1
 Will invis go away when we attack? More...
 
objecttransport
 Transport the player is in. More...
 
unapplymode unapply
 Method for auto unapply. More...
 
const char * unarmed_skill
 Prefered skill to use in unarmed combat. More...
 
usekeytype usekeys
 Method for finding keys for doors. More...
 
char write_buf [MAX_BUF]
 Holds arbitrary input from client. More...
 

Detailed Description

One player.

Definition at line 92 of file player.h.

Field Documentation

living pl::applied_stats

Stat changes due to gear or skills.

Definition at line 152 of file player.h.

Referenced by esrv_update_stats(), and fix_object().

int16_t pl::bed_x
int16_t pl::bed_y
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 159 of file player.h.

Referenced by blinded_sight(), check_wall(), clear_los(), draw_client_map2(), expand_lighted_sight(), expand_sight(), look_at_cmd(), make_sure_seen(), player_can_view(), print_los(), set_wall(), and update_los().

bowtype_t pl::bowtype

Which firemode?

Definition at line 101 of file player.h.

Referenced by check_login(), command_bowmode(), fire_bow(), get_player(), player_fire_bow(), and save_player().

uint32_t pl::braced

Will not move if braced, only attack.

Definition at line 124 of file player.h.

Referenced by add_player_exp(), command_brace(), fix_player(), kill_player(), kill_player_not_permadeath(), and move_player_attack().

uint32_t pl::count
int16_t pl::digestion

Any bonuses/penalties to digestion.

Definition at line 112 of file player.h.

Referenced by check_login(), describe_monster(), fix_object(), old_describe_monster(), and save_player().

uint32_t pl::do_los
int16_t pl::encumbrance

How much our player is encumbered.

Definition at line 179 of file player.h.

Referenced by cast_spell(), and fix_object().

uint32_t pl::fire_on

Player should fire object, not move.

Definition at line 127 of file player.h.

Referenced by command_fire(), command_fire_stop(), command_stay(), esrv_update_stats(), handle_newcs_player(), move_internal(), and move_player().

sstring pl::followed_player

Player the DM is following.

Definition at line 199 of file player.h.

Referenced by command_follow(), command_nowiz(), and process_players1().

int16_t pl::gen_grace

Bonuses to regeneration speed of grace.

Definition at line 116 of file player.h.

Referenced by check_login(), describe_monster(), fix_object(), old_describe_monster(), and save_player().

int16_t pl::gen_hp

Bonuses to regeneration speed of hp.

Definition at line 113 of file player.h.

Referenced by check_login(), describe_monster(), do_some_living(), fix_object(), old_describe_monster(), and save_player().

int16_t pl::gen_sp

Bonuses to regeneration speed of sp.

Definition at line 114 of file player.h.

Referenced by check_login(), describe_monster(), do_some_living(), fix_object(), old_describe_monster(), and save_player().

int16_t pl::gen_sp_armour

Penalty to sp regen from armour.

Definition at line 115 of file player.h.

Referenced by fix_object(), and get_player().

uint32_t pl::golem_count
uint32_t pl::has_directory

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

Definition at line 134 of file player.h.

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

uint32_t pl::has_hit

If set, weapon_sp instead of speed will count.

Definition at line 129 of file player.h.

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

uint32_t pl::hidden
char pl::input_buf[MAX_BUF]

Holds command to run.

Definition at line 175 of file player.h.

const char* pl::invis_race

What race invisible to?

Definition at line 135 of file player.h.

Referenced by cast_invisible(), make_visible(), and makes_invisible_to().

int16_t pl::item_power

Total item power of objects equipped.

Definition at line 117 of file player.h.

Referenced by apply_check_item_power(), fix_object(), improve_armour(), improve_weapon(), and show_skills().

char pl::killer[BIG_NAME]
int pl::language

The language the player wishes to use.

Definition at line 201 of file player.h.

Referenced by check_login(), command_help(), command_language(), get_language(), get_player(), help_topics(), i18n(), and save_player().

living pl::last_applied_stats

Last applied stats sent to the client.

Definition at line 153 of file player.h.

Referenced by esrv_update_stats().

uint16_t pl::last_flags

Fire/run on flags for last tick.

Definition at line 141 of file player.h.

Referenced by esrv_update_stats().

int16_t pl::last_golem_hp

Last golem hp value sent to the client.

Definition at line 156 of file player.h.

Referenced by esrv_update_stats().

int16_t pl::last_golem_maxhp

Last golem max hp value sent to the client.

Definition at line 157 of file player.h.

Referenced by esrv_update_stats().

int8_t pl::last_level

Last level we sent to client.

Definition at line 121 of file player.h.

Referenced by esrv_update_stats().

living pl::last_orig_stats

Last permanent stats sent to client.

Definition at line 150 of file player.h.

Referenced by esrv_update_stats().

uint32_t pl::last_path_attuned

Last spell attunment sent to client.

Definition at line 144 of file player.h.

Referenced by esrv_update_stats().

uint32_t pl::last_path_denied

Last spell denied sent to client.

Definition at line 146 of file player.h.

Referenced by esrv_update_stats().

uint32_t pl::last_path_repelled

Last spell repelled sent to client.

Definition at line 145 of file player.h.

Referenced by esrv_update_stats().

living pl::last_race_stats

Last race stats sent to the client.

Definition at line 151 of file player.h.

Referenced by esrv_update_stats().

int16_t pl::last_resist[NROFATTACKS]

last resist values sent to client.

Definition at line 155 of file player.h.

Referenced by esrv_update_stats(), and get_player().

int64_t pl::last_skill_exp[NUM_SKILLS]

Last exp sent to client.

If != exp. obj update client.

Definition at line 138 of file player.h.

Referenced by esrv_update_stats(), get_player(), give_skill_by_name(), and link_player_skills().

object* pl::last_skill_ob[NUM_SKILLS]

Exp objects sent to client.

Definition at line 137 of file player.h.

Referenced by add_player_exp(), caster_level(), esrv_update_stats(), get_player(), give_skill_by_name(), kill_object(), and link_player_skills().

float pl::last_speed

Last speed as sent to client.

Definition at line 154 of file player.h.

Referenced by esrv_update_stats(), and get_player().

living pl::last_stats

Last stats as sent to client.

Definition at line 149 of file player.h.

Referenced by esrv_update_stats(), and get_player().

char pl::last_tell[MAX_NAME]

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

Definition at line 172 of file player.h.

Referenced by command_reply(), and do_tell().

float pl::last_weapon_sp

if diff than weapon_sp, update client.

Definition at line 140 of file player.h.

Referenced by esrv_update_stats(), and get_player().

int32_t pl::last_weight

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

Definition at line 142 of file player.h.

Referenced by do_server(), esrv_new_player(), esrv_update_item(), and get_player().

int32_t pl::last_weight_limit

Last weight limit transmitted to client.

Definition at line 143 of file player.h.

Referenced by esrv_update_stats().

int8_t pl::levgrace[11]

What grace bonus the player gained on that level.

Definition at line 169 of file player.h.

Referenced by check_login(), fix_player(), player_lvl_adj(), potion_type_apply(), roll_stats(), save_player(), and swap_stat().

int8_t pl::levhp[11]

What hp bonus the player gained on that level.

Definition at line 167 of file player.h.

Referenced by check_login(), fix_player(), player_lvl_adj(), potion_type_apply(), roll_stats(), save_player(), and swap_stat().

int8_t pl::levsp[11]

What sp bonus the player gained on that level.

Definition at line 168 of file player.h.

Referenced by check_login(), fix_player(), player_lvl_adj(), potion_type_apply(), roll_stats(), save_player(), and swap_stat().

uint8_t pl::listening

Which priority will be used in info_all.

Definition at line 120 of file player.h.

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

char pl::maplevel[MAX_BUF]

On which level is the player?

Definition at line 96 of file player.h.

Referenced by account_char_add(), check_login(), emergency_save(), enter_map(), enter_player_maplevel(), kill_player_permadeath(), set_first_map(), and START_TEST().

object* pl::mark

Marked object.

Definition at line 194 of file player.h.

Referenced by cfapi_object_set_property(), command_mark(), find_marked_object(), inscribe_scroll_cmd(), and mark_item_cmd().

uint32_t pl::mark_count

Count of marked object.

Definition at line 193 of file player.h.

Referenced by cfapi_object_set_property(), command_mark(), find_marked_object(), inscribe_scroll_cmd(), and mark_item_cmd().

uint32_t pl::mode

Mode of player for pickup.

Definition at line 110 of file player.h.

Referenced by check_login(), check_pick(), command_pickup(), display_new_pickup(), esrv_send_pickup(), save_player(), and set_pickup_mode().

uint32_t pl::name_changed

If true, the player has set a name.

Definition at line 130 of file player.h.

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

char pl::new_password[16]

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

Definition at line 177 of file player.h.

Referenced by receive_player_password().

struct pl* pl::next
uint32_t pl::no_shout

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

Definition at line 133 of file player.h.

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

object* pl::ob

The object representing the player.

Definition at line 158 of file player.h.

Referenced by account_char_add(), account_play_cmd(), add_player(), append_spell(), apply_cmd(), basic_emote(), cfapi_object_get_property(), cfapi_object_move(), cfapi_object_set_property(), cflogger_globalEventListener(), cfpython_globalEventListener(), check_login(), check_name(), 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(), create_player_cmd(), Crossfire_Party_GetPlayers(), dm_stack_peek(), dm_stack_pop(), dm_stack_push(), 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_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(), 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(), metaserver_update(), 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_help(), quest_info(), quest_list(), quest_set_state(), quest_start(), receive_play_again(), reply_cmd(), save_player(), send_changed_object(), set_up_cmd(), share_exp(), START_TEST(), swap_map(), transport_type_apply(), update_all_los(), and update_all_map_los().

living pl::orig_stats
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 163 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().

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

Referenced by confirm_party_password(), get_party_password(), and receive_party_password().

char pl::password[16]

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

Definition at line 176 of file player.h.

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

uint32_t pl::peaceful

If set, won't attack friendly creatures.

Definition at line 131 of file player.h.

Referenced by check_login(), command_peaceful(), command_statistics(), friendly_fire(), get_player(), get_who_escape_code_value(), kill_object(), move_player_attack(), and save_player().

petmode_t pl::petmode
object* pl::ranges[range_size]
party_rejoin_mode pl::rejoin_party

Whether to rejoin or not party at login.

Definition at line 191 of file player.h.

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

uint32_t pl::run_on

Player should keep moving in dir until run is off.

Definition at line 128 of file player.h.

Referenced by command_run(), command_run_stop(), do_hidden_move(), esrv_update_stats(), handle_newcs_player(), move_internal(), move_player(), player_attack_door(), and push_ob().

char pl::savebed_map[MAX_BUF]
char pl::search_str[MAX_BUF]

Item we are looking for.

Definition at line 192 of file player.h.

Referenced by check_login(), check_pick(), command_search_items(), and fix_player().

rangetype pl::shoottype
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 94 of file player.h.

Referenced by account_get_logged_in_player(), account_login_cmd(), account_play_cmd(), alchemy(), append_spell(), apply_cmd(), apply_container(), apply_race_and_class(), apply_savebed(), attempt_jump(), blinded_sight(), book_type_apply(), cfapi_object_drop(), cfapi_object_get_property(), cfapi_object_set_property(), cfapi_object_teleport(), check_login(), check_wall(), command_banish(), command_dropall(), command_kick2(), command_passwd(), command_quit(), command_sound(), confirm_password(), create_player_cmd(), dimension_door(), do_server(), do_wizard_dm(), draw_client_map(), draw_client_map2(), draw_ext_info(), draw_magic_map(), enter_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(), expand_lighted_sight(), expand_sight(), final_free_player(), find_player_socket(), free_player(), get_name(), get_party_password(), get_password(), get_player(), get_who_escape_code_value(), handle_newcs_player(), key_change_class(), key_confirm_quit(), key_roll_stat(), kill_object(), kill_player_permadeath(), 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(), metaserver_update(), monsterFight(), move_ob(), new_player_cmd(), object_decrease_nrof(), object_increase_nrof(), object_insert_in_map(), object_update(), play_again(), play_sound_player_only(), player_can_view(), print_los(), process_players1(), push_ob(), put_object_in_sack(), quest_send_initial_states(), quest_set_state(), receive_play_again(), receive_player_password(), roll_again(), save_player(), send_background_music(), send_changed_object(), send_plugin_custom_message(), send_tick(), set_player_socket(), set_wall(), shop_mat_type_move_on(), spellbook_type_apply(), teleport(), transfer_ob(), transport_type_apply(), turn_one_transport(), update_all_los(), update_los(), and wrong_password().

client_spell* pl::spell_state

Spell information sent to client.

Definition at line 196 of file player.h.

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

char pl::spellparam[MAX_BUF]

What param to add to spells.

Definition at line 100 of file player.h.

Referenced by check_login(), command_cast_spell(), and fire().

tag_t* pl::stack_items

Item stack for patch/dump/...

commands.

Definition at line 198 of file player.h.

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

int pl::stack_position
uint8_t pl::state
int pl::swap_first

First stat player has selected to swap.

Definition at line 147 of file player.h.

Referenced by get_player(), key_roll_stat(), and swap_stat().

uint32_t pl::ticks_played

How many ticks this player has played.

Definition at line 203 of file player.h.

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

char pl::title[BIG_NAME]
uint32_t pl::tmp_invis

Will invis go away when we attack?

Definition at line 125 of file player.h.

Referenced by action_makes_visible(), attempt_hide(), cast_invisible(), do_skill_attack(), make_visible(), monster_can_detect_enemy(), and move_player_attack().

object* pl::transport
unapplymode pl::unapply

Method for auto unapply.

Definition at line 108 of file player.h.

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

const char* pl::unarmed_skill

Prefered skill to use in unarmed combat.

Definition at line 202 of file player.h.

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

usekeytype pl::usekeys

Method for finding keys for doors.

Definition at line 107 of file player.h.

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

char pl::write_buf[MAX_BUF]

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