OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
PriceCalculator Class Reference

#include <PriceCalculator.h>

Static Public Member Functions

static int baseItemIdentifyPrice (float priceMultiplier)
 
static int baseItemRepairPrice (int realValue, float priceMultiplier)
 
static int baseItemBuyingPrice (int realValue, float priceMultiplier)
 
static int baseItemSellingPrice (int realValue, float priceMultiplier)
 
static int itemRepairPriceForPlayer (const Character *player, int realValue, float priceMultiplier)
 
static int itemIdentificationPriceForPlayer (const Character *player, float priceMultiplier)
 
static int itemBuyingPriceForPlayer (const Character *player, int realValue, float priceMultiplier)
 
static int itemSellingPriceForPlayer (const Character *player, const ItemGen &item, float priceMultiplier)
 
static int templeHealingCostForPlayer (const Character *player, float priceMultiplier)
 
static int playerMerchant (const Character *player)
 
static int applyMerchantDiscount (const Character *player, int goldAmount)
 
static int applyMerchantDiscount (const Character *player, float goldAmount)
 
static int skillLearningCostForPlayer (const Character *player, const HouseData &house)
 
static int transportCostForPlayer (const Character *player, const HouseData &house)
 
static int tavernRoomCostForPlayer (const Character *player, const HouseData &house)
 
static int tavernFoodCostForPlayer (const Character *player, const HouseData &house)
 
static int trainingCostForPlayer (const Character *player, const HouseData &house)
 

Member Function Documentation

◆ applyMerchantDiscount() [1/2]

int PriceCalculator::applyMerchantDiscount ( const Character player,
float  goldAmount 
)
static
Parameters
playerCharacter to calculate discount for.
goldAmountFull price before applying the merchant skill.
Returns
Price after applying the merchant skill.

◆ applyMerchantDiscount() [2/2]

int PriceCalculator::applyMerchantDiscount ( const Character player,
int  goldAmount 
)
static
Parameters
playerCharacter to calculate discount for.
goldAmountFull price before applying the merchant skill.
Returns
Price after applying the merchant skill.

◆ baseItemBuyingPrice()

int PriceCalculator::baseItemBuyingPrice ( int  realValue,
float  priceMultiplier 
)
static

Originally was a method of class Character.

Parameters
realValueItem base value.
priceMultiplierGeneral shop price multiplier.
Returns
Base item buying price (before applying merchant skill).
Original binary offset:
0x4B8233

◆ baseItemIdentifyPrice()

int PriceCalculator::baseItemIdentifyPrice ( float  priceMultiplier)
static

Originally was a method of class Character.

Parameters
priceMultiplierGeneral shop price multiplier.
Returns
Base item identify price (before applying merchant skill).
Original binary offset:
0x4B824B

◆ baseItemRepairPrice()

int PriceCalculator::baseItemRepairPrice ( int  realValue,
float  priceMultiplier 
)
static

Originally was a method of class Character.

Parameters
realValueItem base value.
priceMultiplierGeneral shop price multiplier.
Returns
Base item repair price (before applying merchant skill).
Original binary offset:
0x4B8265

◆ baseItemSellingPrice()

int PriceCalculator::baseItemSellingPrice ( int  realValue,
float  priceMultiplier 
)
static

Originally was a method of class Character.

Parameters
realValueItem base value.
priceMultiplierGeneral shop price multiplier.
Returns
Base item selling price (before applying merchant skill).
Original binary offset:
0x4B8213

◆ itemBuyingPriceForPlayer()

int PriceCalculator::itemBuyingPriceForPlayer ( const Character player,
int  realValue,
float  priceMultiplier 
)
static

Originally was a method of class Character.

Parameters
playerCharacter buying the item.
realValueReal item value.
priceMultiplierGeneral shop price multiplier.
Returns
Price that player has to pay for buying an item.
Original binary offset:
0x4B8142

◆ itemIdentificationPriceForPlayer()

int PriceCalculator::itemIdentificationPriceForPlayer ( const Character player,
float  priceMultiplier 
)
static

Originally was a method of class Character.

Parameters
playerCharacter trying to identify the item.
priceMultiplierGeneral shop price multiplier.
Returns
Price that player has to pay for identifying an item.
Original binary offset:
0x4B8179

◆ itemRepairPriceForPlayer()

int PriceCalculator::itemRepairPriceForPlayer ( const Character player,
int  realValue,
float  priceMultiplier 
)
static

Originally was a method of class Character.

Parameters
playerCharacter trying to repair item.
realValueItem base value.
priceMultiplierGeneral shop price multiplier.
Returns
Price that player has to pay for repairing an item.
Original binary offset:
0x4B81C3

◆ itemSellingPriceForPlayer()

int PriceCalculator::itemSellingPriceForPlayer ( const Character player,
const ItemGen item,
float  priceMultiplier 
)
static

Originally was a method of class Character.

Parameters
playerCharacter selling the item.
itemItem being sold.
priceMultiplierGeneral shop price multiplier.
Returns
Price that player will get for selling an item.
Original binary offset:
0x4B8102

◆ playerMerchant()

int PriceCalculator::playerMerchant ( const Character player)
static

Originally was a method of class Character.

Parameters
playerCharacter to calculate value for.
Returns
Merchant modifier for the character, a number in range (-inf, 100].
Original binary offset:
0x4911F3

◆ skillLearningCostForPlayer()

int PriceCalculator::skillLearningCostForPlayer ( const Character player,
const HouseData house 
)
static
Parameters
playerCharacter to calculate cost for.
houseHouse in which player tries to learn skill.
Returns
Skill learning cost for character.

◆ tavernFoodCostForPlayer()

int PriceCalculator::tavernFoodCostForPlayer ( const Character player,
const HouseData house 
)
static
Parameters
playerCharacter to calculate cost for.
houseTavern in which player tries to buy food.
Returns
Tavern food cost for character.

◆ tavernRoomCostForPlayer()

int PriceCalculator::tavernRoomCostForPlayer ( const Character player,
const HouseData house 
)
static
Parameters
playerCharacter to calculate cost for.
houseTavern in which player tries to buy room.
Returns
Tavern room cost for character.

◆ templeHealingCostForPlayer()

int PriceCalculator::templeHealingCostForPlayer ( const Character player,
float  priceMultiplier 
)
static

Originally was a method of class Character.

Parameters
playerCharacter being healed.
priceMultiplierGeneral shop price multiplier.
Returns
Price that player has to pay for healing in a temple.
Original binary offset:
0x4B807C

◆ trainingCostForPlayer()

int PriceCalculator::trainingCostForPlayer ( const Character player,
const HouseData house 
)
static
Parameters
playerCharacter to calculate cost for.
houseTraining hall in which player tries to train.
Returns
Training cost for character.

◆ transportCostForPlayer()

int PriceCalculator::transportCostForPlayer ( const Character player,
const HouseData house 
)
static
Parameters
playerCharacter to calculate cost for.
houseStable/boat building in which player travels.
Returns
Transport (stable/boat) cost for character.

The documentation for this class was generated from the following files: