upd(readme): add a note

This commit is contained in:
capyb2222 committed 2026-09-08 17:22:28 -07:00
1 parent 19d702e1a6
commit 116ea108f9
4 files changed
+63 -7

No files matched your search

@@ -7,17 +7,43 @@ namespace CapySR.GameServer.Handlers;
[Handlers]
public static class TutorialHandlers
{
// the client reads rsp.Tutorial / rsp.TutorialGuide without a nil check, so leaving
// them unset throws in TutorialModule.lua and the load never gets past the loading
// screen. echo the id back and call it finished, like the rest of the tutorial state.
public static Task OnUnlockTutorial(PlayerSession session, UnlockTutorialCsReq request) =>
session.SendAsync(new UnlockTutorialScRsp { Retcode = 0 });
session.SendAsync(new UnlockTutorialScRsp
{
Retcode = 0,
Tutorial = Tutorial(request.HPIMDINCCNN),
});
public static Task OnFinishTutorial(PlayerSession session, FinishTutorialCsReq request) =>
session.SendAsync(new FinishTutorialScRsp { Retcode = 0 });
session.SendAsync(new FinishTutorialScRsp
{
Retcode = 0,
Tutorial = Tutorial(request.TutorialId),
});
public static Task OnUnlockTutorialGuide(PlayerSession session, UnlockTutorialGuideCsReq request) =>
session.SendAsync(new UnlockTutorialGuideScRsp { Retcode = 0 });
session.SendAsync(new UnlockTutorialGuideScRsp
{
Retcode = 0,
TutorialGuide = Guide(request.GroupId, request.Type),
});
public static Task OnFinishTutorialGuide(PlayerSession session, FinishTutorialGuideCsReq request) =>
session.SendAsync(new FinishTutorialGuideScRsp { Retcode = 0 });
session.SendAsync(new FinishTutorialGuideScRsp
{
Retcode = 0,
Reward = new ItemList(),
TutorialGuide = Guide(request.GroupId, request.Type),
});
private static Tutorial Tutorial(uint id) =>
new() { Id = id, Status = TutorialStatus.TutorialFinish };
private static TutorialGuide Guide(uint groupId, TutorialGuideType type) =>
new() { Id = groupId, Type = type, Status = TutorialStatus.TutorialFinish };
public static Task OnSetClientPaused(PlayerSession session, SetClientPausedCsReq request) =>
session.SendAsync(new SetClientPausedScRsp { Retcode = 0, Paused = request.Paused });