• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# InventoryItemBase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中InventoryItemBase的典型用法代码示例。如果您正苦于以下问题:C# InventoryItemBase类的具体用法?C# InventoryItemBase怎么用?C# InventoryItemBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



InventoryItemBase类属于命名空间,在下文中一共展示了InventoryItemBase类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ShowDialog

 public virtual void ShowDialog(string title, string description, string yes, string no, int minValue, int maxValue, InventoryItemBase item, ItemBuySellDialogAction action, VendorTriggerer vendor, IntValDialogCallback yesCallback, IntValDialogCallback noCallback)
 {
     // Don't call base class going directly to this.ShowDialog()
     inventoryItem = item;
     this.action = action;
     this.vendor = vendor;
     ShowDialog(string.Format(string.Format(title, item.name, item.description)), string.Format(description, item.name, item.description), yes, no, minValue, maxValue, yesCallback, noCallback);
 }
开发者ID:L4w3s,项目名称:DOOM-Inspired-Dungon-Crawler,代码行数:8,代码来源:ItemBuySellDialog.cs


示例2: OnBoughtItemBackFromVendor

 public void OnBoughtItemBackFromVendor(InventoryItemBase item, uint amount, VendorTriggerer vendor)
 {
     if (onBoughtItemBackFromVendor.Count > 0)
     {
         RunEvents(onBoughtItemBackFromVendor,
             new plyEventArg("item", item),
             new plyEventArg("itemID", (int)item.ID),
             new plyEventArg("amount", (int)amount),
             new plyEventArg("vendor", vendor));
     }
 }
开发者ID:predominant,项目名称:Treasure_Chest,代码行数:11,代码来源:VendorEventHandler.cs


示例3: CharacterOnUnEquippedItem

 public void CharacterOnUnEquippedItem(InventoryItemBase item, uint itemID, uint slot, uint amount)
 {
     if (onUnEquippedItemEvents.Count > 0)
     {
         RunEvents(onUnEquippedItemEvents,
             new plyEventArg("item", item),
             new plyEventArg("itemID", (int)itemID),
             new plyEventArg("slot", (int)slot),
             new plyEventArg("amount", (int)amount));
     }
 }
开发者ID:predominant,项目名称:Treasure_Chest,代码行数:11,代码来源:CharactersEventHandler.cs


示例4: OnCraftSuccess

 public void OnCraftSuccess(InventoryCraftingCategory category, InventoryCraftingBlueprint blueprint, InventoryItemBase result)
 {
     if (onCraftingSuccess.Count > 0)
     {
         RunEvents(onCraftingSuccess,
             new plyEventArg("item", result),
             new plyEventArg("itemID", (int)result.ID),
             new plyEventArg("category", category),
             new plyEventArg("categoryID", (int)category.ID),
             new plyEventArg("blueprint", blueprint),
             new plyEventArg("blueprintID", (int)blueprint.ID));
     }
 }
开发者ID:predominant,项目名称:Treasure_Chest,代码行数:13,代码来源:CraftingEventHandler.cs


示例5: GetInventoryItem

 public InventoryItemBase GetInventoryItem(InventoryItemBase item)
 {
     System.Console.WriteLine("[HGrid] GetInventory " + item.ID + " from " + ServerURL);
     try
     {
         item = SynchronousRestSessionObjectPoster<Guid, InventoryItemBase>.BeginPostObject("POST", ServerURL + "/GetItem/", item.ID.Guid, "", "");
         return item;
     }
     catch (Exception e)
     {
         System.Console.WriteLine("[HGrid]: Exception posting to inventory: " + e);
     }
     return null;
 }
开发者ID:BogusCurry,项目名称:halcyon,代码行数:14,代码来源:InventoryClient.cs


示例6: GetInventoryItemAsync

        public void GetInventoryItemAsync(InventoryItemBase item, ReturnResponse<InventoryItemBase> callBack)
        {
            System.Console.WriteLine("[HGrid] GetInventory from " + ServerURL);
            try
            {
                RestSessionObjectPosterResponse<InventoryItemBase, InventoryItemBase> requester
                        = new RestSessionObjectPosterResponse<InventoryItemBase, InventoryItemBase>();
                requester.ResponseCallback = callBack;

                requester.BeginPostObject(ServerURL + "/GetItem/", item, string.Empty, string.Empty);
            }
            catch (Exception e)
            {
                System.Console.WriteLine("[HGrid]: Exception posting to inventory: " + e);
            }
        }
开发者ID:BogusCurry,项目名称:halcyon,代码行数:16,代码来源:InventoryClient.cs


示例7: Deserialize

        /// <summary>
        ///   Deserialize item
        /// </summary>
        /// <param name = "serializedSettings"></param>
        /// <returns></returns>
        /// <exception cref = "System.Xml.XmlException"></exception>
        public static InventoryItemBase Deserialize(byte[] serialization)
        {
            InventoryItemBase item = new InventoryItemBase();

            StringReader reader = new StringReader(Encoding.ASCII.GetString(serialization, 0, serialization.Length));
            XmlReader xtr = XmlReader.Create(reader);
            //Uses byte[] directly... should be used once issues with it are fixed
            //MemoryStream mr = new MemoryStream (serialization);
            //StreamReader sr = new StreamReader (mr, Encoding.ASCII);
            //XmlReader xtr = XmlTextReader.Create (sr);
            xtr.ReadStartElement("InventoryItem");

            item.Name = xtr.ReadElementString("Name");
            item.ID = UUID.Parse(xtr.ReadElementString("ID"));
            item.InvType = Convert.ToInt32(xtr.ReadElementString("InvType"));
            item.CreatorId = xtr.ReadElementString("CreatorUUID");
            try
            {
                item.CreatorData = xtr.ReadElementString("CreatorData");
            }
            catch
            {
            }
            item.CreationDate = Convert.ToInt32(xtr.ReadElementString("CreationDate"));
            item.Owner = UUID.Parse(xtr.ReadElementString("Owner"));
            item.Description = xtr.ReadElementString("Description");
            item.AssetType = Convert.ToInt32(xtr.ReadElementString("AssetType"));
            item.AssetID = UUID.Parse(xtr.ReadElementString("AssetID"));
            item.SaleType = Convert.ToByte(xtr.ReadElementString("SaleType"));
            item.SalePrice = Convert.ToInt32(xtr.ReadElementString("SalePrice"));
            item.BasePermissions = Convert.ToUInt32(xtr.ReadElementString("BasePermissions"));
            item.CurrentPermissions = Convert.ToUInt32(xtr.ReadElementString("CurrentPermissions"));
            item.EveryOnePermissions = Convert.ToUInt32(xtr.ReadElementString("EveryOnePermissions"));
            item.NextPermissions = Convert.ToUInt32(xtr.ReadElementString("NextPermissions"));
            item.Flags = Convert.ToUInt32(xtr.ReadElementString("Flags"));
            item.GroupID = UUID.Parse(xtr.ReadElementString("GroupID"));
            item.GroupOwned = Convert.ToBoolean(xtr.ReadElementString("GroupOwned"));

            xtr.ReadEndElement();

            xtr.Close();

            return item;
        }
开发者ID:savino1976,项目名称:Aurora-Sim,代码行数:50,代码来源:UserInventoryItemSerializer.cs


示例8: CreateItem

 public InventoryItemBase CreateItem(UUID inventoryID, UUID assetID, string name, string description,
                                     int assetType, int invType, UUID parentFolderID)
 {
     InventoryItemBase item = new InventoryItemBase();
     item.Owner = libOwner;
     item.CreatorId = libOwner.ToString();
     item.ID = inventoryID;
     item.AssetID = assetID;
     item.Description = description;
     item.Name = name;
     item.AssetType = assetType;
     item.InvType = invType;
     item.Folder = parentFolderID;
     item.BasePermissions = 0x7FFFFFFF;
     item.EveryOnePermissions = 0x7FFFFFFF;
     item.CurrentPermissions = 0x7FFFFFFF;
     item.NextPermissions = 0x7FFFFFFF;
     return item;
 }
开发者ID:ChrisD,项目名称:opensim,代码行数:19,代码来源:LibraryRootFolder.cs


示例9: GetLLSDItems

 public override OSDArray GetLLSDItems(string[] fields, string[] vals)
 {
     string query = "";
     for (int i = 0; i < fields.Length; i++)
     {
         query += String.Format("where {0} = '{1}' and ", fields[i], vals[i]);
         i++;
     }
     query = query.Remove(query.Length - 5);
     if (fields[0] == "inventoryID")
     {
         IInventoryService invService = m_registry.RequestModuleInterface<IInventoryService>();
         if (invService != null)
         {
             InventoryItemBase baseItem = new InventoryItemBase(UUID.Parse(vals[0]));
             return BuildLLSDInventoryItems(invService.GetItem(baseItem));
         }
     }
     
     return null;
 }
开发者ID:chazzmac,项目名称:Aurora-Sim,代码行数:21,代码来源:RobustInventoryConnector.cs


示例10: SetLootableItemsClients

        private void SetLootableItemsClients(string itemIDsString, PhotonMessageInfo info)
        {
            if (itemIDsString == "")
            {
                lootable.items = new InventoryItemBase[0];
                return;
            }

            string[] itemIDs = itemIDsString.Split(',');

            UnityEngine.Debug.Log("Received message from server to set items for lootable: " + itemIDs.Length);
            var items = new InventoryItemBase[itemIDs.Length];

            for (int i = 0; i < itemIDs.Length; i++)
            {
                var item = UnityEngine.Object.Instantiate<InventoryItemBase>(ItemManager.instance.items[int.Parse(itemIDs[i])]);
                item.gameObject.SetActive(false);
                item.transform.SetParent(transform);
                items[i] = item;
            }

            lootable.items = items; // Set the lootable items for this object.
        }
开发者ID:predominant,项目名称:Treasure_Chest,代码行数:23,代码来源:PhotonLootableObjectSyncer.cs


示例11: CopyWearablesAndAttachments

        private AvatarAppearance CopyWearablesAndAttachments(UUID destination, UUID source,
            AvatarAppearance avatarAppearance,
            InventoryFolderBase destinationFolder, UUID agentid,
            OSDMap itemsMap,
            out List<InventoryItemBase> items)
        {
            if (destinationFolder == null)
                throw new Exception("Cannot locate folder(s)");
            items = new List<InventoryItemBase>();

            List<InventoryItemBase> litems = new List<InventoryItemBase>();
            foreach (KeyValuePair<string, OSD> kvp in itemsMap)
            {
                InventoryItemBase item = new InventoryItemBase();
                item.FromOSD((OSDMap)kvp.Value);
                MainConsole.Instance.Info("[AvatarArchive]: Loading item " + item.ID.ToString());
                litems.Add(item);
            }

            // Wearables
            AvatarWearable[] wearables = avatarAppearance.Wearables;

            for (int i = 0; i < wearables.Length; i++)
            {
                AvatarWearable wearable = wearables[i];
                for (int ii = 0; ii < wearable.Count; ii++)
                {
                    if (wearable[ii].ItemID != UUID.Zero)
                    {
                        // Get inventory item and copy it
                        InventoryItemBase item = InventoryService.GetItem(UUID.Zero, wearable[ii].ItemID);

                        if (item == null)
                        {
                            //Attempt to get from the map if it doesn't already exist on the grid
                            item = litems.First((itm) => itm.ID == wearable[ii].ItemID);
                        }
                        if (item != null)
                        {
                            InventoryItemBase destinationItem = InventoryService.InnerGiveInventoryItem(destination,
                                                                                                        destination,
                                                                                                        item,
                                                                                                        destinationFolder
                                                                                                            .ID,
                                                                                                        false, false);
                            items.Add(destinationItem);
                            MainConsole.Instance.DebugFormat("[RADMIN]: Added item {0} to folder {1}",
                                                             destinationItem.ID, destinationFolder.ID);

                            // Wear item
                            AvatarWearable newWearable = new AvatarWearable();
                            newWearable.Wear(destinationItem.ID, destinationItem.AssetID);
                            avatarAppearance.SetWearable(i, newWearable);
                        }
                        else
                        {
                            MainConsole.Instance.WarnFormat("[RADMIN]: Error transferring {0} to folder {1}",
                                                            wearable[ii].ItemID, destinationFolder.ID);
                        }
                    }
                }
            }

            // Attachments
            List<AvatarAttachment> attachments = avatarAppearance.GetAttachments();

            foreach (AvatarAttachment attachment in attachments)
            {
                int attachpoint = attachment.AttachPoint;
                UUID itemID = attachment.ItemID;

                if (itemID != UUID.Zero)
                {
                    // Get inventory item and copy it
                    InventoryItemBase item = InventoryService.GetItem(UUID.Zero, itemID);

                    if (item != null)
                    {
                        InventoryItemBase destinationItem = InventoryService.InnerGiveInventoryItem(destination,
                                                                                                    destination, item,
                                                                                                    destinationFolder.ID,
                                                                                                    false, false);
                        items.Add(destinationItem);
                        MainConsole.Instance.DebugFormat("[RADMIN]: Added item {0} to folder {1}", destinationItem.ID,
                                                         destinationFolder.ID);

                        // Attach item
                        avatarAppearance.SetAttachment(attachpoint, destinationItem.ID, destinationItem.AssetID);
                        MainConsole.Instance.DebugFormat("[RADMIN]: Attached {0}", destinationItem.ID);
                    }
                    else
                    {
                        MainConsole.Instance.WarnFormat("[RADMIN]: Error transferring {0} to folder {1}", itemID,
                                                        destinationFolder.ID);
                    }
                }
            }
            return avatarAppearance;
        }
开发者ID:KSLcom,项目名称:Aurora-Sim,代码行数:99,代码来源:AppearanceArchiver.cs


示例12: ModifyAndMoveItem

 public void ModifyAndMoveItem(InventoryItemBase item, UUID folderID)
 {
     IInventoryProviderSelector selector = ProviderRegistry.Instance.Get<IInventoryProviderSelector>();
     ICheckedInventoryStorage provider = selector.GetCheckedProvider(m_userProfile.ID);
     provider.ModifyAndMoveItem(m_userProfile.ID, item, folderID);
 }
开发者ID:BogusCurry,项目名称:halcyon,代码行数:6,代码来源:CachedUserInfo.cs


示例13: OnRemovedItemPly

 private void OnRemovedItemPly(InventoryItemBase item, uint itemID, uint slot, uint amount)
 {
     if (eventHandler != null)
         eventHandler.CharacterOnUnEquippedItem(item, itemID, slot, amount);
 }
开发者ID:predominant,项目名称:Treasure_Chest,代码行数:5,代码来源:CharactersCollectionEventsProxy.cs


示例14: UpdateItem

 /// <summary>
 /// Update an item in the user's inventory
 /// </summary>
 /// <param name="userID"></param>
 /// <param name="itemInfo"></param>
 public void UpdateItem(InventoryItemBase item)
 {
     if (m_hasReceivedInventory)
     {
         m_InventoryService.UpdateItem(item);
     }
     else
     {
         AddRequest(
             new InventoryRequest(
                 Delegate.CreateDelegate(typeof(UpdateItemDelegate), this, "UpdateItem"),
                 new object[] { item }));
     }
 }
开发者ID:intari,项目名称:OpenSimMirror,代码行数:19,代码来源:CachedUserInfo.cs


示例15: ItemReceive

        /// <summary>
        /// Callback invoked when an item is received from an async request to the inventory service.
        ///
        /// We're assuming here that items are always received after all the folders
        /// received.
        /// If folder is null, we will search for it starting from RootFolder (an O(n) operation),
        /// otherwise we'll just put it into folder
        /// </summary>
        /// <param name="folderInfo"></param>
        private void ItemReceive(InventoryItemBase itemInfo, InventoryFolderImpl folder)
        {
            //            m_log.DebugFormat(
            //                "[INVENTORY CACHE]: Received item {0} {1} for user {2}",
            //                itemInfo.Name, itemInfo.ID, userID);

            if (folder == null && RootFolder != null)
                folder = RootFolder.FindFolder(itemInfo.Folder);

            if (null == folder)
            {
                m_log.WarnFormat(
                    "Received item {0} {1} but its folder {2} does not exist",
                    itemInfo.Name, itemInfo.ID, itemInfo.Folder);

                return;
            }

            lock (folder.Items)
            {
                folder.Items[itemInfo.ID] = itemInfo;
            }

            if (OnItemReceived != null)
                OnItemReceived(itemInfo.ID);
        }
开发者ID:intari,项目名称:OpenSimMirror,代码行数:35,代码来源:CachedUserInfo.cs


示例16: StoreItem

 public bool StoreItem (InventoryItemBase item)
 {
     GD.Delete(m_itemsrealm, new string[1] { "inventoryID" }, new object[1] { item.ID });
     return GD.Insert (m_itemsrealm, new string[20]{"assetID","assetType","inventoryName","inventoryDescription",
         "inventoryNextPermissions","inventoryCurrentPermissions","invType","creatorID","inventoryBasePermissions",
         "inventoryEveryOnePermissions","salePrice","saleType","creationDate","groupID","groupOwned",
         "flags","inventoryID","avatarID","parentFolderID","inventoryGroupPermissions"}, new object[20]{
             item.AssetID, item.AssetType, item.Name, item.Description, item.NextPermissions, item.CurrentPermissions,
             item.InvType, item.CreatorId, item.BasePermissions, item.EveryOnePermissions, item.SalePrice, item.SaleType,
             item.CreationDate, item.GroupID, item.GroupOwned ? "1" : "0", item.Flags, item.ID, item.Owner,
             item.Folder, item.GroupPermissions});
 }
开发者ID:kow,项目名称:Aurora-Sim,代码行数:12,代码来源:LocalInventoryConnector.cs


示例17: GiveInventoryItem

        private InventoryItemBase GiveInventoryItem(UUID senderId, UUID recipient, InventoryItemBase item, InventoryFolderBase parentFolder)
        {
            InventoryItemBase itemCopy = new InventoryItemBase();
            itemCopy.Owner = recipient;
            itemCopy.CreatorId = item.CreatorId;
            itemCopy.CreatorData = item.CreatorData;
            itemCopy.ID = UUID.Random();
            itemCopy.AssetID = item.AssetID;
            itemCopy.Description = item.Description;
            itemCopy.Name = item.Name;
            itemCopy.AssetType = item.AssetType;
            itemCopy.InvType = item.InvType;
            itemCopy.Folder = UUID.Zero;

            //Give full permissions for them
            itemCopy.NextPermissions = (uint)PermissionMask.All;
            itemCopy.GroupPermissions = (uint)PermissionMask.All;
            itemCopy.EveryOnePermissions = (uint)PermissionMask.All;
            itemCopy.CurrentPermissions = (uint)PermissionMask.All;

            if (parentFolder == null)
            {
                InventoryFolderBase folder = InventoryService.GetFolderForType (recipient, (InventoryType)itemCopy.InvType, (AssetType)itemCopy.AssetType);

                if (folder != null)
                    itemCopy.Folder = folder.ID;
                else
                {
                    InventoryFolderBase root = InventoryService.GetRootFolder(recipient);

                    if (root != null)
                        itemCopy.Folder = root.ID;
                    else
                        return null; // No destination
                }
            }
            else
                itemCopy.Folder = parentFolder.ID; //We already have a folder to put it in

            itemCopy.GroupID = UUID.Zero;
            itemCopy.GroupOwned = false;
            itemCopy.Flags = item.Flags;
            itemCopy.SalePrice = item.SalePrice;
            itemCopy.SaleType = item.SaleType;

            InventoryService.AddItem(itemCopy);
            return itemCopy;
        }
开发者ID:chazzmac,项目名称:Aurora-Sim,代码行数:48,代码来源:LLLoginService.cs


示例18: GiveInventoryItem

        private InventoryItemBase GiveInventoryItem(UUID senderId, UUID recipient, UUID itemId, InventoryFolderBase parentFolder)
        {
            InventoryItemBase item = new InventoryItemBase(itemId, senderId);
            item = m_scene.InventoryService.GetItem(item);


            InventoryItemBase itemCopy = new InventoryItemBase();
            itemCopy.Owner = recipient;
            itemCopy.CreatorId = item.CreatorId;
            itemCopy.ID = UUID.Random();
            itemCopy.AssetID = item.AssetID;
            itemCopy.Description = item.Description;
            itemCopy.Name = item.Name;
            itemCopy.AssetType = item.AssetType;
            itemCopy.InvType = item.InvType;
            itemCopy.Folder = UUID.Zero;

            //Give full permissions for them
            itemCopy.NextPermissions = (uint)PermissionMask.All;
            itemCopy.GroupPermissions = (uint)PermissionMask.All;
            itemCopy.EveryOnePermissions = (uint)PermissionMask.All;
            itemCopy.CurrentPermissions = (uint)PermissionMask.All;

            if (parentFolder == null)
            {
                InventoryFolderBase folder = m_scene.InventoryService.GetFolderForType(recipient, (AssetType)itemCopy.AssetType);

                if (folder != null)
                    itemCopy.Folder = folder.ID;
                else
                {
                    InventoryFolderBase root = m_scene.InventoryService.GetRootFolder(recipient);

                    if (root != null)
                        itemCopy.Folder = root.ID;
                    else
                        return null; // No destination
                }
            }
            else
                itemCopy.Folder = parentFolder.ID; //We already have a folder to put it in

            itemCopy.GroupID = UUID.Zero;
            itemCopy.GroupOwned = false;
            itemCopy.Flags = item.Flags;
            itemCopy.SalePrice = item.SalePrice;
            itemCopy.SaleType = item.SaleType;

            if (m_scene.InventoryService.AddItem(itemCopy))
            {
                IInventoryAccessModule invAccess = m_scene.RequestModuleInterface<IInventoryAccessModule>();
                if (invAccess != null)
                    invAccess.TransferInventoryAssets(itemCopy, senderId, recipient);
            }
            return itemCopy;
        }
开发者ID:shangcheng,项目名称:Aurora,代码行数:56,代码来源:AppearanceArchiver.cs


示例19: HandleSaveAvatarArchive

        protected void HandleSaveAvatarArchive(string module, string[] cmdparams)
		{
			if (cmdparams.Length != 7)
            {
				m_log.Debug("[AvatarArchive] Not enough parameters!");
			}
			UserAccount account = m_scene.UserAccountService.GetUserAccount(UUID.Zero, cmdparams[3], cmdparams[4]);
			if (account == null) 
            {
				m_log.Error("[AvatarArchive] User not found!");
				return;
			}

            ScenePresence SP;
            m_scene.TryGetScenePresence(account.PrincipalID, out SP);
            if (SP == null)
                return; //Bad people!
            SP.ControllingClient.SendAlertMessage("Appearance saving in progress...");



			AvatarData avatarData = m_scene.AvatarService.GetAvatar(account.PrincipalID);
			AvatarAppearance appearance = avatarData.ToAvatarAppearance(account.PrincipalID);
			StreamWriter writer = new StreamWriter(cmdparams[5]);
			writer.Write("<avatar>\n");
			writer.Write("<" + appearance.AvatarHeight + ">\n");
			writer.Write("<" + appearance.BodyAsset + ">\n");
			writer.Write("<" + appearance.BodyItem + ">\n");
			writer.Write("<" + appearance.EyesAsset + ">\n");
			writer.Write("<" + appearance.EyesItem + ">\n");
			writer.Write("<" + appearance.GlovesAsset + ">\n");
			writer.Write("<" + appearance.GlovesItem + ">\n");
			writer.Write("<" + appearance.HairAsset + ">\n");
			writer.Write("<" + appearance.HairItem + ">\n");
			writer.Write("<" + appearance.HipOffset + ">\n");
			writer.Write("<" + appearance.JacketAsset + ">\n");
			writer.Write("<" + appearance.JacketItem + ">\n");
			writer.Write("<" + appearance.Owner + ">\n");
			writer.Write("<" + appearance.PantsAsset + ">\n");
			writer.Write("<" + appearance.PantsItem + ">\n");
			writer.Write("<" + appearance.Serial + ">\n");
			writer.Write("<" + appearance.ShirtAsset + ">\n");
			writer.Write("<" + appearance.ShirtItem + ">\n");
			writer.Write("<" + appearance.ShoesAsset + ">\n");
			writer.Write("<" + appearance.ShoesItem + ">\n");
			writer.Write("<" + appearance.SkinAsset + ">\n");
			writer.Write("<" + appearance.SkinItem + ">\n");
			writer.Write("<" + appearance.SkirtAsset + ">\n");
			writer.Write("<" + appearance.SkirtItem + ">\n");
			writer.Write("<" + appearance.SocksAsset + ">\n");
			writer.Write("<" + appearance.SocksItem + ">\n");
			writer.Write("<" + appearance.UnderPantsAsset + ">\n");
			writer.Write("<" + appearance.UnderPantsItem + ">\n");
			writer.Write("<" + appearance.UnderShirtAsset + ">\n");
			writer.Write("<" + appearance.UnderShirtItem + ">\n");
			writer.Write("<VisualParams>\n");
			foreach (Byte Byte in appearance.VisualParams)
            {
				writer.Write("</VP" + Convert.ToString(Byte) + ">\n");
			}
			writer.Write("</VisualParams>\n");
			writer.Write("<wearables>\n");
			foreach (AvatarWearable wear in appearance.Wearables)
            {
				writer.Write("<WA" + wear.AssetID + ">\n");
				writer.Write("<WI" + wear.ItemID + ">\n");
			}
			writer.Write("</wearables>\n");
			writer.Write("<TEXTURE" + appearance.Texture.ToString().Replace("\n", "") + "TEXTURE>\n");
			writer.Write("</avatar>");
			Hashtable attachments = appearance.GetAttachments();
			writer.Write("<attachments>\n");
			if (attachments != null)
            {
				foreach (DictionaryEntry element in attachments) 
                {
					Hashtable attachInfo = (Hashtable)element.Value;
                    InventoryItemBase IB = new InventoryItemBase(UUID.Parse(attachInfo["item"].ToString()));
                    writer.Write("<AI" + attachInfo["item"] + ">\n");
                    writer.Write("<AA" + IB.AssetID + ">\n");
					writer.Write("<AP" + (int)element.Key + ">\n");
				}
			}
			writer.Write("</attachments>");
			writer.Close();
			writer.Dispose();
			m_log.Debug("[AvatarArchive] Saved archive to " + cmdparams[5]);
		}
开发者ID:shangcheng,项目名称:Aurora,代码行数:88,代码来源:AppearanceArchiver.cs


示例20: ItemReceive

 /// <summary>
 /// Callback invoked when an item is received from an async request to the inventory service.
 ///
 /// We're assuming here that items are always received after all the folders
 /// received.
 /// If folder is null, we will search for it starting from RootFolder (an O(n) operation),
 /// otherwise we'll just put it into folder
 /// </summary>
 /// <param name="folderInfo"></param>
 private void ItemReceive(InventoryItemBase itemInfo, InventoryFolderImpl folder)
 {
     if (OnItemReceived != null)
         OnItemReceived(itemInfo.ID);
 }
开发者ID:BogusCurry,项目名称:halcyon,代码行数:14,代码来源:CachedUserInfo.cs



注:本文中的InventoryItemBase类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# InventoryManager类代码示例发布时间:2022-05-24
下一篇:
C# InventoryItem类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap