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

◆ GetItemExpectedPrice()

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

Definition at line 33543 of file Player.cs.

33544 {
33545 if (item.shopSpecialCurrency != -1)
33546 {
33548 return;
33549 }
33550 int storeValue = item.GetStoreValue();
33554 {
33555 if (!item.buyOnce)
33556 {
33557 calcForBuying = (int)((float)calcForBuying * 0.8f);
33558 }
33559 if (item.isAShopItem)
33560 {
33562 }
33563 }
33564 if (item.buyOnce)
33565 {
33568 }
33569 else
33570 {
33573 }
33574 if (item.buyOnce)
33575 {
33576 calcForBuying /= 5L;
33577 if (storeValue != 0 && calcForBuying < 1)
33578 {
33579 calcForBuying = 1L;
33580 }
33581 }
33582 }
static decimal Round(decimal d)
Definition Math.cs:1096
static void GetPrices(Item item, out long calcForSelling, out long calcForBuying)
ShoppingSettings currentShoppingSettings
Definition Player.cs:2473
bool discountAvailable
Definition Player.cs:2213

References Terraria.GameContent.UI.CustomCurrencyManager.GetPrices(), System.item, System.L, and System.Math.Round().

Referenced by Terraria.UI.ItemSlot.HandleShopSlot().