--- deliantra/server/common/treasure.C 2007/04/28 17:51:57 1.58 +++ deliantra/server/common/treasure.C 2007/05/12 18:14:47 1.60 @@ -400,7 +400,13 @@ } if (op->flag [FLAG_TREASURE_ENV]) - flag |= GT_ENVIRONMENT; + { + // do not generate items when there already is something above the object + if (op->flag [FLAG_IS_FLOOR] && op->above) + return; + + flag |= GT_ENVIRONMENT; + } if (tl->total_chance) create_one_treasure (tl, op, flag, difficulty, tries); @@ -644,7 +650,7 @@ case 4: case 5: case 6: - set_attr_value (&op->stats, r, (signed char) (bonus + get_attr_value (&op->stats, r))); + op->stats.stat (r) += bonus; break; case 7: @@ -1414,7 +1420,7 @@ } for (i = 0; i < NUM_STATS; i++) - change_attr_value (&(op->stats), i, get_attr_value (&(change->stats), i)); + change_attr_value (&(op->stats), i, change->stats.stat (i)); op->attacktype |= change->attacktype; op->path_attuned |= change->path_attuned;