version 1.36 | | version 1.37 |
---|
| | |
/* | | /* |
* static char *rcsid_pets_c = | | * static char *rcsid_pets_c = |
* "$Id: pets.c,v 1.36 2005/09/24 09:49:49 ryo_saeba Exp $"; | | * "$Id: pets.c,v 1.37 2005/10/01 17:46:05 ryo_saeba Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
| | |
| | |
| | |
int summon_object(object *op, object *caster, object *spell_ob, int dir) | | int summon_object(object *op, object *caster, object *spell_ob, int dir, const char *stringarg) |
{ | | { |
sint16 x,y, nrof=1, i; | | sint16 x,y, nrof=1, i; |
archetype *summon_arch; | | archetype *summon_arch; |
| | |
for (tr=spell_ob->randomitems->items; tr; tr=tr->next) { | | for (tr=spell_ob->randomitems->items; tr; tr=tr->next) { |
if (level < tr->magic) break; | | if (level < tr->magic) break; |
lasttr = tr; | | lasttr = tr; |
| | if(stringarg && !strcmp(tr->item->name,stringarg)) break; |
if (tr->next == NULL || tr->next->item == NULL) break; | | if (tr->next == NULL || tr->next->item == NULL) break; |
} | | } |
if (!lasttr) { | | if (!lasttr) { |