Go to the documentation of this file.
54 #include <sys/types.h>
55 #include <netinet/in.h>
56 #include <netinet/tcp.h>
100 if (len <= 0 || !
buf) {
120 for (;
buf[s] &&
buf[s] !=
' '; s++)
126 while (
buf[s] ==
' ')
132 for (;
buf[s] &&
buf[s] !=
' '; s++)
136 while (s < len &&
buf[s] ==
' ')
141 if (!strcmp(cmd,
"sound2")) {
144 }
else if (!strcmp(cmd,
"spellmon")) {
147 monitor_spells = atoi(param);
148 if (monitor_spells < 0 || monitor_spells > 2) {
154 }
else if (!strcmp(cmd,
"darkness")) {
157 darkness = atoi(param);
158 if (darkness != 0 && darkness != 1) {
164 }
else if (!strcmp(cmd,
"map2cmd")) {
167 map2cmd = atoi(param);
173 }
else if (!strcmp(cmd,
"facecache")) {
176 facecache = atoi(param);
177 if (facecache != 0 && facecache != 1) {
183 }
else if (!strcmp(cmd,
"faceset")) {
189 }
else if (!strcmp(cmd,
"mapsize")) {
192 if (sscanf(param,
"%dx%d%n", &
x, &
y, &n) != 2 || n != (
int)strlen(param)) {
216 }
else if (!strcmp(cmd,
"tick")) {
220 if (tick != 0 && tick != 1) {
226 }
else if (!strcmp(cmd,
"bot")) {
229 is_bot = atoi(param);
230 if (is_bot != 0 && is_bot != 1) {
236 }
else if (!strcmp(cmd,
"want_pickup")) {
239 want_pickup = atoi(param);
240 if (want_pickup != 0 && want_pickup != 1) {
246 }
else if (!strcmp(cmd,
"num_look_objects")) {
264 }
else if (!strcmp(cmd,
"extended_stats")) {
267 extended_stats = atoi(param);
268 if (extended_stats != 0 && extended_stats != 1) {
274 }
else if (!strcmp(cmd,
"beat")) {
275 int use_beat = atoi(param);
277 if (use_beat != 0 && use_beat != 1) {
285 }
else if (!strcmp(cmd,
"loginmethod")) {
288 loginmethod = atoi(param);
291 if (loginmethod > 2) loginmethod=2;
296 }
else if (!strcmp(cmd,
"notifications")) {
299 notifications = atoi(param);
304 }
else if (!strcmp(cmd,
"newmapcmd")) {
312 }
else if (!strcmp(cmd,
"extendedTextInfos")) {
318 }
else if (!strcmp(cmd,
"itemcmd")) {
324 }
else if (!strcmp(cmd,
"exp64")) {
377 "Warning: Your client is too old to receive map data. Please update to a new client at: "
378 "https://sourceforge.net/projects/crossfire/");
394 const Face *smoothface;
413 "Could not smooth face %s. "
414 "Check that this face has a smoothing pixmap, or remove its smoothlevel.\n",
440 if (len <= 0 || !
buf) {
441 LOG(
llevDebug,
"IP '%s' sent bogus ask_smooth_cmd information\n", ns->
host);
468 LOG(
llevDebug,
"Corrupt ncom command - not long enough - discarding\n");
491 "You can not issue commands - state is not ST_PLAYING (%s)",
498 LOG(
llevError,
"Player has negative time - shouldn't do command.\n");
524 if (len <= 0 || !
buf) {
533 LOG(
llevError,
"Got reply message with ST_PLAYING input state\n");
586 char *cs_str = strtok_r(
buf,
" ", &
rest);
587 char *sc_str = strtok_r(NULL,
" ", &
rest);
590 if (cs_str == NULL || sc_str == NULL) {
609 LOG(
llevInfo,
"Connection from %s (%s), CS %d, SC %d\n",
644 if (len <= 0 || !
buf) {
654 for (i = 0; i < 2; i++) {
656 if (!(
buf = strchr(
buf,
' '))) {
688 #define AddIfInt64(Old, New, sl, Type) \
691 SockList_AddChar(sl, Type); \
692 SockList_AddInt64(sl, New); \
695 #define AddIfInt(Old, New, sl, Type) \
698 SockList_AddChar(sl, Type); \
699 SockList_AddInt(sl, New); \
702 #define AddIfShort(Old, New, sl, Type) \
705 SockList_AddChar(sl, Type); \
706 SockList_AddShort(sl, New); \
709 #define AddIfFloat(Old, New, sl, Type) \
712 SockList_AddChar(sl, Type); \
713 SockList_AddInt(sl, (long)(New*FLOAT_MULTI));\
716 #define AddIfString(Old, New, sl, Type) \
717 if (Old == NULL || strcmp(Old, New)) { \
719 Old = strdup_local(New); \
720 SockList_AddChar(sl, Type); \
721 SockList_AddLen8Data(sl, New, strlen(New)); \
731 for (int16_t i = 1; i < until; i++) {
746 const char *god =
"none";
760 if (QUERY_FLAG(pl->ob, F)) { \
773 if (strcmp(
item->arch->name,
"poisoning") == 0) {
776 if (strcmp(
item->arch->name,
"blindness") == 0) {
779 if (
item->type ==
FORCE && strcmp(
item->name,
"confusion") == 0) {
809 if (
pl->
ob != NULL) {
825 int16_t golem_hp, golem_maxhp;
833 if (
pl->
ob != NULL) {
872 LOG(
llevDebug,
"pruning removed object from last_skill_ob\n");
988 for (i = 0; i <
anim->num_animations; i++) {
1008 memset(cell->
faces, face,
sizeof(cell->
faces));
1011 #define MAX_HEAD_POS MAX(MAX_CLIENT_X, MAX_CLIENT_Y)
1048 uint8_t nlayer, smoothlevel = 0;
1054 const Face *face =
ob->face;
1078 if (bx < ax || by < ay) {
1079 LOG(
llevError,
"map2_add_ob: bx (%d) or by (%d) is less than ax (%d) or ay (%d)\n", bx, by, ax, ay);
1086 for (
l = layer-1;
l <= layer+1;
l++) {
1089 if (
heads[by][bx][
l] == head)
1096 if (!
heads[by][bx][layer])
1097 heads[by][bx][layer] = head;
1099 heads[by][bx][layer+1] = head;
1104 uint16_t face_num = face ? face->
number : 0;
1108 face_num = (
ob->animation ?
ob->animation->num : 0)|(1<<15);
1120 uint8_t len, anim_speed = 0, i;
1132 smoothlevel =
ob->smoothlevel;
1143 anim_speed =
ob->anim_speed;
1144 else if (
FABS(
ob->speed) < 0.004)
1146 else if (
FABS(
ob->speed) >= 1.0)
1149 anim_speed = (
int)(1.0/
FABS(
ob->speed));
1197 nlayer = 0x10+layer+(2<<5);
1218 int got_one = 0, poisoned = 0, diseased = 0;
1220 int value, granularity;
1221 const object *
probe;
1243 granularity = (
probe->level - 14) / 3;
1244 if (granularity <= 0)
1246 else if (granularity > 30)
1250 if (
ob->stats.maxhp > 0) {
1251 value = (
ob->stats.hp * granularity) / (
ob->stats.maxhp);
1255 else if (
value > granularity)
1256 value = granularity;
1270 snprintf(
name,
sizeof(
name),
"hpbar%s%s%s_%d",
1271 poisoned ?
"_poisoned" :
"",
1272 diseased ?
"_diseased" :
"",
1273 (!poisoned && !diseased) ?
"_standard" :
"",
1276 if (dummy != NULL) {
1286 int got_one =
check_probe(ax, ay,
ob, sl, ns, has_obj, alive_layer);
1290 if (dummy != NULL) {
1315 int layer, got_one = 0, del_one = 0, oldlen, has_obj = 0;
1322 for (layer = 0; layer <
MAP_LAYERS; layer++) {
1325 head =
heads[ay][ax][layer];
1330 got_one +=
map2_add_ob(ax, ay, layer, head, sl, ns, &has_obj, 1);
1343 if (!del_one && !got_one) {
1345 }
else if (del_one && !has_obj) {
1362 int x,
y, ax, ay, d, min_x, max_x, min_y, max_y, oldlen, layer;
1398 for (
y = min_y;
y < max_y;
y++, ay++) {
1400 for (
x = min_x;
x < max_x;
x++, ax++) {
1450 int have_darkness = 0, has_obj = 0, got_one = 0, del_one = 0, g1, alive_layer = -1, old_got;
1480 for (layer = 0; layer <
MAP_LAYERS; layer++) {
1487 && (
pl->invisible&(
pl->invisible < 50 ? 4 : 1))
1497 if (got_one != old_got || (
ob->head == NULL &&
ob->more))
1505 if (g1 == has_obj) {
1507 }
else if (
ob->head == NULL) {
1512 if (layer != alive_layer)
1519 if (!del_one && !got_one && !have_darkness) {
1521 }
else if (del_one && !has_obj) {
1543 if (sl.
len > startlen) {
1557 int min_x, min_y, max_x, max_y;
1560 LOG(
llevError,
"draw_client_map called with non player/non eric-server\n");
1584 for (j = min_y; j < max_y; j++) {
1585 for (i = min_x; i < max_x; i++) {
1629 for (
x = 0;
x < mx;
x++) {
1630 for (
y = 0;
y < my;
y++) {
1634 }
else if (
x+dx < 0 || x+dx >= ns->
mapx ||
y+dy < 0 || y+dy >= ns->
mapy) {
1683 if (spell->type ==
SPELL) {
1720 if (!
pl || !spell || spell->
env !=
pl->
ob) {
1761 switch (spell->
type)
1786 int len, i, skill = 0;
1826 len = strlen(spell->
msg);
1860 LOG(
llevError,
"esrv_add_spells, tried to add a spell to a NULL player\n");
1883 size = 26+strlen(spell->
name)+(spell->
msg ? strlen(spell->
msg) : 0);
1897 LOG(
llevError,
"Asked to send a non-spell object as a spell\n");
1925 if (setsockopt(
pl->
socket.
fd, IPPROTO_TCP, TCP_NODELAY, &
tmp,
sizeof(
tmp)))
1926 LOG(
llevError,
"send_tick: Unable to turn on TCP_NODELAY\n");
1930 if (setsockopt(
pl->
socket.
fd, IPPROTO_TCP, TCP_NODELAY, &
tmp,
sizeof(
tmp)))
1931 LOG(
llevError,
"send_tick: Unable to turn off TCP_NODELAY\n");
2007 uint16_t faceno = 0;
2018 if (acn->
face[0] != 0 ) {
2085 nlen = (
unsigned char)
buf[0];
2086 if (nlen >=
MAX_BUF || nlen > *len-2) {
2092 plen = (
unsigned char)
buf[nlen+1];
2093 if (plen >=
MAX_BUF || plen > *len-2-nlen) {
2096 memcpy(password,
buf+2+nlen, plen);
2118 if (len <= 0 || !
buf) {
2119 LOG(
llevDebug,
"IP '%s' sent bogus add_player_cmd information\n", ns->
host);
2141 SockList_AddString(&sl,
"failure accountlogin No such account name exists on this server");
2217 if (len <= 0 || !
buf) {
2218 LOG(
llevDebug,
"IP '%s' sent bogus add_player_cmd information\n", ns->
host);
2256 if (strlen(password)<2) {
2264 SockList_AddString(&sl,
"failure accountnew That account already exists on this server");
2273 "failure accountnew That account name contains invalid characters.");
2281 "failure accountnew That account name is too long");
2290 "failure accountnew That password contains invalid characters.");
2298 "failure accountnew That password is too long");
2332 if (len <= 0 || !
buf) {
2333 LOG(
llevDebug,
"IP '%s' sent bogus add_player_cmd information\n", ns->
host);
2385 SockList_AddString(&sl,
"failure accountaddplayer 0 That character is already connected to this account.");
2391 SockList_AddString(&sl,
"failure accountaddplayer 1 That character is already connected to a different account.");
2403 SockList_AddString(&sl,
"failure accountaddplayer 0 That character is already connected to a different account which is currently logged in.");
2425 }
else if (
status == 2) {
2426 SockList_AddString(&sl,
"failure accountaddplayer 0 You have reached the maximum number of characters allowed per account.");
2462 if (len <= 0 || !
buf) {
2463 LOG(
llevDebug,
"IP '%s' sent bogus account_play_cmd information\n", ns->
host);
2493 for (i=0; chars[i]; i++) {
2494 if (strcmp(chars[i],
buf) == 0)
2499 "failure accountplay Character %s is not associated with account %s",
2509 "failure accountplay Character %s is already playing",
2554 #define MAX_CHOICES 100
2564 int status, nlen, choice_num=0, i;
2570 if (len <= 0 || !
buf) {
2571 LOG(
llevDebug,
"IP '%s' sent bogus create_player_cmd information\n", ns->
host);
2602 SockList_AddString(&sl,
"failure createplayer Player name contains invalid characters");
2609 if (strlen(password)<2) {
2632 if (strlen(password)>17)
2641 SockList_AddString(&sl,
"failure createplayer The name contains illegal characters");
2703 int i, j, stat_total=0;
2704 char *
key, *
value, *race=NULL, *
class=NULL;
2709 memset(&new_stats, 0,
sizeof(
living));
2711 while (nlen < len) {
2720 if ((i == 0) || (nlen + i > len))
break;
2740 "failure createplayer Invalid starting map");
2754 "Number of choices receive exceed max value: %d>%d\n",
2757 choices[choice_num] =
value;
2765 int val = atoi(
value);
2793 "failure createplayer Stat value is out of range - %d must be between %d and %d",
2802 "failure createplayer Total allocated statistics is higher than allowed (%d>%d)",
2818 if (!race_a || race_a->clone.type !=
PLAYER || !class_a || class_a->clone.type !=
CLASS) {
2820 "failure createplayer Invalid or unknown race or class");
2831 "failure createplayer Unable to apply race or class - statistic is out of bounds");
2913 for (i=0; i < choice_num; i++) {
2914 char *choiceval, *cp;
2919 choiceval = strchr(choices[i],
' ');
2921 LOG(
llevError,
"Choice does not specify value: %s\n", choices[i]);
2931 LOG(
llevError,
"Choice not found in archetype: %s\n", choices[i]);
2934 cp = strstr(
value, choiceval);
2936 LOG(
llevError,
"Choice value not found in archetype: %s %s\n",
2937 choices[i], choiceval);
2947 if ((cp[strlen(choiceval)] !=
' ') && (cp[strlen(choiceval)] != 0) &&
2948 (cp !=
value) && (*(cp-1) !=
' ')) {
2950 LOG(
llevError,
"Choice value matches substring but not entire word: %s substring %s\n",
2956 LOG(
llevError,
"Choice value can not find archetype %s\n", choiceval);
2968 "%s has entered the game.",
pl->
ob->
name);
2986 if (len <= 0 || !
buf) {
2987 LOG(
llevDebug,
"IP '%s' sent bogus account_password_cmd information\n", ns->
host);
3017 if (strlen(change)<2) {
3027 "failure accountpw That password contains invalid characters.");
3035 "failure accountpw That password is too long");
3046 error =
"failure accountpw Illegal characters present";
3047 }
else if (
status == 2) {
3048 error =
"failure accountpw Invalid account";
3050 error =
"failure accountpw Incorrect current password";
player * find_player_socket(const socket_struct *ns)
#define ADD_PLAYER_NO_STATS_ROLL
#define CS_STAT_RES_DEPLETE
uint32_t get_weight_limit(int stat)
static int map2_delete_layer(int ax, int ay, int layer, SockList *sl, socket_struct *ns)
void SockList_AddInt(SockList *sl, uint32_t data)
#define ST_CHANGE_PASSWORD_OLD
void print_ext_msg(socket_struct *ns, int color, uint8_t type, uint8_t subtype, const char *message)
sstring add_string(const char *str)
void object_remove(object *op)
static uint8_t is_perfect(const player *pl)
void SockList_AddInt64(SockList *sl, uint64_t data)
static bool CAN_PROBE(const object *ob)
#define FLAG_CLIENT_ANIM_RANDOM
void reply_cmd(char *buf, int len, player *pl)
#define CS_STAT_APPLIED_WIS
#define MSG_TYPE_ADMIN_PLAYER
void account_login_cmd(char *buf, int len, socket_struct *ns)
void account_play_cmd(char *buf, int len, socket_struct *ns)
#define QUERY_FLAG(xyz, p)
char const * newhash(char const *password)
arch
DIALOGCHECK MINARGS 1 MAXARGS 1
linked_char * account_get_additional_chars(const char *account_name, const Account_Chars *chars, int *count)
#define CS_STAT_APPLIED_POW
void account_new_cmd(char *buf, int len, socket_struct *ns)
int get_skill_client_code(const char *skill_name)
#define MAX_NUM_LOOK_OBJECTS
void command_execute(object *pl, char *command)
object * object_find_by_arch_name(const object *who, const char *name)
void SockList_AddString(SockList *sl, const char *data)
#define CS_STAT_SPELL_DENY
char ** account_get_players_for_account(const char *account_name)
int8_t blocked_los[MAP_CLIENT_X][MAP_CLIENT_Y]
void send_tick(player *pl)
void esrv_add_spells(player *pl, object *spell)
uint8_t starting_stat_min
player * get_player(player *p)
#define CS_STAT_RES_HOLYWORD
int account_link(const char *account_name, const char *player_name)
#define CS_STAT_TURN_UNDEAD
#define SP_CREATE_MISSILE
static const flag_definition flags[]
void move_cmd(char *buf, int len, player *pl)
static int decode_name_password(const char *buf, int *len, char *name, char *password)
void receive_play_again(object *op, char key)
int16_t last_resist[NROFATTACKS]
void draw_client_map(object *pl)
#define MSG_TYPE_COMMAND_ERROR
void SockList_Reset(SockList *sl)
#define CS_STAT_CHARACTER_FLAGS
int is_valid_faceset(int fsn)
void send_account_players(socket_struct *ns)
struct treasureliststruct * randomitems
void key_confirm_quit(object *op, char key)
#define CS_STAT_APPLIED_DEX
player * add_player(socket_struct *ns, int flags)
static int check_probe(int ax, int ay, const object *ob, SockList *sl, socket_struct *ns, int *has_obj, int *alive_layer)
#define CS_STAT_GOLEM_MAXHP
static int spell_client_use(const object *spell)
method_ret ob_apply(object *op, object *applier, int aflags)
size_t SockList_Avail(const SockList *sl)
short GetShort_String(const unsigned char *data)
const char * object_get_value(const object *op, const char *const key)
#define SP_SUMMON_MONSTER
void esrv_remove_spell(player *pl, object *spell)
static event_registration m
Account_Chars * account_chars
char savebed_map[MAX_BUF]
void set_title(const object *pl, char *buf, size_t len)
#define CS_STAT_SPELL_REPEL
static void send_extra_stats(SockList *sl, player *pl)
void esrv_send_animation(socket_struct *ns, const Animations *anim)
void account_add_player_cmd(char *buf, int len, socket_struct *ns)
int playername_ok(const char *cp)
void esrv_send_face(socket_struct *ns, const Face *face, int nocache)
#define CS_STAT_APPLIED_CHA
#define ST_CHANGE_PASSWORD_CONFIRM
int check_race_and_class(living *stats, archetype *race, archetype *opclass)
void check_login(object *op, const char *password)
void send_query(socket_struct *ns, uint8_t flags, const char *text)
const char * account_get_account_for_char(const char *charname)
uint8_t account_block_create
#define AddIfFloat(Old, New, sl, Type)
#define ADD_PLAYER_NO_MAP
void account_char_free(Account_Chars *chars)
int account_remove_player(const char *account_name, const char *player_name)
void SockList_AddShort(SockList *sl, uint16_t data)
#define AddIfString(Old, New, sl, Type)
void SockList_AddChar(SockList *sl, unsigned char c)
#define CS_STAT_APPLIED_STR
uint32_t last_path_attuned
object * object_present_in_ob(uint8_t type, const object *op)
#define GET_MAP_FACE_OBJ(M, X, Y, L)
uint32_t last_character_flags
#define FREE_AND_COPY(sv, nv)
EXTERN player * first_player
void version_cmd(char *buf, int len, socket_struct *ns)
#define CS_STAT_APPLIED_CON
#define MAP_LAYER_LIVING1
void add_me_cmd(char *buf, int len, socket_struct *ns)
static void send_smooth(socket_struct *ns, const Face *face)
const char * skill_names[MAX_SKILLS]
uint16_t faces[MAP_LAYERS]
#define CS_STAT_RES_GHOSTHIT
struct linked_char * next
#define CS_STAT_SKILLINFO
struct archt * other_arch
int account_new(const char *account_name, const char *account_password)
static int annotate_ob(int ax, int ay, const object *ob, SockList *sl, socket_struct *ns, int *has_obj, int *alive_layer)
#define ST_CHANGE_PASSWORD_NEW
float last_character_load
#define CS_STAT_RES_BLIND
const typedef char * sstring
#define FLAG_UNAGGRESSIVE
#define MAP2_TYPE_DARKNESS
struct account_char_struct * next
static void draw_client_map2(object *pl)
const Face * get_face_by_id(uint16_t id)
uint32_t last_path_denied
int16_t SP_level_spellpoint_cost(object *caster, object *spell, int flags)
client_spell * get_client_spell_state(player *pl, object *spell)
int account_is_logged_in(const char *name)
void SockList_Init(SockList *sl)
static void append_spell(player *pl, SockList *sl, object *spell)
void free_charlinks(linked_char *lc)
#define CS_STAT_WEIGHT_LIM
void esrv_send_pickup(player *pl)
#define CS_STAT_ITEM_POWER
#define CS_STAT_RES_POISON
void receive_player_name(object *op, const char *name)
static const short atnr_cs_stat[NROFATTACKS]
void SockList_Term(SockList *sl)
static int map2_add_ob(int ax, int ay, int layer, const object *ob, SockList *sl, socket_struct *ns, int *has_obj, int is_head)
int probe(object *op, object *caster, object *spell_ob, int dir, int level)
void key_roll_stat(object *op, char key)
#define FLAG_CLIENT_ANIM_SYNC
uint8_t starting_stat_points
client_spell * spell_state
#define MAP2_COORD_ENCODE(x, y, flags)
int apply_race_and_class(object *op, archetype *race, archetype *opclass, living *stats)
living last_applied_stats
void account_password(char *buf, int len, socket_struct *ns)
#define CS_STAT_SPELL_ATTUNE
void SockList_AddData(SockList *sl, const void *data, size_t len)
void esrv_move_object(object *pl, tag_t to, tag_t tag, long nrof)
int SP_level_dam_adjust(const object *caster, const object *spob)
void ask_smooth_cmd(char *buf, int len, socket_struct *ns)
static void add_char_field(SockList *sl, int type, const char *data)
#define ST_CONFIRM_PASSWORD
void LOG(LogLevel logLevel, const char *format,...)
int64_t last_skill_exp[MAX_SKILLS]
void enter_exit(object *op, object *exit_ob)
void esrv_update_stats(player *pl)
void create_player_cmd(char *buf, int len, socket_struct *ns)
int32_t last_weight_limit
object * last_skill_ob[MAX_SKILLS]
void SockList_AddLen8Data(SockList *sl, const void *data, size_t len)
void receive_player_password(object *op, const char *password)
void esrv_draw_look(object *pl)
struct map_cell_struct cells[MAX_CLIENT_X][MAX_CLIENT_Y]
void set_attr_value(living *stats, int attr, int8_t value)
#define AddIfInt64(Old, New, sl, Type)
#define NUM_ANIMATIONS(ob)
object * object_insert_in_ob(object *op, object *where)
void SockList_ResetRead(SockList *sl)
const char *const short_stat_name[NUM_STATS]
uint8_t anims_sent[MAXANIMNUM]
int account_change_password(const char *account_name, const char *current_password, const char *new_password)
#define AddIfShort(Old, New, sl, Type)
static void check_space_for_heads(int ax, int ay, SockList *sl, socket_struct *ns)
void set_up_cmd(char *buf, int len, socket_struct *ns)
#define CS_STAT_RES_DEATH
object * arch_to_object(archetype *at)
object * ranges[range_size]
int GetInt_String(const unsigned char *data)
int strcasecmp(const char *s1, const char *s2)
void send_plugin_custom_message(object *pl, char *buf)
int save_player(object *op, int flag)
void esrv_map_scroll(socket_struct *ns, int dx, int dy)
#define ST_GET_PARTY_PASSWORD
int8_t get_attr_value(const living *stats, int attr)
void update_position(mapstruct *m, int x, int y)
archetype * get_archetype_by_type_subtype(int type, int subtype)
void player_set_state(player *pl, uint8_t state)
archetype * try_find_archetype(const char *name)
const Face * try_find_face(const char *name, const Face *error)
#define MIN_NUM_LOOK_OBJECTS
#define MAP_LAYER_LIVING2
void map_newmap_cmd(socket_struct *ns)
static int account_block_create(const socket_struct *ns)
Account_Chars * account_char_load(const char *account_name)
void key_change_class(object *op, char key)
void receive_party_password(object *op, const char *password)
int account_check_string(const char *str)
object * object_find_by_type_and_name(const object *who, int type, const char *name)
char * account_trusted_host
void esrv_update_spells(player *pl)
#define AddIfInt(Old, New, sl, Type)
#define MSG_TYPE_ADMIN_VERSION
int find_smooth(const Face *face, const Face **smoothed)
int account_login(const char *account_name, const char *account_password)
int verify_player(const char *name, char *password)
static const object * heads[MAX_HEAD_POS][MAX_HEAD_POS][MAP_LAYERS]
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny)
static void map_clearcell(struct map_cell_struct *cell, int face, int count)
void account_char_save(Account_Chars *chars)
void esrv_new_player(player *pl, uint32_t weight)
#define CS_STAT_RES_DRAIN
int16_t resist[NROFATTACKS]
void Send_With_Handling(socket_struct *ns, SockList *sl)
mapstruct * get_map_from_coord(mapstruct *m, int16_t *x, int16_t *y)
#define FOR_INV_PREPARE(op_, it_)
void account_char_remove(Account_Chars *chars, const char *pl_name)
#define CS_STAT_APPLIED_INT
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...)
void update_los(object *op)
void rangetostring(const object *pl, char *obuf, size_t len)
#define NS_FACESENT_SMOOTH
void SockList_AddPrintf(SockList *sl, const char *format,...)
const char * account_exists(const char *account_name)
uint8_t starting_stat_max
uint32_t last_path_repelled
void new_player_cmd(uint8_t *buf, int len, player *pl)