--- deliantra/server/common/treasure.C 2006/09/26 17:19:38 1.20 +++ deliantra/server/common/treasure.C 2006/12/10 20:15:57 1.22 @@ -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; } @@ -851,6 +851,12 @@ if (difficulty < 1) difficulty = 1; + if (INVOKE_OBJECT (ADD_BONUS, op, + ARG_OBJECT (creator != op ? creator : 0), + ARG_INT (difficulty), ARG_INT (max_magic), + ARG_INT (flags))) + return; + if (!(flags & GT_MINIMAL)) { if (op->arch == crown_arch) @@ -1847,7 +1853,7 @@ if (at->allowed) free_charlinks (at->allowed); - at->item->free (1); + at->item->destroy (1); delete at; } @@ -1857,7 +1863,7 @@ { artifactlist *nextal; - for (al = first_artifactlist; al != NULL; al = nextal) + for (al = first_artifactlist; al; al = nextal) { nextal = al->next;