EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
EVE_Market.h
Go to the documentation of this file.
1 
2 /* EVE_Market.h
3  * enumerators and other defines for Market system
4  *
5  * Allan
6  * 19 October 2020
7  */
8 
9 
10 #ifndef EVE_MARKET_H
11 #define EVE_MARKET_H
12 
13 
14 #include "eve-common.h"
15 
16 /* market range
17  * rangeStation = -1
18  * rangeSolarSystem = 0
19  * rangeConstellation = 4
20  * rangeRegion = 32767
21  */
22 
23 
24 namespace Market {
25  namespace Action {
26  enum {
27  Add = 1,
28  Modify = 2,
29  Expiry = 3
30  };
31  }
32 
33  namespace Type {
34  enum {
35  Sell = 0,
36  Buy = 1
37  };
38  }
39 
40  namespace Duration {
41  enum {
42  Immediate = 0,
43  Day = 1,
44  ThreeDays = 3,
45  Week = 7,
46  TwoWeeks = 14, // default
47  Month = 30,
49  };
50  }
51 
52  // this is jumps from current system/station
53  namespace Range {
54  enum {
55  Station = -1,
56  System = 0,
58  Region = 32767
59  //Unreachable = 1000000
60  };
61  }
62 
63  namespace QtyStatus {
64  enum {
65  Invalid = 0,
66  Complete = 1,
67  Over = 2,
68  Under = 3
69  };
70 
71  }
72  // used to query/save transaction data
73  //sellBuy, typeID, clientID, quantity, fromDate, maxPrice, minPrice, accountKey, memberID
74  struct TxData {
75  bool isCorp :1;
82  uint32 accountKey; // corp account key (default 1000 (cash))
83  uint32 memberID; // corp member that placed order (0 for char order)
85  float price;
86  };
87 
88  // used to save order data
89  struct SaveData {
90  /*
91  * orderID, typeID, ownerID, regionID, stationID
92  * orderRange, bid, price, escrow, minVolume, volEntered, volRemaining,
93  * issued, contraband, duration, jumps, isCorp, accountKey, memberID
94  */
95  bool bid :1;
96  bool isCorp :1;
97  bool contraband :1;
113  float price;
114  float escrow;
115  };
116 
117  // used to query sell orders when buy is requested
118  struct OrderInfo {
119  //orderID, typeID, charID, regionID, stationID, orderRange, bid, price, escrow,
120  // minVolume, volEntered, volRemaining, issued, contraband, duration, jumps, isCorp, accountKey, memberID
121  bool isBuy :1;
122  bool isCorp :1;
129  uint32 accountKey; // corp account key (default 1000 (cash))
130  uint32 memberID; // corp member that placed order (0 for char order)
131  float price;
132  };
133 
134  // POD structure for mineral data used in pricing method
135  struct matlData {
137  float price;
138  std::string name;
139  };
140 
141 }
142 
143 /*
144  MarketTransaction = 2, // * transactionID
145  MarketEscrow = 42,
146  MarketFinePaid = 44,
147  Brokerfee = 46, // * station ownerID
148  TransactionTax = 54, // *
149  */
150 
151 
152 #endif // EVE_MARKET_H
153 
154 
155 /*
156  * {'FullPath': u'UI/Market/Corporation', 'messageID': 251301, 'label': u'AccessDeniedNeedAccountantOrTraderRole'}(u'You do not have the role <b>Accountant</b> or <b>Trader</b>.', None, None)
157  * {'FullPath': u'UI/Market/Corporation', 'messageID': 251303, 'label': u'AccessDeniedNeedAddRights'}(u'This is a delivery bay. You can only pick up items here, which have been bought off the market or returned from the market.', None, None)
158  * {'FullPath': u'UI/Market/Corporation', 'messageID': 251307, 'label': u'AccessDeniedNeedJuniorAccountantOrTraderRole'}(u'You do not have the role <b>Accountant</b> or <b>Junior Accountant</b> or <b>Trader</b>.', None, None)
159  *
160  */
161 
162 
163 
164 /* this is data displayed on bottom of 'my orders' window
165  *
166  * def GetSkillLimits(self):
167  * limits = {}
168  * currentOpen = 0
169  * myskills = sm.GetService('skills').MySkillLevelsByID()
170  * retailLevel = myskills.get(const.typeRetail, 0)
171  * tradeLevel = myskills.get(const.typeTrade, 0)
172  * wholeSaleLevel = myskills.get(const.typeWholesale, 0)
173  * accountingLevel = myskills.get(const.typeAccounting, 0)
174  * brokerLevel = myskills.get(const.typeBrokerRelations, 0)
175  * tycoonLevel = myskills.get(const.typeTycoon, 0)
176  * marginTradingLevel = myskills.get(const.typeMarginTrading, 0)
177  * marketingLevel = myskills.get(const.typeMarketing, 0)
178  * procurementLevel = myskills.get(const.typeProcurement, 0)
179  * visibilityLevel = myskills.get(const.typeVisibility, 0)
180  * daytradingLevel = myskills.get(const.typeDaytrading, 0)
181  * maxOrderCount = 5 + tradeLevel * 4 + retailLevel * 8 + wholeSaleLevel * 16 + tycoonLevel * 32
182  * limits['cnt'] = maxOrderCount
183  * commissionPercentage = const.marketCommissionPercentage / 100.0
184  * commissionPercentage *= 1 - brokerLevel * 0.05
185  * transactionTax = const.mktTransactionTax / 100.0
186  * transactionTax *= 1 - accountingLevel * 0.1
187  * limits['fee'] = commissionPercentage
188  * limits['acc'] = transactionTax
189  * limits['ask'] = jumpsPerSkillLevel[marketingLevel]
190  * limits['bid'] = jumpsPerSkillLevel[procurementLevel]
191  * limits['vis'] = jumpsPerSkillLevel[visibilityLevel]
192  * limits['mod'] = jumpsPerSkillLevel[daytradingLevel]
193  * limits['esc'] = 0.75 ** marginTradingLevel
194  * return limits
195  */
uint32 regionID
Definition: EVE_Market.h:80
unsigned __int8 uint8
Definition: eve-compat.h:46
uint32 stationID
Definition: EVE_Market.h:79
uint32 quantity
Definition: EVE_Market.h:81
uint32 solarSystemID
Definition: EVE_Market.h:106
signed __int8 int8
Definition: eve-compat.h:45
std::string name
Definition: EVE_Market.h:138
uint16 typeID
Definition: EVE_Market.h:77
uint32 accountKey
Definition: EVE_Market.h:82
uint32 memberID
Definition: EVE_Market.h:83
unsigned __int32 uint32
Definition: eve-compat.h:50
uint32 clientID
Definition: EVE_Market.h:78
Type
Definition: EVE_LSC.h:71
signed __int64 int64
Definition: eve-compat.h:51
signed __int16 int16
Definition: eve-compat.h:47
unsigned __int16 uint16
Definition: eve-compat.h:48
uint32 volRemaining
Definition: EVE_Market.h:109