Rewrote the server commands. They can now accept a client connection, letting a user fire a command from within the game and only receive the response. Added actor removal for the instance system. Removed hardcoded packet 9.

This commit is contained in:
Filip Maj 2016-01-23 23:28:12 -05:00
parent 7bc3c8c2dd
commit f1025f89d3
6 changed files with 149 additions and 92 deletions

View file

@ -1,6 +1,7 @@
using FFXIVClassic_Lobby_Server.packets;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@ -12,9 +13,19 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
public const ushort OPCODE = 0x00CB;
public const uint PACKET_SIZE = 0x28;
public static SubPacket buildPacket(uint playerActorID, uint actorID)
public static SubPacket buildPacket(uint playerActorID, uint actorId)
{
return new SubPacket(OPCODE, playerActorID, actorID, new byte[8]);
byte[] data = new byte[PACKET_SIZE - 0x20];
using (MemoryStream mem = new MemoryStream(data))
{
using (BinaryWriter binWriter = new BinaryWriter(mem))
{
binWriter.Write((UInt32)actorId);
}
}
return new SubPacket(OPCODE, actorId, playerActorID, data);
}
}