Provides additional primitive data for the ObjectManager.ObjectProperties event

The ObjectManager.ObjectProperties event occurs when the simulator sends an ObjectPropertiesPacket containing additional details for a Primitive, Foliage data or Attachment data

The ObjectManager.ObjectProperties event is also raised when a ObjectManager.SelectObject request is made.

상속: System.EventArgs
예제 #1
0
 public override void Objects_OnObjectProperties(object sender, ObjectPropertiesEventArgs e)
 {
     var simulator = e.Simulator;
     var props = e.Properties;          
     //throw new InvalidOperationException("Objects_OnObjectProperties");
     CheckConnected(simulator);
     //NeverSelect(props.LocalID, simulator);                
     PropertyQueue.Enqueue(delegate() { Objects_OnObjectProperties11(simulator, null, props); });
 }
예제 #2
0
        void Objects_OnObjectProperties(object sender, ObjectPropertiesEventArgs e)
        {
            lock (PrimsWaiting)
            {
                Primitive prim;
                if (PrimsWaiting.TryGetValue(e.Properties.ObjectID, out prim))
                {
                    prim.Properties = e.Properties;
                }
                PrimsWaiting.Remove(e.Properties.ObjectID);

                if (PrimsWaiting.Count == 0)
                    AllPropertiesReceived.Set();
            }
        }
예제 #3
0
        void Objects_ObjectProperties(object sender, ObjectPropertiesEventArgs e)
        {
            if (active == false)
                return;

            lock (requested_props)
            {
                if (requested_props.Contains(e.Properties.ObjectID))
                {
                    requested_props.Remove(e.Properties.ObjectID);
                    MainClass.NameTrack.processagentID(e.Properties.OwnerID);
                    MainClass.NameTrack.processagentID(e.Properties.CreatorID);
                }
            }
        }
예제 #4
0
        void Objects_ObjectProperties(object sender, ObjectPropertiesEventArgs e)
        {
            lock (PrimsWaiting)
            {
                PrimsWaiting.Remove(e.Properties.ObjectID);

                if (PrimsWaiting.Count == 0)
                    AllPropertiesReceived.Set();
            }
        }
예제 #5
0
 void Objects_ObjectProperties(object sender, ObjectPropertiesEventArgs e)
 {
     if (e.Properties.ObjectID == attachment.ID)
     {
         attachment.Properties = e.Properties;
         UpdateControls();
     }
 }
예제 #6
0
 void Objects_ObjectProperties(object sender, ObjectPropertiesEventArgs e)
 {
     if (selectedPrim != null) {
         if (selectedPrim.ID == e.Properties.ObjectID) {
             selectedPrim.Properties = e.Properties;
             UpdateDisplay();
         }
     }
 }
예제 #7
0
        void Objects_ObjectProperties(object sender, ObjectPropertiesEventArgs e)
        {
            if (e.Simulator.Handle != client.Network.CurrentSim.Handle)
            {
                return;
            }

            if (InvokeRequired)
            {
                BeginInvoke(new MethodInvoker(delegate() { Objects_ObjectProperties(sender, e); }));
                return;
            }

            lock (lstPrims.Items)
            {
                if (lstPrims.Items.ContainsKey(e.Properties.ObjectID.ToString()))
                {
                    Primitive prim = lstPrims.Items[e.Properties.ObjectID.ToString()].Tag as Primitive;
                    prim.Properties = e.Properties;
                    lstPrims.Items[e.Properties.ObjectID.ToString()].Text = GetObjectName(prim);
                }
            }

            lock (lstChildren.Items)
            {
                if (lstChildren.Items.ContainsKey(e.Properties.ObjectID.ToString()))
                {
                    Primitive prim = lstChildren.Items[e.Properties.ObjectID.ToString()].Tag as Primitive;
                    prim.Properties = e.Properties;
                    lstChildren.Items[e.Properties.ObjectID.ToString()].Text = prim.Properties.Name;
                }
            }

            if (e.Properties.ObjectID == currentPrim.ID)
            {
                UpdateCurrentObject(false);
            }
        }
        void Objects_ObjectProperties(object sender, ObjectPropertiesEventArgs e)
        {
            try
            {
                lock (PrimsWaiting)
                {
                    Primitive prim;
                    if (PrimsWaiting.TryGetValue(e.Properties.ObjectID, out prim))
                    {
                        prim.Properties = e.Properties;
                        Gtk.Application.Invoke(delegate
                        {
                            Vector3 self_pos;
                            lock (MainClass.client.Network.CurrentSim.ObjectsAvatars)
                            {
                                // Cope if *we* are sitting on someting
                                if (MainClass.client.Network.CurrentSim.ObjectsAvatars[MainClass.client.Self.LocalID].ParentID != 0)
                                {
                                    Primitive parent = MainClass.client.Network.CurrentSim.ObjectsPrimitives[MainClass.client.Network.CurrentSim.ObjectsAvatars[MainClass.client.Self.LocalID].ParentID];
                                    self_pos = Vector3.Transform(MainClass.client.Self.RelativePosition, Matrix4.CreateFromQuaternion(parent.Rotation)) + parent.Position;
                                }
                                else
                                {
                                    self_pos = MainClass.client.Self.RelativePosition;
                                }
                            }

                            PrimsWaiting.Remove(e.Properties.ObjectID);
                            if (FetchedPrims.ContainsKey(e.Properties.ObjectID))
                            {
                                Logger.Log("Trying to add a duplicate prim to FetchedPrims WTF? " + e.Properties.ObjectID.ToString(),Helpers.LogLevel.Debug);
                                return;
                            }
                            else
                            {
                                FetchedPrims.Add(e.Properties.ObjectID, prim);
                            }
                            Gtk.Application.Invoke(delegate
                            {
                                Gdk.Pixbuf owner = this.img_blank;

                                if ((prim.Flags & PrimFlags.ObjectYouOwner) == PrimFlags.ObjectYouOwner)
                                    owner = this.img_owner;
                                if ((prim.Flags & PrimFlags.ObjectYouOfficer) == PrimFlags.ObjectYouOfficer)
                                    owner = this.img_officer;
                                if ((prim.Flags & PrimFlags.ObjectGroupOwned) == PrimFlags.ObjectGroupOwned)
                                    owner = this.img_group;

                                store.AppendValues(prim.Properties.Name, prim.Properties.Description, MainClass.cleandistance(Vector3d.Distance(AutoPilot.localtoglobalpos(prim.Position, e.Simulator.Handle), AutoPilot.localtoglobalpos(self_pos, MainClass.client.Network.CurrentSim.Handle)).ToString(),2), prim.Properties.ObjectID, e.Simulator.Handle,
                                    owner,
                                    (prim.Flags & PrimFlags.Money) == PrimFlags.Money ? this.img_pay : this.img_blank,
                                    (prim.Flags & PrimFlags.Touch) == PrimFlags.Touch ? this.img_touch : this.img_blank,
                                    (prim.Flags & PrimFlags.Scripted) == PrimFlags.Scripted ? this.img_script : this.img_blank,
                                    (prim.Flags & PrimFlags.Phantom) == PrimFlags.Phantom ? this.img_phantom : this.img_blank,
                                    (prim.Flags & PrimFlags.Physics) == PrimFlags.Physics ? this.img_physical : this.img_blank,
                                    (prim.Flags & PrimFlags.ObjectMove) == PrimFlags.ObjectMove ? this.img_move : this.img_blank,
                                    (prim.Flags & PrimFlags.ObjectModify) == PrimFlags.ObjectModify ? this.img_mod : this.img_blank,
                                    (prim.Flags & PrimFlags.ObjectTransfer) == PrimFlags.ObjectTransfer ? this.img_trans : this.img_blank

                                    );
                            });
                        });

                    }
                }
            }
            catch(Exception ee)
            {
                // General messups, we can get here if we try to scan for objects too soon after login and ourself is not
                // in the dictionary yet. Can't be bothered to test *every* object property if we are valid so just catch the exception
                Logger.Log("Error: Scanning for object triggered exception: "+ee.Message, Helpers.LogLevel.Error);
            }
        }
예제 #9
0
        void Objects_OnObjectProperties(object sender, ObjectPropertiesEventArgs e)
        {
            if (e.Properties.ObjectID == Properties.ObjectID)
            {
                if (e.Properties.CreatorID != UUID.Zero)
                {
                    Properties.CreatorID = e.Properties.CreatorID;
                    Properties.Permissions = e.Properties.Permissions;
                    GotPermissions = true;
                    GotPermissionsEvent.Set();
                }
            }
            lock (PrimsWaiting)
            {
                PrimsWaiting.Remove(e.Properties.ObjectID);

                if (PrimsWaiting.Count == 0)
                    AllPropertiesReceived.Set();
            }
        }
예제 #10
0
        private void Objects_OnObjectProperties(object sender, ObjectPropertiesEventArgs e)
        {
            if (e.Properties.Description.Trim() == client.Self.AgentID.ToString().Trim())
            {
                client.Objects.ObjectProperties -= new EventHandler<ObjectPropertiesEventArgs>(Objects_OnObjectProperties);
                //client.Self.AvatarSitResponse += new EventHandler<AvatarSitResponseEventArgs>(Self_AvatarSitResponse);
                //listnerdisposed = true;

                if (instance.Config.CurrentConfig.AutoSit)
                {
                    if (!instance.State.IsSitting)
                    {
                        instance.State.SetSitting(true, e.Properties.ObjectID);
                        //localids = null;
                        //listnerdisposed = true;

                        Logger.Log("AUTOSIT: Found sit object and sitting", Helpers.LogLevel.Info);
                    }
                }
            }
        }
예제 #11
0
 void Objects_ObjectProperties(object sender, ObjectPropertiesEventArgs e)
 {
     if (e.Properties.OwnerID == cliente.Self.AgentID && e.Properties.Name == nomeDoObjectoColocado)
     {
         registaLog("Já chegaram as propriedades do objecto que coloquei");
         // if new object already registered this object, then it must be one
         // of the objects we've rezzed, as it contains the right owner id
         if (mergeObjectIDAndLocalID.ContainsKey(e.Properties.ObjectID))
         {
             registaLog("Já está...");
             objectoColocado = mergeObjectIDAndLocalID[e.Properties.ObjectID];
             gotMyObject.Set();
         }
         else
         {
             registaLog("Ainda não chegou o PRIM ???...");
             mergeObjectIDAndLocalID[e.Properties.ObjectID] = uint.MinValue;
         }
     }
     else
         registaLog("Népias : " + e.Properties.Name);
 }
예제 #12
0
 private void TaskInventoryItemReceived(object sender, ObjectPropertiesEventArgs e)
 {
     if (e.Properties.ObjectID == HolderPrim.NewID)
     {
         if (oldTaskSerial < e.Properties.InventorySerial)
         {
             areItem.Set();
         }
     }
 }
예제 #13
0
 private void OnObjectPropertiesNewesh1(object sender, ObjectPropertiesEventArgs e)
 {
     var p = e.Properties;
     var holder = p.FromTaskID;
     var objID = p.ObjectID;
     if (ExportHolder.Contains(holder))
     {
         Client.Inventory.RequestSetScriptRunning(objID, UUID.Zero, false);
         var O = WorldObjects.GetSimObjectFromUUID(objID);
         if (O != null)
         {
             O.IsPhysical = false;
             O.IsTemporary = false;
         }
     }
     
 }
예제 #14
0
 private void rezedInWorld(object o, ObjectPropertiesEventArgs e)
 {
     var iie = e.Properties.ItemID;
     if (CogbotHelpers.IsNullOrZero(iie)) return;
     if ((AgentItem == null || iie != AgentItem.UUID) && (SourceTaskItem == null || iie != SourceTaskItem.UUID))
     {
         return;
     }
     Error = "";
     Client.Objects.ObjectProperties -= rezedInWorld;
     OldAssetID = e.Properties.ObjectID;
     Importing.MustExport.Add(OldAssetID);
     Exporting.TasksRezed[oneAssetID] = this;
     PostRezzed();
     rezedEvent.Set();
 }
예제 #15
0
파일: AutoSit.cs 프로젝트: Booser/radegast
        public void Objects_ObjectProperties(object sender, ObjectPropertiesEventArgs e)
        {
            if (e.Properties.ObjectID == Preferences.Primitive)
            {
                Preferences = new AutoSitPreferences
                {
                    Primitive = Preferences.Primitive,
                    PrimitiveName = e.Properties.Name,
                    Enabled = Preferences.Enabled
                };

                m_instance.Client.Objects.ObjectProperties -= Objects_ObjectProperties;
            }
        }
예제 #16
0
 private void TaskInventoryItemReceived(object sender, ObjectPropertiesEventArgs e)
 {
     if (e.Properties.ObjectID != NewID) return;
     short newSerial = e.Properties.InventorySerial;
     if (TaskSerial < newSerial)
     {
         sourceObjectinventory = null;
         if (TaskInvChanged != null)
         {
             TaskInvChanged();
         }
     }
     TaskSerial = newSerial;
 }
예제 #17
0
 public virtual void Objects_OnObjectProperties(object sender, ObjectPropertiesEventArgs e) { OnEvent("On-Object-Properties", paramNamesOnObjectProperties, paramTypesOnObjectProperties, e); }
예제 #18
0
        private void Objects_ObjectProperties(object sender, ObjectPropertiesEventArgs e)
        {
            if (e.Properties.ObjectID != prim.ID) return;

            try
            {
                gettingProperties = false;
                gotProperties = true;
                prim.Properties = e.Properties;

                listBox.BeginInvoke(
                    new OnPropReceivedRaise(OnPropertiesReceived),
                    new object[] { EventArgs.Empty });
            }
            catch
            {
                ;
            }

            //client.Objects.ObjectProperties -= new EventHandler<ObjectPropertiesEventArgs>(Objects_ObjectProperties);
        }
예제 #19
0
        void Objects_ObjectProperties(object sender, ObjectPropertiesEventArgs e)
        {
            if (e.Simulator.Handle != client.Network.CurrentSim.Handle)
            {
                return;
            }

            if (InvokeRequired)
            {
                BeginInvoke(new MethodInvoker(delegate() { Objects_ObjectProperties(sender, e); }));
                return;
            }

            UpdateProperties(e.Properties);
        }
예제 #20
0
 ///<summary>Raises the ObjectProperties Event</summary>
 /// <param name="e">A ObjectPropertiesEventArgs object containing
 /// the data sent from the simulator</param>
 protected virtual void OnObjectProperties(ObjectPropertiesEventArgs e)
 {
     EventHandler<ObjectPropertiesEventArgs> handler = m_ObjectProperties;
     if (handler != null)
         handler(this, e);
 }
예제 #21
0
 void Objects_OnObjectProperties(object sender, ObjectPropertiesEventArgs e)
 {
     lock (Waiting)
     {
         Waiting.Properties = e.Properties;
         PropertiesReceived.Set();
     }
 }