public int OnCraft(int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue) { Held = 75; Quality = (WineQuality)quality; if (Quality == WineQuality.Exceptional) { Crafter = from; } Item[] items = from.Backpack.FindItemsByType(typeof(VinyardLabelMaker)); if (items.Length != 0) { foreach (VinyardLabelMaker lm in items) { if (lm.VinyardName != null) { this.Name = lm.VinyardName; break; } } } Type resourceType = typeRes; if (resourceType == null) { resourceType = craftItem.Resources.GetAt(0).ItemType; } Variety = WinemakingResources.GetFromType(resourceType); CraftContext context = craftSystem.GetContext(from); Hue = 0; BottleDuration = 7.0; AllowBottling = false; m_Start = DateTime.UtcNow; return(quality); }
public int OnCraft( int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue ) { Quality = (WineQuality)quality; if ( makersMark ) Crafter = from; Item[] items = from.Backpack.FindItemsByType( typeof( VinyardLabelMaker ) ); if ( items.Length != 0 ) { foreach( VinyardLabelMaker lm in items ) { if (lm.VinyardName != null) { this.Name = lm.VinyardName; break; } } } Type resourceType = typeRes; if ( resourceType == null ) resourceType = craftItem.Resources.GetAt( 0 ).ItemType; Variety = WinemakingResources.GetFromType( resourceType ); CraftContext context = craftSystem.GetContext( from ); Hue = 0; return quality; }