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
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.
for unreachable you could just create a new check for:
if you want it only from his backpack:
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;
}
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.