RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

DoubleClick Equip/Unequip/Swap (DeusX) - not working properly on 2.3

pooka01

Sorceror
Console messages are better enroq, as you place it wherever you wish in your code and that just takes a little space.
And lol, i call that flaming.

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
back to subject.

This line under returns: that thing can be worn, AND we have nothing on that layer currently equipped
return ( m_Layer != Layer.Invalid && m.FindItemOnLayer( m_Layer ) == null );

while in your current codes you have:
you should change it to
Code:
            if (!this.IsAccessibleTo(from) || this.Layer == Layer.Invalid || this.Parent is Corpse || from.Backpack == null || !this.CanEquip(from)
                || !this.Movable)
            {
                // Lets not do something crazy like equipping unequippable/unreachable item
                // Also we don't want corpses to be handled in any way as players could possibly swap their rare item for some junk in there
                return;
            }
which traducts to:
not accessible, the layer of the item is not wearable, it is in a corpse, we have no backpack, -> then that thing can be worn, AND we have nothing on that layer currently equipped <- and is not movable.

so you woul need to do:
not accessible, the layer of the item is not wearable, it is in a corpse, we have no backpack, -> we have something on that layer currently equipped <- and is not movable.
Code:
            if (!this.IsAccessibleTo(from) || this.Layer == Layer.Invalid || this.Parent is Corpse || from.Backpack == null || from.FindItemOnLayer( m_Layer ) != null || !this.Movable)
            {
                // Lets not do something crazy like equipping unequippable/[COLOR=#cc99ff]unreachable[/COLOR] item
                // Also we don't want corpses to be handled in any way as players could possibly swap their rare item for some junk in there
                return;
            }

for unreachable you could just create a new check for:
Code:
if (from.InRange( this.GetWorldLocation(), 1 ))

if you want it only from his backpack:
Code:
if (this.Parent == from.Backpack) //checked "from.Backpack == null" just above, no need to repeat here.
 

daat99

Moderator
Staff member
If someone wants to make a private comment about someone else (me included) than do so in private messages or in the starbucks forum.

Either keep this thread on topic or it'll be locked and then you can blame me for locking threads where you post offensive comments.

PS
This post is in reference to a deleted post.
If I deleted your post than you know I'm talking to you.
 

Desttro

Traveler
Sorry for late reply, thank you pooka01. I'm currently out of computer, I will try it as soon as possible. Thanks.
 
Top