This commit is contained in:
rafi1212122
2023-05-30 09:37:52 +07:00
parent ca558f76bd
commit 88c69529fd
17 changed files with 243 additions and 9 deletions

View File

@@ -11,6 +11,7 @@ namespace PemukulPaku.GameServer
public readonly string Id;
public readonly TcpClient Client;
public readonly Logger c;
public long LastKeepAlive = Global.GetUnixInSeconds();
public Player Player = default!;
public Session(string id, TcpClient client)
@@ -82,6 +83,7 @@ namespace PemukulPaku.GameServer
public void ProcessPacket(Packet _packet)
{
string PacketName = Enum.GetName(typeof(CmdId), _packet.CmdId)!;
if(PacketName == "KeepAliveNotify") { LastKeepAlive = Global.GetUnixInSeconds(); c.Log(PacketName); return; }
try
{
CmdId cmdId = (CmdId)Enum.ToObject(typeof(CmdId), _packet.CmdId);