2017-05-05 02:37:01 -04:00
|
|
|
|
using FFXIVClassic.Common;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
2019-05-06 13:39:24 -04:00
|
|
|
|
namespace FFXIVClassic_Map_Server.packets.send.actor
|
2017-05-05 02:37:01 -04:00
|
|
|
|
{
|
|
|
|
|
class PlayBGAnimation
|
|
|
|
|
{
|
|
|
|
|
public const ushort OPCODE = 0x00D9;
|
|
|
|
|
public const uint PACKET_SIZE = 0x28;
|
|
|
|
|
|
2017-06-27 13:23:05 -04:00
|
|
|
|
public static SubPacket BuildPacket(uint sourceActorId, string animName)
|
2017-05-05 02:37:01 -04:00
|
|
|
|
{
|
|
|
|
|
byte[] data = new byte[PACKET_SIZE - 0x20];
|
|
|
|
|
|
|
|
|
|
using (MemoryStream mem = new MemoryStream(data))
|
|
|
|
|
{
|
|
|
|
|
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
|
|
|
|
{
|
|
|
|
|
binWriter.Write(Encoding.ASCII.GetBytes(animName), 0, Encoding.ASCII.GetByteCount(animName) > 0x8 ? 0x8 : Encoding.ASCII.GetByteCount(animName));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-06-27 13:23:05 -04:00
|
|
|
|
return new SubPacket(OPCODE, sourceActorId, data);
|
2017-05-05 02:37:01 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|