Crossfire Client, Trunk  R18666
/home/leaf/crossfire/client/trunk/common/shared/newclient.h
Go to the documentation of this file.
00001 /*
00002  * static char *rcsid_newclient_h =
00003  *   "$Id: newclient.h 14013 2010-10-21 06:16:43Z mwedel $";
00004  */
00005 
00006 /*
00007     CrossFire, A Multiplayer game for X-windows
00008 
00009     Copyright (C) 2002,2006,2010 Mark Wedel & Crossfire Development Team
00010     Copyright (C) 1992 Frank Tore Johansen
00011 
00012     This program is free software; you can redistribute it and/or modify
00013     it under the terms of the GNU General Public License as published by
00014     the Free Software Foundation; either version 2 of the License, or
00015     (at your option) any later version.
00016 
00017     This program is distributed in the hope that it will be useful,
00018     but WITHOUT ANY WARRANTY; without even the implied warranty of
00019     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020     GNU General Public License for more details.
00021 
00022     You should have received a copy of the GNU General Public License
00023     along with this program; if not, write to the Free Software
00024     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00025 
00026     The authors can be reached via e-mail at crossfire-devel@real-time.com
00027 */
00028 
00042 #ifndef NEWCLIENT_H
00043 #define NEWCLIENT_H
00044 
00053 #define MAXSOCKBUF (2+65535+1)
00054 
00060 #define MAP2_COORD_OFFSET   15
00061 
00070 #define MAP2_TYPE_CLEAR         0x0
00071 #define MAP2_TYPE_DARKNESS      0x1
00072 /*
00073  * These next two are not used presently, but the numbers are set aside for
00074  * when support is added.
00075  *
00076  * #define MAP2_TYPE_SOUND         0x2
00077  * #define MAP2_TYPE_LIGHTSOURCE   0x3
00078  */
00081 #define MAP2_LAYER_START        0x10
00082 
00092 #define MAP2_COORD_ENCODE(x, y, flags) ((((x)+MAP2_COORD_OFFSET)&0x3f)<<10|(((y)+MAP2_COORD_OFFSET)&0x3f)<<4|(flags&0x0f))
00093 
00094 #define CS_QUERY_YESNO      0x1 
00095 #define CS_QUERY_SINGLECHAR 0x2 
00096 #define CS_QUERY_HIDEINPUT  0x4 
00098 #define CS_SAY_NORMAL       0x1 
00099 #define CS_SAY_SHOUT        0x2 
00100 #define CS_SAY_GSAY         0x4 
00107 #define FLOAT_MULTI    100000   
00108 #define FLOAT_MULTF    100000.0 
00109 
00115 #define CS_STAT_HP                  1
00116 #define CS_STAT_MAXHP               2
00117 #define CS_STAT_SP                  3
00118 #define CS_STAT_MAXSP               4
00119 #define CS_STAT_STR                 5
00120 #define CS_STAT_INT                 6
00121 #define CS_STAT_WIS                 7
00122 #define CS_STAT_DEX                 8
00123 #define CS_STAT_CON                 9
00124 #define CS_STAT_CHA                10
00125 #define CS_STAT_EXP                11  
00126 #define CS_STAT_LEVEL              12
00127 #define CS_STAT_WC                 13
00128 #define CS_STAT_AC                 14
00129 #define CS_STAT_DAM                15
00130 #define CS_STAT_ARMOUR             16
00131 #define CS_STAT_SPEED              17
00132 #define CS_STAT_FOOD               18
00133 #define CS_STAT_WEAP_SP            19
00134 #define CS_STAT_RANGE              20
00135 #define CS_STAT_TITLE              21
00136 #define CS_STAT_POW                22
00137 #define CS_STAT_GRACE              23
00138 #define CS_STAT_MAXGRACE           24
00139 #define CS_STAT_FLAGS              25
00140 #define CS_STAT_WEIGHT_LIM         26
00141 #define CS_STAT_EXP64              28
00142 #define CS_STAT_SPELL_ATTUNE       29
00143 #define CS_STAT_SPELL_REPEL        30
00144 #define CS_STAT_SPELL_DENY         31
00145 #define CS_STAT_RACE_STR           32
00146 #define CS_STAT_RACE_INT           33
00147 #define CS_STAT_RACE_WIS           34
00148 #define CS_STAT_RACE_DEX           35
00149 #define CS_STAT_RACE_CON           36
00150 #define CS_STAT_RACE_CHA           37
00151 #define CS_STAT_RACE_POW           38
00152 #define CS_STAT_BASE_STR           39
00153 #define CS_STAT_BASE_INT           40
00154 #define CS_STAT_BASE_WIS           41
00155 #define CS_STAT_BASE_DEX           42
00156 #define CS_STAT_BASE_CON           43
00157 #define CS_STAT_BASE_CHA           44
00158 #define CS_STAT_BASE_POW           45
00159 #define CS_STAT_APPLIED_STR        46 
00160 #define CS_STAT_APPLIED_INT        47 
00161 #define CS_STAT_APPLIED_WIS        48 
00162 #define CS_STAT_APPLIED_DEX        49 
00163 #define CS_STAT_APPLIED_CON        50 
00164 #define CS_STAT_APPLIED_CHA        51 
00165 #define CS_STAT_APPLIED_POW        52 
00167 #define CS_STAT_RESIST_START      100 
00168 #define CS_STAT_RESIST_END        117 
00170 #define CS_STAT_RES_PHYS          100
00171 #define CS_STAT_RES_MAG           101
00172 #define CS_STAT_RES_FIRE          102
00173 #define CS_STAT_RES_ELEC          103
00174 #define CS_STAT_RES_COLD          104
00175 #define CS_STAT_RES_CONF          105
00176 #define CS_STAT_RES_ACID          106
00177 #define CS_STAT_RES_DRAIN         107
00178 #define CS_STAT_RES_GHOSTHIT      108
00179 #define CS_STAT_RES_POISON        109
00180 #define CS_STAT_RES_SLOW          110
00181 #define CS_STAT_RES_PARA          111
00182 #define CS_STAT_TURN_UNDEAD       112
00183 #define CS_STAT_RES_FEAR          113
00184 #define CS_STAT_RES_DEPLETE       114
00185 #define CS_STAT_RES_DEATH         115
00186 #define CS_STAT_RES_HOLYWORD      116
00187 #define CS_STAT_RES_BLIND         117
00188 
00189 #define CS_STAT_SKILLEXP_START    118 
00191 #define CS_STAT_SKILLEXP_END      129 
00193 #define CS_STAT_SKILLEXP_AGILITY  118
00194 #define CS_STAT_SKILLEXP_AGLEVEL  119
00195 #define CS_STAT_SKILLEXP_PERSONAL 120
00196 #define CS_STAT_SKILLEXP_PELEVEL  121
00197 #define CS_STAT_SKILLEXP_MENTAL   122
00198 #define CS_STAT_SKILLEXP_MELEVEL  123
00199 #define CS_STAT_SKILLEXP_PHYSIQUE 124
00200 #define CS_STAT_SKILLEXP_PHLEVEL  125
00201 #define CS_STAT_SKILLEXP_MAGIC    126
00202 #define CS_STAT_SKILLEXP_MALEVEL  127
00203 #define CS_STAT_SKILLEXP_WISDOM   128
00204 #define CS_STAT_SKILLEXP_WILEVEL  129
00205 
00211 #define CS_STAT_SKILLINFO         140
00212 
00218 #define CS_NUM_SKILLS              50
00219 
00228 #define SF_FIREON   0x01
00229 #define SF_RUNON    0x02
00230 
00239 #define ACL_NAME        1
00240 #define ACL_CLASS       2
00241 #define ACL_RACE        3
00242 #define ACL_LEVEL       4
00243 #define ACL_FACE        5
00244 #define ACL_PARTY       6
00245 #define ACL_MAP         7
00246 #define ACL_FACE_NUM    8
00247 
00264 #define NDI_BLACK       0
00265 #define NDI_WHITE       1
00266 #define NDI_NAVY        2
00267 #define NDI_RED         3
00268 #define NDI_ORANGE      4
00269 #define NDI_BLUE        5       
00270 #define NDI_DK_ORANGE   6       
00271 #define NDI_GREEN       7       
00272 #define NDI_LT_GREEN    8       
00274 #define NDI_GREY        9
00275 #define NDI_BROWN       10      
00276 #define NDI_GOLD        11
00277 #define NDI_TAN         12      
00278 #define NDI_MAX_COLOR   12      
00280 #define NDI_COLOR_MASK  0xff    
00284 #define NDI_UNIQUE      0x100   
00285 #define NDI_ALL         0x200   
00286 #define NDI_ALL_DMS     0x400   
00289 
00290 
00294 enum {a_none, a_readied, a_wielded, a_worn, a_active, a_applied};
00295 
00296 #define F_APPLIED       0x000F
00297 #define F_UNIDENTIFIED  0x0010
00298 #define F_UNPAID        0x0200
00299 #define F_MAGIC         0x0400
00300 #define F_CURSED        0x0800
00301 #define F_DAMNED        0x1000
00302 #define F_OPEN          0x2000
00303 #define F_NOPICK        0x4000
00304 #define F_LOCKED        0x8000
00305 #define F_BLESSED       0x0100
00306 
00307 #define CF_FACE_NONE    0
00308 #define CF_FACE_BITMAP  1
00309 #define CF_FACE_XPM     2
00310 #define CF_FACE_PNG     3
00311 #define CF_FACE_CACHE   0x10
00312 
00321 #define FACE_FLOOR      0x80
00322 #define FACE_WALL       0x40    
00324 #define FACE_COLOR_MASK 0xf
00325 
00332 #define UPD_LOCATION    0x01
00333 #define UPD_FLAGS       0x02
00334 #define UPD_WEIGHT      0x04
00335 #define UPD_FACE        0x08
00336 #define UPD_NAME        0x10
00337 #define UPD_ANIM        0x20
00338 #define UPD_ANIMSPEED   0x40
00339 #define UPD_NROF        0x80
00340 #define UPD_ALL         0xFF
00341 
00342 #define UPD_SP_MANA     0x01            
00343 #define UPD_SP_GRACE    0x02            
00344 #define UPD_SP_DAMAGE   0x04            
00346 
00347 
00352 #define SOUND_NORMAL    0
00353 #define SOUND_SPELL     1
00354 
00361 #define FACE_IS_ANIM    1<<15
00362 #define ANIM_RANDOM     1<<13
00363 #define ANIM_SYNC       2<<13
00364 
00365 #define ANIM_FLAGS_MASK 0x6000 
00371 #define ANIM_MASK       0x1fff
00372 
00388 #define EMI_NOREDRAW        0x01
00389 
00392 #define EMI_SMOOTH          0x02
00393 
00398 #define EMI_HASMOREBITS     0x80
00399 
00401 /*
00402  * Note!
00403  * When adding message types, don't forget to keep the client up to date too!
00404  */
00405 
00410 #define MSG_TYPE_BOOK                  1
00411 #define MSG_TYPE_CARD                  2
00412 #define MSG_TYPE_PAPER                 3
00413 #define MSG_TYPE_SIGN                  4
00414 #define MSG_TYPE_MONUMENT              5
00415 #define MSG_TYPE_DIALOG                6 
00416 #define MSG_TYPE_MOTD                  7
00417 #define MSG_TYPE_ADMIN                 8
00418 #define MSG_TYPE_SHOP                  9
00419 #define MSG_TYPE_COMMAND              10 
00420 #define MSG_TYPE_ATTRIBUTE            11 
00422 #define MSG_TYPE_SKILL                12 
00423 #define MSG_TYPE_APPLY                13 
00424 #define MSG_TYPE_ATTACK               14 
00425 #define MSG_TYPE_COMMUNICATION        15 
00426 #define MSG_TYPE_SPELL                16 
00427 #define MSG_TYPE_ITEM                 17 
00428 #define MSG_TYPE_MISC                 18 
00430 #define MSG_TYPE_VICTIM               19 
00432 #define MSG_TYPE_CLIENT               20 
00433 #define MSG_TYPE_LAST                 21
00434 
00435 #define MSG_SUBTYPE_NONE               0
00436 
00437 /* book messages subtypes */
00438 #define MSG_TYPE_BOOK_CLASP_1          1
00439 #define MSG_TYPE_BOOK_CLASP_2          2
00440 #define MSG_TYPE_BOOK_ELEGANT_1        3
00441 #define MSG_TYPE_BOOK_ELEGANT_2        4
00442 #define MSG_TYPE_BOOK_QUARTO_1         5
00443 #define MSG_TYPE_BOOK_QUARTO_2         6
00444 #define MSG_TYPE_BOOK_SPELL_EVOKER     7
00445 #define MSG_TYPE_BOOK_SPELL_PRAYER     8
00446 #define MSG_TYPE_BOOK_SPELL_PYRO       9
00447 #define MSG_TYPE_BOOK_SPELL_SORCERER  10
00448 #define MSG_TYPE_BOOK_SPELL_SUMMONER  11
00449 
00450 /* card messages subtypes*/
00451 #define MSG_TYPE_CARD_SIMPLE_1         1
00452 #define MSG_TYPE_CARD_SIMPLE_2         2
00453 #define MSG_TYPE_CARD_SIMPLE_3         3
00454 #define MSG_TYPE_CARD_ELEGANT_1        4
00455 #define MSG_TYPE_CARD_ELEGANT_2        5
00456 #define MSG_TYPE_CARD_ELEGANT_3        6
00457 #define MSG_TYPE_CARD_STRANGE_1        7
00458 #define MSG_TYPE_CARD_STRANGE_2        8
00459 #define MSG_TYPE_CARD_STRANGE_3        9
00460 #define MSG_TYPE_CARD_MONEY_1         10
00461 #define MSG_TYPE_CARD_MONEY_2         11
00462 #define MSG_TYPE_CARD_MONEY_3         12
00463 
00464 /* Paper messages subtypes */
00465 #define MSG_TYPE_PAPER_NOTE_1          1
00466 #define MSG_TYPE_PAPER_NOTE_2          2
00467 #define MSG_TYPE_PAPER_NOTE_3          3
00468 #define MSG_TYPE_PAPER_LETTER_OLD_1    4
00469 #define MSG_TYPE_PAPER_LETTER_OLD_2    5
00470 #define MSG_TYPE_PAPER_LETTER_NEW_1    6
00471 #define MSG_TYPE_PAPER_LETTER_NEW_2    7
00472 #define MSG_TYPE_PAPER_ENVELOPE_1      8
00473 #define MSG_TYPE_PAPER_ENVELOPE_2      9
00474 #define MSG_TYPE_PAPER_SCROLL_OLD_1   10
00475 #define MSG_TYPE_PAPER_SCROLL_OLD_2   11
00476 #define MSG_TYPE_PAPER_SCROLL_NEW_1   12
00477 #define MSG_TYPE_PAPER_SCROLL_NEW_2   13
00478 #define MSG_TYPE_PAPER_SCROLL_MAGIC   14
00479 
00480 /* road signs messages subtypes */       /* Including magic mouths */
00481 #define MSG_TYPE_SIGN_BASIC            1
00482 #define MSG_TYPE_SIGN_DIR_LEFT         2
00483 #define MSG_TYPE_SIGN_DIR_RIGHT        3
00484 #define MSG_TYPE_SIGN_DIR_BOTH         4
00485 #define MSG_TYPE_SIGN_MAGIC_MOUTH      5
00486 
00487 /* stones and monument messages */
00488 #define MSG_TYPE_MONUMENT_STONE_1      1
00489 #define MSG_TYPE_MONUMENT_STONE_2      2
00490 #define MSG_TYPE_MONUMENT_STONE_3      3
00491 #define MSG_TYPE_MONUMENT_STATUE_1     4
00492 #define MSG_TYPE_MONUMENT_STATUE_2     5
00493 #define MSG_TYPE_MONUMENT_STATUE_3     6
00494 #define MSG_TYPE_MONUMENT_GRAVESTONE_1 7
00495 #define MSG_TYPE_MONUMENT_GRAVESTONE_2 8
00496 #define MSG_TYPE_MONUMENT_GRAVESTONE_3 9
00497 #define MSG_TYPE_MONUMENT_WALL_1      10
00498 #define MSG_TYPE_MONUMENT_WALL_2      11
00499 #define MSG_TYPE_MONUMENT_WALL_3      12
00500 
00501 /* dialog message */
00502 #define MSG_TYPE_DIALOG_NPC            1 
00503 #define MSG_TYPE_DIALOG_ALTAR          2 
00504 #define MSG_TYPE_DIALOG_MAGIC_EAR      3 
00506 /* MOTD doesn't have any subtypes */
00507 
00508 /* admin/global messages */
00509 #define MSG_TYPE_ADMIN_RULES           1
00510 #define MSG_TYPE_ADMIN_NEWS            2
00511 #define MSG_TYPE_ADMIN_PLAYER          3 
00512 #define MSG_TYPE_ADMIN_DM              4 
00513 #define MSG_TYPE_ADMIN_HISCORE         5 
00514 #define MSG_TYPE_ADMIN_LOADSAVE        6 
00515 #define MSG_TYPE_ADMIN_LOGIN           7 
00516 #define MSG_TYPE_ADMIN_VERSION         8 
00517 #define MSG_TYPE_ADMIN_ERROR           9 
00518 /*
00519  * I'm not actually expecting anything to make much use of the MSG_TYPE_SHOP
00520  * values However, to use the media tags, need to use draw_ext_info, and need
00521  * to have a type/subtype, so figured might as well put in real values here.
00522  */
00523 #define MSG_TYPE_SHOP_LISTING          1 
00525 #define MSG_TYPE_SHOP_PAYMENT          2 
00527 #define MSG_TYPE_SHOP_SELL             3 
00528 #define MSG_TYPE_SHOP_MISC             4 
00529 /*
00530  * Basically, 1 subtype/command.  Like shops, not expecting much to be done,
00531  * but by having different subtypes, it makes it easier for client to store
00532  * way information (eg, who output)
00533  */
00534 #define MSG_TYPE_COMMAND_WHO           1
00535 #define MSG_TYPE_COMMAND_MAPS          2
00536 #define MSG_TYPE_COMMAND_BODY          3
00537 #define MSG_TYPE_COMMAND_MALLOC        4
00538 #define MSG_TYPE_COMMAND_WEATHER       5
00539 #define MSG_TYPE_COMMAND_STATISTICS    6
00540 #define MSG_TYPE_COMMAND_CONFIG        7 
00541 #define MSG_TYPE_COMMAND_INFO          8 
00542 #define MSG_TYPE_COMMAND_QUESTS        9 
00543 #define MSG_TYPE_COMMAND_DEBUG        10 
00544 #define MSG_TYPE_COMMAND_ERROR        11 
00545 #define MSG_TYPE_COMMAND_SUCCESS      12 
00546 #define MSG_TYPE_COMMAND_FAILURE      13 
00547 #define MSG_TYPE_COMMAND_EXAMINE      14 
00548 #define MSG_TYPE_COMMAND_INVENTORY    15 
00549 #define MSG_TYPE_COMMAND_HELP         16 
00550 #define MSG_TYPE_COMMAND_DM           17 
00551 #define MSG_TYPE_COMMAND_NEWPLAYER    18 
00556 /* This is somewhat verbose.  If the client ends up being able to
00557  * choose various attributes based on message type, I think it is important
00558  * for the client to know if this is a benefit or detriment to the player.
00559  * In the case of losing a bonus, this typically indicates a spell has
00560  * ended, which is probably more important (and should be displayed more
00561  * prominently) than when you cast the spell
00562  */
00563 
00564 #define MSG_TYPE_ATTRIBUTE_ATTACKTYPE_GAIN    1 
00565 #define MSG_TYPE_ATTRIBUTE_ATTACKTYPE_LOSS    2 
00570 #define MSG_TYPE_ATTRIBUTE_PROTECTION_GAIN    3 
00571 #define MSG_TYPE_ATTRIBUTE_PROTECTION_LOSS    4 
00577 #define MSG_TYPE_ATTRIBUTE_MOVE               5 
00579 #define MSG_TYPE_ATTRIBUTE_RACE               6 
00580 #define MSG_TYPE_ATTRIBUTE_BAD_EFFECT_START   7 
00582 #define MSG_TYPE_ATTRIBUTE_BAD_EFFECT_END     8 
00583 #define MSG_TYPE_ATTRIBUTE_STAT_GAIN          9
00584 #define MSG_TYPE_ATTRIBUTE_STAT_LOSS         10
00585 #define MSG_TYPE_ATTRIBUTE_LEVEL_GAIN        11
00586 #define MSG_TYPE_ATTRIBUTE_LEVEL_LOSS        12
00587 #define MSG_TYPE_ATTRIBUTE_GOOD_EFFECT_START 13 
00589 #define MSG_TYPE_ATTRIBUTE_GOOD_EFFECT_END   14 
00590 #define MSG_TYPE_ATTRIBUTE_GOD               15 
00592 /* I think one type/skill is overkill, so instead, use broader categories
00593  * for these messages.
00594  * The difference in ERROR vs FAILURE is basically this:  ERROR indicates
00595  * something wasn't right to even attempt to use the skill (don't have
00596  * needed object, or haven't marked objects, etc).
00597  * FAILURE indicates that player attempted to use the skill, but it
00598  * didn't work.
00599  * PRAY is listed out because praying over altars can generate some
00600  * messages not really related to the skill itself.
00601  */
00602 #define MSG_TYPE_SKILL_MISSING        1 
00603 #define MSG_TYPE_SKILL_ERROR          2 
00604 #define MSG_TYPE_SKILL_SUCCESS        3 
00605 #define MSG_TYPE_SKILL_FAILURE        4 
00606 #define MSG_TYPE_SKILL_PRAY           5 
00607 #define MSG_TYPE_SKILL_LIST           6 
00609 /* Messages related to applying objects.  Note that applying many objects may
00610  * generate MSG_TYPE_ATTRIBUTE messages - the APPLY here more directly related
00611  * to the direct messages related to applying them (you put on your armor, you
00612  * apply scroll, etc).  The ERROR is like that for SKILLS - something prevent
00613  * even trying to apply the object.  FAILURE indicates result wasn't
00614  * successful.
00615  */
00616 #define MSG_TYPE_APPLY_ERROR          1
00617 #define MSG_TYPE_APPLY_UNAPPLY        2 
00618 #define MSG_TYPE_APPLY_SUCCESS        3 
00619 #define MSG_TYPE_APPLY_FAILURE        4 
00620 #define MSG_TYPE_APPLY_CURSED         5 
00621 #define MSG_TYPE_APPLY_TRAP           6 
00622 #define MSG_TYPE_APPLY_BADBODY        7 
00623 #define MSG_TYPE_APPLY_PROHIBITION    8 
00624 #define MSG_TYPE_APPLY_BUILD          9 
00626 /* attack related messages */
00627 #define MSG_TYPE_ATTACK_DID_HIT       1 
00628 #define MSG_TYPE_ATTACK_PET_HIT       2 
00629 #define MSG_TYPE_ATTACK_FUMBLE        3 
00630 #define MSG_TYPE_ATTACK_DID_KILL      4 
00631 #define MSG_TYPE_ATTACK_PET_DIED      5 
00632 #define MSG_TYPE_ATTACK_NOKEY         6 
00633 #define MSG_TYPE_ATTACK_NOATTACK      7 
00634 #define MSG_TYPE_ATTACK_PUSHED        8 
00635 #define MSG_TYPE_ATTACK_MISS          9 
00637 #define MSG_TYPE_COMMUNICATION_RANDOM 1 
00638 #define MSG_TYPE_COMMUNICATION_SAY    2 
00639 #define MSG_TYPE_COMMUNICATION_ME     3 
00640 #define MSG_TYPE_COMMUNICATION_TELL   4 
00641 #define MSG_TYPE_COMMUNICATION_EMOTE  5 
00642 #define MSG_TYPE_COMMUNICATION_PARTY  6 
00643 #define MSG_TYPE_COMMUNICATION_SHOUT  7 
00644 #define MSG_TYPE_COMMUNICATION_CHAT   8 
00646 #define MSG_TYPE_SPELL_HEAL           1 
00647 #define MSG_TYPE_SPELL_PET            2 
00648 #define MSG_TYPE_SPELL_FAILURE        3 
00649 #define MSG_TYPE_SPELL_END            4 
00650 #define MSG_TYPE_SPELL_SUCCESS        5 
00651 #define MSG_TYPE_SPELL_ERROR          6 
00652 #define MSG_TYPE_SPELL_PERCEIVE_SELF  7 
00653 #define MSG_TYPE_SPELL_TARGET         8 
00654 #define MSG_TYPE_SPELL_INFO           9 
00657 #define MSG_TYPE_ITEM_REMOVE          1 
00658 #define MSG_TYPE_ITEM_ADD             2 
00659 #define MSG_TYPE_ITEM_CHANGE          3 
00660 #define MSG_TYPE_ITEM_INFO            4 
00661 /*
00662  * MSG_TYPE_MISC, by its very nature, doesn't really have subtypes.  It is
00663  * used for messages that really don't belong anyplace else
00664  */
00665 #define MSG_TYPE_VICTIM_SWAMP         1 
00666 #define MSG_TYPE_VICTIM_WAS_HIT       2 
00667 #define MSG_TYPE_VICTIM_STEAL         3 
00669 #define MSG_TYPE_VICTIM_SPELL         4 
00671 #define MSG_TYPE_VICTIM_DIED          5 
00672 #define MSG_TYPE_VICTIM_WAS_PUSHED    6 
00675 #define MSG_TYPE_CLIENT_CONFIG        1 
00676 #define MSG_TYPE_CLIENT_SERVER        2 
00677 #define MSG_TYPE_CLIENT_COMMAND       3 
00678 #define MSG_TYPE_CLIENT_QUERY         4 
00679 #define MSG_TYPE_CLIENT_DEBUG         5 
00680 #define MSG_TYPE_CLIENT_NOTICE        6 
00681 #define MSG_TYPE_CLIENT_METASERVER    7 
00682 #define MSG_TYPE_CLIENT_SCRIPT        8 
00683 #define MSG_TYPE_CLIENT_ERROR         9 
00685 
00686 
00689 #define INFO_MAP_ARCH_NAME          1 
00690 #define INFO_MAP_NAME               2 
00691 #define INFO_MAP_DESCRIPTION        3 
00696 typedef struct SockList {
00697 #ifdef CLIENT_TYPES_H                       /* Used by the client */
00698     int len;
00699     unsigned char *buf;
00700 #else                                       /* Used by the server */
00701     size_t len;
00702     unsigned char buf[MAXSOCKBUF]; /* 2(size)+65535(content)+1(ending NULL) */
00703 #endif
00704 } SockList;
00705 
00709 typedef struct CS_Stats {
00710     int     ibytes;     
00711     int     obytes;
00712     short   max_conn;   
00713     time_t  time_start; 
00714 } CS_Stats;
00715 
00716 extern CS_Stats cst_tot, cst_lst;
00717 
00718 #endif /* NEWCLIENT_H */