~ruther/NosSmooth.Local

e99e694f3410aa627cab2a22a010c061c27c65ff — Rutherther 2 years ago 561d094
feat(client): fire events for packets sent from the bot
1 files changed, 6 insertions(+), 4 deletions(-)

M src/Core/NosSmooth.LocalClient/NostaleLocalClient.cs
M src/Core/NosSmooth.LocalClient/NostaleLocalClient.cs => src/Core/NosSmooth.LocalClient/NostaleLocalClient.cs +6 -4
@@ 112,17 112,19 @@ public class NostaleLocalClient : BaseNostaleClient
    }

    /// <inheritdoc />
    public override Task<Result> ReceivePacketAsync(string packetString, CancellationToken ct = default)
    public override async Task<Result> ReceivePacketAsync(string packetString, CancellationToken ct = default)
    {
        ReceivePacket(packetString);
        return Task.FromResult(Result.FromSuccess());
        await ProcessPacketAsync(PacketSource.Server, packetString);
        return Result.FromSuccess();
    }

    /// <inheritdoc />
    public override Task<Result> SendPacketAsync(string packetString, CancellationToken ct = default)
    public override async Task<Result> SendPacketAsync(string packetString, CancellationToken ct = default)
    {
        SendPacket(packetString);
        return Task.FromResult(Result.FromSuccess());
        await ProcessPacketAsync(PacketSource.Client, packetString);
        return Result.FromSuccess();
    }

    private bool ReceiveCallback(string packet)

Do not follow this link