horadryn
Apprentice
Posts: 8
Likes Given: 2
Likes Received: 0 in 0 posts
Joined: Nov 2012
Reputation: 0
|
RE: [UPDATED]Paperdoll & Web
I think this is the part that establishes the hierarchy of the layers ... To avoid seeing the pants over the armor ...
although, looking deeply, I think this is the right part
Code:
public void InsertItems( Mobile mob )
{
ArrayList items = m_Items;
items.AddRange( mob.Items );
string serial = mob.Serial.Value.ToString();
items.Sort( LayerComparer.Instance );
int index = 0;
bool hidePants = false;
bool alive = mob.Alive;
bool hideHair = !alive;
for ( int i = 0; i < items.Count; ++i )
{
Item item = (Item)items[i];
if ( !LayerComparer.IsValid( item ) )
break;
if ( !alive && item.ItemID != 8270 )
continue;
if ( item.ItemID == 0x1411 || item.ItemID == 0x141A ) // plate legs
hidePants = true;
else if ( hidePants && item.Layer == Layer.Pants )
continue;
if ( !hideHair && item.Layer == Layer.Helm )
hideHair = true;
InsertItem( serial, index++, item.ItemID, item.Hue );
}
if ( mob.FacialHairItemID != 0 && alive )
InsertItem( serial, index++, mob.FacialHairItemID, mob.FacialHairHue );
if ( mob.HairItemID != 0 && !hideHair )
InsertItem( serial, index++, mob.HairItemID, mob.HairHue );
items.Clear();
}
(This post was last modified: 06-16-2014 04:11 AM by horadryn.)
|
|
06-16-2014 03:43 AM |
|
|