New debug packets.

This commit is contained in:
Filip Maj 2015-10-04 22:42:20 -04:00
parent 46c4c26d01
commit 3cacedf6ab
100 changed files with 820 additions and 0 deletions

View file

@ -0,0 +1,41 @@
using FFXIVClassic_Lobby_Server.packets;
using FFXIVClassic_Map_Server.dataobjects;
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.Actor.inventory
{
class InventoryItemEndPacket
{
public const ushort OPCODE = 0x0149;
public const uint PACKET_SIZE = 0x90;
public static SubPacket buildPacket(uint playerActorID, List<Item> items, ref int listOffset)
{
byte[] data;
using (MemoryStream mem = new MemoryStream())
{
using (BinaryWriter binWriter = new BinaryWriter(mem))
{
for (int i = listOffset; i < items.Count; i++)
{
binWriter.Write(items[i].toPacketBytes());
listOffset++;
}
}
data = mem.GetBuffer();
}
return new SubPacket(OPCODE, playerActorID, playerActorID, data);
}
}
}

View file

@ -0,0 +1,41 @@
using FFXIVClassic_Lobby_Server.packets;
using FFXIVClassic_Map_Server.dataobjects;
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.Actor.inventory
{
class InventoryItemPacket
{
public const ushort OPCODE = 0x014B;
public const uint PACKET_SIZE = 0x90;
public static SubPacket buildPacket(uint playerActorID, List<Item> items, ref int listOffset)
{
byte[] data;
using (MemoryStream mem = new MemoryStream())
{
using (BinaryWriter binWriter = new BinaryWriter(mem))
{
for (int i = listOffset; i < items.Count; i++)
{
binWriter.Write(items[i].toPacketBytes());
listOffset++;
}
}
data = mem.GetBuffer();
}
return new SubPacket(OPCODE, playerActorID, playerActorID, data);
}
}
}

View file

@ -0,0 +1,38 @@
using FFXIVClassic_Lobby_Server.packets;
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.Actor.inventory
{
class InventorySetBeginPacket
{
public const ushort OPCODE = 0x0146;
public const uint PACKET_SIZE = 0x28;
public const ushort CODE_ITEMS = 0x0000;
public const ushort CODE_CURRANCYITEMS = 0x0063;
public const ushort CODE_KEYITEMS = 0x0064;
public static SubPacket buildPacket(uint playerActorID, ushort size, ushort code)
{
byte[] data = new byte[8];
using (MemoryStream mem = new MemoryStream(data))
{
using (BinaryWriter binWriter = new BinaryWriter(mem))
{
binWriter.Write((UInt32)playerActorID);
binWriter.Write((UInt16)size);
binWriter.Write((UInt16)code);
}
}
return new SubPacket(OPCODE, playerActorID, playerActorID, data);
}
}
}

View file

@ -0,0 +1,22 @@
using FFXIVClassic_Lobby_Server.packets;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
{
class InventorySetEndPacket
{
public const ushort OPCODE = 0x0147;
public const uint PACKET_SIZE = 0x28;
public static SubPacket buildPacket(uint playerActorID)
{
return new SubPacket(OPCODE, playerActorID, playerActorID, new byte[8]);
}
}
}