Ejemplo n.º 1
0
        public void RegisterCustomItem(CustomItemInformation info)
        {
            if (info.ID >= 0 && info.ID <= HighestItem)
            {
                throw new Exception("A plugin tried to register a CustomItem with an ID of a BaseGame Item");
            }

            if (customItems.Select(x => x.ID).Contains(info.ID))
            {
                throw new Exception("A plugin tried to register a CustomItem with an ID which was already registered");
            }

            customItems.Add(info);
        }
Ejemplo n.º 2
0
        public void RegisterCustomItem(CustomItemInformation info)
        {
            if (info.ID >= 0 && info.ID <= HighestItem)
            {
                throw new SynapseItemAlreadyRegisteredException("A Item was registered with an ID of a Vanilla Item", info);
            }

            if (customItems.Select(x => x.ID).Contains(info.ID))
            {
                throw new SynapseItemAlreadyRegisteredException("A Item was registered with an already registered Item ID", info);
            }

            customItems.Add(info);
        }