fix(core): Converts some packets & misc fixes/cleanup (#414)

- [X] Adds a stop music packet
- [X] Converts chat packets
- [X] Breaks out chat code a little bit more
- [X] Converts character statue animation packet
- [X] Renames some folders to have spaces
- [X] Organizes and consolidates incoming/outgoing packets for other content
- [X] Fixes virtual checks
This commit is contained in:
Kamron Batman 2021-01-16 21:01:54 -08:00 • committed by GitHub
parent a146955f6c
commit fbafd7210d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
49 changed files with 814 additions and 662 deletions

View file

@ -0,0 +1,25 @@
using System;
using Server.Engines.Chat;
using Server.Tests;
using Server.Tests.Network;
using Xunit;
namespace UOContent.Tests
{
public class ChatPacketTests
{
[Theory]
[InlineData(null, 100, "some param", "some other param")]
[InlineData("ENU", 200, "a third param", "another param")]
public void TestSendChatMessage(string lang, int number, string param1, string param2)
{
var expected = new ChatMessagePacket(lang, number, param1, param2).Compile();
using var ns = PacketTestUtilities.CreateTestNetState();
ns.SendChatMessage(lang, number, param1, param2);
var result = ns.SendPipe.Reader.TryRead();
AssertThat.Equal(result.Buffer[0].AsSpan(0), expected);
}
}
}