Is there anyway that you know of to only show an items properties to the player that is wearing it or if it is in their backpack or if it is simply on the ground it would show it to everyone.
What I'd like to be able to do is if player A is holding a weapon I would like the properties to be hidden or not shown to play or B.
Or perhaps if player B has high-level item identification they actually would be able to see the properties of the weapon held by player A.
Thank you for your time and suggestions.
 
This method is in "Item.cs" which is a core Server file:

Code:
        /// <summary>
        ///     Overridable. Sends the <see cref="PropertyList">object property list</see> to <paramref name="from" />.
        /// </summary>
        public virtual void SendPropertiesTo(Mobile from)
        {
            from.Send(PropertyList);
        }

You might want to override it in BaseWeapon or BaseJewel or where appropriate. Not sure if this method is necessarily called by the client when pointing at an item, but it's worth a shot.
 
Lokai, are you suggesting to add a check if the item has a parent mobile and if the from mobile isn't the parent to return?
 
Lokai, are you suggesting to add a check if the item has a parent mobile and if the from mobile isn't the parent to return?

The point of the question was to find a way to display certain things to some people, and other things to other people, based on Item ID skill of the person or whatever. In order to do that we must use a method that includes the Mobile, or it could never work.

One possibility is to just NOT show those properties by default, and make it like old-school where you have to click on the item to view the properties. That would ensure that the properties are being passed to a Mobile. Just throwing ideas out there.
 
Here's what i came up with. I put it in BaseArmor, but it doesn't seem to work.

Code:
public override void SendPropertiesTo(Mobile from)
        {
            from.SendMessage("debugging: SendPropertiesTo(Mobile from)");
            if (this.RootParent == null || (Mobile)this.RootParent == from || from.Skills.ItemID.Value >= 50)
            {
                from.Send(this.PropertyList);
                from.SendMessage("debugging: this.RootParent == null || (Mobile)this.RootParent == from || from.Skills.ItemID.Value >= 50))");
            }
            else
            {
                return;
            }
        }
I like to add in those simple SendMessages for troubleshooting, and when I try to view the item properties using the mouse hover or click to display, in each scenario the properties are still displayed and I don't get those debugging messages.
This image shows the GM Rex, all skills set to 0, looking at the "Studded Chest" which is located on a different player mobile "rexy".
upload_2016-5-7_5-51-2.png

Hopefully i'm missing something, and thanks for your help!
 
Here's what i came up with. I put it in BaseArmor, but it doesn't seem to work.

Code:
public override void SendPropertiesTo(Mobile from)
        {
            from.SendMessage("debugging: SendPropertiesTo(Mobile from)");
            if (this.RootParent == null || (Mobile)this.RootParent == from || from.Skills.ItemID.Value >= 50)
            {
                from.Send(this.PropertyList);
                from.SendMessage("debugging: this.RootParent == null || (Mobile)this.RootParent == from || from.Skills.ItemID.Value >= 50))");
            }
            else
            {
                return;
            }
        }
I like to add in those simple SendMessages for troubleshooting, and when I try to view the item properties using the mouse hover or click to display, in each scenario the properties are still displayed and I don't get those debugging messages.
This image shows the GM Rex, all skills set to 0, looking at the "Studded Chest" which is located on a different player mobile "rexy".
View attachment 5701

Hopefully i'm missing something, and thanks for your help!

I added this to BaseArmor and it's working

Code:
public override void SendPropertiesTo(Mobile from)
     {
       if( this.Parent == null || from.Skills.ItemID.Value >= 50 || this.Parent == from )
         from.Send(PropertyList);
     }

no return; was needed.

slight issue with performance: if your ItemID is under 50 when you have someone's paperdoll open but it goes to 50, you'll need to close and reopen the paperdoll for it to work.
also if ItemID goes below 50, you'll have to sign out and back in for the properties to not show up
 
There is no real easy way to do this, because OPL's are cached in a way that if they don't change, the old one is still sent and if they do change, a new one is sent, but they are always sent to all applicable NetStates, not individual ones.

Doing what you propose WILL dramatically increase your shard's data output.

All the secrets to doing this can be found here; https://github.com/Vita-Nex/Core/blob/master/Network/ExtendedOPL.cs

It requires hooking incoming and outgoing packets, then calling a custom event to apply unique properties on a per-viewer basis.

Example of implementation here; https://github.com/Vita-Nex/Core/blob/master/Modules/EquipmentSets/EquipmentSets.cs#L53
 
Back