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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
session.player = player;
|
||||||
session.SendResponse(new LoginResponse
|
session.SendResponse(new LoginResponse
|
||||||
{
|
{
|
||||||
Code = 0,
|
Code = 0,
|
||||||
|
@ -64,6 +65,7 @@ namespace AscNet.GameServer.Handlers
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
session.player = player;
|
||||||
session.SendResponse(new ReconnectResponse()
|
session.SendResponse(new ReconnectResponse()
|
||||||
{
|
{
|
||||||
ReconnectToken = request.Token
|
ReconnectToken = request.Token
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
using System.Buffers.Binary;
|
using System.Buffers.Binary;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
using AscNet.Common;
|
using AscNet.Common;
|
||||||
|
using AscNet.Common.Database;
|
||||||
using AscNet.Common.Util;
|
using AscNet.Common.Util;
|
||||||
using AscNet.Logging;
|
using AscNet.Logging;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
|
@ -13,6 +14,7 @@ namespace AscNet.GameServer
|
||||||
{
|
{
|
||||||
public readonly string id;
|
public readonly string id;
|
||||||
public readonly TcpClient client;
|
public readonly TcpClient client;
|
||||||
|
public Player player = default!;
|
||||||
public readonly Logger log;
|
public readonly Logger log;
|
||||||
private long lastPacketTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
|
private long lastPacketTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
|
||||||
private ushort packetNo = 0;
|
private ushort packetNo = 0;
|
||||||
|
|
Loading…
Reference in New Issue