| version 1.40 | | version 1.41 |
|---|
| | |
| /* | | /* |
| * static char *rcsid_shop_c = | | * static char *rcsid_shop_c = |
| * "$Id: shop.c,v 1.40 2005/10/03 03:29:41 cavesomething Exp $"; | | * "$Id: shop.c,v 1.41 2005/10/04 04:39:19 cavesomething Exp $"; |
| */ | | */ |
| | | |
| /* | | /* |
| | |
| LOG(llevError, "shop_specialisation_ratio: passed a NULL item for map %s", map->path); | | LOG(llevError, "shop_specialisation_ratio: passed a NULL item for map %s", map->path); |
| return 0; | | return 0; |
| } | | } |
| | | if (!item->type) { |
| | | LOG(llevError, "shop_specialisation_ratio: passed an item with an invalid type"); |
| | | /* |
| | | * I'm not really sure what the /right/ thing to do here is, these types of |
| | | * item shouldn't exist anyway, but returning the ratio is probably the best bet.." |
| | | */ |
| | | return ratio; |
| | | } |
| if (map->shopitems) { | | if (map->shopitems) { |
| for (i=0; i<items[0].index; i++) | | for (i=0; i<items[0].index; i++) |
| if (items[i].typenum==item->type || (!items[i].typenum && likedness == 0.001)) | | if (items[i].typenum==item->type || (!items[i].typenum && likedness == 0.001)) |