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.32 by root, Thu Apr 15 21:49:15 2010 UTC vs.
Revision 1.33 by root, Wed Apr 28 19:49:50 2010 UTC

163 * state. 163 * state.
164 */ 164 */
165void 165void
166init_experience () 166init_experience ()
167{ 167{
168 char buf[MAX_BUF], *cp;
169 int lastlevel = 0, comp; 168 int lastlevel = 0;
170 sint64 lastexp = -1, tmpexp; 169 sint64 lastexp = -1;
171 170
172 sprintf (buf, "%s/exp_table", settings.confdir); 171 object_thawer thawer (settings.confdir, "exp_table");
173
174 object_thawer thawer (buf);
175 172
176 if (!thawer) 173 if (!thawer)
177 { 174 {
178 LOG (llevError, "unable to parse experience table file"); 175 LOG (llevError, "unable to parse experience table file");
179 return; 176 return;
189 186
190 sint64 newlevels [MAXNUMLEVELS]; 187 sint64 newlevels [MAXNUMLEVELS];
191 188
192 while (thawer.next_line ()) 189 while (thawer.next_line ())
193 { 190 {
191 sint64 tmpexp;
194 thawer.get (tmpexp); 192 thawer.get (tmpexp);
195 193
196 /* Do some sanity checking - if value is bogus, just exit because 194 /* Do some sanity checking - if value is bogus, just exit because
197 * the table otherwise is probably in an inconsistent state 195 * the table otherwise is probably in an inconsistent state
198 */ 196 */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines