29 lines
889 B
C#
29 lines
889 B
C#
|
using RPG.Network.Proto;
|
|||
|
using RPG.Services.Gameserver.Modules.Attributes;
|
|||
|
using RPG.Services.Gameserver.Session;
|
|||
|
|
|||
|
namespace RPG.Services.Gameserver.Modules;
|
|||
|
internal class LoginModule : BaseModule
|
|||
|
{
|
|||
|
[OnCommand(CmdType.CmdPlayerLoginCsReq)]
|
|||
|
public Task OnCmdPlayerLoginCsReq(PlayerSession session, ReadOnlyMemory<byte> body)
|
|||
|
{
|
|||
|
PlayerLoginCsReq req = PlayerLoginCsReq.Parser.ParseFrom(body.Span);
|
|||
|
Send(session, CmdType.CmdPlayerLoginScRsp, new PlayerLoginScRsp
|
|||
|
{
|
|||
|
Retcode = 0,
|
|||
|
LoginRandom = req.LoginRandom,
|
|||
|
Stamina = 180,
|
|||
|
ServerTimestampMs = (ulong)DateTimeOffset.Now.ToUnixTimeMilliseconds(),
|
|||
|
BasicInfo = new()
|
|||
|
{
|
|||
|
Level = 5,
|
|||
|
Stamina = 180,
|
|||
|
Nickname = "KafkaSR"
|
|||
|
}
|
|||
|
});
|
|||
|
|
|||
|
return Task.CompletedTask;
|
|||
|
}
|
|||
|
}
|