mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-12 15:34:32 +02:00
Added party sync packet which will sync member info between world/zone servers.
This commit is contained in:
parent
a68866617f
commit
2bdc238bc2
6 changed files with 158 additions and 4 deletions
|
@ -0,0 +1,45 @@
|
|||
using FFXIVClassic_Map_Server.actors.group;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.packets.WorldPackets.Receive
|
||||
{
|
||||
class PartySyncPacket
|
||||
{
|
||||
public ulong partyGroupId;
|
||||
public uint owner;
|
||||
public uint[] memberActorIds;
|
||||
|
||||
public bool invalidPacket = false;
|
||||
|
||||
public PartySyncPacket(byte[] data)
|
||||
{
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryReader binReader = new BinaryReader(mem))
|
||||
{
|
||||
try
|
||||
{
|
||||
partyGroupId = binReader.ReadUInt64();
|
||||
uint owner = binReader.ReadUInt32();
|
||||
uint numMembers = binReader.ReadUInt32();
|
||||
memberActorIds = new uint[numMembers];
|
||||
|
||||
PartyGroup group = new PartyGroup(partyGroupId, owner);
|
||||
for (int i = 0; i < numMembers; i++)
|
||||
memberActorIds[i] = binReader.ReadUInt32();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
invalidPacket = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue