Vorspire
Knight
Creating an ArrayList
i want a deed, on double click to get all equiped ARMOR parts (helm, chest, gorget, arms, gloves, legs and shield) and put them in an arraylist so that later on they can be hued. Im not sure on ArrayLists, they confuse me, but here's my attempt anyway...
if someone could tell me how to search each individual part and add it to the ArrayList, i would be greatful, thanks in advance :>
i want a deed, on double click to get all equiped ARMOR parts (helm, chest, gorget, arms, gloves, legs and shield) and put them in an arraylist so that later on they can be hued. Im not sure on ArrayLists, they confuse me, but here's my attempt anyway...
if someone could tell me how to search each individual part and add it to the ArrayList, i would be greatful, thanks in advance :>
Code:
case (int)Buttons.Okay:
{
TextRelay relay = info.GetTextEntry( 0 );
string hueno = ( relay == null ? null : relay.Text.Trim() );
if ( hueno.Length <= 4 )
{
ArrayList equipitems = new ArrayList( pm.BaseArmor );
foreach (BaseArmor arpart in equipitems)
if( pm != null )
{
if ((arpart.Layer != Layer.Helm) && (arpart.Layer != Layer.InnerTorso) && (arpart.Layer != Layer.Neck) && (arpart.Layer != Layer.Pants) && (arpart.Layer != Layer.Gloves) && (arpart.Layer != Layer.Arms))
{
arpart.Hue = Utility.ToInt32( relay.Text );
pm.SendMessage("Your Armor Set has been recolored.");
FARD.Delete();
}
}
else
{
pm.SendMessage("Unable to recolor your Armor Set at this time.");
}
}
else
{
pm.SendMessage("Hue code too long. Must be a 4-digit number.");
}
break;
}