FaceMelter
Member
I've been working on a little snippet of code that equips and un-equips items by checking the layer they are on.
Armor is working just great! But, I've noticed that weapons can have MANY possible layers,
I've seen FirstValid, OneHanded and TwoHanded so far.
I'm looking for help on how I could implement a check to see what weapon is equipped currently, regardless of layer. I'm not sure how to do that, or if it's a possible check that can be made.
Or, perhaps check all three of those layers and see if one comes back valid, and then remove it.
Would that be going too far? Any Advice?
Code:
if (mUseItem is BaseArmor)
{
var Layer = mUseItem.Layer;
Item RemoveItem = from.FindItemOnLayer(Layer);
mPouch.DropItem(RemoveItem);
from.EquipItem(mUseItem);
}
else if (mUseItem is BaseWeapon)
{
var Layer = mUseItem.Layer;
Item RemoveItem = from.FindItemOnLayer(Layer);
mPouch.DropItem(RemoveItem);
from.EquipItem(mUseItem);
}
I've seen FirstValid, OneHanded and TwoHanded so far.
I'm looking for help on how I could implement a check to see what weapon is equipped currently, regardless of layer. I'm not sure how to do that, or if it's a possible check that can be made.
Or, perhaps check all three of those layers and see if one comes back valid, and then remove it.
Would that be going too far? Any Advice?