Crossfire Server, Trunk  R20513
Data Structures | Macros | Typedefs | Functions
account_char.h File Reference

Characters associated with an account.n. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  account_char_struct
 One character account. More...
 

Macros

#define MAX_CHARACTERS_PER_ACCOUNT   (VERY_BIG_BUF - 150) / (MAX_NAME+1)
 The maximum characters per account is really driven by the size of the buffer we use to read in the data. More...
 

Typedefs

typedef struct account_char_struct Account_Char
 One character account. More...
 

Functions

Account_Characcount_char_remove (Account_Char *chars, const char *pl_name)
 This removes a character on this account. More...
 
int make_perma_dead (object *op)
 This will edit the character account information so that the character that just died in permadeath will be listed as such in the accounts file. More...
 
int unmake_perma_dead (char *account, char *player)
 This will edit the character account information so that the character that was just resurrected in permadeath will be listed as such in the accounts file. More...
 

Detailed Description

Characters associated with an account.n.

Definition in file account_char.h.

Macro Definition Documentation

#define MAX_CHARACTERS_PER_ACCOUNT   (VERY_BIG_BUF - 150) / (MAX_NAME+1)

The maximum characters per account is really driven by the size of the buffer we use to read in the data.

Take 150 characters off for the account name, password, overhead, and other wiggle room and find a maximum. From my quick calculations, this amounts to 18 characters/account. I think that is sufficient - moving to a HUGE_BUF would allow 82. The code could be more clever and look at the length of each character name and total it up, but having the same limit for everyone is better IMO.

Definition at line 20 of file account_char.h.

Referenced by account_link(), account_new(), account_play_cmd(), accounts_load(), and send_account_players().

Typedef Documentation

One character account.

Function Documentation

Account_Char* account_char_remove ( Account_Char chars,
const char *  pl_name 
)

This removes a character on this account.

This is typically used when a character has been deleted, and not for general cleanup

Parameters
charsExisting list of characters for account.
pl_nameThe name of the character
Returns
Returns new list of characters for account.

Definition at line 296 of file account_char.c.

Referenced by account_add_player_cmd(), key_confirm_quit(), and START_TEST().

Here is the caller graph for this function:

int make_perma_dead ( object op)

This will edit the character account information so that the character that just died in permadeath will be listed as such in the accounts file.

Parameters
opThe player experiencing permadeath.
Returns
0 for success, 1 for failure

Definition at line 357 of file account_char.c.

References account_char_load(), account_char_save(), socket_struct::account_name, obj::contr, get_player(), account_char_struct::isDead, account_char_struct::name, obj::name, account_char_struct::next, and pl::socket.

Referenced by dead_player().

Here is the call graph for this function:

Here is the caller graph for this function:

int unmake_perma_dead ( char *  account,
char *  player 
)

This will edit the character account information so that the character that was just resurrected in permadeath will be listed as such in the accounts file.

Parameters
accountThe account of the resurrected character.
playerThe name of the resurrected character.
Returns
0 for success, 1 for failure

Definition at line 397 of file account_char.c.

References account_char_load(), account_char_save(), account_char_struct::isDead, account_char_struct::name, and account_char_struct::next.

Referenced by resurrect_player().

Here is the call graph for this function:

Here is the caller graph for this function: