mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 21:44:35 +02:00
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:
parent
7bc3c8c2dd
commit
f1025f89d3
6 changed files with 149 additions and 92 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue