2024-09-16 17:09:36 +08:00
|
|
|
|
using PSO2SERVER.Models;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
2024-11-27 18:05:53 +08:00
|
|
|
|
namespace PSO2SERVER.Protocol.Packets
|
2024-09-16 17:09:36 +08:00
|
|
|
|
{
|
2024-09-18 20:28:51 +08:00
|
|
|
|
public class MailBodyPacket : Packet
|
2024-09-16 17:09:36 +08:00
|
|
|
|
{
|
2024-12-11 14:57:15 +08:00
|
|
|
|
public MailId Id { get; set; } = new MailId();
|
|
|
|
|
public string Messaga { get; set; } = string.Empty;
|
|
|
|
|
public uint Unk3 { get; set; } = 0;
|
2024-09-16 17:09:36 +08:00
|
|
|
|
|
2024-09-18 20:28:51 +08:00
|
|
|
|
public MailBodyPacket()
|
2024-09-16 17:09:36 +08:00
|
|
|
|
{
|
2024-12-11 14:57:15 +08:00
|
|
|
|
Id = new MailId();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public MailBodyPacket(MailId id, string messaga, uint unk3)
|
|
|
|
|
{
|
|
|
|
|
Id = id;
|
|
|
|
|
Messaga = messaga;
|
|
|
|
|
Unk3 = unk3;
|
2024-09-16 17:09:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region implemented abstract members of Packet
|
|
|
|
|
|
|
|
|
|
public override byte[] Build()
|
|
|
|
|
{
|
2024-09-17 11:29:41 +08:00
|
|
|
|
var pkt = new PacketWriter();
|
2024-12-11 14:57:15 +08:00
|
|
|
|
pkt.WriteStruct(Id);
|
|
|
|
|
pkt.WriteUtf16(Messaga, 0x5913, 0x82);
|
|
|
|
|
pkt.Write(Unk3);
|
2024-09-17 11:29:41 +08:00
|
|
|
|
return pkt.ToArray();
|
2024-09-16 17:09:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override PacketHeader GetHeader()
|
|
|
|
|
{
|
2024-12-11 14:57:15 +08:00
|
|
|
|
return new PacketHeader(0x1A, 0x07, PacketFlags.PACKED);
|
2024-09-16 17:09:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|