public ItemPriceInfo(Item item, Quality quality = Quality.Unique)
        {
            Item = item;
            Quality = quality;
            Killstreak = KillstreakType.None;
            _skin = Item?.GetSkin();

            Craftable = true;
            Tradable = true;
        }
        public ItemPriceInfo(ItemInstance inst)
        {
            Item = inst.Item;
            Quality = inst.Quality;
            Killstreak = inst.GetKillstreak();
            Unusual = inst.GetUnusual();
            CrateSeries = inst.GetCrateSeries();
            _skin = Item.GetSkin();
            SkinWear = inst.GetSkinWear();

            Craftable = inst.Craftable;
            Tradable = inst.Tradable;
            Australium = inst.IsAustralium();
        }
Пример #3
0
        public static Price? GetSkinPrice(Skin skin, SkinWear wear)
        {
            string hash = skin.GetMarketHash(wear);
            MarketPricing pricing = DataManager.MarketPrices.GetPricing(hash);

            if (pricing != null)
            {
                return pricing.Price;
            }
            else
            {
                VersatileIO.Warning("  No market pricing found for {0} {1}.", wear.ToReadableString(), skin.Name);
                return null;
            }
        }
Пример #4
0
        public static Dictionary<SkinWear, Price> GetSkinPrices(Skin skin)
        {
            Dictionary<SkinWear, Price> results = new Dictionary<SkinWear, Price>();

            for (SkinWear w = SkinWear.FactoryNew; w <= SkinWear.BattleScarred; w++)
            {
                Price? price = GetSkinPrice(skin, w);

                if (price != null)
                {
                    results.Add(w, price.Value);
                }
            }

            return results;
        }
 public CheckedPrice(Skin skin, SkinWear wear, Price price)
 {
     Skin = skin;
     SkinWear = wear;
     _price = price;
 }