--- deliantra/server/common/treasure.C 2006/09/14 22:34:00 1.19 +++ deliantra/server/common/treasure.C 2006/09/27 00:36:08 1.21 @@ -460,10 +460,10 @@ tmp = ob->inv; if (tmp != NULL) remove_ob (tmp); + if (ob->inv) - { - LOG (llevError, "In generate treasure, created multiple objects.\n"); - } + LOG (llevError, "In generate treasure, created multiple objects.\n"); + free_object (ob); return tmp; } @@ -1558,12 +1558,8 @@ op->item_power = change->item_power; for (i = 0; i < NROFATTACKS; i++) - { - if (change->resist[i]) - { - op->resist[i] += change->resist[i]; - } - } + if (change->resist[i]) + op->resist[i] += change->resist[i]; if (change->stats.dam) { @@ -1851,7 +1847,7 @@ if (at->allowed) free_charlinks (at->allowed); - at->item->free (1); + at->item->destroy (1); delete at; } @@ -1861,7 +1857,7 @@ { artifactlist *nextal; - for (al = first_artifactlist; al != NULL; al = nextal) + for (al = first_artifactlist; al; al = nextal) { nextal = al->next;