 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
72 while (prev != NULL && prev->
next != NULL && prev->
next != pl)
74 if (!prev || prev->
next != pl) {
75 LOG(
llevError,
"Free_player: Can't find previous player.\n");
204 snprintf(pl->
title,
sizeof(pl->
title),
"%s hatchling", attack);
206 snprintf(pl->
title,
sizeof(pl->
title),
"%s wyrm", attack);
208 snprintf(pl->
title,
sizeof(pl->
title),
"%s wyvern", attack);
210 snprintf(pl->
title,
sizeof(pl->
title),
"%s dragon", attack);
212 else if (skin_resist > 80)
213 snprintf(pl->
title,
sizeof(pl->
title),
"legendary %s dragon", attack);
214 else if (skin_resist > 50)
215 snprintf(pl->
title,
sizeof(pl->
title),
"ancient %s dragon", attack);
217 snprintf(pl->
title,
sizeof(pl->
title),
"big %s dragon", attack);
234 snprintf(
buf, bufsize,
"the %s", pl->
title);
290 if (tmp->type ==
SKILL) {
308 object *force =
add_force(op,
"criminal", 25);
tag_t * stack_items
Item stack for patch/dump/...
player * next
Pointer to next player, NULL if this is last.
#define FREE_OBJ_NO_DESTROY_CALLBACK
Do not run the destroy callback.
player * first_player
First player.
const char * unarmed_skill
Prefered skill to use in unarmed combat.
@ llevError
Error, serious thing.
void LOG(LogLevel logLevel, const char *format,...)
Logs a message to stderr, or to file.
This stores, for a spell a player knows, the last sp/gr/dam information sent to client.
#define QUERY_FLAG(xyz, p)
bool is_wraith
Whether this player is a wraith or not, initialized at load time.
client_spell * spell_state
Spell information sent to client.
struct archetype * arch
Pointer to archetype.
struct client_spell * next
Next spell information.
object * ob
The object representing the player.
void player_set_own_title(struct player *pl, const char *title)
Sets the custom title.
SockList ** delayed_buffers
Buffers which will be sent after the player's tick completes.
@ SKILL
Also see SKILL_TOOL (74) below.
int player_has_own_title(const struct player *pl)
Returns whether the player has a custom title.
void object_free_drop_inventory(object *ob)
Frees everything allocated by an object, removes it from the list of used objects,...
struct player * contr
Pointer to the player which control this object.
bool is_criminal(object *op)
object clone
An object from which to do object_copy()
uint8_t delayed_buffers_used
Used items in delayed_buffers_used.
void commit_crime(object *op, const char *description)
int64_t last_skill_exp[MAX_SKILLS]
Last exp sent to client.
object * spell
Spell object this structure is about.
spell prayer lvl t sp speed range duration short description
uint8_t type
PLAYER, BULLET, etc.
with a maximum of six This is not so if you are wearing plate you receive no benefit Armour is additive with all the supplementry forms of which means that it lasts until the next semi permanent spell effect is cast upon the character spell
void object_free(object *ob, int flags)
Frees everything allocated by an object, removes it from the list of used objects,...
Information on one title.
#define FOR_INV_FINISH()
Finishes FOR_INV_PREPARE().
#define MAX_SKILLS
This is the maximum number of skills the game may handle.
sstring race
Human, goblin, dragon, etc.
void replace_unprintable_chars(char *buf)
Replaces any unprintable character in the given buffer with a space.
void fatal(enum fatal_error err)
fatal() is meant to be called whenever a fatal signal is intercepted.
object * last_skill_ob[MAX_SKILLS]
Exp objects sent to client.
size_t strlcpy(char *dst, const char *src, size_t size)
Portable implementation of strlcpy(3).
int is_wraith_pl(object *op)
Tests if a player is a wraith.
#define FREE_AND_CLEAR_STR(xyz)
Release the shared string, and set it to NULL.
#define FLAG_REMOVED
Object is not in any map or invenory.
client_spell * get_client_spell_state(player *pl, object *spell)
Gets the (client-side) spell state for specified spell.
#define FREE_AND_CLEAR(xyz)
Free the pointer and then set it to NULL.
int is_dragon_pl(const object *op)
Checks if player is a dragon.
bool is_old_wraith
Whether this player is a "old" wraith, initialized at load time and updated when eating.
char own_title[MAX_NAME]
Title the player has chosen for themself.
void object_set_msg(object *op, const char *msg)
Set the message field of an object.
object * add_force(object *op, const char *name, int duration)
Add or return an existing force inside 'op' with the given 'name' and 'duration' in units of 100 tick...
int atnr_is_dragon_enabled(int attacknr)
Determine if the attacktype represented by the specified attack-number is enabled for dragon players.
object * find_force(object *op, const char *name)
Find a force with the given 'name' in the slaying field.
void player_set_dragon_title(player *pl, int level, const char *attack, int skin_resist)
Updates the title of a dragon player to reflect the current level, attack type, and resistances.
uint8_t delayed_buffers_allocated
Number of items in delayed_buffers_used.
void object_remove(object *op)
This function removes the object op from the linked list of objects which it is currently tied to.
int stack_position
Current stack position, 0 for no item.
int is_old_wraith_pl(object *op)
Checks if player is a wraith without the 'wraith feed' skill.
char title[BIG_NAME]
Default title, like fighter, wizard, etc.
const char * player_get_own_title(const struct player *pl)
Returns the player's own title.
object * last_exit
Last exit used by player or NULL.
void clear_player(player *pl)
Clears data in player structure.
void link_player_skills(object *op)
This function goes through the player inventory and sets up the last_skills[] array in the player obj...
#define FOR_INV_PREPARE(op_, it_)
Constructs a loop iterating over the inventory of an object.
void free_player(player *pl)
Frees player structure, including pointed object (through object_free_drop_inventory()).
void player_get_title(const player *pl, char *buf, size_t bufsize)
Returns the player's title.