--- deliantra/server/random_maps/treasure.C 2007/01/27 02:19:37 1.24 +++ deliantra/server/random_maps/treasure.C 2007/06/04 13:04:00 1.29 @@ -61,8 +61,8 @@ if (OUT_OF_REAL_MAP (m, x, y)) return 1; - int r = GET_MAP_MOVE_BLOCK (m, x, y) & ~MOVE_BLOCK_DEFAULT; - return r; + m->at (x, y).update (); + return GET_MAP_MOVE_BLOCK (m, x, y) & MOVE_WALK; } /* place treasures in the map, given the @@ -241,7 +241,7 @@ if (tlist != NULL) for (ti = 0; ti < n_treasures; ti++) { /* use the treasure list */ - object *new_treasure = pick_random_object (style_map); + object *new_treasure = style_map->pick_random_object (); insert_ob_in_ob (arch_to_object (new_treasure->arch), the_chest); } @@ -252,7 +252,7 @@ } #endif { /* neither style_map no treasure list given */ - treasurelist *tlist = find_treasurelist ("chest"); + treasurelist *tlist = treasurelist::find ("chest"); the_chest->randomitems = tlist; the_chest->stats.hp = n_treasures; @@ -266,7 +266,7 @@ if (trap_map) { - the_trap = pick_random_object (trap_map); + the_trap = trap_map->pick_random_object (); the_trap->stats.Cha = 10 + RP->difficulty; the_trap->level = bc_random ((3 * RP->difficulty) / 2); if (the_trap) @@ -660,7 +660,7 @@ } } /* give up and return the closest free spot. */ - i = find_free_spot (&archetype::find ("chest")->clone, map, x, y, 1, SIZEOFFREE1 + 1); + i = find_free_spot (archetype::find ("chest"), map, x, y, 1, SIZEOFFREE1 + 1); if (i != -1) { @@ -700,7 +700,7 @@ surround_by_doors (maptile *map, char **layout, int x, int y, int opts) { int i; - char *doors[2]; + const char *doors[2]; object **doorlist; int ndoors_made = 0; doorlist = (object **) calloc (9, sizeof (object *)); /* 9 doors so we can hold termination null */