fix: Fixes backup folder not being created (#801)
This commit is contained in:
parent
fa5eafdaff
commit
b5799c33af
2 changed files with 8 additions and 11 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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}");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue