… | |
… | |
66 | { |
66 | { |
67 | value -= t->chance; |
67 | value -= t->chance; |
68 | if (value < 0) |
68 | if (value < 0) |
69 | break; |
69 | break; |
70 | } |
70 | } |
71 | if (!t) |
71 | if (!t || !t->item) |
72 | { |
72 | { |
73 | LOG (llevError, "resurrect_player: got null treasure from treasurelist %s!\n", &spell->race); |
73 | LOG (llevError, "resurrect_player: got null treasure from treasurelist %s!\n", &spell->race); |
74 | return 0; |
74 | return 0; |
75 | } |
75 | } |
76 | race = t->item->name; |
76 | race = t->item->name; |
… | |
… | |
209 | |
209 | |
210 | if (resurrection_fails (clevel, leveldead)) |
210 | if (resurrection_fails (clevel, leveldead)) |
211 | { |
211 | { |
212 | if (spell->randomitems) |
212 | if (spell->randomitems) |
213 | for (treasure *t = spell->randomitems->items; t; t = t->next) |
213 | for (treasure *t = spell->randomitems->items; t; t = t->next) |
|
|
214 | if (t->item) |
214 | summon_hostile_monsters (op, t->nrof, t->item->name); |
215 | summon_hostile_monsters (op, t->nrof, t->item->name); |
215 | |
216 | |
216 | return 1; |
217 | return 1; |
217 | |
218 | |
218 | } |
219 | } |
219 | else |
220 | else |