public CEItem(ItemSlots slot, int id, int?stack = null, ItemPrefixes prefix = ItemPrefixes.None) { Slot = (int)slot; ItemID = id; if (stack != null) { Stack = (int)stack; } else { Stack = TShock.Utils.GetItemById(id).maxStack; } Prefix = (byte)prefix; }
public static string ItemPrefix(Random?r = null) => ItemPrefixes.Random(r);