Updated to net9.0
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<StartupObject>BNetServer.Server</StartupObject>
|
<StartupObject>BNetServer.Server</StartupObject>
|
||||||
<ApplicationIcon>Red.ico</ApplicationIcon>
|
<ApplicationIcon>Red.ico</ApplicationIcon>
|
||||||
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Framework\Framework.csproj" />
|
<ProjectReference Include="..\Framework\Framework.csproj" />
|
||||||
|
|||||||
@@ -262,10 +262,7 @@ namespace Framework.Cryptography.Ed25519
|
|||||||
// Leading zero bytes get encoded as leading `1` characters
|
// Leading zero bytes get encoded as leading `1` characters
|
||||||
int leadingZeroCount = input.TakeWhile(c => c == '1').Count();
|
int leadingZeroCount = input.TakeWhile(c => c == '1').Count();
|
||||||
var leadingZeros = Enumerable.Repeat((byte)0, leadingZeroCount);
|
var leadingZeros = Enumerable.Repeat((byte)0, leadingZeroCount);
|
||||||
var bytesWithoutLeadingZeros =
|
var bytesWithoutLeadingZeros = intData.ToByteArray(true, true);
|
||||||
intData.ToByteArray()
|
|
||||||
.Reverse()// to big endian
|
|
||||||
.SkipWhile(b => b == 0);//strip sign byte
|
|
||||||
var result = leadingZeros.Concat(bytesWithoutLeadingZeros).ToArray();
|
var result = leadingZeros.Concat(bytesWithoutLeadingZeros).ToArray();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
<Import Project="..\..\default.props" />
|
<Import Project="..\..\default.props" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||||
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -24,7 +24,9 @@ namespace Framework.IO
|
|||||||
deflateStream.Flush();
|
deflateStream.Flush();
|
||||||
}
|
}
|
||||||
buffer.WriteBytes(ms.ToArray());
|
buffer.WriteBytes(ms.ToArray());
|
||||||
buffer.WriteBytes(BitConverter.GetBytes(adler32).Reverse().ToArray());
|
var adlerBytes = BitConverter.GetBytes(adler32);
|
||||||
|
adlerBytes.Reverse();
|
||||||
|
buffer.WriteBytes(adlerBytes);
|
||||||
|
|
||||||
return buffer.GetData();
|
return buffer.GetData();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,9 +25,9 @@ namespace System
|
|||||||
public static string ToHexString(this byte[] byteArray, bool reverse = false)
|
public static string ToHexString(this byte[] byteArray, bool reverse = false)
|
||||||
{
|
{
|
||||||
if (reverse)
|
if (reverse)
|
||||||
return byteArray.Reverse().Aggregate("", (current, b) => current + b.ToString("X2"));
|
byteArray.Reverse();
|
||||||
else
|
|
||||||
return byteArray.Aggregate("", (current, b) => current + b.ToString("X2"));
|
return byteArray.Aggregate("", (current, b) => current + b.ToString("X2"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static byte[] ToByteArray(this string str, bool reverse = false)
|
public static byte[] ToByteArray(this string str, bool reverse = false)
|
||||||
@@ -40,7 +40,10 @@ namespace System
|
|||||||
string temp = String.Concat(str[i * 2], str[i * 2 + 1]);
|
string temp = String.Concat(str[i * 2], str[i * 2 + 1]);
|
||||||
res[i] = Convert.ToByte(temp, 16);
|
res[i] = Convert.ToByte(temp, 16);
|
||||||
}
|
}
|
||||||
return reverse ? res.Reverse().ToArray() : res;
|
if (reverse)
|
||||||
|
res.Reverse();
|
||||||
|
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static byte[] ToByteArray(this string value, char separator)
|
public static byte[] ToByteArray(this string value, char separator)
|
||||||
|
|||||||
@@ -1449,4 +1449,4 @@ namespace Game.Chat
|
|||||||
handler.SendSysMessage($"Map Id: {map.GetId()} Name: '{map.GetMapName()}' Instance Id: {map.GetInstanceId()} Highest Guid Creature: {map.GetMaxLowGuid(HighGuid.Creature)} GameObject: {map.GetMaxLowGuid(HighGuid.GameObject)}");
|
handler.SendSysMessage($"Map Id: {map.GetId()} Name: '{map.GetMapName()}' Instance Id: {map.GetInstanceId()} Highest Guid Creature: {map.GetMaxLowGuid(HighGuid.Creature)} GameObject: {map.GetMaxLowGuid(HighGuid.GameObject)}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
<Import Project="..\..\default.props" />
|
<Import Project="..\..\default.props" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||||
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<ApplicationIcon>Blue.ico</ApplicationIcon>
|
<ApplicationIcon>Blue.ico</ApplicationIcon>
|
||||||
<StartupObject>WorldServer.Server</StartupObject>
|
<StartupObject>WorldServer.Server</StartupObject>
|
||||||
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputPath>../../Build/$(Configuration)/$(Platform)</OutputPath>
|
<OutputPath>../../Build/$(Configuration)/$(Platform)</OutputPath>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||||
<AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>
|
<AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>
|
||||||
<AppendRuntimeIdentifierToOutputPath>False</AppendRuntimeIdentifierToOutputPath>
|
<AppendRuntimeIdentifierToOutputPath>False</AppendRuntimeIdentifierToOutputPath>
|
||||||
|
|||||||
Reference in New Issue
Block a user