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

@ -95,8 +95,23 @@ namespace FFXIVClassic_Map_Server.dataobjects
public List<BasePacket> updateInstance(List<Actor> list)
{
List<BasePacket> basePackets = new List<BasePacket>();
List<SubPacket> removeActorSubpackets = new List<SubPacket>();
List<SubPacket> posUpdateSubpackets = new List<SubPacket>();
//Remove missing actors
for (int i = 0; i < actorInstanceList.Count; i++)
{
if (!list.Contains(actorInstanceList[i]))
{
removeActorSubpackets.Add(RemoveActorPacket.buildPacket(playerActor.actorId, actorInstanceList[i].actorId));
actorInstanceList.RemoveAt(i);
}
}
if (removeActorSubpackets.Count != 0)
basePackets.Add(BasePacket.createPacket(removeActorSubpackets, true, false));
//Add new actors or move
for (int i = 0; i < list.Count; i++)
{
Actor actor = list[i];