--- deliantra/server/common/treasure.C 2009/11/06 12:27:05 1.88 +++ deliantra/server/common/treasure.C 2009/11/06 13:31:47 1.90 @@ -54,11 +54,10 @@ static tl_map_t tl_map; //TODO: class method +static void free_treasurestruct (treasure *t); // bleh desu static void clear (treasurelist *tl) { - void free_treasurestruct (treasure *t); - if (tl->items) { free_treasurestruct (tl->items); @@ -499,7 +498,7 @@ * elmex Wed Aug 9 17:44:59 CEST 2006: * Removed multiplicator, too many high-level items were generated on low-difficulty maps. */ -int +static int level_for_item (const object *op, int difficulty) { if (!op->inv) @@ -526,7 +525,7 @@ * weird integer between 1-31. * */ -int +static int magic_from_difficulty (int difficulty) { int percent = 0, magic = 0; @@ -626,10 +625,9 @@ * other bonuses previously rolled and ones the item might natively have. * 2) Add code to deal with new PR method. */ -void +static void set_ring_bonus (object *op, int bonus) { - int r = rndm (bonus > 0 ? 25 : 11); if (op->type == AMULET) @@ -762,7 +760,7 @@ * rings and amulets. * Another scheme is used to calculate the magic of weapons and armours. */ -int +static int get_magic (int diff) { int i; @@ -778,7 +776,7 @@ } /* special_potion() - so that old potion code is still done right. */ -int +static int special_potion (object *op) { if (op->attacktype) @@ -1662,7 +1660,7 @@ } } -void +static void free_treasurestruct (treasure *t) { if (t->next) free_treasurestruct (t->next); @@ -1672,7 +1670,7 @@ delete t; } -void +static void free_charlinks (linked_char *lc) { if (lc->next) @@ -1681,7 +1679,7 @@ delete lc; } -void +static void free_artifact (artifact *at) { if (at->next) free_artifact (at->next); @@ -1692,7 +1690,7 @@ sfree (at); } -void +static void free_artifactlist (artifactlist *al) { artifactlist *nextal; @@ -1708,18 +1706,3 @@ } } -void -free_all_treasures (void) -{ - treasurelist *tl, *next; - - for (tl = first_treasurelist; tl; tl = next) - { - clear (tl); - - next = tl->next; - delete tl; - } - - free_artifactlist (first_artifactlist); -}