--- deliantra/server/common/loader.C 2007/05/07 06:01:47 1.78 +++ deliantra/server/common/loader.C 2007/05/14 21:32:26 1.81 @@ -262,50 +262,53 @@ void object::post_load_check () { - // as a kind of a hack, we now adjust the range, shield and combat slots switch (type) { case BOW: case WAND: case ROD: case HORN: - case SKILL: // maybe have to think about this one, as skills get applied togethr with their governing weapons - case SKILL_TOOL: - if (slot [body_range].info != 1) + if (slot [body_range].info != -1) { - LOG (llevInfo, "%s: body_range %d != 1\n", debug_desc (), slot [body_range].info); - slot [body_range].info = 1; + LOG (llevError, "%s: body_range %d != -1\n", debug_desc (), slot [body_range].info); + slot [body_range].info = -1; } break; case WEAPON: - if (slot [body_combat].info != 1) + if (slot [body_combat].info != -1) { - LOG (llevInfo, "%s: body_combat %d != 1\n", debug_desc (), slot [body_combat].info); - slot [body_combat].info = 1; + LOG (llevError, "%s: body_combat %d != -1\n", debug_desc (), slot [body_combat].info); + slot [body_combat].info = -1; } break; case SHIELD: - if (slot [body_shield].info != 1) + if (slot [body_shield].info != -1) { - LOG (llevInfo, "%s: body_shield %d != 1\n", debug_desc (), slot [body_shield].info); - slot [body_shield].info = 1; + LOG (llevError, "%s: body_shield %d != -1\n", debug_desc (), slot [body_shield].info); + slot [body_shield].info = -1; } break; case PLAYER: if (slot [body_shield].info != 1) { - LOG (llevInfo, "%s: body_shield %d != 1\n", debug_desc (), slot [body_shield].info); + LOG (llevError, "%s: body_shield %d != 1\n", debug_desc (), slot [body_shield].info); slot [body_shield].info = 1; } if (slot [body_combat].info != 1) { - LOG (llevInfo, "%s: body_shield %d != 1\n", debug_desc (), slot [body_combat].info); + LOG (llevError, "%s: body_combat %d != 1\n", debug_desc (), slot [body_combat].info); slot [body_combat].info = 1; } + + if (slot [body_range].info != 1) + { + LOG (llevError, "%s: body_range %d != 1\n", debug_desc (), slot [body_range].info); + slot [body_range].info = 1; + } break; } @@ -326,12 +329,7 @@ /* objects now have a materialname. try to patch it in */ if (!(is_weapon () && level > 0)) - { - if (map != NULL) - set_materialname (this, map->difficulty, NULL); - else - set_materialname (this, 5, NULL); - } + set_materialname (this, map ? map->difficulty : 5, 0); /* only do these when program is first run - a bit * excessive to do this at every run - most of this is