campaign UI working

This commit is contained in:
Mikhail Thompson
2024-06-26 22:02:09 +03:00
parent ce0b5bf040
commit 7c6e57bd63
15 changed files with 306 additions and 9 deletions

View File

@@ -0,0 +1,24 @@
using nksrv.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace nksrv.LobbyServer.Msgs.User
{
[PacketPath("/user/getfieldtalklist")]
public class GetFieldTalkList : LobbyMsgHandler
{
protected override async Task HandleAsync()
{
var req = await ReadData<ReqGetFieldTalkList>();
var user = GetUser();
var response = new ResGetFieldTalkList();
// TODO
WriteData(response);
}
}
}

View File

@@ -0,0 +1,30 @@
using nksrv.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace nksrv.LobbyServer.Msgs.User
{
[PacketPath("/User/GetScenarioList")]
public class GetScenarioList : LobbyMsgHandler
{
protected override async Task HandleAsync()
{
var req = await ReadData<ReqGetScenarioList>();
var user = GetUser();
// todo what are bookmark scenarios?
// this returns a list of scenarios that user has completed
var response = new ResGetScenarioList();
foreach (var item in user.CompletedScenarios)
{
response.ScenarioList.Add(item);
}
WriteData(response);
}
}
}