PSO2SERVER/Server/Protocol/Packets/19-LobbyPacket/19-08-SendSystemMessagePacket.cs

43 lines
1.1 KiB
C#

using PSO2SERVER.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace PSO2SERVER.Protocol.Packets
{
public class SendSystemMessagePacket : Packet
{
public string _msg { get; set; }
public uint unk1 { get; set; }
public uint unk2 { get; set; }
public uint unk3 { get; set; }
public SendSystemMessagePacket(string msg, uint unk1, uint unk2, uint unk3)
{
_msg = msg;
this.unk1 = 0x00002196;
this.unk2 = unk2;
this.unk3 = unk3;
}
#region implemented abstract members of Packet
public override byte[] Build()
{
var pkt = new PacketWriter();
pkt.WriteUtf16(_msg, 0x2126, 0xB0);
pkt.Write(unk1);
pkt.Write(unk2);
pkt.Write(unk3);
return pkt.ToArray();
}
public override PacketHeader GetHeader()
{
return new PacketHeader(0x19, 0x08, PacketFlags.PACKED);
}
#endregion
}
}