OSDN Git Service

Merge pull request #3297 from Hourier/Move-Update-Flags-3
[hengbandforosx/hengbandosx.git] / src / store / store.h
1 #pragma once
2
3 #include "store/store-util.h"
4 #include "system/angband.h"
5
6 /* Store constants */
7 #define STORE_INVEN_MAX 24 /* Max number of discrete objs in inven */
8 #define STORE_TURNOVER 12 /* Normal shop turnover, per day */
9 #define STORE_MIN_KEEP 6 /* Min slots to "always" keep full */
10 #define STORE_MAX_KEEP 21 /* Max slots to "always" keep full */
11 #define STORE_SHUFFLE 21 /* 1/Chance (per day) of an owner changing */
12 #define STORE_TICKS 1000 /* Number of ticks between turnovers */
13
14 struct owner_type;
15 extern int store_top;
16 extern int store_bottom;
17 extern int xtra_stock;
18 extern const owner_type *ot_ptr;
19 extern int16_t old_town_num;
20 extern int16_t inner_town_num;
21
22 extern int cur_store_feat;
23 extern bool allow_inc;
24
25 class PlayerType;
26 int16_t store_get_stock_max(StoreSaleType sst, bool powerup = true);
27 void store_shuffle(PlayerType *player_ptr, StoreSaleType which);
28 void store_maintenance(PlayerType *player_ptr, int town_num, StoreSaleType store_num, int chance);
29 void store_init(int town_num, StoreSaleType store_num);
30 void store_examine(PlayerType *player_ptr, StoreSaleType store_num);
31 int store_check_num(ItemEntity *o_ptr, StoreSaleType store_num);
32 int get_stock(COMMAND_CODE *com_val, concptr pmt, int i, int j, StoreSaleType store_num);