Beispiel #1
0
        public int OnCraft(int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue)
        {
            Quality = (CoffeeQuality)quality;
            if (Quality == CoffeeQuality.Exceptional)
            {
                Crafter = from;
            }
            Item[] items = from.Backpack.FindItemsByType(typeof(BreweryLabelMaker));
            if (items.Length != 0)
            {
                foreach (BreweryLabelMaker lm in items)
                {
                    if (lm.BreweryName != null)
                    {
                        this.Name = lm.BreweryName;
                        break;
                    }
                }
            }

            Type resourceType = typeRes;

            if (resourceType == null)
            {
                resourceType = craftItem.Resources.GetAt(0).ItemType;
            }
            Variety = BrewingResources.GetFromType(resourceType);
            CraftContext context = craftSystem.GetContext(from);

            Hue = 0;
            return(quality);
        }
Beispiel #2
0
        public int OnCraft(int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue)
        {
            Held = 75;

            Quality = (CiderQuality)quality;

            if (makersMark)
            {
                Crafter = from;
            }

            Item[] items = from.Backpack.FindItemsByType(typeof(BreweryLabelMaker));

            if (items.Length != 0)
            {
                foreach (BreweryLabelMaker lm in items)
                {
                    if (lm.BreweryName != null)
                    {
                        this.Name = lm.BreweryName;
                        break;
                    }
                }
            }

            Type resourceType = typeRes;

            if (resourceType == null)
            {
                resourceType = craftItem.Ressources.GetAt(0).ItemType;
            }

            Variety = BrewingResources.GetFromType(resourceType);

            CraftContext context = craftSystem.GetContext(from);

            Hue = 0;

            BottleDuration = 7.0;
            AllowBottling  = false;
            m_Start        = DateTime.Now;

            return(quality);
        }