--- deliantra/server/common/treasure.C 2008/07/29 02:00:55 1.79 +++ deliantra/server/common/treasure.C 2008/09/29 09:04:51 1.80 @@ -250,14 +250,14 @@ //TODO: flag such as objects... as such (no drop, anybody?) if (op->type == SPELL) { - op->destroy (); + op->destroy (true); return; } op->expand_tail (); if (!creator->is_on_map () || op->blocked (creator->map, creator->x, creator->y)) - op->destroy (); + op->destroy (true); else { SET_FLAG (op, FLAG_OBJ_ORIGINAL); @@ -442,7 +442,8 @@ if (ob->inv) LOG (llevError, "In generate treasure, created multiple objects.\n"); - ob->destroy (); + ob->destroy (true); + return tmp; } @@ -967,13 +968,6 @@ op->value *= 5; /* Since it's not just decoration */ case RING: - if (!op->arch) // wtf? schmorp - { - op->destroy (); - op = 0; - break; - } - if (!IS_ARCH (op->arch, ring) && !IS_ARCH (op->arch, amulet)) /* It's a special artifact! */ break; @@ -1355,14 +1349,11 @@ */ if (op->type == HORN || op->type == POTION) { - object *tmp_obj; - /* Remove any spells this object currently has in it */ - while (op->inv) - op->inv->destroy (); + op->destroy_inv (); - tmp_obj = arch_to_object (change->other_arch); - insert_ob_in_ob (tmp_obj, op); + object *tmp = arch_to_object (change->other_arch); + insert_ob_in_ob (tmp, op); } /* No harm setting this for potions/horns */ op->other_arch = change->other_arch; @@ -1688,7 +1679,7 @@ if (at->next) free_artifact (at->next); if (at->allowed) free_charlinks (at->allowed); - at->item->destroy (1); + at->item->destroy (true); sfree (at); }