ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/player.h
(Generate patch)

Comparing deliantra/server/include/player.h (file contents):
Revision 1.9 by root, Tue Aug 29 07:33:58 2006 UTC vs.
Revision 1.10 by root, Tue Aug 29 08:01:36 2006 UTC

1/* 1/*
2 * static char *rcsid_player_h = 2 * static char *rcsid_player_h =
3 * "$Id: player.h,v 1.9 2006/08/29 07:33:58 root Exp $"; 3 * "$Id: player.h,v 1.10 2006/08/29 08:01:36 root Exp $";
4 */ 4 */
5 5
6/* 6/*
7 CrossFire, A Multiplayer game for X-windows 7 CrossFire, A Multiplayer game for X-windows
8 8
59 bow_se = 6, 59 bow_se = 6,
60 bow_s = 7, 60 bow_s = 7,
61 bow_sw = 8, 61 bow_sw = 8,
62 bow_w = 9, 62 bow_w = 9,
63 bow_nw = 10, /* must stay at 10 */ 63 bow_nw = 10, /* must stay at 10 */
64 bow_bestarrow = 11 64 bow_bestarrow = 11
65}; 65};
66 66
67typedef enum _petmode { 67typedef enum _petmode {
68 pet_normal = 0, 68 pet_normal = 0,
69 pet_sad = 1, 69 pet_sad = 1,
82 */ 82 */
83typedef enum unapplymode { 83typedef enum unapplymode {
84 unapply_nochoice=0, /* Will unapply objects when there no choice to unapply */ 84 unapply_nochoice=0, /* Will unapply objects when there no choice to unapply */
85 unapply_never=1, /* will not unapply objects automatically */ 85 unapply_never=1, /* will not unapply objects automatically */
86 unapply_always=2 /* Will unapply whatever is necessary - this goes beyond */ 86 unapply_always=2 /* Will unapply whatever is necessary - this goes beyond */
87 /* no choice - if there are multiple ojbect of the same type */ 87 /* no choice - if there are multiple ojbect of the same type */
88 /* that need to be unapplied, there is no way for the player */ 88 /* that need to be unapplied, there is no way for the player */
89 /* to control which of these will be unapplied. */ 89 /* to control which of these will be unapplied. */
90} unapplymode; 90} unapplymode;
91 91
92/* not really the player, but tied pretty closely */ 92/* not really the player, but tied pretty closely */
93typedef struct party_struct { 93typedef struct party_struct {
94 char * partyleader; 94 char * partyleader;
96 struct party_struct *next; 96 struct party_struct *next;
97 char *partyname; 97 char *partyname;
98 98
99#ifdef PARTY_KILL_LOG 99#ifdef PARTY_KILL_LOG
100 struct party_kill { 100 struct party_kill {
101 char killer[MAX_NAME+1],dead[MAX_NAME+1]; 101 char killer[MAX_NAME+1],dead[MAX_NAME+1];
102 sint64 exp; 102 sint64 exp;
103 } party_kills[PARTY_KILL_LOG]; 103 } party_kills[PARTY_KILL_LOG];
104#endif 104#endif
105 sint64 total_exp; 105 sint64 total_exp;
106 uint32 kills; 106 uint32 kills;
107} partylist; 107} partylist;
113 mapstruct *loading; /* When entering a map in progress of loading, not really used */ 113 mapstruct *loading; /* When entering a map in progress of loading, not really used */
114 rangetype shoottype; /* Which range-attack is being used by player */ 114 rangetype shoottype; /* Which range-attack is being used by player */
115 bowtype_t bowtype; /* which firemode? */ 115 bowtype_t bowtype; /* which firemode? */
116 petmode_t petmode; /* which petmode? */ 116 petmode_t petmode; /* which petmode? */
117 object *ranges[range_size];/* object for each range. Set up in fix player. Note */ 117 object *ranges[range_size];/* object for each range. Set up in fix player. Note */
118 /* That not all are used, it is just nice to map this 1:1 */ 118 /* That not all are used, it is just nice to map this 1:1 */
119 /* With the range names */ 119 /* With the range names */
120 uint32 golem_count; /* To track the golem */ 120 uint32 golem_count; /* To track the golem */
121 usekeytype usekeys; /* Method for finding keys for doors */ 121 usekeytype usekeys; /* Method for finding keys for doors */
122 unapplymode unapply; /* Method for auto unapply */ 122 unapplymode unapply; /* Method for auto unapply */
123 uint32 count; /* Any numbers typed before a command */ 123 uint32 count; /* Any numbers typed before a command */
124 uint32 mode; /* Mode of player for pickup. */ 124 uint32 mode; /* Mode of player for pickup. */
164 sint16 last_resist[NROFATTACKS]; /* last resist values sent to client */ 164 sint16 last_resist[NROFATTACKS]; /* last resist values sent to client */
165 int Swap_First; /* First stat player has selected to swap */ 165 int Swap_First; /* First stat player has selected to swap */
166 object *last_used; /* Pointer to object last picked or applied */ 166 object *last_used; /* Pointer to object last picked or applied */
167 uint32 last_used_id; /* Safety measures to be sure it's the same */ 167 uint32 last_used_id; /* Safety measures to be sure it's the same */
168 sint8 blocked_los[MAP_CLIENT_X][MAP_CLIENT_Y]; /* array showing what spaces */ 168 sint8 blocked_los[MAP_CLIENT_X][MAP_CLIENT_Y]; /* array showing what spaces */
169 /* the player can see. For maps smaller than */ 169 /* the player can see. For maps smaller than */
170 /* MAP_CLIENT_.., the upper left is used */ 170 /* MAP_CLIENT_.., the upper left is used */
171 171
172 sint16 bed_x, bed_y; /* x,y - coordinates of respawn (savebed) */ 172 sint16 bed_x, bed_y; /* x,y - coordinates of respawn (savebed) */
173 char savebed_map[MAX_BUF]; /* map where player will respawn after death */ 173 char savebed_map[MAX_BUF]; /* map where player will respawn after death */
174 char maplevel[MAX_BUF]; /* On which level is the player? */ 174 char maplevel[MAX_BUF]; /* On which level is the player? */
175 char spellparam[MAX_BUF]; /* What param to add to spells */ 175 char spellparam[MAX_BUF]; /* What param to add to spells */
176 176
177 char own_title[MAX_NAME]; /* Title the player has chosen for themself */ 177 char own_title[MAX_NAME]; /* Title the player has chosen for themself */
178 /* Note that for dragon players, this is filled in for them */ 178 /* Note that for dragon players, this is filled in for them */
179 char title[BIG_NAME]; /* Default title, like fighter, wizard, etc */ 179 char title[BIG_NAME]; /* Default title, like fighter, wizard, etc */
180 180
181 sint8 levhp[11]; /* What the player gained on that level */ 181 sint8 levhp[11]; /* What the player gained on that level */
182 sint8 levsp[11]; /* Same for sp */ 182 sint8 levsp[11]; /* Same for sp */
183 sint8 levgrace[11]; /* And same for grace */ 183 sint8 levgrace[11]; /* And same for grace */
195#ifdef AUTOSAVE 195#ifdef AUTOSAVE
196 uint32 last_save_tick; 196 uint32 last_save_tick;
197#endif 197#endif
198 partylist *party; /* Party this player is part of */ 198 partylist *party; /* Party this player is part of */
199 partylist *party_to_join; /* used when player wants to join a party */ 199 partylist *party_to_join; /* used when player wants to join a party */
200 /* but we will have to get password first */ 200 /* but we will have to get password first */
201 /* so we have to remember which party to */ 201 /* so we have to remember which party to */
202 /* join */ 202 /* join */
203 char search_str[MAX_BUF]; /* Item we are looking for */ 203 char search_str[MAX_BUF]; /* Item we are looking for */
204 sint16 encumbrance; /* How much our player is encumbered */ 204 sint16 encumbrance; /* How much our player is encumbered */
205 Output_Buf outputs[NUM_OUTPUT_BUFS]; /* holds output strings to client */ 205 Output_Buf outputs[NUM_OUTPUT_BUFS]; /* holds output strings to client */
206 uint16 outputs_sync; /* How often to print, no matter what */ 206 uint16 outputs_sync; /* How often to print, no matter what */
207 uint16 outputs_count; /* Print if this count is exceeded */ 207 uint16 outputs_count; /* Print if this count is exceeded */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines