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 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
7 | * |
7 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify |
8 | * Deliantra is free software: you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by |
9 | * it under the terms of the GNU General Public License as published by |
… | |
… | |
146 | |
146 | |
147 | sint8 ACC (RW, levhp[11]); /* What the player gained on that level */ |
147 | sint8 ACC (RW, levhp[11]); /* What the player gained on that level */ |
148 | sint8 ACC (RW, levsp[11]); /* Same for sp */ |
148 | sint8 ACC (RW, levsp[11]); /* Same for sp */ |
149 | sint8 ACC (RW, levgrace[11]); /* And same for grace */ |
149 | sint8 ACC (RW, levgrace[11]); /* And same for grace */ |
150 | |
150 | |
151 | char ACC (RW, killer)[64]; /* Who killed this player. */ |
151 | object_ptr ACC (RW, killer); /* Who last tried to kill this player (this object is usually destroyed) */ |
152 | |
152 | |
153 | char write_buf[MAX_BUF]; /* Holds arbitrary input from client */ /* should go */ |
153 | char write_buf[MAX_BUF]; /* Holds arbitrary input from client */ /* should go */ |
154 | char ACC (RW, password)[16]; /* 2 (seed) + 11 (crypted) + 1 (EOS) + 2 (safety) = 16 */ |
154 | char ACC (RW, password)[16]; /* 2 (seed) + 11 (crypted) + 1 (EOS) + 2 (safety) = 16 */ |
155 | |
155 | |
156 | partylist *ACC (RW, party); /* Party this player is part of */ |
156 | partylist *ACC (RW, party); /* Party this player is part of */ |
… | |
… | |
170 | /* the player can see. For maps smaller than */ |
170 | /* the player can see. For maps smaller than */ |
171 | /* MAP_CLIENT_.., the upper left is used */ |
171 | /* MAP_CLIENT_.., the upper left is used */ |
172 | |
172 | |
173 | shstr ACC (RW, invis_race); /* What race invisible to? */ |
173 | shstr ACC (RW, invis_race); /* What race invisible to? */ |
174 | |
174 | |
|
|
175 | MTH const char *killer_name () const; // makes a string out of ->killer |
|
|
176 | |
175 | MTH static player *create (); |
177 | MTH static player *create (); |
176 | static player *find (const_utf8_string name); |
178 | static player *find (const_utf8_string name); |
177 | |
179 | |
178 | static player *load_pl (object_thawer &thawer); |
180 | static player *load_pl (object_thawer &thawer); |
179 | MTH static player *load_pl (object_thawer *thawer) { return load_pl (*thawer); } |
181 | MTH static player *load_pl (object_thawer *thawer) { return load_pl (*thawer); } |
… | |
… | |
181 | bool save_pl (object_freezer &freezer); |
183 | bool save_pl (object_freezer &freezer); |
182 | MTH bool save_pl (const char *path); |
184 | MTH bool save_pl (const char *path); |
183 | |
185 | |
184 | void do_destroy (); |
186 | void do_destroy (); |
185 | void gather_callbacks (AV *&callbacks, event_type event) const; |
187 | void gather_callbacks (AV *&callbacks, event_type event) const; |
|
|
188 | |
|
|
189 | MTH void touch () { dirty = true; } // need to touch when logged out and changed |
186 | |
190 | |
187 | MTH void play_sound (faceidx sound, int dx = 0, int dy = 0) const |
191 | MTH void play_sound (faceidx sound, int dx = 0, int dy = 0) const |
188 | { |
192 | { |
189 | if (ns) |
193 | if (ns) |
190 | ns->play_sound (sound, dx, dy); |
194 | ns->play_sound (sound, dx, dy); |