From 766a8605b7ffa07541e6fcd3fdf01d9a8540e3f8 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Fri, 26 Jul 2024 14:43:59 -0400 Subject: [PATCH] add GetInterceptData --- .../Msgs/Intercept/GetInterceptData.cs | 25 +++++++++++++++++++ nksrv/Protos/intercept.proto | 15 +++++++++++ nksrv/nksrv.csproj | 1 + 3 files changed, 41 insertions(+) create mode 100644 nksrv/LobbyServer/Msgs/Intercept/GetInterceptData.cs create mode 100644 nksrv/Protos/intercept.proto diff --git a/nksrv/LobbyServer/Msgs/Intercept/GetInterceptData.cs b/nksrv/LobbyServer/Msgs/Intercept/GetInterceptData.cs new file mode 100644 index 0000000..4100aa9 --- /dev/null +++ b/nksrv/LobbyServer/Msgs/Intercept/GetInterceptData.cs @@ -0,0 +1,25 @@ +using nksrv.Net; +using nksrv.Utils; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace nksrv.LobbyServer.Msgs.Intercept +{ + [PacketPath("/intercept/get")] + public class GetInterceptData : LobbyMsgHandler + { + protected override async Task HandleAsync() + { + var req = await ReadData(); + + var response = new ResGetInterceptData(); + + // TODO implement + + await WriteDataAsync(response); + } + } +} diff --git a/nksrv/Protos/intercept.proto b/nksrv/Protos/intercept.proto new file mode 100644 index 0000000..b3b8248 --- /dev/null +++ b/nksrv/Protos/intercept.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; + +option csharp_namespace = "nksrv.Net"; + +import "google/protobuf/timestamp.proto"; +import "google/protobuf/Duration.proto"; +import "Protos/allmsgs.proto"; + +message ReqGetInterceptData {} +message ResGetInterceptData { + int32 NormalInterceptGroup = 1; + int32 SpecialInterceptId = 2; + int32 TicketCount = 3; + int32 MaxTicketCount = 4; +} \ No newline at end of file diff --git a/nksrv/nksrv.csproj b/nksrv/nksrv.csproj index cd8f5b0..d381b6a 100644 --- a/nksrv/nksrv.csproj +++ b/nksrv/nksrv.csproj @@ -30,6 +30,7 @@ +