Quasar/Server/Core/Packets/ServerPackets/DoClientUpdate.cs

46 lines
1.1 KiB
C#
Raw Normal View History

2014-07-08 12:58:53 +00:00
using ProtoBuf;
using xServer.Core.Networking;
2014-07-08 12:58:53 +00:00
2015-01-13 18:29:11 +00:00
namespace xServer.Core.Packets.ServerPackets
2014-07-08 12:58:53 +00:00
{
[ProtoContract]
2015-07-14 17:00:31 +00:00
public class DoClientUpdate : IPacket
2014-07-08 12:58:53 +00:00
{
[ProtoMember(1)]
public int ID { get; set; }
[ProtoMember(2)]
2014-07-08 12:58:53 +00:00
public string DownloadURL { get; set; }
[ProtoMember(3)]
public string FileName { get; set; }
[ProtoMember(4)]
public byte[] Block { get; set; }
[ProtoMember(5)]
public int MaxBlocks { get; set; }
[ProtoMember(6)]
public int CurrentBlock { get; set; }
2015-07-14 17:00:31 +00:00
public DoClientUpdate()
{
}
2015-07-14 17:00:31 +00:00
public DoClientUpdate(int id, string downloadurl, string filename, byte[] block, int maxblocks, int currentblock)
2014-07-08 12:58:53 +00:00
{
this.ID = id;
2014-07-08 12:58:53 +00:00
this.DownloadURL = downloadurl;
this.FileName = filename;
this.Block = block;
this.MaxBlocks = maxblocks;
this.CurrentBlock = currentblock;
2014-07-08 12:58:53 +00:00
}
public void Execute(Client client)
{
client.Send(this);
2014-07-08 12:58:53 +00:00
}
}
}