version 1.42 | | version 1.43 |
---|
| | |
/* | | /* |
* static char *rcsid_shop_c = | | * static char *rcsid_shop_c = |
* "$Id: shop.c,v 1.42 2005/10/04 17:16:05 ryo_saeba Exp $"; | | * "$Id: shop.c,v 1.43 2005/10/06 05:27:35 qal21 Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
} | | } |
| | |
/* Limit amount of money you can get for really great items. */ | | /* Limit amount of money you can get for really great items. */ |
if (flag==F_TRUE || flag==F_SELL) | | if ((flag==F_TRUE || flag==F_SELL) && who) |
val=value_limit(val, number, who->map, shop); | | val=value_limit(val, number, who->map, shop); |
| | |
/* This modification is for bargaining skill. | | /* This modification is for bargaining skill. |
| | |
} | | } |
| | |
/* if we are in a shop, check how the type of shop should affect the price */ | | /* if we are in a shop, check how the type of shop should affect the price */ |
if (shop) { | | if (shop && who) { |
if (flag==F_SELL) | | if (flag==F_SELL) |
val=(sint64)val*shop_specialisation_ratio(tmp, who->map)*shopkeeper_approval(who->map, who) | | val=(sint64)val*shop_specialisation_ratio(tmp, who->map)*shopkeeper_approval(who->map, who) |
/shop_greed(who->map); | | /shop_greed(who->map); |