2016-06-08 22:29:04 +01:00
|
|
|
|
using FFXIVClassic_Map_Server.lua;
|
2016-03-19 10:22:20 -04:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
2016-08-22 10:43:04 -04:00
|
|
|
|
using FFXIVClassic.Common;
|
|
|
|
|
|
2016-03-19 10:22:20 -04:00
|
|
|
|
namespace FFXIVClassic_Map_Server.packets.send.player
|
|
|
|
|
{
|
2016-08-21 19:51:49 -04:00
|
|
|
|
class GenericDataPacket
|
2016-03-19 10:22:20 -04:00
|
|
|
|
{
|
|
|
|
|
public const ushort OPCODE = 0x0133;
|
|
|
|
|
public const uint PACKET_SIZE = 0xE0;
|
|
|
|
|
|
2017-06-27 13:23:05 -04:00
|
|
|
|
public static SubPacket BuildPacket(uint sourceActorId, List<LuaParam> luaParams)
|
2016-03-19 10:22:20 -04:00
|
|
|
|
{
|
|
|
|
|
byte[] data = new byte[PACKET_SIZE - 0x20];
|
|
|
|
|
|
|
|
|
|
using (MemoryStream mem = new MemoryStream(data))
|
|
|
|
|
{
|
|
|
|
|
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
|
|
|
|
{
|
2016-06-14 21:29:10 +01:00
|
|
|
|
LuaUtils.WriteLuaParams(binWriter, luaParams);
|
2016-03-19 10:22:20 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-06-27 13:23:05 -04:00
|
|
|
|
return new SubPacket(OPCODE, sourceActorId, data);
|
2016-03-19 10:22:20 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|