1 #include "store/black-market.h"
2 #include "floor/floor-town.h"
3 #include "store/store-owners.h"
4 #include "store/store-util.h"
5 #include "system/object-type-definition.h"
6 #include "system/player-type-definition.h"
9 * @brief ブラックマーケット用の無価値品の排除判定 /
10 * This function will keep 'crap' out of the black market.
11 * @param player_ptr プレイヤーへの参照ポインタ
12 * @param o_ptr 判定したいオブジェクトの構造体参照ポインタ
13 * @return ブラックマーケットにとって無価値な品ならばTRUEを返す
16 * Crap is defined as any item that is "available" elsewhere
17 * Based on a suggestion by "Lee Vogt" <lvogt@cig.mcel.mot.com>
20 bool black_market_crap(player_type *player_ptr, object_type *o_ptr)
34 for (auto sst : STORE_SALE_TYPE_LIST) {
35 if (sst == StoreSaleType::HOME || sst == StoreSaleType::MUSEUM) {
39 for (int j = 0; j < town_info[player_ptr->town_num].store[enum2i(sst)].stock_num; j++) {
40 object_type *j_ptr = &town_info[player_ptr->town_num].store[enum2i(sst)].stock[j];
41 if (o_ptr->k_idx == j_ptr->k_idx)