main quest works

This commit is contained in:
Mikhail Thompson
2024-06-29 15:11:42 +03:00
parent 1229104086
commit 846b72ce9d
21 changed files with 299 additions and 49 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.Trigger
{
[PacketPath("/Trigger/FinMainQuest")]
public class FinishMainQuest : LobbyMsgHandler
{
protected override async Task HandleAsync()
{
var req = await ReadData<ReqFinMainQuest>();
var user = GetUser();
Console.WriteLine("Complete quest: " + req.Tid);
user.SetQuest(req.Tid, true); // todo is this right?
JsonDb.Save();
var response = new ResFinMainQuest();
WriteData(response);
}
}
}