ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/exp.C
(Generate patch)

Comparing deliantra/server/common/exp.C (file contents):
Revision 1.34 by root, Wed Apr 28 20:51:58 2010 UTC vs.
Revision 1.37 by root, Sat Apr 23 04:56:45 2011 UTC

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 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
155 else 155 else
156 return levels [min (level, settings.max_level)]; 156 return levels [min (level, settings.max_level)];
157} 157}
158 158
159/* This loads the experience table from the exp_table 159/* This loads the experience table from the exp_table
160 * file. This tends to exit on any errors, since it 160 * file.
161 * populates the table as it goes along, so if there
162 * are errors, the table is likely in an inconsistent
163 * state.
164 */ 161 */
165void 162void
166init_experience () 163reload_exp_table ()
167{ 164{
168 int lastlevel = 0; 165 int lastlevel = 0;
169 sint64 lastexp = -1; 166 sint64 lastexp = -1;
170 167
171 object_thawer thawer (settings.datadir, "exp_table"); 168 object_thawer thawer (settings.datadir, "exp_table");
172 169
173 if (!thawer) 170 if (!thawer)
174 { 171 {
175 LOG (llevError, "unable to parse experience table file"); 172 LOG (llevError, "unable to load experience table file");
176 return; 173 return;
177 } 174 }
178 175
179 if (thawer.kw != KW_max_level) 176 if (thawer.kw != KW_max_level)
180 { 177 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines