Пример #1
0
        public static ItemDataBlock[] ItemsLoaded(System.Collections.Generic.List <ItemDataBlock> items, Dictionary <string, int> stringDB, Dictionary <int, int> idDB)
        {
            ItemsBlocks blocks = new ItemsBlocks(items);

            if (OnItemsLoaded != null)
            {
                OnItemsLoaded(blocks);
            }
            int num = 0;

            foreach (ItemDataBlock block in blocks)
            {
                stringDB.Add(block.name, num);
                idDB.Add(block.uniqueID, num);
                num++;
            }
            Magma.Server.GetServer().Items = blocks;
            return(blocks.ToArray());
        }
Пример #2
0
        public static ItemDataBlock[] ItemsLoaded(List <ItemDataBlock> items, Dictionary <string, int> stringDB, Dictionary <int, int> idDB)
        {
            ItemsBlocks itemsBlocks = new ItemsBlocks(items);

            if (Hooks.OnItemsLoaded != null)
            {
                Hooks.OnItemsLoaded(itemsBlocks);
            }
            int num = 0;

            foreach (ItemDataBlock current in itemsBlocks)
            {
                stringDB.Add(current.name, num);
                idDB.Add(current.uniqueID, num);
                num++;
            }
            Server.GetServer().Items = itemsBlocks;
            return(itemsBlocks.ToArray());
        }