diff --git a/Projects/Server/Items/Item.cs b/Projects/Server/Items/Item.cs index bff61cba3..0e49d5568 100644 --- a/Projects/Server/Items/Item.cs +++ b/Projects/Server/Items/Item.cs @@ -796,12 +796,12 @@ namespace Server if (x != 0 || y != 0 || z != 0) { - if (x >= short.MinValue && x <= short.MaxValue && y >= short.MinValue && y <= short.MaxValue && - z >= sbyte.MinValue && z <= sbyte.MaxValue) + if (x is >= short.MinValue and <= short.MaxValue && y is >= short.MinValue and <= short.MaxValue && + z is >= sbyte.MinValue and <= sbyte.MaxValue) { if (x != 0 || y != 0) { - if (x >= byte.MinValue && x <= byte.MaxValue && y >= byte.MinValue && y <= byte.MaxValue) + if (x is >= byte.MinValue and <= byte.MaxValue && y is >= byte.MinValue and <= byte.MaxValue) { flags |= SaveFlag.LocationByteXY; } @@ -1291,7 +1291,7 @@ namespace Server var worldLoc = GetWorldLocation(); var update = (flags & ItemDelta.Update) != 0; - if (update && m_Parent is Container contParent && !contParent.IsPublicContainer) + if (update && m_Parent is Container { IsPublicContainer: false } contParent) { var rootParent = contParent.RootParent as Mobile; Mobile tradeRecip = null; @@ -1752,12 +1752,9 @@ namespace Server parentItem.OnItemBounceCleared(this); } } - else if (bounce.Parent is Mobile parentMobile) + else if (bounce.Parent is Mobile { Deleted: false } parentMobile) { - if (!parentMobile.Deleted) - { - parentMobile.OnItemBounceCleared(this); - } + parentMobile.OnItemBounceCleared(this); } VerifyCompactInfo(); @@ -2348,7 +2345,7 @@ namespace Server var itemID = m_ItemID; var doubled = m_Amount > 1; - if (itemID >= 0xEEA && itemID <= 0xEF2) // Are we coins? + if (itemID is >= 0xEEA and <= 0xEF2) // Are we coins? { var coinBase = (itemID - 0xEEA) / 3; coinBase *= 3; diff --git a/Projects/UOContent/World Saves/AutoArchive.cs b/Projects/UOContent/World Saves/AutoArchive.cs index c0ec356e1..62a50f53d 100755 --- a/Projects/UOContent/World Saves/AutoArchive.cs +++ b/Projects/UOContent/World Saves/AutoArchive.cs @@ -86,7 +86,7 @@ namespace Server.Saves } var backupPath = Path.Combine(BackupPath, Utility.GetTimeStamp()); - AssemblyHandler.EnsureDirectory(BackupPath); + AssemblyHandler.EnsureDirectory(backupPath); Directory.Move(args.OldSavePath, backupPath); logger.Information($"Created backup at {backupPath}");