--- deliantra/server/common/loader.C 2007/04/28 18:18:04 1.74 +++ deliantra/server/common/loader.C 2007/05/07 04:21:09 1.77 @@ -1,5 +1,5 @@ /* - * CrossFire, A Multiplayer game for X-windows + * CrossFire, A Multiplayer game * * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team * Copyright (C) 2002 Mark Wedel & Crossfire Development Team @@ -295,9 +295,9 @@ { if (!op->skill) LOG (llevError, "Weapon %s lacks a skill.\n", op->debug_desc ()); - else if ((!strcmp (op->skill, "one handed weapons") && op->body_info[1] != -1) || - (!strcmp (op->skill, "two handed weapons") && op->body_info[1] != -2)) - LOG (llevError, "weapon %s arm usage does not match skill: %d, %s\n", op->debug_desc (), op->body_info[1], &op->skill); + else if ((!strcmp (op->skill, "one handed weapons") && op->slot[1].info != -1) || + (!strcmp (op->skill, "two handed weapons") && op->slot[1].info != -2)) + LOG (llevError, "weapon %s arm usage does not match skill: %d, %s\n", op->debug_desc (), op->slot[1].info, &op->skill); } /* We changed last_heal to gen_sp_armour, which is what it @@ -892,18 +892,18 @@ //TODO: mechanism to ensure that KW_xxx is consecutive needed from include/preprocess //TODO: parse from other include files - case KW_body_range: f.get (body_info[0]); break; - case KW_body_arm: f.get (body_info[1]); break; - case KW_body_torso: f.get (body_info[2]); break; - case KW_body_head: f.get (body_info[3]); break; - case KW_body_neck: f.get (body_info[4]); break; - case KW_body_skill: f.get (body_info[5]); break; - case KW_body_finger: f.get (body_info[6]); break; - case KW_body_shoulder: f.get (body_info[7]); break; - case KW_body_foot: f.get (body_info[8]); break; - case KW_body_hand: f.get (body_info[9]); break; - case KW_body_wrist: f.get (body_info[10]); break; - case KW_body_waist: f.get (body_info[11]); break; + case KW_body_range: slot[ 0].info = f.get_sint32 (); break; + case KW_body_arm: slot[ 1].info = f.get_sint32 (); break; + case KW_body_torso: slot[ 2].info = f.get_sint32 (); break; + case KW_body_head: slot[ 3].info = f.get_sint32 (); break; + case KW_body_neck: slot[ 4].info = f.get_sint32 (); break; + case KW_body_skill: slot[ 5].info = f.get_sint32 (); break; + case KW_body_finger: slot[ 6].info = f.get_sint32 (); break; + case KW_body_shoulder: slot[ 7].info = f.get_sint32 (); break; + case KW_body_foot: slot[ 8].info = f.get_sint32 (); break; + case KW_body_hand: slot[ 9].info = f.get_sint32 (); break; + case KW_body_wrist: slot[10].info = f.get_sint32 (); break; + case KW_body_waist: slot[11].info = f.get_sint32 (); break; case KW_can_apply: break; @@ -922,6 +922,8 @@ if (!randomitems) LOG (llevError, "%s uses unknown randomitems '%s'.\n", debug_desc (), f.get_str ()); } + else + randomitems = 0; break; case KW_msg: @@ -1363,10 +1365,10 @@ if (flag_names [i] && op->flag [i] != tmp->flag [i]) f.put (flag_names [i], op->flag [i] ? "1" : "0"); - /* Save body locations */ + // save body locations for (i = 0; i < NUM_BODY_LOCATIONS; i++) - if (op->body_info[i] != tmp->body_info[i]) - f.put (body_locations[i].save_name, op->body_info[i]); + if (op->slot[i].info != tmp->slot[i].info) + f.put (body_locations[i].save_name, op->slot[i].info); } /*