Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<PackageVersion Include="NosCore.Analyzers" Version="2.0.0" />
<PackageVersion Include="NosCore.Dao" Version="5.0.0" />
<PackageVersion Include="NosCore.Networking" Version="8.0.0" />
<PackageVersion Include="NosCore.Packets" Version="21.0.0" />
<PackageVersion Include="NosCore.Packets" Version="21.1.0" />
<PackageVersion Include="NosCore.PathFinder" Version="2.1.0" />
<PackageVersion Include="NosCore.Shared" Version="6.0.1" />
<PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.3" />
Expand Down
2 changes: 1 addition & 1 deletion src/NosCore.PacketHandlers/Miniland/MlobjPacketHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public override async Task ExecuteAsync(MLEditPacket mlEditPacket, ClientSession
switch (mlEditPacket.Type)
{
case 1:
await clientSession.SendPacketAsync(new MlintroPacket { Intro = mlEditPacket.MinilandInfo!.Replace(' ', '^') });
await clientSession.SendPacketAsync(new MlintroPacket { Intro = mlEditPacket.MinilandInfo });
miniland.MinilandMessage = mlEditPacket.MinilandInfo;
await clientSession.SendPacketAsync(new InfoiPacket
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// |_|\__|\__/ |___/ \__/\__/|_|_\___|
//

using NosCore.Packets;
using Mapster;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
Expand Down Expand Up @@ -207,7 +208,11 @@ private void MinilandMessageWithSpaceShouldBeChanged()
var miniland = MinilandProvider.GetMiniland(Session.Character.CharacterId);
Assert.AreEqual("Test Test", miniland.MinilandMessage);
var lastpacket2 = (MlintroPacket?)Session.LastPackets.FirstOrDefault(s => s is MlintroPacket);
Assert.AreEqual("Test^Test", lastpacket2?.Intro);

// The packet carries the message as typed; the "^" encoding is the serializer's,
// which is why MlintroPacket.Intro declares EscapeSpaces.
Assert.AreEqual("Test Test", lastpacket2?.Intro);
Assert.AreEqual("mlintro Test^Test", new Serializer(new[] { typeof(MlintroPacket) }).Serialize(lastpacket2!));
}

private void InfoPacketShouldBeSent()
Expand Down
Loading