ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/treasure.C
(Generate patch)

Comparing deliantra/server/common/treasure.C (file contents):
Revision 1.1 by elmex, Sun Aug 13 17:16:01 2006 UTC vs.
Revision 1.2 by root, Sun Aug 27 16:15:11 2006 UTC

1 1
2/* 2/*
3 * static char *rcs_treasure_c = 3 * static char *rcs_treasure_c =
4 * "$Id: treasure.C,v 1.1 2006/08/13 17:16:01 elmex Exp $"; 4 * "$Id: treasure.C,v 1.2 2006/08/27 16:15:11 root Exp $";
5 */ 5 */
6 6
7/* 7/*
8 CrossFire, A Multiplayer game for X-windows 8 CrossFire, A Multiplayer game for X-windows
9 9
1277 artifact *art=NULL; 1277 artifact *art=NULL;
1278 linked_char *tmp; 1278 linked_char *tmp;
1279 int value, comp; 1279 int value, comp;
1280 artifactlist *al; 1280 artifactlist *al;
1281 1281
1282 object_thawer thawer;
1283
1282 if (has_been_inited) return; 1284 if (has_been_inited) return;
1283 else has_been_inited = 1; 1285 else has_been_inited = 1;
1284 1286
1285 sprintf(filename, "%s/artifacts", settings.datadir); 1287 sprintf(filename, "%s/artifacts", settings.datadir);
1286 LOG(llevDebug, "Reading artifacts from %s...",filename); 1288 LOG(llevDebug, "Reading artifacts from %s...",filename);
1321 else if (sscanf(cp, "difficulty %d", &value)) 1323 else if (sscanf(cp, "difficulty %d", &value))
1322 art->difficulty = (uint8) value; 1324 art->difficulty = (uint8) value;
1323 else if (!strncmp(cp, "Object",6)) { 1325 else if (!strncmp(cp, "Object",6)) {
1324 art->item = (object *) calloc(1, sizeof(object)); 1326 art->item = (object *) calloc(1, sizeof(object));
1325 reset_object(art->item); 1327 reset_object(art->item);
1326 if (!load_object(fp, art->item,LO_LINEMODE,0)) 1328 if (!load_object(fp, thawer, art->item,LO_LINEMODE,0))
1327 LOG(llevError,"Init_Artifacts: Could not load object.\n"); 1329 LOG(llevError,"Init_Artifacts: Could not load object.\n");
1328 art->item->name = add_string((strchr(cp, ' ')+1)); 1330 art->item->name = add_string((strchr(cp, ' ')+1));
1329 al=find_artifactlist(art->item->type); 1331 al=find_artifactlist(art->item->type);
1330 if (al==NULL) { 1332 if (al==NULL) {
1331 al = get_empty_artifactlist(); 1333 al = get_empty_artifactlist();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines