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.73 by root, Sat Apr 28 17:51:57 2007 UTC vs.
Revision 1.77 by root, Mon May 7 04:21:09 2007 UTC

1/* 1/*
2 * CrossFire, A Multiplayer game for X-windows 2 * CrossFire, A Multiplayer game
3 * 3 *
4 * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team 4 * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team
5 * Copyright (C) 2002 Mark Wedel & Crossfire Development Team 5 * Copyright (C) 2002 Mark Wedel & Crossfire Development Team
6 * Copyright (C) 1992 Frank Tore Johansen 6 * Copyright (C) 1992 Frank Tore Johansen
7 * 7 *
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 ());
920 : treasurelist::find (f.get_str ()); 920 : treasurelist::find (f.get_str ());
921 921
922 if (!randomitems) 922 if (!randomitems)
923 LOG (llevError, "%s uses unknown randomitems '%s'.\n", debug_desc (), f.get_str ()); 923 LOG (llevError, "%s uses unknown randomitems '%s'.\n", debug_desc (), f.get_str ());
924 } 924 }
925 else
926 randomitems = 0;
925 break; 927 break;
926 928
927 case KW_msg: 929 case KW_msg:
928 f.get_ml (KW_endmsg, msg); 930 f.get_ml (KW_endmsg, msg);
929 //TODO: allow longer messages 931 //TODO: allow longer messages
1361 if (op->flag != tmp->flag) 1363 if (op->flag != tmp->flag)
1362 for (i = 0; i <= NUM_FLAGS; i++) 1364 for (i = 0; i <= NUM_FLAGS; i++)
1363 if (flag_names [i] && op->flag [i] != tmp->flag [i]) 1365 if (flag_names [i] && op->flag [i] != tmp->flag [i])
1364 f.put (flag_names [i], op->flag [i] ? "1" : "0"); 1366 f.put (flag_names [i], op->flag [i] ? "1" : "0");
1365 1367
1366 /* Save body locations */ 1368 // save body locations
1367 for (i = 0; i < NUM_BODY_LOCATIONS; i++) 1369 for (i = 0; i < NUM_BODY_LOCATIONS; i++)
1368 if (op->body_info[i] != tmp->body_info[i]) 1370 if (op->slot[i].info != tmp->slot[i].info)
1369 f.put (body_locations[i].save_name, op->body_info[i]); 1371 f.put (body_locations[i].save_name, op->slot[i].info);
1370} 1372}
1371 1373
1372/* 1374/*
1373 * Dumps all variables in an object to a file. 1375 * Dumps all variables in an object to a file.
1374 * 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,
1436 goto finish; 1438 goto finish;
1437 1439
1438 default: 1440 default:
1439 if (!f.parse_error ("resource file")) 1441 if (!f.parse_error ("resource file"))
1440 goto finish; 1442 goto finish;
1443
1444 f.next ();
1445 break;
1441 } 1446 }
1442 } 1447 }
1443 1448
1444finish: 1449finish:
1445 if (seen_arch) 1450 if (seen_arch)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines