Cleaned up script packets and added the InfoResponse packet (internally the DataPacket). Added more info to the music packets. More work on class changing.

This commit is contained in:
Filip Maj 2016-03-19 10:22:20 -04:00
parent 01eceee58f
commit a93843510e
7 changed files with 139 additions and 62 deletions

View file

@ -0,0 +1,33 @@
using FFXIVClassic_Lobby_Server.common;
using FFXIVClassic_Lobby_Server.packets;
using FFXIVClassic_Map_Server.lua;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FFXIVClassic_Map_Server.packets.send.player
{
class InfoRequestResponsePacket
{
public const ushort OPCODE = 0x0133;
public const uint PACKET_SIZE = 0xE0;
public static SubPacket buildPacket(uint playerActorID, uint targetActorID, List<LuaParam> luaParams)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
using (MemoryStream mem = new MemoryStream(data))
{
using (BinaryWriter binWriter = new BinaryWriter(mem))
{
LuaUtils.writeLuaParams(binWriter, luaParams);
}
}
return new SubPacket(OPCODE, playerActorID, targetActorID, data);
}
}
}