diff --git a/Projects/Server/World/World.cs b/Projects/Server/World/World.cs index ab7364d4b..b2aa02afb 100644 --- a/Projects/Server/World/World.cs +++ b/Projects/Server/World/World.cs @@ -367,12 +367,12 @@ namespace Server IIndexInfo mobileIndexInfo = new EntityTypeIndex("Mobiles"); IIndexInfo guildIndexInfo = new EntityTypeIndex("Guilds"); - Items = LoadIndex(itemIndexInfo, out items); Mobiles = LoadIndex(mobileIndexInfo, out mobiles); + Items = LoadIndex(itemIndexInfo, out items); Guilds = LoadIndex(guildIndexInfo, out guilds); - LoadData(itemIndexInfo, items); LoadData(mobileIndexInfo, mobiles); + LoadData(itemIndexInfo, items); LoadData(guildIndexInfo, guilds); EventSink.InvokeWorldLoad(); @@ -464,8 +464,8 @@ namespace Server IIndexInfo mobileIndexInfo = new EntityTypeIndex("Mobiles"); IIndexInfo guildIndexInfo = new EntityTypeIndex("Guilds"); - WriteEntities(itemIndexInfo, Items, ItemTypes); WriteEntities(mobileIndexInfo, Mobiles, MobileTypes); + WriteEntities(itemIndexInfo, Items, ItemTypes); WriteEntities(guildIndexInfo, Guilds, GuildTypes); watch.Stop(); diff --git a/Projects/UOContent/Items/Armor/BaseArmor.cs b/Projects/UOContent/Items/Armor/BaseArmor.cs index 1c5fe2f34..0dffbc5f3 100644 --- a/Projects/UOContent/Items/Armor/BaseArmor.cs +++ b/Projects/UOContent/Items/Armor/BaseArmor.cs @@ -1655,17 +1655,12 @@ namespace Server.Items return true; } - if (Layer == Layer.Pants) + return Layer switch { - return m.FindItemOnLayer(Layer.InnerLegs) != null; - } - - if (Layer == Layer.Shirt) - { - return m.FindItemOnLayer(Layer.InnerTorso) != null; - } - - return false; + Layer.Pants => m.FindItemOnLayer(Layer.InnerLegs) != null, + Layer.Shirt => m.FindItemOnLayer(Layer.InnerTorso) != null, + _ => false + }; } public override bool OnEquip(Mobile from)