forked from PGR/ascnet
player instance on session
This commit is contained in:
parent
5af2ab34d0
commit
8ebfb0df9a
|
@ -38,6 +38,7 @@ namespace AscNet.GameServer.Handlers
|
|||
return;
|
||||
}
|
||||
|
||||
session.player = player;
|
||||
session.SendResponse(new LoginResponse
|
||||
{
|
||||
Code = 0,
|
||||
|
@ -64,6 +65,7 @@ namespace AscNet.GameServer.Handlers
|
|||
return;
|
||||
}
|
||||
|
||||
session.player = player;
|
||||
session.SendResponse(new ReconnectResponse()
|
||||
{
|
||||
ReconnectToken = request.Token
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using System.Buffers.Binary;
|
||||
using System.Net.Sockets;
|
||||
using AscNet.Common;
|
||||
using AscNet.Common.Database;
|
||||
using AscNet.Common.Util;
|
||||
using AscNet.Logging;
|
||||
using MessagePack;
|
||||
|
@ -13,6 +14,7 @@ namespace AscNet.GameServer
|
|||
{
|
||||
public readonly string id;
|
||||
public readonly TcpClient client;
|
||||
public Player player = default!;
|
||||
public readonly Logger log;
|
||||
private long lastPacketTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
|
||||
private ushort packetNo = 0;
|
||||
|
|
Loading…
Reference in New Issue