Пример #1
0
        /// <summary>
        /// Returns a MyInventory.Item object.
        /// </summary>
        /// <param name="uidkey">Name UUID Key</param>
        /// <param name="invtype">INV_TYPE object</param>
        /// <returns></returns>
        public static Object GetInvObj(string uidkey, OrderedDictionary<String, int> objectdict, out INV_TYPE invtype)
        {
            invtype = MIUtils.INV_TYPE.NULL;
            Object objinfo = new Object();
            int iNodeindex = 0;
            objectdict.TryGetValue(uidkey, out iNodeindex);
            if (iNodeindex != -1)
            {
                MIUtils.INV_TYPE nodeObjtype;
                objinfo = MIUtils.GetMyInventoryObject(iNodeindex, out nodeObjtype);
                if (nodeObjtype == MIUtils.INV_TYPE.ITEM)
                {
                    invtype = INV_TYPE.ITEM;
                }
                else
                    invtype = INV_TYPE.FOLDER;
            }

            return objinfo;
        }