fix(map): Fixes map diffs (Old Haven/Minax) (#720)

* Fixes reading map/static diffs.
This commit is contained in:
Kamron Batman 2021-08-22 23:35:18 -07:00 • committed by GitHub
parent 0bcf7a8d01
commit 9729b5a7b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 54 additions and 157 deletions

View file

@ -6,16 +6,12 @@ namespace Server.Tests.Network
{
public class MapPatchesTests : IClassFixture<ServerFixture>
{
[Theory]
[InlineData(ProtocolChanges.Version500a, ClientFlags.Malas | ClientFlags.Trammel | ClientFlags.Felucca)]
[InlineData(ProtocolChanges.Version7090, ClientFlags.TerMur | ClientFlags.Trammel | ClientFlags.Felucca)]
public void TestMapPatches(ProtocolChanges protocolChanges, ClientFlags flags)
[Fact]
public void TestMapPatches()
{
var ns = PacketTestUtilities.CreateTestNetState();
ns.ProtocolChanges = protocolChanges;
ns.Flags = flags;
var expected = ns.ProtocolChanges >= ProtocolChanges.Version6000 ? Span<byte>.Empty : new MapPatches().Compile();
var expected = new MapPatches().Compile();
ns.SendMapPatches();