Crossfire Server, Branches 1.12
R18729
|
#include <global.h>
Go to the source code of this file.
Functions | |
int | atnr_is_dragon_enabled (int attacknr) |
void | clear_player (player *pl) |
void | free_player (player *pl) |
client_spell * | get_client_spell_state (player *pl, object *spell) |
int | is_dragon_pl (const object *op) |
int | is_old_wraith_pl (object *op) |
int | is_wraith_pl (object *op) |
Player-structure related functions.
Definition in file player.c.
int atnr_is_dragon_enabled | ( | int | attacknr | ) |
Determine if the attacktype represented by the specified attack-number is enabled for dragon players. A dragon player (quetzal) can gain resistances for all enabled attacktypes.
attacknr | attacktype to check |
Definition at line 106 of file player.c.
References ATNR_ACID, ATNR_COLD, ATNR_ELECTRICITY, ATNR_FIRE, ATNR_MAGIC, and ATNR_POISON.
Referenced by command_resistances(), describe_item(), describe_resistance(), dragon_eat_flesh(), dragon_level_gain(), and set_dragon_name().
void clear_player | ( | player * | pl | ) |
Clears data in player structure.
Socket isn't touched. Nor is anything that doesn't need to be freed. So you may need to do a memset() to clear out values.
pl | player to clear. Pointer is still valid, and can be reused for "play again". |
Definition at line 45 of file player.c.
References client_spell::next, pl::spell_state, pl::stack_items, and pl::stack_position.
Referenced by free_player(), and get_player().
void free_player | ( | player * | pl | ) |
Clears player structure, including pointed object (through free_object()).
pl | player to clear. Pointer is invalid after this call. |
Definition at line 68 of file player.c.
References CFREE, clear_player(), socket_struct::faces_sent, first_player, FLAG_REMOVED, free_object(), llevError, LOG(), pl::next, pl::ob, QUERY_FLAG, remove_ob(), and pl::socket.
Referenced by final_free_player().
client_spell* get_client_spell_state | ( | player * | pl, |
object * | spell | ||
) |
Gets the (client-side) spell state for specified spell. Will be created to empty state if not found.
pl | player we're handling. |
spell | spell for which to search data. |
Definition at line 147 of file player.c.
References fatal(), client_spell::next, OUT_OF_MEMORY, client_spell::spell, and pl::spell_state.
Referenced by append_spell(), and esrv_update_spells().
int is_dragon_pl | ( | const object * | op | ) |
Checks if player is a dragon.
op | player to check. Can be NULL. |
Definition at line 125 of file player.c.
References obj::arch, archt::clone, PLAYER, obj::race, and obj::type.
Referenced by check_login(), command_resistances(), command_title(), describe_item(), describe_monster(), dragon_eat_flesh(), find_best_player_hth_skill(), food_type_apply(), perceive_self(), and player_lvl_adj().
int is_old_wraith_pl | ( | object * | op | ) |
Checks if player is a wraith without the 'wraith feed' skill.
op | player to check. |
Definition at line 192 of file player.c.
References obj::arch, obj::below, obj::inv, is_wraith_pl(), obj::name, PLAYER, and obj::type.
Referenced by food_type_apply().
int is_wraith_pl | ( | object * | op | ) |
Tests if a player is a wraith.
op | player to check. |
Definition at line 173 of file player.c.
References obj::arch, obj::below, obj::inv, obj::name, PLAYER, and obj::type.
Referenced by eat_special_food(), food_type_apply(), hit_with_one_attacktype(), and is_old_wraith_pl().