Files
DanhengServer-OpenSource/GameServer/Server/Packet/Send/Others/PacketClientDownloadDataScNotify.cs
Somebody 87d228eb79 Feature:Asynchronous Operation & Formatting Code
- Now the async operation is enabled!
- Code formatted by Resharper plugin <3
2024-07-22 17:12:03 +08:00

28 lines
825 B
C#

using EggLink.DanhengServer.Proto;
using Google.Protobuf;
namespace EggLink.DanhengServer.Server.Packet.Send.Others;
public class PacketClientDownloadDataScNotify : BasePacket
{
public PacketClientDownloadDataScNotify(byte[] data) : base(CmdIds.ClientDownloadDataScNotify)
{
var downloadData = new ClientDownloadData
{
Data = ByteString.CopyFrom(data),
Version = 81,
Time = (long)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds
};
var notify = new ClientDownloadDataScNotify
{
DownloadData = downloadData
};
SetData(notify);
}
public PacketClientDownloadDataScNotify(string base64) : base(CmdIds.ClientDownloadDataScNotify)
{
SetData(Convert.FromBase64String(base64));
}
}