Atrinik Client  4.0
player.h
Go to the documentation of this file.
1 /*************************************************************************
2  * Atrinik, a Multiplayer Online Role Playing Game *
3  * *
4  * Copyright (C) 2009-2014 Alex Tokar and Atrinik Development Team *
5  * *
6  * Fork from Crossfire (Multiplayer game for X-windows). *
7  * *
8  * This program is free software; you can redistribute it and/or modify *
9  * it under the terms of the GNU General Public License as published by *
10  * the Free Software Foundation; either version 2 of the License, or *
11  * (at your option) any later version. *
12  * *
13  * This program is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16  * GNU General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License *
19  * along with this program; if not, write to the Free Software *
20  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
21  * *
22  * The author can be reached at admin@atrinik.org *
23  ************************************************************************/
24 
30 #ifndef PLAYER_H
31 #define PLAYER_H
32 
38 #define GENDER_NEUTER 0
39 
40 #define GENDER_MALE 1
41 
42 #define GENDER_FEMALE 2
43 
44 #define GENDER_HERMAPHRODITE 3
45 
46 #define GENDER_MAX 4
47 
49 #define PLAYER_DOLL_SLOT_COLOR "353734"
50 
51 #define EXP_PROGRESS_BUBBLES 10
52 
53 typedef struct Stat_struct {
54  int8_t Str, Dex, Con, Int, Pow;
55 
57  int16_t wc;
58 
60  int16_t ac;
61 
63  uint32_t level;
64 
66  int32_t hp;
67 
69  int32_t maxhp;
70 
72  int32_t sp;
73 
75  int32_t maxsp;
76 
78  int64_t exp;
79 
81  int16_t food;
82 
84  int16_t dam;
85 
87  float speed;
88 
90  float weapon_speed;
91 
93  uint16_t flags;
94 
96  int8_t protection[CS_STAT_PROT_END - CS_STAT_PROT_START + 1];
97 
99  int16_t ranged_dam;
100 
102  int16_t ranged_wc;
103 
105  float ranged_ws;
106 } Stats;
107 
109 typedef struct Player_Struct {
111  object *ob;
112 
114  object *below;
115 
117  object *sack;
118 
120  object *interface;
121 
124 
127 
129  int dm;
130 
133 
135  char target_color[COLOR_BUF];
136 
138  char target_name[MAX_BUF];
139 
140  int warn_hp;
141 
143  tag_t mark_count;
144 
146  float gen_hp;
147 
149  float gen_sp;
150 
153 
155  uint8_t fire_on;
156 
158  uint8_t run_on;
159 
161  float real_weight;
162 
163  int warn_statdown;
164  int warn_statup;
165 
168 
170  char target_hp;
171 
173  char name[40];
174 
176  char partyname[MAX_BUF];
177 
182  char partyjoin[MAX_BUF];
183 
188 
193 
198 
201 
204 
205  size_t target_object_index;
206 
207  uint8_t target_is_friend;
208 
212  uint8_t gender;
213 
214  tag_t equipment[PLAYER_EQUIP_MAX];
215 
216  uint32_t path_attuned;
217 
218  uint32_t path_repelled;
219 
220  uint32_t path_denied;
221 
222  player_state_t state;
223 
227  char account[MAX_BUF];
228 
232  char password[MAX_BUF];
233 
237  char host[MAX_BUF];
238 
242  char last_host[MAX_BUF];
243 
247  time_t last_time;
248 
252  char http_url[MAX_BUF];
253 
258  uint8_t combat;
259 
264  uint8_t combat_force;
265 } Client_Player;
266 
267 #endif
object * below
Definition: player.h:114
float gen_sp
Definition: player.h:149
float action_timer
Definition: player.h:152
int16_t ac
Definition: player.h:60
struct Player_Struct Client_Player
int32_t hp
Definition: player.h:66
char last_host[MAX_BUF]
Definition: player.h:242
int16_t dam
Definition: player.h:84
int32_t maxhp
Definition: player.h:69
int64_t exp
Definition: player.h:78
float speed
Definition: player.h:87
int8_t protection[CS_STAT_PROT_END-CS_STAT_PROT_START+1]
Definition: player.h:96
int server_socket_version
Definition: player.h:203
char target_name[MAX_BUF]
Definition: player.h:138
char target_hp
Definition: player.h:170
Stats stats
Definition: player.h:167
uint16_t flags
Definition: player.h:93
uint8_t gender
Definition: player.h:212
int16_t ranged_wc
Definition: player.h:102
object * sack
Definition: player.h:117
char account[MAX_BUF]
Definition: player.h:227
float weapon_speed
Definition: player.h:90
uint8_t fire_on
Definition: player.h:155
tag_t dragging_tag
Definition: player.h:187
tag_t mark_count
Definition: player.h:143
char password[MAX_BUF]
Definition: player.h:232
float gen_hp
Definition: player.h:146
int32_t maxsp
Definition: player.h:75
char name[40]
Definition: player.h:173
uint8_t run_on
Definition: player.h:158
char http_url[MAX_BUF]
Definition: player.h:252
object * interface
Definition: player.h:120
int target_code
Definition: player.h:132
int dragging_startx
Definition: player.h:192
player_state_t
Definition: main.h:238
time_t last_time
Definition: player.h:247
int16_t wc
Definition: player.h:57
char host[MAX_BUF]
Definition: player.h:237
int16_t food
Definition: player.h:81
uint32_t level
Definition: player.h:63
int32_t sp
Definition: player.h:72
char partyjoin[MAX_BUF]
Definition: player.h:182
char partyname[MAX_BUF]
Definition: player.h:176
float weight_limit
Definition: player.h:126
widgetdata * inventory_focus
Definition: player.h:200
uint8_t combat_force
Definition: player.h:264
uint8_t combat
Definition: player.h:258
int dragging_starty
Definition: player.h:197
tag_t container_tag
Definition: player.h:123
char target_color[COLOR_BUF]
Definition: player.h:135
float real_weight
Definition: player.h:161
int16_t ranged_dam
Definition: player.h:99
object * ob
Definition: player.h:111
float ranged_ws
Definition: player.h:105