1 | /* |
1 | /* |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
3 | * |
3 | * |
4 | * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2002 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2002 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992 Frank Tore Johansen |
6 | * Copyright (©) 1992 Frank Tore Johansen |
7 | * |
7 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
9 | * the terms of the Affero GNU General Public License as published by the |
9 | * the terms of the Affero GNU General Public License as published by the |
10 | * Free Software Foundation, either version 3 of the License, or (at your |
10 | * Free Software Foundation, either version 3 of the License, or (at your |
11 | * option) any later version. |
11 | * option) any later version. |
12 | * |
12 | * |
13 | * This program is distributed in the hope that it will be useful, |
13 | * This program is distributed in the hope that it will be useful, |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | * GNU General Public License for more details. |
16 | * GNU General Public License for more details. |
17 | * |
17 | * |
18 | * You should have received a copy of the Affero GNU General Public License |
18 | * You should have received a copy of the Affero GNU General Public License |
19 | * and the GNU General Public License along with this program. If not, see |
19 | * and the GNU General Public License along with this program. If not, see |
20 | * <http://www.gnu.org/licenses/>. |
20 | * <http://www.gnu.org/licenses/>. |
21 | * |
21 | * |
22 | * The authors can be reached via e-mail to <support@deliantra.net> |
22 | * The authors can be reached via e-mail to <support@deliantra.net> |
23 | */ |
23 | */ |
24 | |
24 | |
25 | #ifndef PLAYER_H_ |
25 | #ifndef PLAYER_H_ |
26 | #define PLAYER_H_ |
26 | #define PLAYER_H_ |
… | |
… | |
131 | bool ACC (RW, dirty); // set if player is dirty (not reliable yet!) |
131 | bool ACC (RW, dirty); // set if player is dirty (not reliable yet!) |
132 | |
132 | |
133 | float ACC (RW, weapon_sp); /* Penalties to speed when fighting w speed >ws/10 */ |
133 | float ACC (RW, weapon_sp); /* Penalties to speed when fighting w speed >ws/10 */ |
134 | float ACC (RW, weapon_sp_left); // same as speed_left, but for attacks |
134 | float ACC (RW, weapon_sp_left); // same as speed_left, but for attacks |
135 | living ACC (RO, orig_stats); /* Permanent real stats of player */ |
135 | living ACC (RO, orig_stats); /* Permanent real stats of player */ |
136 | object_ptr last_skill_ob[NUM_SKILLS]; /* the exp object */ |
136 | object_ptr last_skill_ob[CS_NUM_SKILLS]; /* the exp object */ |
137 | object_ptr ACC (RW, last_used); /* Pointer to object last picked or applied */ |
137 | object_ptr ACC (RW, last_used); /* Pointer to object last picked or applied */ |
138 | |
138 | |
139 | object_ptr ACC (RW, combat_ob); // which weapon/bow/skill to use for direct attacks |
139 | object_ptr ACC (RW, combat_ob); // which weapon/bow/skill to use for direct attacks |
140 | object_ptr ACC (RW, ranged_ob); // which skill/item/spell to use for ranged attacks |
140 | object_ptr ACC (RW, ranged_ob); // which skill/item/spell to use for ranged attacks |
141 | object_ptr ACC (RW, golem); // the currently controlled golem |
141 | object_ptr ACC (RW, golem); // the currently controlled golem |
… | |
… | |
157 | |
157 | |
158 | object_ptr ACC (RW, killer); /* Who last tried to kill this player (this object is usually destroyed) */ |
158 | object_ptr ACC (RW, killer); /* Who last tried to kill this player (this object is usually destroyed) */ |
159 | |
159 | |
160 | float speed_left_save; // spee doptimisation, see process_players[12] |
160 | float speed_left_save; // spee doptimisation, see process_players[12] |
161 | char write_buf[MAX_BUF]; /* Holds arbitrary input from client */ /* should go */ |
161 | char write_buf[MAX_BUF]; /* Holds arbitrary input from client */ /* should go */ |
162 | char ACC (RW, password)[16]; /* 2 (seed) + 11 (crypted) + 1 (EOS) + 2 (safety) = 16 */ |
162 | char ACC (RW, password)[256]; /* 2 (seed) + 11 (crypted) + 1 (EOS) + 2 (safety) = 16 */ |
163 | |
163 | |
164 | partylist *ACC (RW, party); /* Party this player is part of */ |
164 | partylist *ACC (RW, party); /* Party this player is part of */ |
165 | partylist *ACC (RW, party_to_join); /* used when player wants to join a party */ |
165 | partylist *ACC (RW, party_to_join); /* used when player wants to join a party */ |
166 | /* but we will have to get password first */ |
166 | /* but we will have to get password first */ |
167 | /* so we have to remember which party to */ |
167 | /* so we have to remember which party to */ |
… | |
… | |
287 | MTH void statusmsg (const_utf8_string msg, int color = NDI_BLACK); |
287 | MTH void statusmsg (const_utf8_string msg, int color = NDI_BLACK); |
288 | |
288 | |
289 | // a prominent box that signifies some error such as a failed |
289 | // a prominent box that signifies some error such as a failed |
290 | // improvement potion. should not be long. |
290 | // improvement potion. should not be long. |
291 | MTH void failmsg (const_utf8_string msg, int color = NDI_RED); |
291 | MTH void failmsg (const_utf8_string msg, int color = NDI_RED); |
|
|
292 | void failmsgf (const_utf8_string format, ...); // always NDI_RED |
292 | |
293 | |
293 | MTH void update_spells () const |
294 | MTH void update_spells () const |
294 | { |
295 | { |
295 | if (ns) |
296 | if (ns) |
296 | ns->update_spells = true; |
297 | ns->update_spells = true; |