-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchardata.h
306 lines (268 loc) · 9.96 KB
/
chardata.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
/**************************************************************************/
// chardata.h - header for char_data class
/***************************************************************************
* The Dawn of Time v1.69r (c)1997-2004 Michael Garratt *
* >> A number of people have contributed to the Dawn codebase, with the *
* majority of code written by Michael Garratt - www.dawnoftime.org *
* >> To use this source code, you must fully comply with all the licenses *
* in licenses.txt... In particular, you may not remove this copyright *
* notice. *
***************************************************************************
* >> Original Diku Mud copyright (c)1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, & Katja Nyboe. *
* >> Merc Diku Mud improvements copyright (C) 1992, 1993 by Michael *
* Chastain, Michael Quan, and Mitchell Tse. *
* >> ROM 2.4 is copyright 1993-1995 Russ Taylor and has been brought to *
* you by the ROM consortium: Russ Taylor([email protected]), *
* Gabrielle Taylor([email protected]) & Brian Moore([email protected]) *
* >> Oblivion 1.2 is copyright 1996 Wes Wagner *
**************************************************************************/
#ifndef char_data_H
#define char_data_H
struct pload_data;
class intro_data;
class char_data
{
public:
// member functions
// output to character
void print(const char *buf);
void printbw(const char *buf);
void printf(const char *fmt, ...) __mftc_printf_1__;
void printfbw(const char *fmt, ...) __mftc_printf_1__;
void println(const char *buf);
void print_blank_lines(int blank_lines_to_print_to_char);
void printlnbw(const char *buf);
void printlnf(const char *fmt, ...) __mftc_printf_1__;
void printlnfbw(const char *fmt, ...) __mftc_printf_1__;
void wrap(const char *buf);
void wrapf(const char *fmt, ...) __mftc_printf_1__;
void wrapln(const char *buf);
void wraplnf(const char *fmt, ...) __mftc_printf_1__;
void titlebar(const char *header);
void titlebarf(const char *fmt, ...) __mftc_printf_1__;
void olctitlebar(const char *header);
void olctitlebarf(const char *fmt, ...) __mftc_printf_1__;
void print(int seconds, const char *buf);
void printf(int seconds, const char *fmt, ...) __mftc_printf_2__;
void println(int seconds, const char *buf);
void printlnf(int seconds, const char *fmt, ...) __mftc_printf_2__;
void sendpage(const char *txt);
int pdelay(); // the amount print*() text sent to the character is delayed by
void set_pdelay(int seconds); // the amount print*() text sent to the character is delayed by
private:
int m_pdelay; // the amount print*() text sent to the character is delayed by
public:
// skills
int get_skill(int sn); // returns the percentage of skill they have in it
int get_display_skill(int sn); // return the percentage they have out of the max for the class
int get_skill_level(int sn); // returns the level of the skill for the players class
void mpqueue_attached(time_t when);
// void mpqueue_removed(int when);
void mpqueue_dequeue_all(); // dequeue all the queued events involving us
void hit_return_to_continue();
vn_int vnum(); // a safe way to get the vnum from a mob/player
vn_int in_room_vnum(); // a safe way to get the vnum of a room
private:
int npc_skill_level(int sn);
int pc_skill_level(int sn);
public:
int uid; // unique id
DEITY_DATA* deity;
char_data * next;
char_data * next_in_room;
char_data * next_player;
char_data * next_who_list;
char_data * mounted_on;
char_data * ridden_by;
char_data * master;
char_data * leader;
char_data * fighting;
char_data * reply;
char_data * anon_reply;
char_data * retell;
char_data * anon_retell;
char_data * controlling; // who a pc is controlling
char_data * pet;
char_data * mprog_target;
vn_int mprog_remember_room_vnum; // used by premove at this stage
MEM_DATA *memory;
SPEC_FUN *spec_fun;
GAMBLE_FUN *gamble_fun;
mob_index_data *pIndexData;
connection_data *desc;
AFFECT_DATA *affected;
note_data *pnote;
OBJ_DATA *carrying;
OBJ_DATA *on;
ROOM_INDEX_DATA * in_room;
ROOM_INDEX_DATA * was_in_room;
area_data *zone;
pc_data *pcdata;
GEN_DATA *gen_data;
bool valid;
char *name;
long id;
char * remote_ip_copy; // used to detect multilogging
sh_int host_validated;
sh_int version;
sh_int subversion;
char * short_descr;
char * long_descr;
char * description;
char * gprompt;
char * prompt;
char * olcprompt;
char * prefix;
duel_data * duels;
sh_int group;
sh_int helpgroup; // the group number they will help
CClanType *clan;
sh_int clanrank;
CClanType *seeks;
sh_int pksafe; /* 3 pk variables enable automatic pk enforcement */
sh_int pknorecall;
sh_int pkool;
int pkkills;
int pkdefeats;
int pknoquit;
sh_int sex;
sh_int clss;
sh_int race;
sh_int level;
sh_int trust;
int played;
int lines; // lines per page
time_t logon;
int timer;
int idle;
int wait;
int daze;
int hit;
int max_hit;
int mana;
int max_mana;
int move;
int max_move;
long gold;
long silver;
int exp;
long act;
long act2;
long dyn; // dynamic data - never saved
long comm;
long wiznet[4]; // wiznet stuff
char * wiznet_colour[4]; // wiznet colour coding
long imm_flags;
long res_flags;
long vuln_flags;
unsigned char invis_level;
unsigned char iwizi;
unsigned char olcwizi;
unsigned char owizi;
unsigned char incog_level;
long affected_by;
long affected_by2;
long config;
long config2;
sh_int position;
int practice;
int train;
int carry_weight;
int carry_number;
int saving_throw;
sh_int alliance;
sh_int tendency;
int hitroll;
int damroll;
int armor[4];
int wimpy;
// stats
sh_int perm_stats[MAX_STATS];
sh_int potential_stats[MAX_STATS];
sh_int modifiers[MAX_STATS];
// parts stuff
long form;
long parts;
sh_int size;
char * material;
// mobile stuff
long off_flags;
sh_int damage[3];
sh_int dam_type;
sh_int start_pos;
sh_int default_pos;
sh_int mprog_delay;
int temple;
// critical stuff
int bleeding;
sh_int will_die;
sh_int is_stunned;
// language stuff
language_data *language;
long bank;
ROOM_INDEX_DATA * last_ic_room; // NULL = currently in ic rooms
// subdue system - kalahn - june 97
bool no_xp, subdued;
bool tethered;
bool bucking;
bool autologout; // set in char_update
bool is_trying_sleep;
int subdued_timer; // budget way to wake them
sh_int will;
sh_int wildness;
sh_int state; /* determines if they are
* comatose (will die),
* unconscience,
* semiconscience,
* subdued,
* yielding,
* free
*/
char_data * subduer; // character who has subdue this character
int cautious_about_backstab; // counter which is how long before a mob
// can be backstabbed for
unsigned char last_colour, saved_colour[MAX_SAVED_COLOUR_ARRAY];
unsigned char saved_colour_index;
long last_force; // the tick this char was last forced to do
// something - used to stop wandering within
// 5 ticks of them being forced
// ( = tick_counter on force)
long notenet; // notenet stuff - kalahn
// Dynamic Spell info
int mirage;
sh_int mirage_hours;
// MOB REMEMBER STUFF
char_data * mobmemory;
// WEAPON SPECIALIZATION
sh_int specialization;
// STATIC VNUMS.
vn_int recall_room; // Recall room for player.
vn_int recall_inn_room; // Recall room for player's inn.
// TIMERS.
int expire_recall_inn; // Time the recall inn expires.
char saycolour;
char motecolour;
sh_int track_index;
int duel_challenged;
int duel_decline;
int duel_accept;
int duel_ignore;
int duel_bypass;
int duel_subdues_before_karn_loss;
sh_int remort; // remort the player is currently on
sh_int beginning_remort; // if a number, the player is midstream of remorting
sh_int highest_level_to_do_damage;
intro_data *know; // data containing who they know info
unsigned short know_index; // their index in the know database
char colour_prefix; // character prefixing all colour codes
pload_data *pload; // data about the pload
char_data *ploaded; // character which has been ploaded by this character
private:
int mpqueue_count; // just a basic command for now
bool mxp_enabled;
public: // mxp functions
void mxp_send_init(); // used to send the mxp element tags we are going to use
void record_replayroom_event(const char *txt); // record says and emotes etc
};
#endif