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

Comparing deliantra/server/random_maps/standalone.C (file contents):
Revision 1.5 by root, Sat Sep 16 22:24:13 2006 UTC vs.
Revision 1.6 by root, Tue Dec 12 20:53:03 2006 UTC

99 while ((tmp = generate_treasure (op->randomitems, op->stats.exp ? op->stats.exp : 5)) == NULL && --i); 99 while ((tmp = generate_treasure (op->randomitems, op->stats.exp ? op->stats.exp : 5)) == NULL && --i);
100 if (tmp == NULL) 100 if (tmp == NULL)
101 return 0; 101 return 0;
102 if (QUERY_FLAG (tmp, FLAG_CURSED) || QUERY_FLAG (tmp, FLAG_DAMNED)) 102 if (QUERY_FLAG (tmp, FLAG_CURSED) || QUERY_FLAG (tmp, FLAG_DAMNED))
103 { 103 {
104 free_object (tmp); 104 tmp->destroy (0);
105 tmp = NULL; 105 tmp = NULL;
106 } 106 }
107 } 107 }
108 while (!tmp); 108 while (!tmp);
109 109
117 case TREASURE: 117 case TREASURE:
118 if (HAS_RANDOM_ITEMS (op)) 118 if (HAS_RANDOM_ITEMS (op))
119 while ((op->stats.hp--) > 0) 119 while ((op->stats.hp--) > 0)
120 create_treasure (op->randomitems, op, GT_ENVIRONMENT, 120 create_treasure (op->randomitems, op, GT_ENVIRONMENT,
121 op->stats.exp ? op->stats.exp : op->map == NULL ? 14 : op->map->difficulty, 0); 121 op->stats.exp ? op->stats.exp : op->map == NULL ? 14 : op->map->difficulty, 0);
122 remove_ob (op); 122 op->remove ();
123 free_object (op); 123 op->destroy (0);
124 break; 124 break;
125 } 125 }
126 126
127 return tmp ? 1 : 0; 127 return tmp ? 1 : 0;
128} 128}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines