… | |
… | |
76 | |
76 | |
77 | warn_archetypes = prev_warn; |
77 | warn_archetypes = prev_warn; |
78 | } |
78 | } |
79 | |
79 | |
80 | /* |
80 | /* |
81 | * Searches for the given treasurelist in the globally linked list |
81 | * Searches for the given treasurelist |
82 | * of treasurelists which has been built by load_treasures(). |
|
|
83 | */ |
82 | */ |
84 | treasurelist * |
83 | treasurelist * |
85 | treasurelist::find (const char *name) |
84 | treasurelist::find (const char *name) |
86 | { |
85 | { |
87 | if (!name) |
86 | if (!name) |
… | |
… | |
125 | if (tl->items) |
124 | if (tl->items) |
126 | { |
125 | { |
127 | free_treasurestruct (tl->items); |
126 | free_treasurestruct (tl->items); |
128 | tl->items = 0; |
127 | tl->items = 0; |
129 | } |
128 | } |
|
|
129 | |
|
|
130 | tl->total_chance = 0; |
130 | } |
131 | } |
131 | |
132 | |
132 | /* |
133 | /* |
133 | * Reads the lib/treasure file from disk, and parses the contents |
134 | * Reads the lib/treasure file from disk, and parses the contents |
134 | * into an internal treasure structure (very linked lists) |
135 | * into an internal treasure structure (very linked lists) |