Party sync is done. Finished kick/promote code. Client is now always at the top of pt list.

This commit is contained in:
Filip Maj 2016-12-21 21:49:50 -05:00
parent 506bcbaf87
commit 2b10221a75
11 changed files with 77 additions and 25 deletions

View file

@ -721,6 +721,7 @@ namespace FFXIVClassic_Map_Server
else
group = currentPlayerParties[syncPacket.partyGroupId];
group.SetLeader(syncPacket.owner);
group.members = syncPacket.memberActorIds.ToList();
//Add group to everyone

View file

@ -1289,6 +1289,12 @@ namespace FFXIVClassic_Map_Server.Actors
}
else
return false;
}
public void PartyOustPlayer(uint actorId)
{
SubPacket oustPacket = PartyModifyPacket.BuildPacket(playerSession, 1, actorId);
QueuePacket(oustPacket);
}
public void PartyOustPlayer(string name)
@ -1305,6 +1311,12 @@ namespace FFXIVClassic_Map_Server.Actors
{
}
public void PartyPromote(uint actorId)
{
SubPacket promotePacket = PartyModifyPacket.BuildPacket(playerSession, 0, actorId);
QueuePacket(promotePacket);
}
public void PartyPromote(string name)
{
SubPacket promotePacket = PartyModifyPacket.BuildPacket(playerSession, 0, name);

View file

@ -25,6 +25,21 @@ namespace FFXIVClassic_Map_Server.packets.WorldPackets.Send.Group
}
}
return new SubPacket(true, OPCODE, session.id, session.id, data);
}
public static SubPacket BuildPacket(Session session, ushort command, uint actorId)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
using (MemoryStream mem = new MemoryStream(data))
{
using (BinaryWriter binWriter = new BinaryWriter(mem))
{
binWriter.Write((UInt16)(command + 2));
binWriter.Write((UInt32)actorId);
}
}
return new SubPacket(true, OPCODE, session.id, session.id, data);
}
}
}