public Item Reconstruct()
        {
            SmallBOD bod = null;

            if (m_DeedType == BODType.Smith)
            {
                bod = new SmallSmithBOD(m_AmountCur, m_AmountMax, m_ItemType, m_Number, m_Graphic, m_RequireExceptional, m_Material);
            }
            else if (m_DeedType == BODType.Tailor)
            {
                bod = new SmallTailorBOD(m_AmountCur, m_AmountMax, m_ItemType, m_Number, m_Graphic, m_RequireExceptional, m_Material);
            }
            else if (m_DeedType == BODType.Inscription)
            {
                bod = new SmallInscriptionBOD(m_AmountCur, m_AmountMax, m_ItemType, m_Number, m_Graphic, m_RequireExceptional, m_Material, m_Hue);
            }
            else if (m_DeedType == BODType.Alchemy)
            {
                bod = new SmallAlchemyBOD(m_AmountCur, m_AmountMax, m_ItemType, m_Number, m_Graphic, m_RequireExceptional, m_Material, m_Hue);
            }
            else if (m_DeedType == BODType.Carpentry)
            {
                bod = new SmallCarpentryBOD(m_AmountCur, m_AmountMax, m_ItemType, m_Number, m_Graphic, m_RequireExceptional, m_Material, m_Hue);
            }
            else if (m_DeedType == BODType.Fletching)
            {
                bod = new SmallFletchingBOD(m_AmountCur, m_AmountMax, m_ItemType, m_Number, m_Graphic, m_RequireExceptional, m_Material, m_Hue);
            }
            else if (m_DeedType == BODType.Cooking)
            {
                bod = new SmallCookingBOD(m_AmountCur, m_AmountMax, m_ItemType, m_Number, m_Graphic, m_RequireExceptional, m_Material, m_Hue);
            }

            return(bod);
        }
示例#2
0
        public Item Reconstruct()
        {
            SmallBOD bod = null;

            switch (m_DeedType)
            {
            case BODType.Smith: bod = new SmallSmithBOD(m_AmountCur, m_AmountMax, m_ItemType, m_Number, m_Graphic, m_RequireExceptional, m_Material, m_Hue); break;

            case BODType.Tailor: bod = new SmallTailorBOD(m_AmountCur, m_AmountMax, m_ItemType, m_Number, m_Graphic, m_RequireExceptional, m_Material, m_Hue); break;

            case BODType.Inscription: bod = new SmallInscriptionBOD(m_AmountCur, m_AmountMax, m_ItemType, m_Number, m_Graphic, m_RequireExceptional, m_Material, m_Hue); break;

            case BODType.Alchemy: bod = new SmallAlchemyBOD(m_AmountCur, m_AmountMax, m_ItemType, m_Number, m_Graphic, m_RequireExceptional, m_Material, m_Hue); break;

            case BODType.Carpentry: bod = new SmallCarpentryBOD(m_AmountCur, m_AmountMax, m_ItemType, m_Number, m_Graphic, m_RequireExceptional, m_Material, m_Hue); break;

            case BODType.Fletching: bod = new SmallFletchingBOD(m_AmountCur, m_AmountMax, m_ItemType, m_Number, m_Graphic, m_RequireExceptional, m_Material, m_Hue); break;

            case BODType.Tinkering: bod = new SmallTinkerBOD(m_AmountCur, m_AmountMax, m_ItemType, m_Number, m_Graphic, m_RequireExceptional, m_Material, m_Hue, m_GemType); break;

            case BODType.Cooking: bod = new SmallCookingBOD(m_AmountCur, m_AmountMax, m_ItemType, m_Number, m_Graphic, m_RequireExceptional, m_Material, m_Hue); break;
            }

            return(bod);
        }
示例#3
0
        public static Item CreateBulkOrder(Mobile m, BODType type, bool fromContextMenu)
        {
            PlayerMobile pm = m as PlayerMobile;

            if (pm == null)
            {
                return(null);
            }

            if (pm.AccessLevel > AccessLevel.Player || fromContextMenu || 0.2 > Utility.RandomDouble())
            {
                SkillName sk         = GetSkillForBOD(type);
                double    theirSkill = pm.Skills[sk].Base;
                bool      doLarge    = theirSkill >= 70.1 && ((theirSkill - 40.0) / 300.0) > Utility.RandomDouble();

                switch (type)
                {
                case BODType.Smith:
                    if (doLarge)
                    {
                        return(new LargeSmithBOD());
                    }
                    else
                    {
                        return(SmallSmithBOD.CreateRandomFor(pm));
                    }

                case BODType.Tailor: if (doLarge)
                    {
                        return(new LargeTailorBOD());
                    }
                    else
                    {
                        return(SmallTailorBOD.CreateRandomFor(pm));
                    }

                case BODType.Alchemy:
                    if (doLarge)
                    {
                        return(new LargeAlchemyBOD());
                    }
                    else
                    {
                        return(SmallAlchemyBOD.CreateRandomFor(pm));
                    }

                case BODType.Inscription:
                    if (doLarge)
                    {
                        return(new LargeInscriptionBOD());
                    }
                    else
                    {
                        return(SmallInscriptionBOD.CreateRandomFor(pm));
                    }

                case BODType.Tinkering:
                    if (doLarge)
                    {
                        return(new LargeTinkerBOD());
                    }
                    else
                    {
                        return(SmallTinkerBOD.CreateRandomFor(pm));
                    }

                case BODType.Cooking:
                    if (doLarge)
                    {
                        return(new LargeCookingBOD());
                    }
                    else
                    {
                        return(SmallCookingBOD.CreateRandomFor(pm));
                    }

                case BODType.Fletching:
                    if (doLarge)
                    {
                        return(new LargeFletchingBOD());
                    }
                    else
                    {
                        return(SmallFletchingBOD.CreateRandomFor(pm));
                    }

                case BODType.Carpentry:
                    if (doLarge)
                    {
                        return(new LargeCarpentryBOD());
                    }
                    else
                    {
                        return(SmallCarpentryBOD.CreateRandomFor(pm));
                    }
                }
            }

            return(null);
        }