feat: Adds KR/EC client versions (No actual support yet). (#1506)
### Summary - Adds KR/EC client versions to ClientVersion - Adds distinction for enhanced versions in the page queue - Adds KR Expansion flags - Adds ProtocolChange enum support - Adds missing Moongate checks for TerMur - Adds better message for why a client version is not supported, and which ones are supported.
This commit is contained in:
parent
cee4d0fb15
commit
0bec97639f
13 changed files with 284 additions and 103 deletions
35
Projects/Server.Tests/Tests/Client/ClientVersionTests.cs
Normal file
35
Projects/Server.Tests/Tests/Client/ClientVersionTests.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using Xunit;
|
||||
|
||||
namespace Server.Tests.Network;
|
||||
|
||||
public class ClientVersionTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData("7.0.33.1", "67.0.33", false, 0)]
|
||||
[InlineData("7.0.45.65", "67.0.33", false, 1)]
|
||||
[InlineData("6.0.0.0", "67.0.33", false, -1)]
|
||||
public void TestCCAndECStringCtor(string ccVersion, string ecVersion, bool equal, int comparison)
|
||||
{
|
||||
var cc = new ClientVersion(ccVersion);
|
||||
var ec = new ClientVersion(ecVersion);
|
||||
|
||||
Assert.Equal(equal, cc == ec);
|
||||
Assert.Equal(comparison, cc.CompareTo(ec));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(7, 0, 33, 1, 67, 0, 33, 0, false, 0)]
|
||||
[InlineData(7, 0, 45, 65, 67, 0, 33, 0, false, 1)]
|
||||
[InlineData(6, 0, 0, 0, 67, 0, 33, 0, false, -1)]
|
||||
public void TestCCAndECCtor(
|
||||
int ccMaj, int ccMin, int ccRev, int ccPatch, int ecMaj, int ecMin, int ecRev, int ecPatch,
|
||||
bool equal, int comparison
|
||||
)
|
||||
{
|
||||
var cc = new ClientVersion(ccMaj, ccMin, ccRev, ccPatch);
|
||||
var ec = new ClientVersion(ecMaj, ecMin, ecRev, ecPatch);
|
||||
|
||||
Assert.Equal(equal, cc == ec);
|
||||
Assert.Equal(comparison, cc.CompareTo(ec));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue