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

Comparing deliantra/server/common/loader.C (file contents):
Revision 1.79 by root, Mon May 7 07:47:32 2007 UTC vs.
Revision 1.80 by root, Sat May 12 16:06:41 2007 UTC

260 * to check for objects to make sure there are no common errors. 260 * to check for objects to make sure there are no common errors.
261 */ 261 */
262void 262void
263object::post_load_check () 263object::post_load_check ()
264{ 264{
265 // as a kind of a hack, we now adjust the range, shield and combat slots
266 switch (type) 265 switch (type)
267 { 266 {
268 case BOW: 267 case BOW:
269 case WAND: 268 case WAND:
270 case ROD: 269 case ROD:
271 case HORN: 270 case HORN:
272 case SKILL: // maybe have to think about this one, as skills get applied togethr with their governing weapons
273 case SKILL_TOOL: 271 case SKILL_TOOL:
274 if (slot [body_range].info != -1) 272 if (slot [body_range].info != -1)
275 { 273 {
276 LOG (llevInfo, "%s: body_range %d != -1\n", debug_desc (), slot [body_range].info); 274 LOG (llevError, "%s: body_range %d != -1\n", debug_desc (), slot [body_range].info);
277 slot [body_range].info = -1; 275 slot [body_range].info = -1;
278 } 276 }
279 break; 277 break;
280 278
281 case WEAPON: 279 case WEAPON:
282 if (slot [body_combat].info != -1) 280 if (slot [body_combat].info != -1)
283 { 281 {
284 LOG (llevInfo, "%s: body_combat %d != -1\n", debug_desc (), slot [body_combat].info); 282 LOG (llevError, "%s: body_combat %d != -1\n", debug_desc (), slot [body_combat].info);
285 slot [body_combat].info = -1; 283 slot [body_combat].info = -1;
286 } 284 }
287 break; 285 break;
288 286
289 case SHIELD: 287 case SHIELD:
290 if (slot [body_shield].info != -1) 288 if (slot [body_shield].info != -1)
291 { 289 {
292 LOG (llevInfo, "%s: body_shield %d != -1\n", debug_desc (), slot [body_shield].info); 290 LOG (llevError, "%s: body_shield %d != -1\n", debug_desc (), slot [body_shield].info);
293 slot [body_shield].info = -1; 291 slot [body_shield].info = -1;
294 } 292 }
295 break; 293 break;
296 294
297 case PLAYER: 295 case PLAYER:
298 if (slot [body_shield].info != 1) 296 if (slot [body_shield].info != 1)
299 { 297 {
300 LOG (llevInfo, "%s: body_shield %d != 1\n", debug_desc (), slot [body_shield].info); 298 LOG (llevError, "%s: body_shield %d != 1\n", debug_desc (), slot [body_shield].info);
301 slot [body_shield].info = 1; 299 slot [body_shield].info = 1;
302 } 300 }
303 301
304 if (slot [body_combat].info != 1) 302 if (slot [body_combat].info != 1)
305 { 303 {
306 LOG (llevInfo, "%s: body_combat %d != 1\n", debug_desc (), slot [body_combat].info); 304 LOG (llevError, "%s: body_combat %d != 1\n", debug_desc (), slot [body_combat].info);
307 slot [body_combat].info = 1; 305 slot [body_combat].info = 1;
308 } 306 }
309 307
310 if (slot [body_range].info != 1) 308 if (slot [body_range].info != 1)
311 { 309 {
312 LOG (llevInfo, "%s: body_range %d != 1\n", debug_desc (), slot [body_range].info); 310 LOG (llevError, "%s: body_range %d != 1\n", debug_desc (), slot [body_range].info);
313 slot [body_range].info = 1; 311 slot [body_range].info = 1;
314 } 312 }
315 break; 313 break;
316 } 314 }
317 315

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines