version 1.111 | | version 1.112 |
---|
| | |
/* | | /* |
* static char *rcsid_apply_c = | | * static char *rcsid_apply_c = |
* "$Id: apply.c,v 1.111 2004/08/16 08:47:04 ryo_saeba Exp $"; | | * "$Id: apply.c,v 1.112 2004/08/17 06:41:04 mwedel Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
tmp->type != SPELL && HAS_RANDOM_ITEMS(tmp)) { | | tmp->type != SPELL && HAS_RANDOM_ITEMS(tmp)) { |
create_treasure(tmp->randomitems, tmp, GT_APPLY, | | create_treasure(tmp->randomitems, tmp, GT_APPLY, |
m->difficulty,0); | | m->difficulty,0); |
| | /* Purely debugging - I've seen crashes in monster_should_cast_spell() |
| | * where the monster has a scroll with no inventory - need to figure |
| | * out how that is happening. Observed that it happens on random |
| | * maps, which should be covered by this code. |
| | */ |
| | if (tmp->type == SCROLL && !tmp->inv) |
| | LOG(llevError,"fix_auto_apply: create treasure failed to create spell for scroll.\n"); |
tmp->randomitems = NULL; | | tmp->randomitems = NULL; |
} | | } |
} | | } |