--- deliantra/server/random_maps/standalone.C 2008/04/11 21:09:53 1.17 +++ deliantra/server/random_maps/standalone.C 2008/09/29 09:04:51 1.18 @@ -96,12 +96,17 @@ do { i = 10; /* let's give it 10 tries */ - while ((tmp = generate_treasure (op->randomitems, op->stats.exp ? op->stats.exp : 5)) == NULL && --i); + + while (!(tmp = generate_treasure (op->randomitems, op->stats.exp ? op->stats.exp : 5)) + && --i) + ; + if (tmp == NULL) return 0; + if (QUERY_FLAG (tmp, FLAG_CURSED) || QUERY_FLAG (tmp, FLAG_DAMNED)) { - tmp->destroy (); + tmp->destroy (true); tmp = NULL; } } @@ -119,8 +124,8 @@ while ((op->stats.hp--) > 0) create_treasure (op->randomitems, op, GT_ENVIRONMENT, op->stats.exp ? op->stats.exp : op->map == NULL ? 14 : op->map->difficulty, 0); - op->remove (); - op->destroy (); + + op->destroy (true); break; }