EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
EvEMath::Market Namespace Reference

Functions

float BrokerFee (uint8 brSkillLvl, float fStanding, float cStanding, float total)
 
float RelistFee (float oldPrice, float newPrice, float brokerPercent=0.01, float discount=0)
 
float SalesTax (float baseSalesTax, uint8 accountingLvl=0, uint8 taxEvasionLvl=0)
 

Function Documentation

float EvEMath::Market::BrokerFee ( uint8  brSkillLvl,
float  fStanding,
float  cStanding,
float  total 
)

Definition at line 202 of file EvEMath.cpp.

References EvE::max().

203 {
204  float wStanding = (0.7f * fStanding + 0.3f * cStanding) / 10.0f;
205  float fee = 0.01f * (1.0f - (0.05f * brSkillLvl)) * pow(2, -2 * wStanding);
206  return EvE::max(fee * orderValue, 100.0f);
207 }
int64 max(int64 x, int64 y=0)
Definition: misc.h:103

Here is the call graph for this function:

float EvEMath::Market::RelistFee ( float  oldPrice,
float  newPrice,
float  brokerPercent = 0.01,
float  discount = 0 
)

Definition at line 209 of file EvEMath.cpp.

References EvE::max().

210 {
211  // this needs a 'Relist Discount' but no clue where to find data for it yet
212  return EvE::max(brokerPercent * (newPrice -oldPrice)) + (1 -discount) *brokerPercent *newPrice;
213 }
int64 max(int64 x, int64 y=0)
Definition: misc.h:103

Here is the call graph for this function:

float EvEMath::Market::SalesTax ( float  baseSalesTax,
uint8  accountingLvl = 0,
uint8  taxEvasionLvl = 0 
)
Todo:
add skillTaxEvasion to this formula; its not calculated in client...

Definition at line 215 of file EvEMath.cpp.

References EvE::min().

Referenced by MarketMgr::ExecuteBuyOrder(), and MarketMgr::ExecuteSellOrder().

216 {
218  float maximumTax = baseSalesTax / 100.0f;
219  float tax = maximumTax * (1 - 0.1f * accountingLvl);
220  return EvE::min(tax, maximumTax);
221 }
double min(double x, double y)
Definition: misc.h:95

Here is the call graph for this function:

Here is the caller graph for this function: