Crossfire Client, Trunk  R19593
Macros | Functions | Variables
commands.c File Reference

Handles server->client commands; See player.c for client->server commands. More...

#include <client.h>
#include <external.h>
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include "mapdata.h"
Include dependency graph for commands.c:

Go to the source code of this file.

Macros

#define ASSERT_LEN(function, curpos, buflen)
 
#define NUM_LAYERS   (MAP1_LAYERS-1)
 
#define NUM_STATS   7
 

Functions

void AccountPlayersCmd (char *buf, int len)
 This handles the accountplayers command. More...
 
void AddMeFail (char *data, int len)
 Handles when the server says we can't be added. More...
 
void AddMeSuccess (char *data, int len)
 This is really a throwaway command - there really isn't any reason to send addme_success commands. More...
 
void AddspellCmd (unsigned char *data, int len)
 
void AnimCmd (unsigned char *data, int len)
 
static void common_item_command (guint8 *data, int len)
 Parses the data sent to us from the server. More...
 
void DeleteInventory (unsigned char *data, int len)
 
void DeleteItem (unsigned char *data, int len)
 
void DeleteSpell (unsigned char *data, int len)
 
void DrawExtInfoCmd (char *data, int len)
 We must extract color, type, subtype and dispatch to callback. More...
 
void DrawInfoCmd (char *data, int len)
 Draws a string in the info window. More...
 
int ExtSmooth (unsigned char *data, int len, int x, int y, int layer)
 Extract smoothing infos from an extendedmapinfo packet part data is located at the beginning of the smooth datas. More...
 
void FailureCmd (char *buf, int len)
 Handles a failure return from the server. More...
 
void free_all_race_class_info (Race_Class_Info *data, int num_entries)
 This function clears the data from the Race_Class_Info array. More...
 
void free_all_starting_map_info ()
 This function clears the data from the Race_Class_Info array. More...
 
static void get_class_info (char *data, int len)
 This is a little wrapper function that does some bounds checking and then calls process_race_info() to do the bulk of the work. More...
 
static void get_exp_info (const unsigned char *data, int len)
 
static void get_new_char_info (char *data, int len)
 This is process the newcharinfo requestinfo. More...
 
static void get_race_info (char *data, int len)
 This is a little wrapper function that does some bounds checking and then calls process_race_info() to do the bulk of the work. More...
 
static void get_skill_info (char *data, int len)
 
static void get_starting_map_info (char *data, int len)
 This processes the replyinfo starting_map_info. More...
 
static ExtTextManager getTextManager (int type)
 
void GoodbyeCmd (char *data, int len)
 
void handle_query (char *data, int len)
 Prompts the user for input. More...
 
void Item2Cmd (unsigned char *data, int len)
 
void item_actions (item *op)
 
void MagicMapCmd (unsigned char *data, int len)
 
void Map2Cmd (unsigned char *data, int len)
 
void map_scrollCmd (char *data, int len)
 Scrolls the map on the client by some amount. More...
 
void MapExtendedCmd (unsigned char *data, int len)
 Handle MapExtended command Warning! if you add commands to extended, take care that the 'layer' argument of main loop is the opposite of the layer of the map so if you reference a layer, use NUM_LAYERS-layer. More...
 
void NewmapCmd (unsigned char *data, int len)
 
void PickupCmd (guint8 *data, int len)
 Server gives us current player's pickup. More...
 
void PlayerCmd (unsigned char *data, int len)
 Gets the player information. More...
 
static void process_race_class_info (char *data, int len, Race_Class_Info *rci)
 This extracts the data from a replyinfo race_info/class_info request. More...
 
static int rc_compar (const Race_Class_Info *a, const Race_Class_Info *b)
 Used for bsearch searching. More...
 
void ReplyInfoCmd (guint8 *buf, int len)
 Handles the response from a 'requestinfo' command. More...
 
void send_reply (const char *text)
 Sends a reply to the server. More...
 
void setTextManager (int type, ExtTextManager callback)
 
void SetupCmd (char *buf, int len)
 Received a response to a setup from the server. More...
 
void SinkCmd (unsigned char *data, int len)
 
void SmoothCmd (unsigned char *data, int len)
 Receives the smooth mapping from the server. More...
 
void StatsCmd (unsigned char *data, int len)
 Updates the local copy of the stats and displays it. More...
 
void TickCmd (guint8 *data, int len)
 Got a tick from the server. More...
 
void UpdateItemCmd (unsigned char *data, int len)
 Updates some attributes of an item. More...
 
void UpdspellCmd (unsigned char *data, int len)
 
void use_skill (int skill_id)
 Maintain the last_used_skills LRU list for displaying the recently used skills first. More...
 

Variables

Animations animations [MAXANIM]
 
Race_Class_Infoclasses =NULL
 
TextManagerfirstTextManager = NULL
 
int mapupdatesent = 0
 
char * motd =NULL
 
char * news =NULL
 
int num_classes = 0
 
int num_races = 0
 
Race_Class_Inforaces =NULL
 
char * rules =NULL
 
static const char *const short_stat_name [NUM_STATS]
 Short name of stats. More...
 
int spellmon_level = 0
 Keeps track of what spellmon command is supported by the server. More...
 
Starting_Map_Infostarting_map_info = NULL
 
int starting_map_number = 0
 
struct Stat_Mapping stat_mapping [NUM_NEW_CHAR_STATS]
 
int stat_maximum = 0
 
int stat_min = 0
 
int stat_points = 0
 
int used_classes = 0
 
int used_races = 0
 

Detailed Description

Handles server->client commands; See player.c for client->server commands.

Not necessarily all commands are handled - some might be in other files (like init.c)

This file contains most of the commands for the dispatch loop. Most of the functions are self-explanatory.

pixmap/bitmap : receive the picture, and display it. drawinfo : draws a string in the info window. stats : updates the local copy of the stats and displays it. handle_query : prompts the user for input. send_reply : sends off the reply for the input. player : gets the player information. MapScroll : scrolls the map on the client by some amount. MapCmd : displays the map with layer packing or stack packing. packing/unpacking is best understood by looking at the server code (server/ericserver.c) stack packing: for every map entry that changed, we pack 1 byte for the x/y location, 1 byte for the count, and 2 bytes per face in the stack. layer packing is harder, but I seem to remember more efficient: first we pack in a list of all map cells that changed and are now empty. The end of this list is a 255, which is bigger that 121, the maximum packed map location. For each changed location we also pack in a list of all the faces and X/Y coordinates by layer, where the layer is the depth in the map. This essentially takes slices through the map rather than stacks. Then for each layer, (max is MAXMAPCELLFACES, a bad name) we start packing the layer into the message. First we pack in a face, then for each place on the layer with the same face, we pack in the x/y location. We mark the last x/y location with the high bit on (11*11 = 121 < 128). We then continue on with the next face, which is why the code marks the faces as -1 if they are finished. Finally we mark the last face in the layer again with the high bit, clearly limiting the total number of faces to 32767, the code comments it's 16384, I'm not clear why, but the second bit may be used somewhere else as well. The unpacking routines basically perform the opposite operations.

Definition in file commands.c.

Macro Definition Documentation

#define ASSERT_LEN (   function,
  curpos,
  buflen 
)
Value:
if (curpos > buflen) { \
LOG(LOG_WARNING, function, "Data goes beyond length of buffer (%d>%d)", curpos, buflen); \
break; \
}
void LOG(LogLevel level, const char *origin, const char *format,...)
Log messages of a certain importance to stderr.
Definition: misc.c:111

Definition at line 76 of file commands.c.

Referenced by process_race_class_info().

#define NUM_STATS   7

Definition at line 105 of file commands.c.

Referenced by get_new_char_info().

Function Documentation

void AccountPlayersCmd ( char *  buf,
int  len 
)

This handles the accountplayers command.

Definition at line 2454 of file commands.c.

References ACL_CLASS, ACL_FACE, ACL_FACE_NUM, ACL_LEVEL, ACL_MAP, ACL_NAME, ACL_PARTY, ACL_RACE, choose_character_init(), GetShort_String(), LOG(), LOG_ERROR, map, MAX_BUF, name, and update_character_choose().

Here is the call graph for this function:

void AddMeFail ( char *  data,
int  len 
)

Handles when the server says we can't be added.

In reality, we need to close the connection and quit out, because the client is going to close us down anyways.

Parameters
data
len

Definition at line 1090 of file commands.c.

References LOG(), and LOG_INFO.

Here is the call graph for this function:

void AddMeSuccess ( char *  data,
int  len 
)

This is really a throwaway command - there really isn't any reason to send addme_success commands.

Parameters
data
len

Definition at line 1106 of file commands.c.

References hide_all_login_windows(), LOG(), and LOG_INFO.

Here is the call graph for this function:

void AnimCmd ( unsigned char *  data,
int  len 
)
Parameters
data
len

Definition at line 1141 of file commands.c.

References Animations::faces, Animations::flags, GetShort_String(), LOG(), LOG_DEBUG, LOG_WARNING, MAXANIM, Animations::num_animations, Animations::phase, Animations::speed, and Animations::speed_left.

Here is the call graph for this function:

static void common_item_command ( guint8 *  data,
int  len 
)
static

Parses the data sent to us from the server.

revision is what item command the data came from - newer ones have addition fields.

Parameters
data
len

Definition at line 1655 of file commands.c.

References GetInt_String(), GetShort_String(), item_actions(), locate_item(), LOG(), LOG_WARNING, MAX_BUF, name, and update_item().

Referenced by Item2Cmd().

Here is the call graph for this function:

Here is the caller graph for this function:

void DeleteInventory ( unsigned char *  data,
int  len 
)
Parameters
data
len

Definition at line 1827 of file commands.c.

References locate_item(), LOG(), LOG_WARNING, and remove_item_inventory().

Here is the call graph for this function:

void DeleteItem ( unsigned char *  data,
int  len 
)
Parameters
data
len

Definition at line 1801 of file commands.c.

References GetInt_String(), locate_item(), LOG(), LOG_WARNING, and remove_item().

Here is the call graph for this function:

void DrawExtInfoCmd ( char *  data,
int  len 
)

We must extract color, type, subtype and dispatch to callback.

Parameters
data
len

Definition at line 1270 of file commands.c.

References getTextManager(), LOG(), and LOG_WARNING.

Here is the call graph for this function:

void DrawInfoCmd ( char *  data,
int  len 
)

Draws a string in the info window.

Parameters
data
len

Definition at line 1206 of file commands.c.

References draw_ext_info(), LOG(), LOG_WARNING, MSG_TYPE_CLIENT, and MSG_TYPE_CLIENT_COMMAND.

Here is the call graph for this function:

void FailureCmd ( char *  buf,
int  len 
)

Handles a failure return from the server.

Parameters
bufbuffer sent by server.
lenlength of data.

Definition at line 2412 of file commands.c.

References account_add_character_failure(), account_change_password_failure(), account_creation_failure(), account_login_failure(), create_new_character_failure(), LOG(), and LOG_ERROR.

Here is the call graph for this function:

void free_all_race_class_info ( Race_Class_Info data,
int  num_entries 
)

This function clears the data from the Race_Class_Info array.

Because the structure itself contains data that is allocated, some work needs to be done to clear that data.

Parameters
dataarray to clear
num_entriessize of the array.

Definition at line 421 of file commands.c.

References Race_Class_Info::num_rc_choice, RC_Choice::num_values, and Race_Class_Info::rc_choice.

Referenced by ReplyInfoCmd(), and reset_client_vars().

Here is the caller graph for this function:

void free_all_starting_map_info ( )

This function clears the data from the Race_Class_Info array.

Because the structure itself contains data that is allocated, some work needs to be done to clear that data.

Definition at line 134 of file commands.c.

References starting_map_number.

Referenced by get_new_char_info().

Here is the caller graph for this function:

static void get_class_info ( char *  data,
int  len 
)
static

This is a little wrapper function that does some bounds checking and then calls process_race_info() to do the bulk of the work.

Pretty much identical to get_race_info() except this is for classes.

Parameters
datadata returned from server. Format is documented in protocol file.
lenlength of data.

Definition at line 678 of file commands.c.

References classes, LOG(), LOG_ERROR, new_char_window_update_info(), num_classes, process_race_class_info(), rc_compar(), and used_classes.

Referenced by ReplyInfoCmd().

Here is the call graph for this function:

Here is the caller graph for this function:

static void get_exp_info ( const unsigned char *  data,
int  len 
)
static
Parameters
data
len

Definition at line 706 of file commands.c.

References exp_table, exp_table_max, GetInt64_String(), GetShort_String(), LOG(), and LOG_ERROR.

Referenced by ReplyInfoCmd().

Here is the call graph for this function:

Here is the caller graph for this function:

static void get_new_char_info ( char *  data,
int  len 
)
static

This is process the newcharinfo requestinfo.

In some cases, it stores away the value, for others, it just makes sure we understand them.

The data is a series of length prefixed lines.

Parameters
datadata returned from server. Format is documented in protocol file.
lenlength of data.

Definition at line 248 of file commands.c.

References cs_print_string(), csocket, ClientSocket::fd, free_all_starting_map_info(), GetChar_String(), LOG(), LOG_ERROR, LOG_WARNING, new_char_window_update_info(), NUM_STATS, short_stat_name, stat_maximum, stat_min, and stat_points.

Referenced by ReplyInfoCmd().

Here is the call graph for this function:

Here is the caller graph for this function:

static void get_race_info ( char *  data,
int  len 
)
static

This is a little wrapper function that does some bounds checking and then calls process_race_info() to do the bulk of the work.

Parameters
datadata returned from server. Format is documented in protocol file.
lenlength of data.

Definition at line 645 of file commands.c.

References LOG(), LOG_ERROR, new_char_window_update_info(), num_races, process_race_class_info(), rc_compar(), and used_races.

Referenced by ReplyInfoCmd().

Here is the call graph for this function:

Here is the caller graph for this function:

static void get_skill_info ( char *  data,
int  len 
)
static
Parameters
data
len

Definition at line 733 of file commands.c.

References CS_STAT_SKILLINFO, LOG(), LOG_WARNING, MAX_SKILL, and skill_names.

Referenced by ReplyInfoCmd().

Here is the call graph for this function:

Here is the caller graph for this function:

static void get_starting_map_info ( char *  data,
int  len 
)
static

This processes the replyinfo starting_map_info.

The data is a series of length prefixed lines.

Parameters
datadata returned from server. Format is documented in protocol file.
lenlength of data.

Definition at line 172 of file commands.c.

References Starting_Map_Info::arch_name, Starting_Map_Info::description, GetShort_String(), INFO_MAP_ARCH_NAME, INFO_MAP_DESCRIPTION, INFO_MAP_NAME, LOG(), LOG_ERROR, LOG_WARNING, Starting_Map_Info::public_name, starting_map_number, and starting_map_update_info().

Referenced by ReplyInfoCmd().

Here is the call graph for this function:

Here is the caller graph for this function:

static ExtTextManager getTextManager ( int  type)
static
Parameters
type

Definition at line 1252 of file commands.c.

References TextManager::callback, firstTextManager, TextManager::next, and TextManager::type.

Referenced by DrawExtInfoCmd().

Here is the caller graph for this function:

void GoodbyeCmd ( char *  data,
int  len 
)
Parameters
data
len

Definition at line 1121 of file commands.c.

References LOG(), and LOG_WARNING.

Here is the call graph for this function:

void handle_query ( char *  data,
int  len 
)

Prompts the user for input.

Parameters
data
len

Definition at line 1533 of file commands.c.

References cpl, CS_QUERY_HIDEINPUT, CS_QUERY_SINGLECHAR, CS_QUERY_YESNO, draw_ext_info(), draw_prompt(), Player_Struct::input_state, LOG(), LOG_DEBUG, MSG_TYPE_CLIENT, MSG_TYPE_CLIENT_QUERY, NDI_BLACK, Player_Struct::no_echo, Reply_Many, Reply_One, and x_set_echo().

Here is the call graph for this function:

void Item2Cmd ( unsigned char *  data,
int  len 
)
Parameters
data
len

Definition at line 1706 of file commands.c.

References common_item_command().

Here is the call graph for this function:

void item_actions ( item op)
Parameters
op

Definition at line 1633 of file commands.c.

References close_container(), Player_Struct::container, cpl, item_struct::open, open_container(), and item_struct::was_open.

Referenced by common_item_command(), and UpdateItemCmd().

Here is the call graph for this function:

Here is the caller graph for this function:

void PickupCmd ( guint8 *  data,
int  len 
)

Server gives us current player's pickup.

Parameters
databuffer sent by server.
lenlength of data.

Definition at line 2398 of file commands.c.

References client_pickup(), and GetInt_String().

Here is the call graph for this function:

void PlayerCmd ( unsigned char *  data,
int  len 
)

Gets the player information.

This function copies relevant data from the archetype to the object. Only copies data that was not set in the object structure.

Parameters
data
len

Definition at line 1606 of file commands.c.

References GetInt_String(), LOG(), LOG_WARNING, MAX_BUF, name, new_player(), and reset_player_data().

Here is the call graph for this function:

static void process_race_class_info ( char *  data,
int  len,
Race_Class_Info rci 
)
static

This extracts the data from a replyinfo race_info/class_info request.

We only get this data if the client has made a requestinfo of this data.

Parameters
datadata returned from server. Format is documented in protocol file.
lenlength of data
rciWhere to store the data.

Definition at line 470 of file commands.c.

References Race_Class_Info::arch_name, ASSERT_LEN, RC_Choice::choice_desc, RC_Choice::choice_name, Stat_Mapping::cs_value, Race_Class_Info::description, GetChar_String(), GetShort_String(), LOG(), LOG_WARNING, NUM_NEW_CHAR_STATS, Race_Class_Info::num_rc_choice, RC_Choice::num_values, Race_Class_Info::public_name, Race_Class_Info::rc_choice, Stat_Mapping::rc_offset, Race_Class_Info::stat_adj, RC_Choice::value_arch, and RC_Choice::value_desc.

Referenced by get_class_info(), and get_race_info().

Here is the call graph for this function:

Here is the caller graph for this function:

static int rc_compar ( const Race_Class_Info a,
const Race_Class_Info b 
)
static

Used for bsearch searching.

Definition at line 406 of file commands.c.

References Race_Class_Info::public_name.

Referenced by get_class_info(), and get_race_info().

Here is the caller graph for this function:

void ReplyInfoCmd ( guint8 *  buf,
int  len 
)

Handles the response from a 'requestinfo' command.

This function doesn't do much itself other than dispatch to other functions.

Parameters
buf
len

Definition at line 775 of file commands.c.

References classes, cs_print_string(), csocket, ClientSocket::fd, free_all_race_class_info(), get_class_info(), get_exp_info(), get_image_info(), get_image_sums(), get_new_char_info(), get_race_info(), get_skill_info(), get_starting_map_info(), INFO_MOTD, INFO_NEWS, INFO_RULES, LOG(), LOG_DEBUG, motd, news, num_classes, num_races, rules, update_login_info(), used_classes, and used_races.

Here is the call graph for this function:

void send_reply ( const char *  text)

Sends a reply to the server.

This function basically just packs the stuff up.

Parameters
textcontains the null terminated string of text to send.

Definition at line 1589 of file commands.c.

References cpl, cs_print_string(), csocket, ClientSocket::fd, Player_Struct::no_echo, and x_set_echo().

Referenced by keyfunc(), and on_entry_commands_activate().

Here is the call graph for this function:

Here is the caller graph for this function:

void setTextManager ( int  type,
ExtTextManager  callback 
)
Parameters
type
callback

Definition at line 1230 of file commands.c.

References TextManager::callback, firstTextManager, TextManager::next, and TextManager::type.

void SetupCmd ( char *  buf,
int  len 
)

Received a response to a setup from the server.

This function is basically the same as the server side function - we just do some different processing on the data.

Parameters
buf
len

Definition at line 903 of file commands.c.

References beat_init(), close_server_connection(), CONFIG_CACHE, CONFIG_MAPHEIGHT, CONFIG_MAPWIDTH, cs_print_string(), csocket, draw_ext_info(), face_info, Face_Information_struct::faceset, ClientSocket::fd, LOG(), LOG_DEBUG, LOG_INFO, LOG_WARNING, mapdata_set_size(), MAX_BUF, MSG_TYPE_CLIENT, MSG_TYPE_CLIENT_SERVER, NDI_RED, resize_map_window(), spellmon_level, start_login(), and use_config.

Here is the call graph for this function:

void SinkCmd ( unsigned char *  data,
int  len 
)
Parameters
data
len

Definition at line 2370 of file commands.c.

void SmoothCmd ( unsigned char *  data,
int  len 
)

Receives the smooth mapping from the server.

Because this information is reference a lot, the smoothing face is stored in the pixmap data - this makes access much faster than searching an array of data for the face to use.

Parameters
data
len

Definition at line 1186 of file commands.c.

References addsmooth(), and GetShort_String().

Here is the call graph for this function:

void StatsCmd ( unsigned char *  data,
int  len 
)

Updates the local copy of the stats and displays it.

Parameters
data
len

Definition at line 1347 of file commands.c.

References Stat_struct::ac, Stat_struct::attuned, Stat_struct::Cha, Stat_struct::Con, cpl, CS_NUM_SKILLS, CS_STAT_AC, CS_STAT_ARMOUR, CS_STAT_CHA, CS_STAT_CON, CS_STAT_DAM, CS_STAT_DEX, CS_STAT_EXP, CS_STAT_EXP64, CS_STAT_FLAGS, CS_STAT_FOOD, CS_STAT_GRACE, CS_STAT_HP, CS_STAT_INT, CS_STAT_LEVEL, CS_STAT_MAXGRACE, CS_STAT_MAXHP, CS_STAT_MAXSP, CS_STAT_POW, CS_STAT_RANGE, CS_STAT_RESIST_END, CS_STAT_RESIST_START, CS_STAT_SKILLINFO, CS_STAT_SP, CS_STAT_SPEED, CS_STAT_SPELL_ATTUNE, CS_STAT_SPELL_DENY, CS_STAT_SPELL_REPEL, CS_STAT_STR, CS_STAT_TITLE, CS_STAT_WC, CS_STAT_WEAP_SP, CS_STAT_WEIGHT_LIM, CS_STAT_WIS, Stat_struct::dam, Stat_struct::denied, Stat_struct::Dex, draw_message_window(), draw_stats(), Stat_struct::exp, Stat_struct::flags, Stat_struct::food, GetInt64_String(), GetInt_String(), GetShort_String(), Stat_struct::grace, Stat_struct::hp, Stat_struct::Int, Stat_struct::level, LOG(), LOG_WARNING, Stat_struct::maxgrace, Stat_struct::maxhp, Stat_struct::maxsp, Stat_struct::Pow, Player_Struct::range, Stat_struct::repelled, Stat_struct::resist_change, Stat_struct::resists, script_lua_stats(), set_weight_limit(), Stat_struct::skill_exp, Stat_struct::skill_level, Stat_struct::sp, Stat_struct::speed, Player_Struct::spells_updated, Player_Struct::stats, Stat_struct::Str, Player_Struct::title, use_skill(), Stat_struct::wc, Stat_struct::weapon_sp, Stat_struct::weight_limit, and Stat_struct::Wis.

Here is the call graph for this function:

void TickCmd ( guint8 *  data,
int  len 
)

Got a tick from the server.

We currently don't care what tick number it is, but just have the code in case at some time we do.

Parameters
data
len

Definition at line 2381 of file commands.c.

References client_tick(), GetInt_String(), and tick.

Here is the call graph for this function:

void UpdateItemCmd ( unsigned char *  data,
int  len 
)
void use_skill ( int  skill_id)

Maintain the last_used_skills LRU list for displaying the recently used skills first.

Parameters
skill_id

Definition at line 1322 of file commands.c.

References last_used_skills.

Referenced by StatsCmd().

Here is the caller graph for this function:

Variable Documentation

Animations animations[MAXANIM]
Race_Class_Info * classes =NULL
TextManager* firstTextManager = NULL

Definition at line 1223 of file commands.c.

Referenced by getTextManager(), and setTextManager().

int mapupdatesent = 0

Definition at line 55 of file commands.c.

Referenced by Map2Cmd(), and MapExtendedCmd().

char * motd =NULL

Definition at line 82 of file commands.c.

Referenced by ReplyInfoCmd(), reset_client_vars(), and update_login_info().

char* news =NULL

Definition at line 82 of file commands.c.

Referenced by ReplyInfoCmd(), reset_client_vars(), and update_login_info().

int num_classes = 0
int num_races = 0
Race_Class_Info* races =NULL
char * rules =NULL

Definition at line 82 of file commands.c.

Referenced by ReplyInfoCmd(), reset_client_vars(), and update_login_info().

const char* const short_stat_name[NUM_STATS]
static
Initial value:
= {
"Str", "Dex", "Con",
"Wis", "Cha", "Int",
"Pow"
}

Short name of stats.

Definition at line 107 of file commands.c.

Referenced by get_new_char_info().

int spellmon_level = 0

Keeps track of what spellmon command is supported by the server.

Definition at line 84 of file commands.c.

Referenced by AddspellCmd(), and SetupCmd().

Starting_Map_Info* starting_map_info = NULL
int starting_map_number = 0
struct Stat_Mapping stat_mapping[NUM_NEW_CHAR_STATS]
Initial value:
= {
{"str", CS_STAT_STR, 0},
{"con", CS_STAT_CON, 1},
{"dex", CS_STAT_DEX, 2},
{"int", CS_STAT_INT, 3},
{"wis", CS_STAT_WIS, 4},
{"pow", CS_STAT_POW, 5},
{"cha", CS_STAT_CHA, 6}
}
#define CS_STAT_INT
Definition: newclient.h:120
#define CS_STAT_DEX
Definition: newclient.h:122
#define CS_STAT_WIS
Definition: newclient.h:121
#define CS_STAT_CHA
Definition: newclient.h:124
#define CS_STAT_STR
Definition: newclient.h:119
#define CS_STAT_POW
Definition: newclient.h:136
#define CS_STAT_CON
Definition: newclient.h:123

Definition at line 118 of file commands.c.

Referenced by init_create_character_window(), on_combobox_rcs_changed(), and send_create_player_to_server().

int stat_maximum = 0

Definition at line 95 of file commands.c.

Referenced by get_new_char_info(), new_char_window_update_info(), and reset_client_vars().

int stat_min = 0

Definition at line 94 of file commands.c.

Referenced by get_new_char_info(), new_char_window_update_info(), and reset_client_vars().

int stat_points = 0
int used_classes = 0
int used_races = 0