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

Comparing deliantra/server/server/apply.C (file contents):
Revision 1.37 by root, Tue Dec 12 21:39:57 2006 UTC vs.
Revision 1.38 by root, Tue Dec 12 22:37:05 2006 UTC

3653 switch (op->type) 3653 switch (op->type)
3654 { 3654 {
3655 case SHOP_FLOOR: 3655 case SHOP_FLOOR:
3656 if (!HAS_RANDOM_ITEMS (op)) 3656 if (!HAS_RANDOM_ITEMS (op))
3657 return 0; 3657 return 0;
3658
3658 do 3659 do
3659 { 3660 {
3660 i = 10; /* let's give it 10 tries */ 3661 i = 10; /* let's give it 10 tries */
3661 while ((tmp = generate_treasure (op->randomitems, 3662 while ((tmp = generate_treasure (op->randomitems,
3662 op->stats.exp ? (int) op->stats.exp : MAX (op->map->difficulty, 5))) == NULL && --i); 3663 op->stats.exp ? (int) op->stats.exp : MAX (op->map->difficulty, 5))) == NULL && --i);
3667 tmp->destroy (); 3668 tmp->destroy ();
3668 tmp = NULL; 3669 tmp = NULL;
3669 } 3670 }
3670 } 3671 }
3671 while (!tmp); 3672 while (!tmp);
3673
3672 tmp->x = op->x; 3674 tmp->x = op->x;
3673 tmp->y = op->y; 3675 tmp->y = op->y;
3674 SET_FLAG (tmp, FLAG_UNPAID); 3676 SET_FLAG (tmp, FLAG_UNPAID);
3675 insert_ob_in_map (tmp, op->map, NULL, 0); 3677 insert_ob_in_map (tmp, op->map, NULL, 0);
3676 CLEAR_FLAG (op, FLAG_AUTO_APPLY); 3678 CLEAR_FLAG (op, FLAG_AUTO_APPLY);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines