Added packets for various search things Showmo found.

This commit is contained in:
Filip Maj
2017-11-17 15:13:38 -05:00
parent e819603432
commit af121f52bd
13 changed files with 104 additions and 14 deletions

View File

@@ -3,7 +3,7 @@ using System.Text;
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.social
namespace FFXIVClassic_Map_Server.packets.send.search
{
class RetainerResultBodyPacket
{
@@ -12,7 +12,15 @@ namespace FFXIVClassic_Map_Server.packets.send.social
public static SubPacket BuildPacket(uint sourceActorId, bool isSuccess, string nameToAdd)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
byte[] data = new byte[PACKET_SIZE - 0x20];
using (MemoryStream mem = new MemoryStream(data))
{
using (BinaryWriter binWriter = new BinaryWriter(mem))
{
binWriter.Write(Encoding.ASCII.GetBytes(sender), 0, Encoding.ASCII.GetByteCount(sender) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(sender));
}
}
return new SubPacket(OPCODE, sourceActorId, data);
}
}