|
Atrinik Server 2.5
|
Go to the source code of this file.
Data Structures | |
| struct | SockList |
| struct | CS_Stats |
| struct | _srv_client_files |
Defines | |
| #define | MAXSOCKBUF (64 * 1024) |
| #define | MAXSOCKBUF_IN (3 * 1024) |
| #define | CS_QUERY_YESNO 0x1 |
| #define | CS_QUERY_SINGLECHAR 0x2 |
| #define | CS_QUERY_HIDEINPUT 0x4 |
| #define | FLOAT_MULTI 100000 |
| #define | FLOAT_MULTF 100000.0 |
| #define | CS_STAT_HP 1 |
| #define | CS_STAT_MAXHP 2 |
| #define | CS_STAT_SP 3 |
| #define | CS_STAT_MAXSP 4 |
| #define | CS_STAT_STR 5 |
| #define | CS_STAT_INT 6 |
| #define | CS_STAT_WIS 7 |
| #define | CS_STAT_DEX 8 |
| #define | CS_STAT_CON 9 |
| #define | CS_STAT_CHA 10 |
| #define | CS_STAT_EXP 11 |
| #define | CS_STAT_LEVEL 12 |
| #define | CS_STAT_WC 13 |
| #define | CS_STAT_AC 14 |
| #define | CS_STAT_DAM 15 |
| #define | CS_STAT_ARMOUR 16 |
| #define | CS_STAT_SPEED 17 |
| #define | CS_STAT_FOOD 18 |
| #define | CS_STAT_WEAP_SP 19 |
| #define | CS_STAT_RANGE 20 |
| #define | CS_STAT_TITLE 21 |
| #define | CS_STAT_POW 22 |
| #define | CS_STAT_GRACE 23 |
| #define | CS_STAT_MAXGRACE 24 |
| #define | CS_STAT_FLAGS 25 |
| #define | CS_STAT_WEIGHT_LIM 26 |
| #define | CS_STAT_EXT_TITLE 27 |
| #define | CS_STAT_REG_HP 28 |
| #define | CS_STAT_REG_MANA 29 |
| #define | CS_STAT_REG_GRACE 30 |
| #define | CS_STAT_TARGET_HP 31 |
| #define | CS_STAT_ACTION_TIME 36 |
| #define | CS_STAT_RANGED_DAM 37 |
| #define | CS_STAT_RANGED_WC 38 |
| #define | CS_STAT_RANGED_WS 39 |
| #define | CS_STAT_RESIST_START 100 |
| #define | CS_STAT_RESIST_END 117 |
| #define | CS_STAT_RES_PHYS 100 |
| #define | CS_STAT_RES_MAG 101 |
| #define | CS_STAT_RES_FIRE 102 |
| #define | CS_STAT_RES_ELEC 103 |
| #define | CS_STAT_RES_COLD 104 |
| #define | CS_STAT_RES_CONF 105 |
| #define | CS_STAT_RES_ACID 106 |
| #define | CS_STAT_RES_DRAIN 107 |
| #define | CS_STAT_RES_GHOSTHIT 108 |
| #define | CS_STAT_RES_POISON 109 |
| #define | CS_STAT_RES_SLOW 110 |
| #define | CS_STAT_RES_PARA 111 |
| #define | CS_STAT_TIME 112 |
| #define | CS_STAT_RES_FEAR 113 |
| #define | CS_STAT_RES_DEPLETE 114 |
| #define | CS_STAT_RES_DEATH 115 |
| #define | CS_STAT_RES_HOLYWORD 116 |
| #define | CS_STAT_RES_BLIND 117 |
| #define | CS_STAT_SKILLEXP_START 118 |
| #define | CS_STAT_SKILLEXP_END 129 |
| #define | CS_STAT_SKILLEXP_AGILITY 118 |
| #define | CS_STAT_SKILLEXP_AGLEVEL 119 |
| #define | CS_STAT_SKILLEXP_PERSONAL 120 |
| #define | CS_STAT_SKILLEXP_PELEVEL 121 |
| #define | CS_STAT_SKILLEXP_MENTAL 122 |
| #define | CS_STAT_SKILLEXP_MELEVEL 123 |
| #define | CS_STAT_SKILLEXP_PHYSIQUE 124 |
| #define | CS_STAT_SKILLEXP_PHLEVEL 125 |
| #define | CS_STAT_SKILLEXP_MAGIC 126 |
| #define | CS_STAT_SKILLEXP_MALEVEL 127 |
| #define | CS_STAT_SKILLEXP_WISDOM 128 |
| #define | CS_STAT_SKILLEXP_WILEVEL 129 |
| #define | CS_STAT_PROT_START 130 |
| #define | CS_STAT_PROT_END 149 |
| #define | SF_FIREON 1 |
| #define | SF_RUNON 2 |
| #define | SF_BLIND 4 |
| #define | SF_XRAYS 8 |
| #define | SF_INFRAVISION 16 |
| #define | COLOR_WHITE "ffffff" |
| #define | COLOR_ORANGE "ff9900" |
| #define | COLOR_NAVY "00ffff" |
| #define | COLOR_RED "ff3030" |
| #define | COLOR_GREEN "00ff00" |
| #define | COLOR_BLUE "0080ff" |
| #define | COLOR_GRAY "999999" |
| #define | COLOR_BROWN "c07f40" |
| #define | COLOR_PURPLE "cc66ff" |
| #define | COLOR_PINK "ff9999" |
| #define | COLOR_YELLOW "ffff33" |
| #define | COLOR_DK_NAVY "00c4c2" |
| #define | COLOR_DK_GREEN "006600" |
| #define | COLOR_DK_ORANGE "ff6600" |
| #define | COLOR_BRIGHT_PURPLE "ff66ff" |
| #define | COLOR_HGOLD "d4d553" |
| #define | COLOR_DGOLD "999900" |
| #define | COLOR_BLACK "000000" |
| #define | NDI_SAY 0x0100 |
| #define | NDI_SHOUT 0x0200 |
| #define | NDI_TELL 0x0400 |
| #define | NDI_PLAYER 0x0800 |
| #define | NDI_EMOTE 0x01000 |
| #define | NDI_ANIM 0x02000 |
| #define | NDI_ALL 0x20000 |
| #define | F_APPLIED 0x000F |
| #define | F_ETHEREAL 0x0080 |
| #define | F_INVISIBLE 0x0100 |
| #define | F_UNPAID 0x0200 |
| #define | F_MAGIC 0x0400 |
| #define | F_CURSED 0x0800 |
| #define | F_DAMNED 0x1000 |
| #define | F_OPEN 0x2000 |
| #define | F_NOPICK 0x4000 |
| #define | F_LOCKED 0x8000 |
| #define | F_TRAPPED 0x10000 |
| #define | UPD_LOCATION 1 |
| #define | UPD_FLAGS 2 |
| #define | UPD_WEIGHT 4 |
| #define | UPD_FACE 8 |
| #define | UPD_NAME 16 |
| #define | UPD_ANIM 32 |
| #define | UPD_ANIMSPEED 64 |
| #define | UPD_NROF 128 |
| #define | UPD_DIRECTION 256 |
| #define | UPD_TYPE 512 |
| #define | UPD_ANIM_NO_INV 1024 |
| #define | SRV_FILE_SPELLS_FILENAME "client_spells_v2" |
| #define | SRV_CLIENT_SKILLS_FILENAME "client_skills_v2" |
| #define | DATA_PACKED_CMD 0x80 |
| #define | SOCKET_SET_BINARY_CMD(__s__, __bc__) |
| #define | MAP_UPDATE_CMD_SAME 0 |
| #define | MAP_UPDATE_CMD_NEW 1 |
| #define | MAP_UPDATE_CMD_CONNECTED 2 |
| #define | CMD_QUICKSLOT_SET 1 |
| #define | CMD_QUICKSLOT_SETSPELL 2 |
| #define | CMD_QUICKSLOT_UNSET 3 |
| #define | QUICKSLOT_TYPE_ITEM 1 |
| #define | QUICKSLOT_TYPE_SPELL 2 |
| #define | CMD_TARGET_SELF 0 |
| #define | CMD_TARGET_ENEMY 1 |
| #define | CMD_TARGET_FRIEND 2 |
Typedefs | |
| typedef struct SockList | SockList |
| typedef struct CS_Stats | CS_Stats |
| typedef struct _srv_client_files | _srv_client_files |
Enumerations | |
| enum | { a_none, a_readied, a_wielded, a_worn, a_active, a_applied } |
| enum | { SRV_CLIENT_SKILLS, SRV_CLIENT_SPELLS, SRV_CLIENT_SETTINGS, SRV_CLIENT_ANIMS, SRV_CLIENT_BMAPS, SRV_CLIENT_HFILES, SRV_FILE_UPDATES, SRV_FILE_SPELLS_V2, SRV_SERVER_SETTINGS, SRV_CLIENT_ANIMS_V2, SRV_CLIENT_EFFECTS, SRV_CLIENT_SKILLS_V2, SRV_CLIENT_FILES } |
| enum | { DATA_CMD_NO, DATA_CMD_SKILL_LIST, DATA_CMD_SPELL_LIST, DATA_CMD_SETTINGS_LIST, DATA_CMD_ANIM_LIST, DATA_CMD_BMAP_LIST, DATA_CMD_HFILES_LIST } |
| enum | { BINARY_CMD_COMC = 1, BINARY_CMD_MAP2, BINARY_CMD_DRAWINFO, BINARY_CMD_DRAWINFO2, BINARY_CMD_FILE_UPD, BINARY_CMD_ITEMX, BINARY_CMD_SOUND, BINARY_CMD_TARGET, BINARY_CMD_UPITEM, BINARY_CMD_DELITEM, BINARY_CMD_STATS, BINARY_CMD_IMAGE, BINARY_CMD_FACE1, BINARY_CMD_ANIM, BINARY_CMD_SKILLRDY, BINARY_CMD_PLAYER, BINARY_CMD_MAPSTATS, BINARY_CMD_SPELL_LIST, BINARY_CMD_SKILL_LIST, BINARY_CMD_CLEAR, BINARY_CMD_ADDME_SUC, BINARY_CMD_ADDME_FAIL, BINARY_CMD_VERSION, BINARY_CMD_BYE, BINARY_CMD_SETUP, BINARY_CMD_QUERY, BINARY_CMD_DATA, BINARY_CMD_NEW_CHAR, BINARY_CMD_ITEMY, BINARY_CMD_BOOK, BINARY_CMD_PARTY, BINARY_CMD_QUICKSLOT, BINARY_CMD_SHOP, BINARY_CMD_QLIST, BINARY_CMD_REGION_MAP, BINARY_CMD_READY, BINARY_CMD_KEEPALIVE, BINARY_CMD_MAGICMAP, BINARY_CMD_DELINV, BINARY_CMD_REPLYINFO, BINARY_CMD_IMAGE2, BINARY_CMD_FACE, BINARY_CMD_FACE2, BINAR_CMD } |
Variables | |
| _srv_client_files | SrvClientFiles [SRV_CLIENT_FILES] |
| CS_Stats | cst_tot |
| CS_Stats | cst_lst |
This file defines various flags that both the new client and newserver uses.
These should never be changed, only expanded. Changing them will likely cause all old clients to not work properly. While called newclient, it is really used by both the client and server to keep some values the same.
Name format is CS_(command)_(flag)
CS = Client/Server.
(command) is protocol command, ie ITEM
(flag) is the flag name
Definition in file newclient.h.
| #define MAXSOCKBUF (64 * 1024) |
Maximum size of any packet we expect. Using this makes it so we don't need to allocate and deallocate the same buffer over and over again at the price of using a bit of extra memory.
It also makes the code simpler.
Definition at line 53 of file newclient.h.
| #define MAXSOCKBUF_IN (3 * 1024) |
Maximum size of socket input buffer we can read/fill when reading from socket. This is raw data until we sort it out and put it in the player command queue.
Definition at line 59 of file newclient.h.
| #define SOCKET_SET_BINARY_CMD | ( | __s__, | |
| __bc__ | |||
| ) |
(__s__)->buf[0] = __bc__; \
(__s__)->len = 1
Set binary socket command.
Definition at line 402 of file newclient.h.
| #define SRV_CLIENT_SKILLS_FILENAME "client_skills_v2" |
Name of the client skills file.
Definition at line 362 of file newclient.h.
| #define SRV_FILE_SPELLS_FILENAME "client_spells_v2" |
Name of the client spells file.
Definition at line 360 of file newclient.h.
| typedef struct _srv_client_files _srv_client_files |
Srv client files.
Contains the base information we use to make up a packet we want to send.
| anonymous enum |
Srv client files.
Definition at line 365 of file newclient.h.
| anonymous enum |
Data commands.
Definition at line 390 of file newclient.h.
| anonymous enum |
All the possible binary commands.
Note that the 0 is reserved to mark compressed data packets that the server sends to client if COMPRESS_DATA_PACKETS is 1 and the data packet has more than COMPRESS_DATA_PACKETS_SIZE bytes.
| BINARY_CMD_SHOP | |
| BINARY_CMD_READY |
Used to exchange information about readied objects such as arrows, bolts, quivers, throwing knives, etc. |
Definition at line 412 of file newclient.h.
Last series of stats.
Definition at line 429 of file lowlevel.c.
Life of the server.
Definition at line 426 of file lowlevel.c.
| _srv_client_files SrvClientFiles[SRV_CLIENT_FILES] |
1.7.4