Exemplo n.º 1
0
        public static bool CanUseMaterial(IBOD bod)
        {
            switch (bod.BODType)
            {
            default: return(true);

            case BODType.Alchemy:
            case BODType.Inscription:
            case BODType.Cooking: return(false);

            case BODType.Tinkering:
            case BODType.Fletching: return(!IsInExceptionalExcludeList(bod));

            case BODType.Tailor: return(BGTClassifier.Classify(BODType.Tailor, GetTypeFromBOD(bod)) == BulkGenericType.Leather);
            }
        }
Exemplo n.º 2
0
        public bool CheckFilter(BulkMaterialType mat, int amountMax, bool isLarge, bool reqExc, BODType deedType, Type itemType)
        {
            BOBFilter f = (m_From.UseOwnFilter ? m_From.BOBFilter : m_Book.Filter);

            if (f.IsDefault)
            {
                return(true);
            }

            if (f.Quality == 1 && reqExc)
            {
                return(false);
            }
            else if (f.Quality == 2 && !reqExc)
            {
                return(false);
            }

            if (f.Quantity == 1 && amountMax != 10)
            {
                return(false);
            }
            else if (f.Quantity == 2 && amountMax != 15)
            {
                return(false);
            }
            else if (f.Quantity == 3 && amountMax != 20)
            {
                return(false);
            }

            if (f.Type == 1 && isLarge)
            {
                return(false);
            }
            else if (f.Type == 2 && !isLarge)
            {
                return(false);
            }

            switch (f.Material)
            {
            default:
            case  0: return(true);

            case  1: return(deedType == BODType.Smith);

            case  2: return(deedType == BODType.Tailor);

            case  3: return(mat == BulkMaterialType.None && BGTClassifier.Classify(deedType, itemType) == BulkGenericType.Iron);

            case  4: return(mat == BulkMaterialType.DullCopper);

            case  5: return(mat == BulkMaterialType.ShadowIron);

            case  6: return(mat == BulkMaterialType.Copper);

            case  7: return(mat == BulkMaterialType.Bronze);

            case  8: return(mat == BulkMaterialType.Gold);

            case  9: return(mat == BulkMaterialType.Agapite);

            case 10: return(mat == BulkMaterialType.Verite);

            case 11: return(mat == BulkMaterialType.Valorite);

            case 12: return(mat == BulkMaterialType.None && BGTClassifier.Classify(deedType, itemType) == BulkGenericType.Cloth);

            case 13: return(mat == BulkMaterialType.None && BGTClassifier.Classify(deedType, itemType) == BulkGenericType.Leather);

            case 14: return(mat == BulkMaterialType.Spined);

            case 15: return(mat == BulkMaterialType.Horned);

            case 16: return(mat == BulkMaterialType.Barbed);
            }
        }
Exemplo n.º 3
0
        public bool CheckFilter(BulkMaterialType mat, int amountMax, bool isLarge, bool reqExc, BODType deedType, Type itemType)
        {
            BOBFilter f = (this.m_From.UseOwnFilter ? this.m_From.BOBFilter : this.m_Book.Filter);

            if (f.IsDefault)
            {
                return(true);
            }

            if (f.Quality == 1 && reqExc)
            {
                return(false);
            }
            else if (f.Quality == 2 && !reqExc)
            {
                return(false);
            }

            if (f.Quantity == 1 && amountMax != 10)
            {
                return(false);
            }
            else if (f.Quantity == 2 && amountMax != 15)
            {
                return(false);
            }
            else if (f.Quantity == 3 && amountMax != 20)
            {
                return(false);
            }

            if (f.Type == 1 && isLarge)
            {
                return(false);
            }
            else if (f.Type == 2 && !isLarge)
            {
                return(false);
            }

            switch (f.Material)
            {
            default:
            case 0:
                return(true);

            case 1:
                return(deedType == BODType.Smith);

            case 2:
                return(deedType == BODType.Tailor);

            case 3:
                return(mat == BulkMaterialType.None && BGTClassifier.Classify(deedType, itemType) == BulkGenericType.Iron);

            case 4:
                return(mat == BulkMaterialType.DullCopper);

            case 5:
                return(mat == BulkMaterialType.ShadowIron);

            case 6:
                return(mat == BulkMaterialType.Copper);

            case 7:
                return(mat == BulkMaterialType.Bronze);

            case 8:
                return(mat == BulkMaterialType.Gold);

            case 9:
                return(mat == BulkMaterialType.Agapite);

            case 10:
                return(mat == BulkMaterialType.Verite);

            case 11:
                return(mat == BulkMaterialType.Valorite);

            //daat9 OWLTR start - custom resources
            case 12: return(mat == BulkMaterialType.Blaze);

            case 13: return(mat == BulkMaterialType.Ice);

            case 14: return(mat == BulkMaterialType.Toxic);

            case 15: return(mat == BulkMaterialType.Electrum);

            case 16: return(mat == BulkMaterialType.Platinum);

            case 17: return(mat == BulkMaterialType.None && BGTClassifier.Classify(deedType, itemType) == BulkGenericType.Cloth);

            case 18: return(mat == BulkMaterialType.None && BGTClassifier.Classify(deedType, itemType) == BulkGenericType.Leather);

            case 19: return(mat == BulkMaterialType.Spined);

            case 20: return(mat == BulkMaterialType.Horned);

            case 21: return(mat == BulkMaterialType.Barbed);

            case 22: return(mat == BulkMaterialType.Polar);

            case 23: return(mat == BulkMaterialType.Synthetic);

            case 24: return(mat == BulkMaterialType.BlazeL);

            case 25: return(mat == BulkMaterialType.Daemonic);

            case 26: return(mat == BulkMaterialType.Shadow);

            case 27: return(mat == BulkMaterialType.Frost);

            case 28: return(mat == BulkMaterialType.Ethereal);
                //daat9 OWLTR end - custom resources
            }
        }
Exemplo n.º 4
0
        public bool CheckFilter(BulkMaterialType mat, int amountMax, bool isLarge, bool reqExc, BODType deedType,
                                Type itemType)
        {
            BOBFilter f = m_From.UseOwnFilter ? m_From.BOBFilter : m_Book.Filter;

            if (f.IsDefault)
            {
                return(true);
            }

            if (f.Quality == 1 && reqExc)
            {
                return(false);
            }
            if (f.Quality == 2 && !reqExc)
            {
                return(false);
            }

            if (f.Quantity == 1 && amountMax != 10)
            {
                return(false);
            }
            if (f.Quantity == 2 && amountMax != 15)
            {
                return(false);
            }
            if (f.Quantity == 3 && amountMax != 20)
            {
                return(false);
            }

            if (f.Type == 1 && isLarge)
            {
                return(false);
            }
            if (f.Type == 2 && !isLarge)
            {
                return(false);
            }

            return(f.Material switch
            {
                1 => deedType == BODType.Smith,
                2 => deedType == BODType.Tailor,
                3 => mat == BulkMaterialType.None && BGTClassifier.Classify(deedType, itemType) == BulkGenericType.Iron,
                4 => mat == BulkMaterialType.DullCopper,
                5 => mat == BulkMaterialType.ShadowIron,
                6 => mat == BulkMaterialType.Copper,
                7 => mat == BulkMaterialType.Bronze,
                8 => mat == BulkMaterialType.Gold,
                9 => mat == BulkMaterialType.Agapite,
                10 => mat == BulkMaterialType.Verite,
                11 => mat == BulkMaterialType.Valorite,
                12 => mat == BulkMaterialType.None && BGTClassifier.Classify(deedType, itemType) == BulkGenericType.Cloth,
                13 => mat == BulkMaterialType.None && BGTClassifier.Classify(deedType, itemType) == BulkGenericType.Leather,
                14 => mat == BulkMaterialType.Spined,
                15 => mat == BulkMaterialType.Horned,
                16 => mat == BulkMaterialType.Barbed,
                _ => true
            });
Exemplo n.º 5
0
        public bool CheckFilter(BulkMaterialType mat, int amountMax, bool isLarge, bool reqExc, BODType deedType, Type itemType)
        {
            BOBFilter f = (m_From.UseOwnFilter ? m_From.BOBFilter : m_Book.Filter);

            if (f.IsDefault)
            {
                return(true);
            }

            if (f.Quality == 1 && reqExc)
            {
                return(false);
            }
            else if (f.Quality == 2 && !reqExc)
            {
                return(false);
            }

            if (f.Quantity == 1 && amountMax != 10)
            {
                return(false);
            }
            else if (f.Quantity == 2 && amountMax != 15)
            {
                return(false);
            }
            else if (f.Quantity == 3 && amountMax != 20)
            {
                return(false);
            }

            if (f.Type == 1 && isLarge)
            {
                return(false);
            }
            else if (f.Type == 2 && !isLarge)
            {
                return(false);
            }

            switch (f.Material)
            {
            default:
            case  0: return(true);

            case 1: return(deedType == BODType.Carpenter);

            case 2: return(deedType == BODType.Fletcher);

            case 3: return(mat == BulkMaterialType.None && BGTClassifier.Classify(deedType, itemType) == BulkGenericType.RegularWood);

            case 4: return(mat == BulkMaterialType.OakWood);

            case 5: return(mat == BulkMaterialType.AshWood);

            case 6: return(mat == BulkMaterialType.YewWood);

            case 7: return(mat == BulkMaterialType.Heartwood);

            case 8: return(mat == BulkMaterialType.Bloodwood);

            case 9: return(mat == BulkMaterialType.Frostwood);

            case 10: return(mat == BulkMaterialType.Ebony);

            case 11: return(mat == BulkMaterialType.Bamboo);

            case 12: return(mat == BulkMaterialType.PurpleHeart);

            case 13: return(mat == BulkMaterialType.Redwood);

            case 14: return(mat == BulkMaterialType.Petrified);

            case 15: return(mat == BulkMaterialType.None && BGTClassifier.Classify(deedType, itemType) == BulkGenericType.RegularWood);

            case 16: return(mat == BulkMaterialType.OakWood);

            case 17: return(mat == BulkMaterialType.AshWood);

            case 18: return(mat == BulkMaterialType.YewWood);

            case 19: return(mat == BulkMaterialType.Heartwood);

            case 20: return(mat == BulkMaterialType.Bloodwood);

            case 21: return(mat == BulkMaterialType.Frostwood);

            case 22: return(mat == BulkMaterialType.Ebony);

            case 23: return(mat == BulkMaterialType.Bamboo);

            case 24: return(mat == BulkMaterialType.PurpleHeart);

            case 25: return(mat == BulkMaterialType.Redwood);

            case 26: return(mat == BulkMaterialType.Petrified);
            }
        }
Exemplo n.º 6
0
        public object GetMaterialName(BulkMaterialType mat, BODType type, Type itemType)
        {
            switch (type)
            {
            case BODType.Tinkering:
            case BODType.Smith:
            {
                if (type == BODType.Tinkering && mat == BulkMaterialType.None && BGTClassifier.Classify(type, itemType) == BulkGenericType.Wood)
                {
                    return(1079435);
                }
                else
                {
                    switch (mat)
                    {
                    case BulkMaterialType.None:
                        return(1062226);

                    case BulkMaterialType.DullCopper:
                        return(1018332);

                    case BulkMaterialType.ShadowIron:
                        return(1018333);

                    case BulkMaterialType.Copper:
                        return(1018334);

                    case BulkMaterialType.Bronze:
                        return(1018335);

                    case BulkMaterialType.Gold:
                        return(1018336);

                    case BulkMaterialType.Agapite:
                        return(1018337);

                    case BulkMaterialType.Verite:
                        return(1018338);

                    case BulkMaterialType.Valorite:
                        return(1018339);
                    }
                }

                break;
            }

            case BODType.Tailor:
            {
                switch (mat)
                {
                case BulkMaterialType.None:
                {
                    if (itemType.IsSubclassOf(typeof(BaseArmor)) || itemType.IsSubclassOf(typeof(BaseShoes)))
                    {
                        return(1062235);
                    }

                    return(1044286);
                }

                case BulkMaterialType.Spined:
                    return(1062236);

                case BulkMaterialType.Horned:
                    return(1062237);

                case BulkMaterialType.Barbed:
                    return(1062238);
                }

                break;
            }

            case BODType.Carpentry:
            case BODType.Fletching:
            {
                if (mat == BulkMaterialType.None)
                {
                    return(1079435);
                }

                switch (mat)
                {
                default:
                case BulkMaterialType.OakWood: return(1071428);

                case BulkMaterialType.AshWood: return(1071429);

                case BulkMaterialType.YewWood: return(1071430);

                case BulkMaterialType.Heartwood: return(1071432);

                case BulkMaterialType.Bloodwood: return(1071431);

                case BulkMaterialType.Frostwood: return(1071433);
                }
            }
            }

            return("");
        }
Exemplo n.º 7
0
        public bool CheckFilter(BulkMaterialType mat, int amountMax, bool isLarge, bool reqExc, BODType deedType, Type itemType)
        {
            BOBFilter f = (m_From.UseOwnFilter ? m_From.BOBFilter : m_Book.Filter);

            if (f.IsDefault)
            {
                return(true);
            }

            if (f.Quality == 1 && reqExc)
            {
                return(false);
            }
            else if (f.Quality == 2 && !reqExc)
            {
                return(false);
            }

            if (f.Quantity == 1 && amountMax != 10)
            {
                return(false);
            }
            else if (f.Quantity == 2 && amountMax != 15)
            {
                return(false);
            }
            else if (f.Quantity == 3 && amountMax != 20)
            {
                return(false);
            }

            if (f.Type == 1 && isLarge)
            {
                return(false);
            }
            else if (f.Type == 2 && !isLarge)
            {
                return(false);
            }

            if (BulkOrderSystem.NewSystemEnabled)
            {
                switch (f.Material)
                {
                default:
                case 0:
                    return(true);

                case 1:
                    return(deedType == BODType.Smith);

                case 2:
                    return(deedType == BODType.Tailor);

                case 3:
                    return(deedType == BODType.Tinkering);

                case 4:
                    return(deedType == BODType.Carpentry);

                case 5:
                    return(deedType == BODType.Fletching);

                case 6:
                    return(deedType == BODType.Alchemy);

                case 7:
                    return(deedType == BODType.Inscription);

                case 8:
                    return(deedType == BODType.Cooking);

                case 9:
                    return(mat == BulkMaterialType.None && deedType == BODType.Smith);

                case 10:
                    return(mat == BulkMaterialType.DullCopper && deedType == BODType.Smith);

                case 11:
                    return(mat == BulkMaterialType.ShadowIron && deedType == BODType.Smith);

                case 12:
                    return(mat == BulkMaterialType.Copper && deedType == BODType.Smith);

                case 13:
                    return(mat == BulkMaterialType.Bronze && deedType == BODType.Smith);

                case 14:
                    return(mat == BulkMaterialType.Gold && deedType == BODType.Smith);

                case 15:
                    return(mat == BulkMaterialType.Agapite && deedType == BODType.Smith);

                case 16:
                    return(mat == BulkMaterialType.Verite && deedType == BODType.Smith);

                case 17:
                    return(mat == BulkMaterialType.Valorite && deedType == BODType.Smith);

                case 18:
                    return(mat == BulkMaterialType.None && BGTClassifier.Classify(deedType, itemType) == BulkGenericType.Cloth);

                case 19:
                    return(mat == BulkMaterialType.None && BGTClassifier.Classify(deedType, itemType) == BulkGenericType.Leather);

                case 20:
                    return(mat == BulkMaterialType.Spined && BGTClassifier.Classify(deedType, itemType) == BulkGenericType.Leather);

                case 21:
                    return(mat == BulkMaterialType.Horned && BGTClassifier.Classify(deedType, itemType) == BulkGenericType.Leather);

                case 22:
                    return(mat == BulkMaterialType.Barbed && BGTClassifier.Classify(deedType, itemType) == BulkGenericType.Leather);

                case 23:     // Tinkering
                    return(mat == BulkMaterialType.None && deedType == BODType.Tinkering);

                case 24:
                    return(mat == BulkMaterialType.DullCopper && deedType == BODType.Tinkering);

                case 25:
                    return(mat == BulkMaterialType.ShadowIron && deedType == BODType.Tinkering);

                case 26:
                    return(mat == BulkMaterialType.Copper && deedType == BODType.Tinkering);

                case 27:
                    return(mat == BulkMaterialType.Bronze && deedType == BODType.Tinkering);

                case 28:
                    return(mat == BulkMaterialType.Gold && deedType == BODType.Tinkering);

                case 29:
                    return(mat == BulkMaterialType.Agapite && deedType == BODType.Tinkering);

                case 30:
                    return(mat == BulkMaterialType.Verite && deedType == BODType.Tinkering);

                case 31:
                    return(mat == BulkMaterialType.Valorite && deedType == BODType.Tinkering);

                case 32:     // Carpentry
                    return(mat == BulkMaterialType.None && deedType == BODType.Carpentry);

                case 33:
                    return(mat == BulkMaterialType.OakWood && deedType == BODType.Carpentry);

                case 34:
                    return(mat == BulkMaterialType.AshWood && deedType == BODType.Carpentry);

                case 35:
                    return(mat == BulkMaterialType.YewWood && deedType == BODType.Carpentry);

                case 36:
                    return(mat == BulkMaterialType.Bloodwood && deedType == BODType.Carpentry);

                case 37:
                    return(mat == BulkMaterialType.Heartwood && deedType == BODType.Carpentry);

                case 38:
                    return(mat == BulkMaterialType.Frostwood && deedType == BODType.Carpentry);

                case 39:     // Fletching
                    return(mat == BulkMaterialType.None && deedType == BODType.Fletching);

                case 40:
                    return(mat == BulkMaterialType.OakWood && deedType == BODType.Fletching);

                case 41:
                    return(mat == BulkMaterialType.AshWood && deedType == BODType.Fletching);

                case 42:
                    return(mat == BulkMaterialType.YewWood && deedType == BODType.Fletching);

                case 43:
                    return(mat == BulkMaterialType.Bloodwood && deedType == BODType.Fletching);

                case 44:
                    return(mat == BulkMaterialType.Heartwood && deedType == BODType.Fletching);

                case 45:
                    return(mat == BulkMaterialType.Frostwood && deedType == BODType.Fletching);
                }
            }
            else
            {
                switch (f.Material)
                {
                default:
                case 0: return(true);

                case 1: return(deedType == BODType.Smith);

                case 2: return(deedType == BODType.Tailor);

                case 3: return(mat == BulkMaterialType.None && BGTClassifier.Classify(deedType, itemType) == BulkGenericType.Iron);

                case 4: return(mat == BulkMaterialType.DullCopper);

                case 5: return(mat == BulkMaterialType.ShadowIron);

                case 6: return(mat == BulkMaterialType.Copper);

                case 7: return(mat == BulkMaterialType.Bronze);

                case 8: return(mat == BulkMaterialType.Gold);

                case 9: return(mat == BulkMaterialType.Agapite);

                case 10: return(mat == BulkMaterialType.Verite);

                case 11: return(mat == BulkMaterialType.Valorite);

                case 12: return(mat == BulkMaterialType.None && BGTClassifier.Classify(deedType, itemType) == BulkGenericType.Cloth);

                case 13: return(mat == BulkMaterialType.None && BGTClassifier.Classify(deedType, itemType) == BulkGenericType.Leather);

                case 14: return(mat == BulkMaterialType.Spined);

                case 15: return(mat == BulkMaterialType.Horned);

                case 16: return(mat == BulkMaterialType.Barbed);
                }
            }
        }
Exemplo n.º 8
0
        public object GetMaterialName(BulkMaterialType mat, BODType type, Type itemType)
        {
            switch (type)
            {
            case BODType.Tinkering:
            case BODType.Smith:
            {
                if (type == BODType.Tinkering && mat == BulkMaterialType.None && BGTClassifier.Classify(type, itemType) == BulkGenericType.Wood)
                {
                    return(1079435);
                }
                else
                {
                    switch (mat)
                    {
                    case BulkMaterialType.None:
                        return(1062226);

                    case BulkMaterialType.DullCopper:
                        return(1018332);

                    case BulkMaterialType.ShadowIron:
                        return(1018333);

                    case BulkMaterialType.Copper:
                        return(1018334);

                    case BulkMaterialType.Bronze:
                        return(1018335);

                    case BulkMaterialType.Gold:
                        return(1018336);

                    case BulkMaterialType.Agapite:
                        return(1018337);

                    case BulkMaterialType.Verite:
                        return(1018338);

                    case BulkMaterialType.Valorite:
                        return(1018339);

                    //daat9 OWLTR start - custom resources
                    case BulkMaterialType.Blaze:
                        return("Blaze");

                    case BulkMaterialType.Ice:
                        return("Ice");

                    case BulkMaterialType.Toxic:
                        return("Toxic");

                    case BulkMaterialType.Electrum:
                        return("Electrum");

                    case BulkMaterialType.Platinum:
                        return("Platinum");
                        //daat9 OWLTR end - custom resources
                    }
                }

                break;
            }

            case BODType.Tailor:
            {
                switch (mat)
                {
                case BulkMaterialType.None:
                {
                    if (itemType.IsSubclassOf(typeof(BaseArmor)) || itemType.IsSubclassOf(typeof(BaseShoes)))
                    {
                        return(1062235);
                    }

                    return(1044286);
                }

                case BulkMaterialType.Spined:
                    return(1062236);

                case BulkMaterialType.Horned:
                    return(1062237);

                case BulkMaterialType.Barbed:
                    return(1062238);

                //daat9 OWLTR start - custom resources
                case BulkMaterialType.Polar:
                    return("Polar");

                case BulkMaterialType.Synthetic:
                    return("Synthetic");

                case BulkMaterialType.BlazeL:
                    return("Blaze");

                case BulkMaterialType.Daemonic:
                    return("Daemonic");

                case BulkMaterialType.Shadow:
                    return("Shadow");

                case BulkMaterialType.Frost:
                    return("Frost");

                case BulkMaterialType.Ethereal:
                    return("Ethereal");
                    //daat9 OWLTR end - custom resources
                }

                break;
            }

            case BODType.Carpentry:
            case BODType.Fletching:
            {
                if (mat == BulkMaterialType.None)
                {
                    return(1079435);
                }

                switch (mat)
                {
                default:
                case BulkMaterialType.OakWood: return(1071428);

                case BulkMaterialType.AshWood: return(1071429);

                case BulkMaterialType.YewWood: return(1071430);

                case BulkMaterialType.Heartwood: return(1071432);

                case BulkMaterialType.Bloodwood: return(1071431);

                case BulkMaterialType.Frostwood: return(1071433);
                }
            }
            }

            return("");
        }