… | |
… | |
80 | treasurelist::find (const char *name) |
80 | treasurelist::find (const char *name) |
81 | { |
81 | { |
82 | if (!name) |
82 | if (!name) |
83 | return 0; |
83 | return 0; |
84 | |
84 | |
85 | auto (i, tl_map.find (name)); |
85 | auto i = tl_map.find (name); |
86 | |
86 | |
87 | if (i == tl_map.end ()) |
87 | if (i == tl_map.end ()) |
88 | return 0; |
88 | return 0; |
89 | |
89 | |
90 | return i->second; |
90 | return i->second; |
… | |
… | |
221 | { |
221 | { |
222 | for (treasure *t = tl->items; t; t = t->next) |
222 | for (treasure *t = tl->items; t; t = t->next) |
223 | { |
223 | { |
224 | if (t->next_yes || t->next_no) |
224 | if (t->next_yes || t->next_no) |
225 | { |
225 | { |
226 | LOG (llevError, "Treasure %s is one item, but on treasure %s\n", &tl->name, t->item ? &t->item->archname : &t->name); |
226 | LOG (llevError, "Treasure %s is one item, but on treasure %s%s\n", |
|
|
227 | &tl->name, |
|
|
228 | t->item ? "item " : "", |
|
|
229 | t->item ? &t->item->archname : &t->name); |
227 | LOG (llevError, " the next_yes or next_no field is set\n"); |
230 | LOG (llevError, " the next_yes or next_no field is set\n"); |
228 | } |
231 | } |
229 | |
232 | |
230 | tl->total_chance += t->chance; |
233 | tl->total_chance += t->chance; |
231 | } |
234 | } |