2023-10-27 17:47:17 +00:00
|
|
|
using Wonderking.Packets;
|
|
|
|
|
2023-10-12 07:15:34 +00:00
|
|
|
namespace Server.Packets;
|
2023-08-09 14:23:41 +00:00
|
|
|
|
2023-08-12 21:02:59 +00:00
|
|
|
using MassTransit;
|
2023-08-09 14:23:41 +00:00
|
|
|
|
|
|
|
[MessageUrn("packets")]
|
2023-08-09 18:14:14 +00:00
|
|
|
public class RawPacket
|
2023-08-09 14:23:41 +00:00
|
|
|
{
|
2023-08-09 18:14:14 +00:00
|
|
|
public RawPacket(OperationCode operationCode, byte[] messageBody, uint aliveTime, byte unknownValue2,
|
2023-08-09 20:04:10 +00:00
|
|
|
byte unknownValue, Guid sessionId, AuthSession session)
|
2023-08-09 14:23:41 +00:00
|
|
|
{
|
2023-08-11 09:31:30 +00:00
|
|
|
this.MessageBody = messageBody;
|
|
|
|
this.UnknownValue2 = unknownValue2;
|
|
|
|
this.UnknownValue = unknownValue;
|
|
|
|
this.SessionId = sessionId;
|
|
|
|
this.Session = session;
|
|
|
|
this.OperationCode = operationCode;
|
2023-08-10 06:51:40 +00:00
|
|
|
/*
|
|
|
|
* 20s = 5
|
|
|
|
* 15s = 4
|
|
|
|
* 10s = 3
|
|
|
|
* client alive time * 5s => uptime
|
|
|
|
*/
|
2023-08-11 09:31:30 +00:00
|
|
|
this.ClientAliveTime = TimeSpan.FromSeconds(5 * aliveTime);
|
2023-08-09 14:23:41 +00:00
|
|
|
}
|
2023-08-12 21:02:59 +00:00
|
|
|
|
|
|
|
public OperationCode OperationCode { get; }
|
|
|
|
public byte[] MessageBody { get; }
|
|
|
|
public TimeSpan ClientAliveTime { get; }
|
|
|
|
public byte UnknownValue { get; }
|
|
|
|
public byte UnknownValue2 { get; }
|
|
|
|
public Guid SessionId { get; }
|
|
|
|
|
|
|
|
public AuthSession Session { get; }
|
2023-08-11 09:31:30 +00:00
|
|
|
}
|