public override Item Construct() { Item item; int index = Utility.Random(m_Types.Length); if (m_Types[index] == typeof(BeverageBottle)) { item = new BeverageBottle(m_Content); } else if (m_Types[index] == typeof(Jug)) { item = new Jug(m_Content); } else { item = base.Construct(); if (item is BaseBeverage) { BaseBeverage bev = (BaseBeverage)item; bev.Content = m_Content; bev.Quantity = bev.MaxQuantity; } } return(item); }
private void MutateFermentable( Mobile from, Item item ) { if ( item is SackFlour ) { item.Delete(); for ( int i = 0; i < 5; i++ ) { Item beverage = new BeverageBottle( BeverageType.Ale ); DropItem( beverage ); } from.SendMessage( "You add the materials to the barrel, and retrieve some of the older stock." ); } else { from.SendMessage( "That cannot be used to make anything." ); } }
private void MutateFermentable(Mobile from, Item item) { if (item is Grapes) { item.Delete(); for (int i = 0; i < ((Grapes)item).Amount; i++) { Item beverage = new BeverageBottle(BeverageType.Wine); // 0 == ale DropItem(beverage); } from.SendMessage("You add the materials to the barrel, and retrieve some of the older stock."); } else { from.SendMessage("That cannot be used to make anything."); } }
private void MutateFermentable(Mobile from, Item item) { if (item is SackFlour) { item.Delete(); for (int i = 0; i < 5; i++) { Item beverage = new BeverageBottle(BeverageType.Liquor); DropItem(beverage); } from.SendMessage("You add the materials to the barrel, and retrieve some of the older stock."); } else { from.SendMessage("That cannot be used to make anything."); } }
public override Item Construct() { Item item; int index = Utility.Random(this.m_Types.Length); if (this.m_Types[index] == typeof(BeverageBottle)) { item = new BeverageBottle(this.m_Content); } else if (this.m_Types[index] == typeof(Jug)) { item = new Jug(this.m_Content); } else { item = base.Construct(); if (item is BaseBeverage) { BaseBeverage bev = (BaseBeverage)item; bev.Content = this.m_Content; bev.Quantity = bev.MaxQuantity; } } return item; }