--- deliantra/server/random_maps/standalone.C 2006/09/16 22:24:13 1.5 +++ deliantra/server/random_maps/standalone.C 2006/12/20 09:14:22 1.9 @@ -91,7 +91,7 @@ switch (op->type) { case SHOP_FLOOR: - if (!HAS_RANDOM_ITEMS (op)) + if (!op->has_random_items ()) return 0; do { @@ -101,7 +101,7 @@ return 0; if (QUERY_FLAG (tmp, FLAG_CURSED) || QUERY_FLAG (tmp, FLAG_DAMNED)) { - free_object (tmp); + tmp->destroy (); tmp = NULL; } } @@ -115,12 +115,12 @@ break; case TREASURE: - if (HAS_RANDOM_ITEMS (op)) + if (op->has_random_items ()) while ((op->stats.hp--) > 0) create_treasure (op->randomitems, op, GT_ENVIRONMENT, op->stats.exp ? op->stats.exp : op->map == NULL ? 14 : op->map->difficulty, 0); - remove_ob (op); - free_object (op); + op->remove (); + op->destroy (); break; } @@ -141,7 +141,7 @@ for (x = 0; x < MAP_WIDTH (m); x++) for (y = 0; y < MAP_HEIGHT (m); y++) - for (tmp = get_map_ob (m, x, y); tmp != NULL; tmp = above) + for (tmp = GET_MAP_OB (m, x, y); tmp != NULL; tmp = above) { above = tmp->above; @@ -149,7 +149,7 @@ auto_apply (tmp); else if (tmp->type == TREASURE) { - if (HAS_RANDOM_ITEMS (tmp)) + if (tmp->has_random_items ()) while ((tmp->stats.hp--) > 0) create_treasure (tmp->randomitems, tmp, 0, m->difficulty, 0); } @@ -157,17 +157,17 @@ { if (tmp->type == CONTAINER) { - if (HAS_RANDOM_ITEMS (tmp)) + if (tmp->has_random_items ()) while ((tmp->stats.hp--) > 0) create_treasure (tmp->randomitems, tmp, 0, m->difficulty, 0); } - else if (HAS_RANDOM_ITEMS (tmp)) + else if (tmp->has_random_items ()) create_treasure (tmp->randomitems, tmp, GT_APPLY, m->difficulty, 0); } } for (x = 0; x < MAP_WIDTH (m); x++) for (y = 0; y < MAP_HEIGHT (m); y++) - for (tmp = get_map_ob (m, x, y); tmp != NULL; tmp = tmp->above) + for (tmp = GET_MAP_OB (m, x, y); tmp != NULL; tmp = tmp->above) if (tmp->above && (tmp->type == TRIGGER_BUTTON || tmp->type == TRIGGER_PEDESTAL)) check_trigger (tmp, tmp->above); }