Inheritance: System.EventArgs
 private void FashionBotModuleMain_OnItemRecieved(object sender, ItemReceivedEventArgs e)
 {
     var item = e.Item;
     if (Received.Contains(item.AssetUUID))
     {
         List<InventoryItem> newList = new List<InventoryItem> { item };
         client.Appearance.AddToOutfit(newList);
     }
     EnumerateClothing();
 }
Exemple #2
0
        void Inventory_ItemReceived(object sender, ItemReceivedEventArgs e)
        {
            if (offeredObject != e.Item.UUID) return;
            if (offeredAgent == UUID.Zero)
            {
                return;
            }

            Dictionary<string, string> param = new Dictionary<string, string>();
            param.Add("invUUID", e.Item.UUID.ToString());
            param.Add("userUUID", offeredAgent.ToString());
            param.Add("name", e.Item.Name);

            if(e.Item.SaleType != SaleType.Not)
                param.Add("price", e.Item.SalePrice.ToString());
            else
                param.Add("price", "0");
            param.Add("texture", "");
            param.Add("botUUID", client.Self.AgentID.ToString());
            string str = this.RequestVendor("ADDPRODUCT", param);
            int result;

            Int32.TryParse(str, out result);

            if(result > 0){
                instance.MainForm.TabConsole.DisplayNotificationInChat(pluginName + ": Product " + e.Item.Name + " from Agent " + offeredAgent.ToString() + " accepted and inserted", ChatBufferTextStyle.StatusBlue);
                client.Self.InstantMessage(offeredAgent, "Your Object has been transfered successfully. Please visit " + this.loginURL + " for further steps");
            }
            else
            {
                // if there is ANY error, delete the object
                instance.MainForm.TabConsole.DisplayNotificationInChat(pluginName + ": ADDPRODUCT FAILED\n" + str + "\n\n[ITEM: " + e.Item.Name + " AGENT: " + offeredAgent.ToString() + "]", ChatBufferTextStyle.Error);
                client.Inventory.RemoveItem(e.Item.UUID);
            }

            offeredAgent = UUID.Zero;
        }
 ///<summary>Raises the ItemReceived Event</summary>
 /// <param name="e">A ItemReceivedEventArgs object containing
 /// the data sent from the simulator</param>
 protected virtual void OnItemReceived(ItemReceivedEventArgs e)
 {
     EventHandler<ItemReceivedEventArgs> handler = m_ItemReceived;
     if (handler != null)
         handler(this, e);
 }
        void Inventory_ItemReceived(object sender, ItemReceivedEventArgs e)
        {
            bool partOfCOF = false;
            var links = ContentLinks();
            foreach (var cofItem in links)
            {
                if (cofItem.AssetUUID == e.Item.UUID)
                {
                    partOfCOF = true;
                    break;
                }
            }

            if (partOfCOF)
            {
                lock (Content)
                {
                    Content[e.Item.UUID] = e.Item;
                }
            }

            if (Content.Count == links.Count)
            {
                COFReady = true;
                if (AppearanceSent)
                {
                    InitialUpdate();
                }
                lock (Content)
                {
                    foreach (InventoryItem link in Content.Values)
                    {
                        if (link.InventoryType == InventoryType.Wearable)
                        {
                            InventoryWearable w = (InventoryWearable)link;
                            InventoryItem lk = links.Find(l => l.AssetUUID == w.UUID);
                            // Logger.DebugLog(string.Format("\nName: {0}\nDescription: {1}\nType: {2} - {3}", w.Name, lk == null ? "" : lk.Description, w.Flags.ToString(), w.WearableType.ToString())); ;
                        }
                    }

                }
            }
        }
Exemple #5
0
        void Inventory_ItemReceived(object sender, ItemReceivedEventArgs e)
        {
            lock (ContentLinks)
            {
                bool partOfCOF = false;
                foreach (var cofItem in ContentLinks)
                {
                    if (cofItem.AssetUUID == e.Item.UUID)
                    {
                        partOfCOF = true;
                        break;
                    }
                }

                if (partOfCOF)
                {
                    lock (Content)
                    {
                        Content[e.Item.UUID] = e.Item;
                    }
                }
            }

            if (Content.Count == ContentLinks.Count)
            {
                COFReady = true;
                if (AppearanceSent)
                {
                    InitialUpdate();
                }
            }
        }
 private void Inventory_OnItemReceived(object sender, ItemReceivedEventArgs e)
 {
     Enqueue(() => LoadItemOrFolder(e.Item));
 }
        //Seperate thread
        private void Inventory_OnItemReceived(object sender, ItemReceivedEventArgs e)
        {
            if (InvokeRequired)
            {

                BeginInvoke(new MethodInvoker(delegate()
                {
                    Inventory_OnItemReceived(sender, e);
                }));

                return;
            }

            ReceivedInventoryItem(e.Item);
        }
Exemple #8
0
 public void Inventory_ItemReceived(object sender, ItemReceivedEventArgs e)
 {
     Hashtable message = new Hashtable();
     message.Add("MessageType", "ItemReceived");
     message.Add("Name", e.Item.Name);
     message.Add("FolderID", e.Item.ParentUUID);
     message.Add("UUID", e.Item.UUID);
     message.Add("AssetType", e.Item.AssetType);
     message.Add("AssetUUID", e.Item.AssetUUID);
     message.Add("CreatorID", e.Item.CreatorID);
     message.Add("OwnerID", e.Item.OwnerID);
     message.Add("CreationDate", e.Item.CreationDate);
     message.Add("Description", e.Item.Description);
     message.Add("Flags", e.Item.Flags);
     message.Add("InventoryType", e.Item.InventoryType);
     message.Add("Permissions", e.Item.Permissions);
     enqueue(message);
 }
Exemple #9
0
 public virtual void Inventory_OnItemReceived(object sender, ItemReceivedEventArgs e) { OnEvent("On-Item-Received", paramNamesOnItemReceived, paramTypesOnItemReceived, e); }
 private void AgentInventoryOnItemReceived(object sender, ItemReceivedEventArgs e)
 {
     var item = e.Item;
     if (item.ParentUUID != HolderPrim.AgentSyncFolder) return;
     if (item.Name != ItemName) return;
     AgentInventoryOnItemReceived(e.Item);
 }