Crossfire Server, Branches 1.12  R18729
player.h
Go to the documentation of this file.
1 /*
2  * static char *rcsid_player_h =
3  * "$Id: player.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 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 
34 #ifndef PLAYER_H
35 #define PLAYER_H
36 
38 #define NUM_OUTPUT_BUFS 5
39 
40 typedef struct {
41  const char *buf;
44 } Output_Buf;
45 
52 typedef enum rangetype {
55  range_bow = 1,
62 } rangetype;
63 
65 typedef enum _bowtype {
69  bow_n = 3, /* must stay at 3 */
70  bow_ne = 4,
71  bow_e = 5,
72  bow_se = 6,
73  bow_s = 7,
74  bow_sw = 8,
75  bow_w = 9,
76  bow_nw = 10, /* must stay at 10 */
78 } bowtype_t;
79 
81 typedef enum _petmode {
83  pet_sad = 1,
86 } petmode_t;
87 
89 typedef enum usekeytype {
91  keyrings = 1,
93 } usekeytype;
94 
99 typedef enum unapplymode {
106 } unapplymode;
107 
111 typedef struct client_spell {
112  object *spell;
117 } client_spell;
118 
120 typedef struct party_struct {
121  char *partyleader;
122  char passwd[9];
123  struct party_struct *next;
124  char *partyname;
126 #ifdef PARTY_KILL_LOG
127  struct party_kill {
128  char killer[MAX_NAME+1], dead[MAX_NAME+1];
129  sint64 exp;
130  } party_kills[PARTY_KILL_LOG];
131 #endif
132  sint64 total_exp;
134 } partylist;
135 
139 typedef enum party_rejoin_mode {
144 
146 typedef struct pl {
147  struct pl *next;
157  object *ranges[range_size];
177  /* Try to put all the bitfields together - saves some small amount of memory */
189  const char *invis_race;
194  float weapon_sp;
205  float last_speed;
207  object *ob;
208  object *last_used;
216  char title[BIG_NAME];
218  sint8 levhp[11];
219  sint8 levsp[11];
222  char killer[BIG_NAME];
227  char password[16];
228  char new_password[16];
231 #ifdef SAVE_INTERVAL
232  time_t last_save_time;
233 #endif /* SAVE_INTERVAL */
234 #ifdef AUTOSAVE
235  uint32 last_save_tick;
236 #endif
248  object *mark;
249  object *transport;
251  /* Special DM fields */
255  int language;
256 } player;
257 
258 #endif /* PLAYER_H */
sint16 bed_x
Definition: player.h:152
signed char sint8
Definition: global.h:80
_bowtype
Definition: player.h:65
Definition: player.h:146
uint32 last_path_attuned
Definition: player.h:199
sint32 last_weight_limit
Definition: player.h:198
signed short sint16
Definition: global.h:72
Definition: player.h:76
char input_buf[MAX_BUF]
Definition: player.h:226
sint8 last_level
Definition: player.h:175
uint32 name_changed
Definition: player.h:184
char spellparam[MAX_BUF]
Definition: player.h:154
signed int sint32
Definition: global.h:64
uint32 last_path_denied
Definition: player.h:201
sint16 digestion
Definition: player.h:166
object * spell
Definition: player.h:112
#define BIG_NAME
Definition: define.h:88
unapplymode
Definition: player.h:99
sint16 encumbrance
Definition: player.h:230
struct pl player
char new_password[16]
Definition: player.h:228
socket_struct socket
Definition: player.h:148
rangetype shoottype
Definition: player.h:153
Output_Buf outputs[NUM_OUTPUT_BUFS]
Definition: player.h:244
uint32 mode
Definition: player.h:164
object * ranges[range_size]
Definition: player.h:157
uint32 run_on
Definition: player.h:182
uint16 count
Definition: player.h:43
int language
Definition: player.h:255
Definition: living.h:77
sint16 last_sp
Definition: player.h:113
sint8 levsp[11]
Definition: player.h:219
char * partyname
Definition: player.h:124
sint64 last_skill_exp[NUM_SKILLS]
Definition: player.h:192
char savebed_map[MAX_BUF]
Definition: player.h:151
sint16 gen_hp
Definition: player.h:167
uint16 outputs_sync
Definition: player.h:245
uint16 outputs_count
Definition: player.h:246
#define NUM_OUTPUT_BUFS
Definition: player.h:38
int stack_position
Definition: player.h:254
partylist * party
Definition: player.h:237
Definition: player.h:69
sint16 gen_grace
Definition: player.h:170
Definition: player.h:71
uint32 tag_t
Definition: object.h:40
party_rejoin_mode
Definition: player.h:139
_petmode
Definition: player.h:81
object * last_used
Definition: player.h:208
Definition: player.h:73
uint32 golem_count
Definition: player.h:160
usekeytype
Definition: player.h:89
unapplymode unapply
Definition: player.h:162
sint16 gen_sp_armour
Definition: player.h:169
uint32 hidden
Definition: player.h:186
struct party_struct * next
Definition: player.h:123
enum _petmode petmode_t
uint32 peaceful
Definition: player.h:185
sint16 item_power
Definition: player.h:171
char search_str[MAX_BUF]
Definition: player.h:243
uint32 last_used_id
Definition: player.h:209
tag_t * stack_items
Definition: player.h:252
Definition: player.h:70
object * transport
Definition: player.h:249
float weapon_sp
Definition: player.h:194
living orig_stats
Definition: player.h:203
Definition: player.h:74
uint32 tmp_invis
Definition: player.h:179
uint8 state
Definition: player.h:172
char last_tell[MAX_NAME]
Definition: player.h:223
sint32 last_weight
Definition: player.h:197
unsigned char uint8
Definition: global.h:75
uint32 count
Definition: player.h:163
uint32 first_update
Definition: player.h:42
party_rejoin_mode rejoin_party
Definition: player.h:242
uint32 last_path_repelled
Definition: player.h:200
#define MAX_BUF
Definition: define.h:81
uint32 kills
Definition: player.h:133
enum _bowtype bowtype_t
char own_title[MAX_NAME]
Definition: player.h:214
unsigned short uint16
Definition: global.h:67
#define MAP_CLIENT_X
Definition: config.h:212
struct client_spell client_spell
#define NUM_SKILLS
Definition: skills.h:95
sint64 total_exp
Definition: player.h:132
uint32 explore
Definition: player.h:187
client_spell * spell_state
Definition: player.h:250
object * ob
Definition: player.h:207
const char * sstring
Definition: global.h:84
struct client_spell * next
Definition: player.h:116
sint16 bed_y
Definition: player.h:152
bowtype_t bowtype
Definition: player.h:155
char killer[BIG_NAME]
Definition: player.h:222
#define MAP_CLIENT_Y
Definition: config.h:213
sint16 last_resist[NROFATTACKS]
Definition: player.h:206
sint16 last_grace
Definition: player.h:114
Definition: player.h:72
float last_speed
Definition: player.h:205
living last_stats
Definition: player.h:204
const char * invis_race
Definition: player.h:189
sint16 last_dam
Definition: player.h:115
char password[16]
Definition: player.h:227
float last_weapon_sp
Definition: player.h:195
char * partyleader
Definition: player.h:121
uint32 do_los
Definition: player.h:180
sint8 levgrace[11]
Definition: player.h:220
int Swap_First
Definition: player.h:202
rangetype
Definition: player.h:52
#define NROFATTACKS
Definition: attack.h:45
uint32 fire_on
Definition: player.h:181
Definition: player.h:75
struct pl * next
Definition: player.h:147
sint16 gen_sp
Definition: player.h:168
petmode_t petmode
Definition: player.h:156
char maplevel[MAX_BUF]
Definition: player.h:150
uint32 no_shout
Definition: player.h:188
usekeytype usekeys
Definition: player.h:161
Definition: player.h:83
object * mark
Definition: player.h:248
unsigned int uint32
Definition: global.h:58
#define MAX_NAME
Definition: define.h:87
sint8 levhp[11]
Definition: player.h:218
object * last_skill_ob[NUM_SKILLS]
Definition: player.h:191
uint8 listening
Definition: player.h:174
uint16 last_flags
Definition: player.h:196
uint32 braced
Definition: player.h:178
char write_buf[MAX_BUF]
Definition: player.h:225
uint32 mark_count
Definition: player.h:247
partylist * party_to_join
Definition: player.h:238
uint32 has_hit
Definition: player.h:183
sstring followed_player
Definition: player.h:253
const char * buf
Definition: player.h:41
sint8 blocked_los[MAP_CLIENT_X][MAP_CLIENT_Y]
Definition: player.h:210
char passwd[9]
Definition: player.h:122
struct party_struct partylist