public void OnItemsLoaded(ItemsBlocks items)
 {
     this.Invoke("On_ItemsLoaded", new object[]
     {
         items
     });
 }
示例#2
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());
        }
示例#3
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());
        }