mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-02 19:42:05 -04:00
36 lines
1.0 KiB
C#
36 lines
1.0 KiB
C#
using FFXIVClassic.Common;
|
|
using System;
|
|
using System.IO;
|
|
|
|
using FFXIVClassic.Common;
|
|
|
|
namespace FFXIVClassic_Map_Server.packets.send.actor
|
|
{
|
|
class SetActorStatusAllPacket
|
|
{
|
|
public const ushort OPCODE = 0x0179;
|
|
public const uint PACKET_SIZE = 0x48;
|
|
|
|
public static SubPacket BuildPacket(uint playerActorID, uint targetActorID, ushort[] statusIds)
|
|
{
|
|
byte[] data = new byte[PACKET_SIZE - 0x20];
|
|
|
|
using (MemoryStream mem = new MemoryStream(data))
|
|
{
|
|
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
|
{
|
|
for (int i = 0; i < statusIds.Length; i++)
|
|
{
|
|
if (i >= 20)
|
|
break;
|
|
binWriter.Write((UInt16)statusIds[i]);
|
|
}
|
|
}
|
|
}
|
|
|
|
SubPacket packet = new SubPacket(OPCODE, playerActorID, targetActorID, data);
|
|
return packet;
|
|
}
|
|
}
|
|
}
|