示例#1
0
        private bool LoadDefinitions()
        {
            var ids = inventory.GetItemDefinitionIDs();

            if (ids == null)
            {
                return(false);
            }

            Definitions = ids.Select(x => CreateDefinition(x)).ToArray();

            foreach (var def in Definitions)
            {
                def.Link(Definitions);
            }

            return(true);
        }
示例#2
0
        internal void FetchItemDefinitions()
        {
            //
            // Make sure item definitions are loaded, because we're going to be using them.
            //

            var ids = inventory.GetItemDefinitionIDs();

            if (ids == null)
            {
                return;
            }

            Definitions = ids.Select(x => CreateDefinition(x)).ToArray();

            foreach (var def in Definitions)
            {
                def.Link(Definitions);
            }
        }