Crossfire Server, Branches 1.12
R18729
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
newclient.h
Go to the documentation of this file.
1
/*
2
* static char *rcsid_newclient_h =
3
* "$Id: newclient.h 11578 2009-02-23 22:02:27Z lalo $";
4
*/
5
6
/*
7
CrossFire, A Multiplayer game for X-windows
8
9
Copyright (C) 2002,2006 Mark Wedel & Crossfire Development Team
10
Copyright (C) 1992 Frank Tore Johansen
11
12
This program is free software; you can redistribute it and/or modify
13
it under the terms of the GNU General Public License as published by
14
the Free Software Foundation; either version 2 of the License, or
15
(at your option) any later version.
16
17
This program is distributed in the hope that it will be useful,
18
but WITHOUT ANY WARRANTY; without even the implied warranty of
19
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
GNU General Public License for more details.
21
22
You should have received a copy of the GNU General Public License
23
along with this program; if not, write to the Free Software
24
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25
26
The authors can be reached via e-mail at crossfire-devel@real-time.com
27
*/
28
53
#ifndef NEWCLIENT_H
54
#define NEWCLIENT_H
55
56
#include <stddef.h>
57
63
#define MAP2_COORD_OFFSET 15
64
74
#define MAP2_COORD_ENCODE(x, y, flags) ((((x)+MAP2_COORD_OFFSET)&0x3f)<<10|(((y)+MAP2_COORD_OFFSET)&0x3f)<<4|(flags&0x0f))
75
76
#define CS_QUERY_YESNO 0x1
77
#define CS_QUERY_SINGLECHAR 0x2
78
#define CS_QUERY_HIDEINPUT 0x4
80
#define CS_SAY_NORMAL 0x1
81
#define CS_SAY_SHOUT 0x2
82
#define CS_SAY_GSAY 0x4
89
#define FLOAT_MULTI 100000
90
#define FLOAT_MULTF 100000.0
91
92
/* ID's for the various stats that get sent across. */
93
94
#define CS_STAT_HP 1
95
#define CS_STAT_MAXHP 2
96
#define CS_STAT_SP 3
97
#define CS_STAT_MAXSP 4
98
#define CS_STAT_STR 5
99
#define CS_STAT_INT 6
100
#define CS_STAT_WIS 7
101
#define CS_STAT_DEX 8
102
#define CS_STAT_CON 9
103
#define CS_STAT_CHA 10
104
#define CS_STAT_EXP 11
105
#define CS_STAT_LEVEL 12
106
#define CS_STAT_WC 13
107
#define CS_STAT_AC 14
108
#define CS_STAT_DAM 15
109
#define CS_STAT_ARMOUR 16
110
#define CS_STAT_SPEED 17
111
#define CS_STAT_FOOD 18
112
#define CS_STAT_WEAP_SP 19
113
#define CS_STAT_RANGE 20
114
#define CS_STAT_TITLE 21
115
#define CS_STAT_POW 22
116
#define CS_STAT_GRACE 23
117
#define CS_STAT_MAXGRACE 24
118
#define CS_STAT_FLAGS 25
119
#define CS_STAT_WEIGHT_LIM 26
120
#define CS_STAT_EXP64 28
121
#define CS_STAT_SPELL_ATTUNE 29
122
#define CS_STAT_SPELL_REPEL 30
123
#define CS_STAT_SPELL_DENY 31
124
125
/* Start & end of resistances, inclusive. */
126
#define CS_STAT_RESIST_START 100
127
#define CS_STAT_RESIST_END 117
128
#define CS_STAT_RES_PHYS 100
129
#define CS_STAT_RES_MAG 101
130
#define CS_STAT_RES_FIRE 102
131
#define CS_STAT_RES_ELEC 103
132
#define CS_STAT_RES_COLD 104
133
#define CS_STAT_RES_CONF 105
134
#define CS_STAT_RES_ACID 106
135
#define CS_STAT_RES_DRAIN 107
136
#define CS_STAT_RES_GHOSTHIT 108
137
#define CS_STAT_RES_POISON 109
138
#define CS_STAT_RES_SLOW 110
139
#define CS_STAT_RES_PARA 111
140
#define CS_STAT_TURN_UNDEAD 112
141
#define CS_STAT_RES_FEAR 113
142
#define CS_STAT_RES_DEPLETE 114
143
#define CS_STAT_RES_DEATH 115
144
#define CS_STAT_RES_HOLYWORD 116
145
#define CS_STAT_RES_BLIND 117
146
147
/* Start & end of skill experience + skill level, inclusive. */
148
#define CS_STAT_SKILLEXP_START 118
149
#define CS_STAT_SKILLEXP_END 129
150
#define CS_STAT_SKILLEXP_AGILITY 118
151
#define CS_STAT_SKILLEXP_AGLEVEL 119
152
#define CS_STAT_SKILLEXP_PERSONAL 120
153
#define CS_STAT_SKILLEXP_PELEVEL 121
154
#define CS_STAT_SKILLEXP_MENTAL 122
155
#define CS_STAT_SKILLEXP_MELEVEL 123
156
#define CS_STAT_SKILLEXP_PHYSIQUE 124
157
#define CS_STAT_SKILLEXP_PHLEVEL 125
158
#define CS_STAT_SKILLEXP_MAGIC 126
159
#define CS_STAT_SKILLEXP_MALEVEL 127
160
#define CS_STAT_SKILLEXP_WISDOM 128
161
#define CS_STAT_SKILLEXP_WILEVEL 129
162
170
#define CS_STAT_SKILLINFO 140
171
#define CS_NUM_SKILLS 50
172
177
#define SF_FIREON 0x01
178
#define SF_RUNON 0x02
179
195
#define NDI_BLACK 0
196
#define NDI_WHITE 1
197
#define NDI_NAVY 2
198
#define NDI_RED 3
199
#define NDI_ORANGE 4
200
#define NDI_BLUE 5
201
#define NDI_DK_ORANGE 6
202
#define NDI_GREEN 7
203
#define NDI_LT_GREEN 8
205
#define NDI_GREY 9
206
#define NDI_BROWN 10
207
#define NDI_GOLD 11
208
#define NDI_TAN 12
210
#define NDI_MAX_COLOR 12
211
#define NDI_COLOR_MASK 0xff
216
#define NDI_UNIQUE 0x100
217
#define NDI_ALL 0x200
218
#define NDI_ALL_DMS 0x400
220
221
222
enum
{
a_none
,
a_readied
,
a_wielded
,
a_worn
,
a_active
,
a_applied
};
223
#define F_APPLIED 0x000F
224
#define F_LOCATION 0x00F0
225
#define F_UNPAID 0x0200
226
#define F_MAGIC 0x0400
227
#define F_CURSED 0x0800
228
#define F_DAMNED 0x1000
229
#define F_OPEN 0x2000
230
#define F_NOPICK 0x4000
231
#define F_LOCKED 0x8000
232
#define F_BLESSED 0x0100
233
234
#define CF_FACE_NONE 0
235
#define CF_FACE_BITMAP 1
236
#define CF_FACE_XPM 2
237
#define CF_FACE_PNG 3
238
#define CF_FACE_CACHE 0x10
239
245
#define FACE_FLOOR 0x80
246
#define FACE_WALL 0x40
/* Or'd into the color value by the server
247
* right before sending.
248
*/
249
#define FACE_COLOR_MASK 0xf
250
251
#define UPD_LOCATION 0x01
252
#define UPD_FLAGS 0x02
253
#define UPD_WEIGHT 0x04
254
#define UPD_FACE 0x08
255
#define UPD_NAME 0x10
256
#define UPD_ANIM 0x20
257
#define UPD_ANIMSPEED 0x40
258
#define UPD_NROF 0x80
259
#define UPD_ALL 0xFF
260
261
/* The flag values sent by the updspell command */
262
#define UPD_SP_MANA 0x01
263
#define UPD_SP_GRACE 0x02
264
#define UPD_SP_DAMAGE 0x04
265
266
#define SOUND_NORMAL 0
267
#define SOUND_SPELL 1
268
269
#define FACE_IS_ANIM 1<<15
270
#define ANIM_RANDOM 1<<13
271
#define ANIM_SYNC 2<<13
272
273
/* ANIM_FLAGS_MASK and ANIM_MASK are only used by the client */
274
#define ANIM_FLAGS_MASK 0x6000
275
276
/* AND'ing this with data from server gets us just the animation id */
277
#define ANIM_MASK 0x1fff
278
279
280
/* Constants in the form EMI_ is for extended map infos.
281
* Even if the client select the additionnal infos it wants
282
* on the map, there may exist cases where this whole info
283
* is not given in one buch but in separate bunches. This
284
* is done performance reasons (imagine some info related to
285
* a visible object and another info related to a 4 square
286
* width and height area). At the begin of an extended info packet
287
* is a bit field. A bit is activated for each extended info
288
* present in the data
289
*/
290
/* Meanings:
291
* EMI_NOREDRAW Take extended infos into account but don't redraw,
292
* some additionnal datas will follow in a new packet
293
* EMI_SMOOTH Datas about smoothing
294
*/
295
#define EMI_NOREDRAW 0x01
296
#define EMI_SMOOTH 0x02
297
298
/* this last one says the bitfield continue un next byte
299
* There may be several on contiguous bytes. So there is 7
300
* actual bits used per byte, and the number of bytes
301
* is not fixed in protocol
302
*/
303
#define EMI_HASMOREBITS 0x80
304
305
306
/*
307
* Note!
308
* If you add message types here, don't forget
309
* to keep the client up to date too!
310
*/
311
312
313
/* message types */
314
#define MSG_TYPE_BOOK 1
315
#define MSG_TYPE_CARD 2
316
#define MSG_TYPE_PAPER 3
317
#define MSG_TYPE_SIGN 4
318
#define MSG_TYPE_MONUMENT 5
319
#define MSG_TYPE_DIALOG 6
320
#define MSG_TYPE_MOTD 7
321
#define MSG_TYPE_ADMIN 8
322
#define MSG_TYPE_SHOP 9
323
#define MSG_TYPE_COMMAND 10
/* Responses to commands, eg, who */
324
#define MSG_TYPE_ATTRIBUTE 11
/* Changes to attributes (stats, */
325
/* resistances, etc) */
326
#define MSG_TYPE_SKILL 12
/* Messages related to using skills */
327
#define MSG_TYPE_APPLY 13
/* Applying objects */
328
#define MSG_TYPE_ATTACK 14
/* Attack related messages */
329
#define MSG_TYPE_COMMUNICATION 15
/* Communication between players */
330
#define MSG_TYPE_SPELL 16
/* Spell related info */
331
#define MSG_TYPE_ITEM 17
/* Item related information */
332
#define MSG_TYPE_MISC 18
/* Messages that don't go anyplace else */
333
#define MSG_TYPE_VICTIM 19
/* Something bad is happening to the player */
334
#define MSG_TYPE_LAST 20
335
336
#define MSG_SUBTYPE_NONE 0
337
338
/* book messages subtypes */
339
#define MSG_TYPE_BOOK_CLASP_1 1
340
#define MSG_TYPE_BOOK_CLASP_2 2
341
#define MSG_TYPE_BOOK_ELEGANT_1 3
342
#define MSG_TYPE_BOOK_ELEGANT_2 4
343
#define MSG_TYPE_BOOK_QUARTO_1 5
344
#define MSG_TYPE_BOOK_QUARTO_2 6
345
#define MSG_TYPE_BOOK_SPELL_EVOKER 7
346
#define MSG_TYPE_BOOK_SPELL_PRAYER 8
347
#define MSG_TYPE_BOOK_SPELL_PYRO 9
348
#define MSG_TYPE_BOOK_SPELL_SORCERER 10
349
#define MSG_TYPE_BOOK_SPELL_SUMMONER 11
350
351
/* card messages subtypes*/
352
#define MSG_TYPE_CARD_SIMPLE_1 1
353
#define MSG_TYPE_CARD_SIMPLE_2 2
354
#define MSG_TYPE_CARD_SIMPLE_3 3
355
#define MSG_TYPE_CARD_ELEGANT_1 4
356
#define MSG_TYPE_CARD_ELEGANT_2 5
357
#define MSG_TYPE_CARD_ELEGANT_3 6
358
#define MSG_TYPE_CARD_STRANGE_1 7
359
#define MSG_TYPE_CARD_STRANGE_2 8
360
#define MSG_TYPE_CARD_STRANGE_3 9
361
#define MSG_TYPE_CARD_MONEY_1 10
362
#define MSG_TYPE_CARD_MONEY_2 11
363
#define MSG_TYPE_CARD_MONEY_3 12
364
365
/* Paper messages subtypes */
366
#define MSG_TYPE_PAPER_NOTE_1 1
367
#define MSG_TYPE_PAPER_NOTE_2 2
368
#define MSG_TYPE_PAPER_NOTE_3 3
369
#define MSG_TYPE_PAPER_LETTER_OLD_1 4
370
#define MSG_TYPE_PAPER_LETTER_OLD_2 5
371
#define MSG_TYPE_PAPER_LETTER_NEW_1 6
372
#define MSG_TYPE_PAPER_LETTER_NEW_2 7
373
#define MSG_TYPE_PAPER_ENVELOPE_1 8
374
#define MSG_TYPE_PAPER_ENVELOPE_2 9
375
#define MSG_TYPE_PAPER_SCROLL_OLD_1 10
376
#define MSG_TYPE_PAPER_SCROLL_OLD_2 11
377
#define MSG_TYPE_PAPER_SCROLL_NEW_1 12
378
#define MSG_TYPE_PAPER_SCROLL_NEW_2 13
379
#define MSG_TYPE_PAPER_SCROLL_MAGIC 14
380
381
/* road signs messages subtypes */
382
#define MSG_TYPE_SIGN_BASIC 1
383
#define MSG_TYPE_SIGN_DIR_LEFT 2
384
#define MSG_TYPE_SIGN_DIR_RIGHT 3
385
#define MSG_TYPE_SIGN_DIR_BOTH 4
386
387
/* stones and monument messages */
388
#define MSG_TYPE_MONUMENT_STONE_1 1
389
#define MSG_TYPE_MONUMENT_STONE_2 2
390
#define MSG_TYPE_MONUMENT_STONE_3 3
391
#define MSG_TYPE_MONUMENT_STATUE_1 4
392
#define MSG_TYPE_MONUMENT_STATUE_2 5
393
#define MSG_TYPE_MONUMENT_STATUE_3 6
394
#define MSG_TYPE_MONUMENT_GRAVESTONE_1 7
395
#define MSG_TYPE_MONUMENT_GRAVESTONE_2 8
396
#define MSG_TYPE_MONUMENT_GRAVESTONE_3 9
397
#define MSG_TYPE_MONUMENT_WALL_1 10
398
#define MSG_TYPE_MONUMENT_WALL_2 11
399
#define MSG_TYPE_MONUMENT_WALL_3 12
400
401
/* dialog messsage */
402
#define MSG_TYPE_DIALOG_NPC 1
/* A message from the npc */
403
#define MSG_TYPE_DIALOG_ALTAR 2
/* A message from an altar */
404
#define MSG_TYPE_DIALOG_MAGIC_MOUTH 3
/* Magic Mouth/Magic Ear */
405
406
/* MOTD doesn't have any subtypes */
407
408
/* admin/global messages */
409
#define MSG_TYPE_ADMIN_RULES 1
410
#define MSG_TYPE_ADMIN_NEWS 2
411
#define MSG_TYPE_ADMIN_PLAYER 3
/* Player coming/going/death */
412
#define MSG_TYPE_ADMIN_DM 4
/* DM related admin actions */
413
#define MSG_TYPE_ADMIN_HISCORE 5
/* Hiscore list */
414
#define MSG_TYPE_ADMIN_LOADSAVE 6
/* load/save operations */
415
#define MSG_TYPE_ADMIN_LOGIN 7
/* login messages/errors */
416
#define MSG_TYPE_ADMIN_VERSION 8
/* version info */
417
418
419
/* I'm not actually expecting anything to make much use of the MSG_TYPE_SHOP
420
* values However, to use the media tags, need to use draw_ext_info, and need
421
* to have a type/subtype, so figured might as well put in real values here.
422
*/
423
#define MSG_TYPE_SHOP_LISTING 1
/* Shop listings - inventory, */
424
/* what it deals in */
425
#define MSG_TYPE_SHOP_PAYMENT 2
/* Messages about payment, lack */
426
/* of funds */
427
#define MSG_TYPE_SHOP_SELL 3
/* Messages about selling items */
428
#define MSG_TYPE_SHOP_MISC 4
/* Random messages */
429
430
/* Basically, 1 subtype/command. Like shops, not expecting much
431
* to be done, but by having different subtypes, it makes it easier for
432
* client to store way information (eg, who output)
433
*/
434
#define MSG_TYPE_COMMAND_WHO 1
435
#define MSG_TYPE_COMMAND_MAPS 2
436
#define MSG_TYPE_COMMAND_BODY 3
437
#define MSG_TYPE_COMMAND_MALLOC 4
438
#define MSG_TYPE_COMMAND_WEATHER 5
439
#define MSG_TYPE_COMMAND_STATISTICS 6
440
#define MSG_TYPE_COMMAND_CONFIG 7
/* bowmode, petmode, applymode */
441
#define MSG_TYPE_COMMAND_INFO 8
/* Generic info - resistances, etc */
442
#define MSG_TYPE_COMMAND_QUESTS 9
/* Quest info */
443
#define MSG_TYPE_COMMAND_DEBUG 10
/* Various debug type commands */
444
#define MSG_TYPE_COMMAND_ERROR 11
/* Bad syntax/can't use command */
445
#define MSG_TYPE_COMMAND_SUCCESS 12
/* Successful result from command */
446
#define MSG_TYPE_COMMAND_FAILURE 13
/* Failed result from command */
447
#define MSG_TYPE_COMMAND_EXAMINE 14
/* Player examining something */
448
#define MSG_TYPE_COMMAND_INVENTORY 15
/* Inventory listing */
449
#define MSG_TYPE_COMMAND_HELP 16
/* Help related information */
450
#define MSG_TYPE_COMMAND_DM 17
/* DM related commands */
451
#define MSG_TYPE_COMMAND_NEWPLAYER 18
/* Create a new character - not */
452
/* really a command, but is responding */
453
/* to player input */
454
455
/* This is somewhat verbose. If the client ends up being able to
456
* choose various attributes based on message type, I think it is important
457
* for the client to know if this is a benefit or detriment to the player.
458
* In the case of losing a bonus, this typically indicates a spell has
459
* ended, which is probably more important (and should be displayed more
460
* prominently) than when you cast the spell
461
*/
462
463
#define MSG_TYPE_ATTRIBUTE_ATTACKTYPE_GAIN 1
/* Atacktypes here refer to */
464
#define MSG_TYPE_ATTRIBUTE_ATTACKTYPE_LOSS 2
/* the player gaining or */
465
/* losing these attacktypes */
466
/* not being a victim of an */
467
/* attacktype. */
468
#define MSG_TYPE_ATTRIBUTE_PROTECTION_GAIN 3
/* Protections in this */
469
#define MSG_TYPE_ATTRIBUTE_PROTECTION_LOSS 4
/* context are pretty */
470
/* generic - things like */
471
/* reflection or lifesave */
472
/* are also under the */
473
/* protection category. */
474
#define MSG_TYPE_ATTRIBUTE_MOVE 5
/* A change in the movement */
475
/* type of the player */
476
#define MSG_TYPE_ATTRIBUTE_RACE 6
/* Racial related changes */
477
#define MSG_TYPE_ATTRIBUTE_BAD_EFFECT_START 7
/* The start/end of bad */
478
#define MSG_TYPE_ATTRIBUTE_BAD_EFFECT_END 8
/* effects to the player */
479
#define MSG_TYPE_ATTRIBUTE_STAT_GAIN 9
/* Start/end of stat changes */
480
#define MSG_TYPE_ATTRIBUTE_STAT_LOSS 10
481
#define MSG_TYPE_ATTRIBUTE_LEVEL_GAIN 11
/* Gaining/losing of levels */
482
#define MSG_TYPE_ATTRIBUTE_LEVEL_LOSS 12
483
#define MSG_TYPE_ATTRIBUTE_GOOD_EFFECT_START 13
/* Like bad effects, but for */
484
#define MSG_TYPE_ATTRIBUTE_GOOD_EFFECT_END 14
/* good effects to the player */
485
#define MSG_TYPE_ATTRIBUTE_GOD 15
/* changing god info */
486
487
488
/* I think one type/skill is overkill, so instead, use broader categories
489
* for these messages.
490
* The difference in ERROR vs FAILURE is basically this: ERROR indicates
491
* something wasn't right to even attempt to use the skill (don't have
492
* needed object, or haven't marked objects, etc).
493
* FAILURE indicates that player attempted to use the skill, but it
494
* didn't work.
495
* PRAY is listed out because praying over altars can generate some
496
* messages not really related to the skill itself.
497
*/
498
#define MSG_TYPE_SKILL_MISSING 1
/* Don't have the skill */
499
#define MSG_TYPE_SKILL_ERROR 2
/* Doing something wrong */
500
#define MSG_TYPE_SKILL_SUCCESS 3
/* Successfully used skill */
501
#define MSG_TYPE_SKILL_FAILURE 4
/* Failure in using skill */
502
#define MSG_TYPE_SKILL_PRAY 5
/* Praying related messages */
503
#define MSG_TYPE_SKILL_LIST 6
/* List of skills */
504
505
506
/* Messages related to applying objects. Note that applying many
507
* objects may generate MSG_TYPE_ATTRIBUTE messages - the APPLY here
508
* more directly related to the direct messages related to applying
509
* them (you put on your armor, you apply scroll, etc).
510
* The ERROR is like that for SKILLS - something prevent even trying
511
* to apply the object. FAILURE indicates result wasn't successful.
512
*/
513
#define MSG_TYPE_APPLY_ERROR 1
514
#define MSG_TYPE_APPLY_UNAPPLY 2
/* Unapply an object */
515
#define MSG_TYPE_APPLY_SUCCESS 3
/* Was able to apply object */
516
#define MSG_TYPE_APPLY_FAILURE 4
/* Apply OK, but no/bad result */
517
#define MSG_TYPE_APPLY_CURSED 5
/* Applied a cursed object (BAD) */
518
#define MSG_TYPE_APPLY_TRAP 6
/* Have activated a trap */
519
#define MSG_TYPE_APPLY_BADBODY 7
/* Don't have body to use object */
520
#define MSG_TYPE_APPLY_PROHIBITION 8
/* Class/god prohibiiton on obj */
521
#define MSG_TYPE_APPLY_BUILD 9
/* Build related actions */
522
523
/* attack related messages */
524
#define MSG_TYPE_ATTACK_DID_HIT 1
/* Player hit something else */
525
#define MSG_TYPE_ATTACK_PET_HIT 2
/* Players pet hit something else */
526
#define MSG_TYPE_ATTACK_FUMBLE 3
/* Player fumbled attack */
527
#define MSG_TYPE_ATTACK_DID_KILL 4
/* Player killed something */
528
#define MSG_TYPE_ATTACK_PET_DIED 5
/* Pet was killed */
529
#define MSG_TYPE_ATTACK_NOKEY 6
/* Keys are like attacks, so... */
530
#define MSG_TYPE_ATTACK_NOATTACK 7
/* You avoid attacking */
531
#define MSG_TYPE_ATTACK_PUSHED 8
/* Pushed a friendly player */
532
#define MSG_TYPE_ATTACK_MISS 9
/* attack didn't hit */
533
534
#define MSG_TYPE_COMMUNICATION_RANDOM 1
/* Random event (coin toss) */
535
#define MSG_TYPE_COMMUNICATION_SAY 2
/* Player says something */
536
#define MSG_TYPE_COMMUNICATION_ME 3
/* Player me's a message */
537
#define MSG_TYPE_COMMUNICATION_TELL 4
/* Player tells something */
538
#define MSG_TYPE_COMMUNICATION_EMOTE 5
/* Player emotes */
539
#define MSG_TYPE_COMMUNICATION_PARTY 6
/* Party message */
540
#define MSG_TYPE_COMMUNICATION_SHOUT 7
/* Party message */
541
#define MSG_TYPE_COMMUNICATION_CHAT 8
/* Party message */
542
543
#define MSG_TYPE_SPELL_HEAL 1
/* Healing related spells */
544
#define MSG_TYPE_SPELL_PET 2
/* Pet related messages */
545
#define MSG_TYPE_SPELL_FAILURE 3
/* Spell failure messages */
546
#define MSG_TYPE_SPELL_END 4
/* A spell ends */
547
#define MSG_TYPE_SPELL_SUCCESS 5
/* Spell succeeded messages */
548
#define MSG_TYPE_SPELL_ERROR 6
/* Spell failure messages */
549
#define MSG_TYPE_SPELL_PERCEIVE_SELF 7
/* Perceive self messages */
550
#define MSG_TYPE_SPELL_TARGET 8
/* Target of non attack spell */
551
#define MSG_TYPE_SPELL_INFO 9
/* random info about spell, not */
552
/* related to failure/success */
553
554
#define MSG_TYPE_ITEM_REMOVE 1
/* Item removed from inv */
555
#define MSG_TYPE_ITEM_ADD 2
/* Item added to inv */
556
#define MSG_TYPE_ITEM_CHANGE 3
/* Item has changed in some way */
557
#define MSG_TYPE_ITEM_INFO 3
/* Information related to an item */
558
559
/* MSG_TYPE_MISC, by its very nature, doesn't really have subtypes. It is
560
* used for messages that really don't belong anyplace else
561
*/
562
563
#define MSG_TYPE_VICTIM_SWAMP 1
/* Player is sinking in a swamp */
564
#define MSG_TYPE_VICTIM_WAS_HIT 2
/* Player was hit by something */
565
#define MSG_TYPE_VICTIM_STEAL 3
/* Someone tried to steal from the player */
566
#define MSG_TYPE_VICTIM_SPELL 4
/* Someone cast a bad spell on the player */
567
#define MSG_TYPE_VICTIM_DIED 5
/* Player died! */
568
#define MSG_TYPE_VICTIM_WAS_PUSHED 6
/* Player was pushed or attempted pushed */
569
571
typedef
struct
SockList
{
572
size_t
len
;
573
unsigned
char
buf
[2+65536UL+1];
/* 2=length, 65536=content, 1=trailing NUL */
574
}
SockList
;
575
577
typedef
struct
CS_Stats
{
578
int
ibytes
;
579
int
obytes
;
580
short
max_conn
;
581
time_t
time_start
;
582
}
CS_Stats
;
583
584
extern
CS_Stats
cst_tot
,
cst_lst
;
585
586
#endif
/* NEWCLIENT_H */
SockList::len
size_t len
Definition:
newclient.h:575
a_none
Definition:
newclient.h:225
CS_Stats::obytes
int obytes
Definition:
newclient.h:582
a_readied
Definition:
newclient.h:225
a_wielded
Definition:
newclient.h:225
a_worn
Definition:
newclient.h:225
SockList::buf
unsigned char buf[2+65536UL+1]
Definition:
newclient.h:576
cst_lst
CS_Stats cst_lst
CS_Stats::max_conn
short max_conn
Definition:
newclient.h:583
CS_Stats::ibytes
int ibytes
Definition:
newclient.h:581
SockList
struct SockList SockList
a_applied
Definition:
newclient.h:225
cst_tot
CS_Stats cst_tot
CS_Stats
Definition:
newclient.h:580
CS_Stats::time_start
time_t time_start
Definition:
newclient.h:584
a_active
Definition:
newclient.h:225
SockList
Definition:
newclient.h:574
CS_Stats
struct CS_Stats CS_Stats
crossfire-code
server
branches
1.12
include
newclient.h
Generated on Sun Nov 18 2018 02:40:29 for Crossfire Server, Branches 1.12 by
1.8.6