修正
This commit is contained in:
parent
16806a40c8
commit
d4528a6dcc
@ -5,7 +5,7 @@ using PSO2SERVER.Packets.PSOPackets;
|
||||
namespace PSO2SERVER.Packets.Handlers
|
||||
{
|
||||
[PacketHandlerAttr(0x11, 0x0D)]
|
||||
public class PingTimestampResponse : PacketHandler
|
||||
public class ClientPingHandler : PacketHandler
|
||||
{
|
||||
#region implemented abstract members of PacketHandler
|
||||
|
||||
@ -14,10 +14,7 @@ namespace PSO2SERVER.Packets.Handlers
|
||||
var reader = new PacketReader(data, position, size);
|
||||
var clientTime = reader.ReadUInt64();
|
||||
|
||||
var writer = new PacketWriter();
|
||||
writer.Write(clientTime);
|
||||
writer.Write(Helper.Timestamp(DateTime.UtcNow));
|
||||
context.SendPacket(0x11, 0xE, 0, writer.ToArray());
|
||||
context.SendPacket(new ClientPongPacket(clientTime));
|
||||
}
|
||||
|
||||
#endregion
|
@ -8,9 +8,10 @@ namespace PSO2SERVER.Packets.PSOPackets
|
||||
{
|
||||
public class ClientPongPacket : Packet
|
||||
{
|
||||
|
||||
public ClientPongPacket()
|
||||
private readonly ulong _clientTime;
|
||||
public ClientPongPacket(ulong clientTime)
|
||||
{
|
||||
_clientTime = clientTime;
|
||||
}
|
||||
|
||||
#region implemented abstract members of Packet
|
||||
@ -18,6 +19,8 @@ namespace PSO2SERVER.Packets.PSOPackets
|
||||
public override byte[] Build()
|
||||
{
|
||||
var pkt = new PacketWriter();
|
||||
pkt.Write(_clientTime);
|
||||
pkt.Write(Helper.Timestamp(DateTime.UtcNow));
|
||||
return pkt.ToArray();
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,7 @@
|
||||
<Compile Include="Packets\Handlers\0E-PartyHandler\0E-19-ChatStatusHandler.cs" />
|
||||
<Compile Include="Packets\Handlers\11-ClientHandler\11-B8-CharacterShipTransferRightsRequest.cs" />
|
||||
<Compile Include="Packets\Handlers\11-ClientHandler\11-06-DeleteCharacter.cs" />
|
||||
<Compile Include="Packets\Handlers\11-ClientHandler\11-0D-PingTimestampResponse.cs" />
|
||||
<Compile Include="Packets\Handlers\11-ClientHandler\11-0D-ClientPingHandler.cs" />
|
||||
<Compile Include="Packets\Handlers\11-ClientHandler\11-1D-GuildInfoRequest.cs" />
|
||||
<Compile Include="Packets\Handlers\11-ClientHandler\11-2B-LogOutRequest.cs" />
|
||||
<Compile Include="Packets\Handlers\11-ClientHandler\11-3E-CharacterSpawn.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user