Crossfire Client, Trunk  R20789
commands.c File Reference
#include "client.h"
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include "external.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)
 
void AddMeFail (char *data, int len)
 
void AddMeSuccess (char *data, int len)
 
void AddspellCmd (unsigned char *data, int len)
 
void AnimCmd (unsigned char *data, int len)
 
static void common_item_command (guint8 *data, int len)
 
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)
 
void DrawInfoCmd (char *data, int len)
 
int ExtSmooth (unsigned char *data, int len, int x, int y, int layer)
 
void FailureCmd (char *buf, int len)
 
void free_all_race_class_info (Race_Class_Info *data, int num_entries)
 
void free_all_starting_map_info ()
 
static void get_class_info (unsigned char *data, int len)
 
static void get_exp_info (const unsigned char *data, int len)
 
static void get_new_char_info (unsigned char *data, int len)
 
static void get_race_info (unsigned char *data, int len)
 
static void get_skill_info (char *data, int len)
 
static void get_starting_map_info (unsigned char *data, int len)
 
static ExtTextManager getTextManager (int type)
 
void GoodbyeCmd (char *data, int len)
 
void handle_query (char *data, int len)
 
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)
 
void MapExtendedCmd (unsigned char *data, int len)
 
void NewmapCmd (unsigned char *data, int len)
 
void PickupCmd (guint8 *data, int len)
 
void PlayerCmd (unsigned char *data, int len)
 
static void process_race_class_info (unsigned char *data, int len, Race_Class_Info *rci)
 
static int rc_compar (const Race_Class_Info *a, const Race_Class_Info *b)
 
void ReplyInfoCmd (unsigned char *buf, int len)
 
static void rstrip (char buf[static 1], size_t len)
 
void send_reply (const char *text)
 
void setTextManager (int type, ExtTextManager callback)
 
void SetupCmd (char *buf, int len)
 
void SinkCmd (unsigned char *data, int len)
 
void SmoothCmd (unsigned char *data, int len)
 
void StatsCmd (unsigned char *data, int len)
 
void TickCmd (guint8 *data, int len)
 
void UpdateItemCmd (unsigned char *data, int len)
 
void UpdspellCmd (unsigned char *data, int len)
 
void use_skill (int skill_id)
 

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]
 
static int spellmon_level = 0
 
Starting_Map_Infostarting_map_info = NULL
 
int starting_map_number = 0
 
struct Stat_Mapping stat_mapping [NUM_NEW_CHAR_STATS]
 
int stat_maximum
 
int stat_min
 
int stat_points
 
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

◆ ASSERT_LEN

#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; \
}
Warning that something might not work.
Definition: client.h:443

Definition at line 76 of file commands.c.

Referenced by process_race_class_info().

◆ NUM_STATS

#define NUM_STATS   7

Definition at line 105 of file commands.c.

Referenced by get_new_char_info().

Function Documentation

◆ AccountPlayersCmd()

void AccountPlayersCmd ( char *  buf,
int  len 
)

This handles the accountplayers command

Definition at line 2451 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:

◆ AddMeFail()

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 1087 of file commands.c.

References LOG(), and LOG_INFO.

+ Here is the call graph for this function:

◆ AddMeSuccess()

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 1103 of file commands.c.

References hide_all_login_windows(), LOG(), LOG_DEBUG, and show_main_client().

+ Here is the call graph for this function:

◆ AnimCmd()

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

Definition at line 1139 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:

◆ common_item_command()

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:

◆ DeleteInventory()

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:

◆ DeleteItem()

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:

◆ DrawExtInfoCmd()

void DrawExtInfoCmd ( char *  data,
int  len 
)

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

Parameters
data
len

Definition at line 1268 of file commands.c.

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

+ Here is the call graph for this function:

◆ DrawInfoCmd()

void DrawInfoCmd ( char *  data,
int  len 
)

Draws a string in the info window.

Parameters
data
len

Definition at line 1204 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:

◆ FailureCmd()

void FailureCmd ( char *  buf,
int  len 
)

Handles a failure return from the server.

Parameters
bufbuffer sent by server.
lenlength of data.

Definition at line 2409 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:

◆ free_all_race_class_info()

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 420 of file commands.c.

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

Referenced by client_reset(), and ReplyInfoCmd().

+ Here is the caller graph for this function:

◆ free_all_starting_map_info()

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:

◆ get_class_info()

static void get_class_info ( unsigned 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 679 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:

◆ get_exp_info()

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

Definition at line 705 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:

◆ get_new_char_info()

static void get_new_char_info ( unsigned 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 247 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:

◆ get_race_info()

static void get_race_info ( unsigned 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 648 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:

◆ get_skill_info()

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

Definition at line 732 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:

◆ get_starting_map_info()

static void get_starting_map_info ( unsigned 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:

◆ getTextManager()

static ExtTextManager getTextManager ( int  type)
static
Parameters
type

Definition at line 1250 of file commands.c.

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

Referenced by DrawExtInfoCmd().

+ Here is the caller graph for this function:

◆ GoodbyeCmd()

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

Definition at line 1119 of file commands.c.

References LOG(), and LOG_WARNING.

+ Here is the call graph for this function:

◆ handle_query()

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:

◆ Item2Cmd()

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:

◆ item_actions()

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:

◆ PickupCmd()

void PickupCmd ( guint8 *  data,
int  len 
)

Server gives us current player's pickup.

Parameters
databuffer sent by server.
lenlength of data.

Definition at line 2395 of file commands.c.

References client_pickup(), and GetInt_String().

+ Here is the call graph for this function:

◆ PlayerCmd()

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:

◆ process_race_class_info()

static void process_race_class_info ( unsigned 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 469 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:

◆ rc_compar()

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

Used for bsearch searching.

Definition at line 405 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:

◆ ReplyInfoCmd()

void ReplyInfoCmd ( unsigned char *  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 774 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:

◆ rstrip()

static void rstrip ( char  buf[static 1],
size_t  len 
)
static

Remove trailing newlines from the given C string in-place.

Definition at line 1846 of file commands.c.

Referenced by AddspellCmd().

+ Here is the caller graph for this function:

◆ send_reply()

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:

◆ setTextManager()

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

Definition at line 1228 of file commands.c.

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

◆ SetupCmd()

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 901 of file commands.c.

References client_disconnect(), 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:

◆ SinkCmd()

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

Definition at line 2367 of file commands.c.

◆ SmoothCmd()

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 1184 of file commands.c.

References addsmooth(), and GetShort_String().

+ Here is the call graph for this function:

◆ StatsCmd()

void StatsCmd ( unsigned char *  data,
int  len 
)

Updates the local copy of the stats and displays it.

Parameters
data
len

Definition at line 1345 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, item_struct::inv_updated, Stat_struct::level, LOG(), LOG_WARNING, Stat_struct::maxgrace, Stat_struct::maxhp, Stat_struct::maxsp, Player_Struct::ob, Stat_struct::Pow, Player_Struct::range, redraw(), 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:

◆ TickCmd()

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 2378 of file commands.c.

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

+ Here is the call graph for this function:

◆ UpdateItemCmd()

void UpdateItemCmd ( unsigned char *  data,
int  len 
)

◆ use_skill()

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 1320 of file commands.c.

References last_used_skills.

Referenced by StatsCmd().

+ Here is the caller graph for this function:

Variable Documentation

◆ animations

◆ classes

◆ firstTextManager

TextManager* firstTextManager = NULL

Definition at line 1221 of file commands.c.

Referenced by getTextManager(), and setTextManager().

◆ mapupdatesent

int mapupdatesent = 0

Definition at line 55 of file commands.c.

Referenced by Map2Cmd(), and MapExtendedCmd().

◆ motd

char * motd =NULL

Definition at line 82 of file commands.c.

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

◆ news

char* news =NULL

Definition at line 82 of file commands.c.

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

◆ num_classes

int num_classes = 0

Definition at line 90 of file commands.c.

Referenced by client_reset(), get_class_info(), new_char_window_update_info(), and ReplyInfoCmd().

◆ num_races

int num_races = 0

Definition at line 87 of file commands.c.

Referenced by client_reset(), get_race_info(), new_char_window_update_info(), and ReplyInfoCmd().

◆ races

◆ rules

char * rules =NULL

Definition at line 82 of file commands.c.

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

◆ short_stat_name

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().

◆ spellmon_level

int spellmon_level = 0
static

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

Definition at line 85 of file commands.c.

Referenced by AddspellCmd(), and SetupCmd().

◆ starting_map_info

Starting_Map_Info* starting_map_info = NULL

◆ starting_map_number

◆ stat_mapping

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:92
#define CS_STAT_DEX
Definition: newclient.h:94
#define CS_STAT_WIS
Definition: newclient.h:93
#define CS_STAT_CHA
Definition: newclient.h:96
#define CS_STAT_STR
Definition: newclient.h:91
#define CS_STAT_POW
Definition: newclient.h:108
#define CS_STAT_CON
Definition: newclient.h:95

Definition at line 118 of file commands.c.

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

◆ stat_maximum

int stat_maximum

Definition at line 95 of file commands.c.

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

◆ stat_min

int stat_min

Definition at line 94 of file commands.c.

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

◆ stat_points

◆ used_classes

int used_classes = 0

Definition at line 91 of file commands.c.

Referenced by client_reset(), get_class_info(), new_char_window_update_info(), and ReplyInfoCmd().

◆ used_races

int used_races = 0

Definition at line 88 of file commands.c.

Referenced by client_reset(), get_race_info(), new_char_window_update_info(), and ReplyInfoCmd().