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.58 by root, Sat Apr 28 17:51:57 2007 UTC vs.
Revision 1.60 by root, Sat May 12 18:14:47 2007 UTC

398 LOG (llevDebug, "createtreasure: tries exceeded 100, returning without making treasure\n"); 398 LOG (llevDebug, "createtreasure: tries exceeded 100, returning without making treasure\n");
399 return; 399 return;
400 } 400 }
401 401
402 if (op->flag [FLAG_TREASURE_ENV]) 402 if (op->flag [FLAG_TREASURE_ENV])
403 {
404 // do not generate items when there already is something above the object
405 if (op->flag [FLAG_IS_FLOOR] && op->above)
406 return;
407
403 flag |= GT_ENVIRONMENT; 408 flag |= GT_ENVIRONMENT;
409 }
404 410
405 if (tl->total_chance) 411 if (tl->total_chance)
406 create_one_treasure (tl, op, flag, difficulty, tries); 412 create_one_treasure (tl, op, flag, difficulty, tries);
407 else 413 else
408 create_all_treasures (tl->items, op, flag, difficulty, tries); 414 create_all_treasures (tl->items, op, flag, difficulty, tries);
642 case 2: 648 case 2:
643 case 3: 649 case 3:
644 case 4: 650 case 4:
645 case 5: 651 case 5:
646 case 6: 652 case 6:
647 set_attr_value (&op->stats, r, (signed char) (bonus + get_attr_value (&op->stats, r))); 653 op->stats.stat (r) += bonus;
648 break; 654 break;
649 655
650 case 7: 656 case 7:
651 op->stats.dam += bonus; 657 op->stats.dam += bonus;
652 break; 658 break;
1412#endif 1418#endif
1413 op->face = change->face; 1419 op->face = change->face;
1414 } 1420 }
1415 1421
1416 for (i = 0; i < NUM_STATS; i++) 1422 for (i = 0; i < NUM_STATS; i++)
1417 change_attr_value (&(op->stats), i, get_attr_value (&(change->stats), i)); 1423 change_attr_value (&(op->stats), i, change->stats.stat (i));
1418 1424
1419 op->attacktype |= change->attacktype; 1425 op->attacktype |= change->attacktype;
1420 op->path_attuned |= change->path_attuned; 1426 op->path_attuned |= change->path_attuned;
1421 op->path_repelled |= change->path_repelled; 1427 op->path_repelled |= change->path_repelled;
1422 op->path_denied |= change->path_denied; 1428 op->path_denied |= change->path_denied;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines