So this is the issue, I want to set it so when a player removed a layer of equipment, such as gloves. The player drops all weapons/shields to pack.


I've tried using the
Code:
this.HeldBy.DropHolding();
however that ends in a crash when removing the gloves.

Then I added in this instead as m was already referenced to mobile.

Code:
m.DropHolding();

this doesn't crash the server but doesn't remove the equipped items when removing gloves.
 
Nevermind on that.. lol.. I was simply over thinking it.. Here is my final outcome.

Code:
                Item weapon1 = m.FindItemOnLayer(Layer.OneHanded);
                if (weapon1 is BaseWeapon)
                    m.AddToBackpack(weapon1);
                Item weapon2 = m.FindItemOnLayer(Layer.TwoHanded);
                if (weapon2 is BaseWeapon)
                    m.AddToBackpack(weapon2);
 
Back