Atrinik Server 2.5
Data Structures | Defines | Typedefs | Functions | Variables
commands/new.c File Reference
#include <global.h>

Go to the source code of this file.

Data Structures

struct  new_char_struct

Defines

#define MAP_POS_X   0
#define MAP_POS_Y   1
#define NROF_MAP_NODE   (sizeof(map_pos_array) / (sizeof(int) * 2))

Typedefs

typedef struct new_char_struct new_char_struct

Functions

int command_run (object *op, char *params)
int command_run_stop (object *op, char *params)
void send_target_command (player *pl)
int command_combat (object *op, char *params)
int command_target (object *op, char *params)
static void set_first_map (object *op)
void new_chars_init ()
void command_new_char (char *params, int len, player *pl)
void command_fire_old (char *params, int len, player *pl)
static char spelllist_determine_path (object *op, int spell_number)
static void add_spell_to_spelllist (object *op, int spell_number, StringBuffer *sb)
void send_spelllist_cmd (object *op, const char *spellname, int mode)
void send_skilllist_cmd (object *op, object *skillp, int mode)
void send_ready_skill (object *op, const char *skillname)
void generate_ext_title (player *pl)

Variables

static int map_pos_array [][2]
new_char_structnew_chars = NULL
static size_t num_new_chars = 0

Detailed Description

This file deals with administrative commands from the client.

Definition in file new.c.


Typedef Documentation

Information about a character the player may choose.


Function Documentation

static void add_spell_to_spelllist ( object op,
int  spell_number,
StringBuffer sb 
) [static]

Helper function for send_spelllist_cmd(), adds one spell to buffer which is then sent to the client as the spell list command.

Parameters:
opObject.
spell_numberID of the spell to add.
sbStringBuffer instance to add to.

Definition at line 1089 of file new.c.

int command_combat ( object op,
char *  params 
)

Turn combat mode on/off.

Parameters:
opObject requesting this.
paramsCommand parameters.
Returns:
Always returns 1.

Definition at line 372 of file new.c.

void command_fire_old ( char *  params,
int  len,
player pl 
)

The fire command.

Sent by the client by pressing Ctrl + numpad.

Parameters:
paramsParameters.
lenLength.
plPlayer.
Deprecated:

Definition at line 997 of file new.c.

void command_new_char ( char *  params,
int  len,
player pl 
)

Client sent us a new char creation.

At this point we know the player's name and the password but nothing about his (player char) base arch.

This command tells us which the player has selected and how he has setup the stats.

If anything is not correct here, we kill this socket.

Parameters:
paramsParameters.
lenLength.
plPlayer structure.

Definition at line 838 of file new.c.

int command_run ( object op,
char *  params 
)

Run command. Used to make your character run in specified direction.

Parameters:
opObject requesting this.
paramsCommand parameters.

Definition at line 87 of file new.c.

int command_run_stop ( object op,
char *  params 
)

Command to stop running.

Parameters:
opObject requesting this.
paramsCommand parameters.
Returns:
Always returns 1.

Definition at line 120 of file new.c.

int command_target ( object op,
char *  params 
)

Look for a target.

Parameters:
opObject requesting this.
paramsCommand parameters.
Returns:
Always returns 1.

Definition at line 400 of file new.c.

void generate_ext_title ( player pl)

Generate player's extended name from race, gender, guild, etc.

Parameters:
plThe player.

Definition at line 1202 of file new.c.

void new_chars_init ( )

Initialize new_chars by reading server_settings file.

Definition at line 754 of file new.c.

void send_ready_skill ( object op,
const char *  skillname 
)

Send skill ready command.

Parameters:
opObject.
skillnameName of skill to ready.

Definition at line 1191 of file new.c.

void send_skilllist_cmd ( object op,
object skillp,
int  mode 
)

Send skill list to the client.

Parameters:
opObject.
skillpSkill object; if not NULL, will only send this skill.
modeOne of Spell list modes.

Definition at line 1156 of file new.c.

void send_spelllist_cmd ( object op,
const char *  spellname,
int  mode 
)

Send spell list command to the client.

Parameters:
opPlayer.
spellnameIf specified, send only this spell name. Otherwise send all spells the player knows.
modeOne of Spell list modes.

Definition at line 1112 of file new.c.

void send_target_command ( player pl)

Send target command, calculate the target's color level, etc.

Parameters:
plPlayer requesting this.

Definition at line 131 of file new.c.

static void set_first_map ( object op) [static]

This loads the first map an puts the player on it.

Parameters:
opThe player object.

Definition at line 695 of file new.c.

static char spelllist_determine_path ( object op,
int  spell_number 
) [static]

Determine spell's path for spell list sending.

Parameters:
opObject.
spell_numberSpell ID.
Return values:
dPlayer is denied from casting the spell.
aPlayer is attuned to the spell.
rPlayer is repelled from the spell.
Returns:
If none of the above, a space character is returned.

Definition at line 1061 of file new.c.


Variable Documentation

All the loaded characters.

Definition at line 748 of file new.c.

size_t num_new_chars = 0 [static]

Number of new_chars.

Definition at line 750 of file new.c.