… | |
… | |
786 | { |
786 | { |
787 | int count = 0; |
787 | int count = 0; |
788 | archetype *at = 0; |
788 | archetype *at = 0; |
789 | object *pouch = 0, *tmp = 0; |
789 | object *pouch = 0, *tmp = 0; |
790 | |
790 | |
791 | for (count = 0; coins[count] != NULL; count++) |
791 | for (count = 0; coins[count]; count++) |
792 | { |
792 | { |
793 | at = archetype::find (coins[count]); |
793 | at = archetype::find (coins[count]); |
794 | |
794 | |
795 | if (at == NULL) |
795 | if (at == NULL) |
796 | LOG (llevError, "Could not find %s archetype\n", coins[count]); |
796 | LOG (llevError, "Could not find %s archetype\n", coins[count]); |
… | |
… | |
909 | change_exp (pl, extra_gain / 10, "bargaining", SK_EXP_NONE); |
909 | change_exp (pl, extra_gain / 10, "bargaining", SK_EXP_NONE); |
910 | |
910 | |
911 | pay_player (pl, amount); |
911 | pay_player (pl, amount); |
912 | |
912 | |
913 | new_draw_info_format (NDI_UNIQUE, 0, pl, "You receive %s for %s.", query_cost_string (op, pl, F_SELL | F_SHOP), query_name (op)); |
913 | new_draw_info_format (NDI_UNIQUE, 0, pl, "You receive %s for %s.", query_cost_string (op, pl, F_SELL | F_SHOP), query_name (op)); |
|
|
914 | pl->play_sound (sound_find ("shop_sell")); |
914 | |
915 | |
915 | SET_FLAG (op, FLAG_UNPAID); |
916 | SET_FLAG (op, FLAG_UNPAID); |
916 | identify (op); |
917 | identify (op); |
917 | } |
918 | } |
918 | |
|
|
919 | |
919 | |
920 | /* returns a double that is the ratio of the price that a shop will offer for |
920 | /* returns a double that is the ratio of the price that a shop will offer for |
921 | * item based on the shops specialisation. Does not take account of greed, |
921 | * item based on the shops specialisation. Does not take account of greed, |
922 | * returned value is between SPECIALISATION_EFFECT and 1. |
922 | * returned value is between SPECIALISATION_EFFECT and 1. |
923 | */ |
923 | */ |
… | |
… | |
1278 | if (floor->type == SHOP_FLOOR) |
1278 | if (floor->type == SHOP_FLOOR) |
1279 | return true; |
1279 | return true; |
1280 | |
1280 | |
1281 | return false; |
1281 | return false; |
1282 | } |
1282 | } |
|
|
1283 | |