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.75 by root, Sat May 5 04:40:40 2007 UTC vs.
Revision 1.76 by root, Mon May 7 03:05:58 2007 UTC

293 */ 293 */
294 if ((op->type == WEAPON || op->type == BOW) && loading_arch) 294 if ((op->type == WEAPON || op->type == BOW) && loading_arch)
295 { 295 {
296 if (!op->skill) 296 if (!op->skill)
297 LOG (llevError, "Weapon %s lacks a skill.\n", op->debug_desc ()); 297 LOG (llevError, "Weapon %s lacks a skill.\n", op->debug_desc ());
298 else if ((!strcmp (op->skill, "one handed weapons") && op->body_info[1] != -1) || 298 else if ((!strcmp (op->skill, "one handed weapons") && op->slot[1].info != -1) ||
299 (!strcmp (op->skill, "two handed weapons") && op->body_info[1] != -2)) 299 (!strcmp (op->skill, "two handed weapons") && op->slot[1].info != -2))
300 LOG (llevError, "weapon %s arm usage does not match skill: %d, %s\n", op->debug_desc (), op->body_info[1], &op->skill); 300 LOG (llevError, "weapon %s arm usage does not match skill: %d, %s\n", op->debug_desc (), op->slot[1].info, &op->skill);
301 } 301 }
302 302
303 /* We changed last_heal to gen_sp_armour, which is what it 303 /* We changed last_heal to gen_sp_armour, which is what it
304 * really does for many objects. Need to catch any in maps 304 * really does for many objects. Need to catch any in maps
305 * that may have an old value. 305 * that may have an old value.
890 case KW_dam_modifier: f.get (dam_modifier); break; 890 case KW_dam_modifier: f.get (dam_modifier); break;
891 case KW_duration_modifier: f.get (duration_modifier); break; 891 case KW_duration_modifier: f.get (duration_modifier); break;
892 892
893 //TODO: mechanism to ensure that KW_xxx is consecutive needed from include/preprocess 893 //TODO: mechanism to ensure that KW_xxx is consecutive needed from include/preprocess
894 //TODO: parse from other include files 894 //TODO: parse from other include files
895 case KW_body_range: f.get (body_info[0]); break; 895 case KW_body_range: slot[ 0].info = f.get_sint32 (); break;
896 case KW_body_arm: f.get (body_info[1]); break; 896 case KW_body_arm: slot[ 1].info = f.get_sint32 (); break;
897 case KW_body_torso: f.get (body_info[2]); break; 897 case KW_body_torso: slot[ 2].info = f.get_sint32 (); break;
898 case KW_body_head: f.get (body_info[3]); break; 898 case KW_body_head: slot[ 3].info = f.get_sint32 (); break;
899 case KW_body_neck: f.get (body_info[4]); break; 899 case KW_body_neck: slot[ 4].info = f.get_sint32 (); break;
900 case KW_body_skill: f.get (body_info[5]); break; 900 case KW_body_skill: slot[ 5].info = f.get_sint32 (); break;
901 case KW_body_finger: f.get (body_info[6]); break; 901 case KW_body_finger: slot[ 6].info = f.get_sint32 (); break;
902 case KW_body_shoulder: f.get (body_info[7]); break; 902 case KW_body_shoulder: slot[ 7].info = f.get_sint32 (); break;
903 case KW_body_foot: f.get (body_info[8]); break; 903 case KW_body_foot: slot[ 8].info = f.get_sint32 (); break;
904 case KW_body_hand: f.get (body_info[9]); break; 904 case KW_body_hand: slot[ 9].info = f.get_sint32 (); break;
905 case KW_body_wrist: f.get (body_info[10]); break; 905 case KW_body_wrist: slot[10].info = f.get_sint32 (); break;
906 case KW_body_waist: f.get (body_info[11]); break; 906 case KW_body_waist: slot[11].info = f.get_sint32 (); break;
907 case KW_can_apply: 907 case KW_can_apply:
908 break; 908 break;
909 909
910 case KW_connected: 910 case KW_connected:
911 add_button_link (this, map, f.get_sint32 ()); 911 add_button_link (this, map, f.get_sint32 ());
1365 if (flag_names [i] && op->flag [i] != tmp->flag [i]) 1365 if (flag_names [i] && op->flag [i] != tmp->flag [i])
1366 f.put (flag_names [i], op->flag [i] ? "1" : "0"); 1366 f.put (flag_names [i], op->flag [i] ? "1" : "0");
1367 1367
1368 /* Save body locations */ 1368 /* Save body locations */
1369 for (i = 0; i < NUM_BODY_LOCATIONS; i++) 1369 for (i = 0; i < NUM_BODY_LOCATIONS; i++)
1370 if (op->body_info[i] != tmp->body_info[i]) 1370 if (op->slot[i].info != tmp->slot[i].info)
1371 f.put (body_locations[i].save_name, op->body_info[i]); 1371 f.put (body_locations[i].save_name, op->slot[i].info);
1372} 1372}
1373 1373
1374/* 1374/*
1375 * Dumps all variables in an object to a file. 1375 * Dumps all variables in an object to a file.
1376 * If bit 0 of flag is set, unpaid objects will be saved. As of now, 1376 * If bit 0 of flag is set, unpaid objects will be saved. As of now,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines