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,2007 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2002 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992,2007 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 | #include <global.h> |
25 | #include <global.h> |
26 | |
26 | |
… | |
… | |
103 | } |
103 | } |
104 | |
104 | |
105 | freezer.put (ob->contr); |
105 | freezer.put (ob->contr); |
106 | freezer.put (KW(endplst)); |
106 | freezer.put (KW(endplst)); |
107 | |
107 | |
108 | CLEAR_FLAG (ob, FLAG_WIZ); |
108 | ob->clr_flag (FLAG_WIZ); |
109 | ob->write (freezer); |
109 | ob->write (freezer); |
110 | |
110 | |
111 | /* Eneq(@csd.uu.se): Reveal the container if we have one. */ |
111 | /* Eneq(@csd.uu.se): Reveal the container if we have one. */ |
112 | ob->container = container; |
112 | ob->container = container; |
113 | |
113 | |
… | |
… | |
172 | return pl; |
172 | return pl; |
173 | |
173 | |
174 | case KW_oid: f.get (pl, f.get_sint32 ()); break; |
174 | case KW_oid: f.get (pl, f.get_sint32 ()); break; |
175 | case KW_password: assign (pl->password , f.get_str ()); break; |
175 | case KW_password: assign (pl->password , f.get_str ()); break; |
176 | case KW_title: assign (pl->own_title, f.get_str ()); break; |
176 | case KW_title: assign (pl->own_title, f.get_str ()); break; |
177 | case KW_bowtype: pl->bowtype = (bowtype_t) f.get_sint32 (); break; |
177 | case KW_bowtype: pl->bowtype = (bowtype_t) f.get_sint32 (); break; |
178 | case KW_petmode: pl->petmode = (petmode_t) f.get_sint32 (); break; |
178 | case KW_petmode: pl->petmode = (petmode_t) f.get_sint32 (); break; |
179 | case KW_gender: f.get (pl->gender); break; |
179 | case KW_gender: f.get (pl->gender); break; |
180 | case KW_hintmode: f.get (pl->hintmode); break; |
180 | case KW_hintmode: f.get (pl->hintmode); break; |
181 | case KW_listening: /*TODO*/; break; |
181 | case KW_listening: /*TODO*/; break; |
182 | case KW_peaceful: f.get (pl->peaceful); break; |
182 | case KW_peaceful: f.get (pl->peaceful); break; |
183 | case KW_digestion: f.get (pl->digestion); break; |
183 | case KW_digestion: f.get (pl->digestion); break; |
… | |
… | |
236 | { |
236 | { |
237 | int count = f.get_sint32 (); |
237 | int count = f.get_sint32 (); |
238 | |
238 | |
239 | for (int i = 1; i <= count; i++) |
239 | for (int i = 1; i <= count; i++) |
240 | { |
240 | { |
241 | char line [32]; |
241 | f.next_line (); f.get (pl->levhp [i]); |
242 | |
242 | f.next_line (); f.get (pl->levsp [i]); |
243 | fgets (line, 32, f); pl->levhp [i] = atoi (line); |
243 | f.next_line (); f.get (pl->levgrace[i]); |
244 | fgets (line, 32, f); pl->levsp [i] = atoi (line); |
|
|
245 | fgets (line, 32, f); pl->levgrace[i] = atoi (line); |
|
|
246 | } |
244 | } |
247 | } |
245 | } |
248 | break; |
246 | break; |
249 | } |
247 | } |
250 | |
248 | |