TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ GetItemExpectedPrice()

void Terraria.Player.GetItemExpectedPrice ( Item item,
out long calcForSelling,
out long calcForBuying )
inline

Definition at line 34077 of file Player.cs.

34078 {
34079 if (item.shopSpecialCurrency != -1)
34080 {
34082 return;
34083 }
34084 int storeValue = item.GetStoreValue();
34088 {
34089 if (!item.buyOnce)
34090 {
34091 calcForBuying = (int)((float)calcForBuying * 0.8f);
34092 }
34093 if (item.isAShopItem)
34094 {
34096 }
34097 }
34098 if (item.buyOnce)
34099 {
34102 }
34103 else
34104 {
34107 }
34108 if (item.buyOnce)
34109 {
34110 calcForBuying /= 5L;
34111 if (storeValue != 0 && calcForBuying < 1)
34112 {
34113 calcForBuying = 1L;
34114 }
34115 }
34116 }
static void GetPrices(Item item, out long calcForSelling, out long calcForBuying)
ShoppingSettings currentShoppingSettings
Definition Player.cs:3019
bool discountAvailable
Definition Player.cs:2795

References Terraria.Item.buyOnce, Terraria.Player.currentShoppingSettings, Terraria.Player.discountAvailable, Terraria.GameContent.UI.CustomCurrencyManager.GetPrices(), Terraria.Item.GetStoreValue(), Terraria.Item.isAShopItem, Terraria.ShoppingSettings.PriceAdjustment, and Terraria.Item.shopSpecialCurrency.

Referenced by Terraria.Player.SellItem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: