Esempio n. 1
0
        bool IsSameClassesItem(TF2ItemSchema item1, TF2ItemSchema item2)
        {
            foreach (var @class in item1.UsedByClasses)
                if (!item2.UsedByClasses.Contains(@class))
                    return false;

            return true;
        }
Esempio n. 2
0
        bool ShouldCraftItem(TF2ItemSchema item, TF2CraftClass craftClass)
        {
            if (item.CraftClass != craftClass)
                return false;

            if (item.Quality != TF2ItemQuality.Unique)
                return false;

            if (item.Slot == TF2WeaponSlot.Misc)
                return false;

            if (item.Slot == TF2WeaponSlot.Action)
                return false;

            if (item.Slot == TF2WeaponSlot.Head)
                return false;

            return true;
        }
Esempio n. 3
0
        bool IsSameClassesAssets(TF2ItemSchema item, List<TF2BackpackItem> assets)
        {
            foreach (var asset in assets)
            {
                var item2 = GetItemFromDefIndex(asset.DefIndex);
                if (!IsSameClassesItem(item, item2))
                    return false;
            }

            return true;
        }