public void EquipItem(Equipment item, Equipment.EquipmentLocation location) { Equipment returned = null; Weapon weapon = item as Weapon; if (weapon == null) { returned = EquipedItems.EquipArmor(item); } else { returned = EquipedItems.EquipWeapon(weapon, location == Equipment.EquipmentLocation.Weapon); BasicAttackSkill = new SkillInstance(SkillFactory.BasicAttacks[EquipedItems.WeaponType()]); SetWeaponSprites(); } if (returned != null && !InventoryItems.AddItem(returned)) { DropItem(returned); } RebuildTempStats(); RebuildEquipment(); }