Пример #1
0
        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;
        }
Пример #2
0
 public static string ItemPrefix(Random?r = null) => ItemPrefixes.Random(r);