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.78 by root, Mon May 7 06:01:47 2007 UTC vs.
Revision 1.79 by root, Mon May 7 07:47:32 2007 UTC

269 case WAND: 269 case WAND:
270 case ROD: 270 case ROD:
271 case HORN: 271 case HORN:
272 case SKILL: // maybe have to think about this one, as skills get applied togethr with their governing weapons 272 case SKILL: // maybe have to think about this one, as skills get applied togethr with their governing weapons
273 case SKILL_TOOL: 273 case SKILL_TOOL:
274 if (slot [body_range].info != 1) 274 if (slot [body_range].info != -1)
275 { 275 {
276 LOG (llevInfo, "%s: body_range %d != 1\n", debug_desc (), slot [body_range].info); 276 LOG (llevInfo, "%s: body_range %d != -1\n", debug_desc (), slot [body_range].info);
277 slot [body_range].info = 1; 277 slot [body_range].info = -1;
278 } 278 }
279 break; 279 break;
280 280
281 case WEAPON: 281 case WEAPON:
282 if (slot [body_combat].info != 1) 282 if (slot [body_combat].info != -1)
283 { 283 {
284 LOG (llevInfo, "%s: body_combat %d != 1\n", debug_desc (), slot [body_combat].info); 284 LOG (llevInfo, "%s: body_combat %d != -1\n", debug_desc (), slot [body_combat].info);
285 slot [body_combat].info = 1; 285 slot [body_combat].info = -1;
286 } 286 }
287 break; 287 break;
288 288
289 case SHIELD: 289 case SHIELD:
290 if (slot [body_shield].info != 1) 290 if (slot [body_shield].info != -1)
291 { 291 {
292 LOG (llevInfo, "%s: body_shield %d != 1\n", debug_desc (), slot [body_shield].info); 292 LOG (llevInfo, "%s: body_shield %d != -1\n", debug_desc (), slot [body_shield].info);
293 slot [body_shield].info = 1; 293 slot [body_shield].info = -1;
294 } 294 }
295 break; 295 break;
296 296
297 case PLAYER: 297 case PLAYER:
298 if (slot [body_shield].info != 1) 298 if (slot [body_shield].info != 1)
301 slot [body_shield].info = 1; 301 slot [body_shield].info = 1;
302 } 302 }
303 303
304 if (slot [body_combat].info != 1) 304 if (slot [body_combat].info != 1)
305 { 305 {
306 LOG (llevInfo, "%s: body_shield %d != 1\n", debug_desc (), slot [body_combat].info); 306 LOG (llevInfo, "%s: body_combat %d != 1\n", debug_desc (), slot [body_combat].info);
307 slot [body_combat].info = 1; 307 slot [body_combat].info = 1;
308 }
309
310 if (slot [body_range].info != 1)
311 {
312 LOG (llevInfo, "%s: body_range %d != 1\n", debug_desc (), slot [body_range].info);
313 slot [body_range].info = 1;
308 } 314 }
309 break; 315 break;
310 } 316 }
311 317
312 /* We do some specialised handling to handle legacy cases of name_pl. 318 /* We do some specialised handling to handle legacy cases of name_pl.
324 if (!name_pl) 330 if (!name_pl)
325 name_pl = name; 331 name_pl = name;
326 332
327 /* objects now have a materialname. try to patch it in */ 333 /* objects now have a materialname. try to patch it in */
328 if (!(is_weapon () && level > 0)) 334 if (!(is_weapon () && level > 0))
329 {
330 if (map != NULL)
331 set_materialname (this, map->difficulty, NULL); 335 set_materialname (this, map ? map->difficulty : 5, 0);
332 else
333 set_materialname (this, 5, NULL);
334 }
335 336
336 /* only do these when program is first run - a bit 337 /* only do these when program is first run - a bit
337 * excessive to do this at every run - most of this is 338 * excessive to do this at every run - most of this is
338 * really just to catch any errors - program will still run, but 339 * really just to catch any errors - program will still run, but
339 * not in the ideal fashion. 340 * not in the ideal fashion.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines