mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
Party leave/disband done.
This commit is contained in:
@@ -286,6 +286,7 @@
|
||||
<Compile Include="packets\WorldPackets\Send\Group\CreateLinkshellPacket.cs" />
|
||||
<Compile Include="packets\WorldPackets\Send\Group\DeleteLinkshellPacket.cs" />
|
||||
<Compile Include="packets\WorldPackets\Send\Group\ModifyLinkshellPacket.cs" />
|
||||
<Compile Include="packets\WorldPackets\Send\Group\PartyLeavePacket.cs" />
|
||||
<Compile Include="packets\WorldPackets\Send\Group\PartyModifyPacket.cs" />
|
||||
<Compile Include="packets\WorldPackets\Send\SessionBeginConfirmPacket.cs" />
|
||||
<Compile Include="packets\WorldPackets\Send\SessionEndConfirmPacket.cs" />
|
||||
|
@@ -1305,10 +1305,14 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
|
||||
public void PartyLeave()
|
||||
{
|
||||
SubPacket leavePacket = PartyLeavePacket.BuildPacket(playerSession, false);
|
||||
QueuePacket(leavePacket);
|
||||
}
|
||||
|
||||
public void PartyDisband()
|
||||
{
|
||||
SubPacket disbandPacket = PartyLeavePacket.BuildPacket(playerSession, true);
|
||||
QueuePacket(disbandPacket);
|
||||
}
|
||||
|
||||
public void PartyPromote(uint actorId)
|
||||
|
@@ -0,0 +1,30 @@
|
||||
using FFXIVClassic.Common;
|
||||
using FFXIVClassic_Map_Server.Actors;
|
||||
using FFXIVClassic_Map_Server.dataobjects;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.packets.WorldPackets.Send.Group
|
||||
{
|
||||
class PartyLeavePacket
|
||||
{
|
||||
public const ushort OPCODE = 0x1021;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket BuildPacket(Session session, bool isDisband)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
binWriter.Write((UInt16)(isDisband ? 1 : 0));
|
||||
}
|
||||
}
|
||||
return new SubPacket(true, OPCODE, session.id, session.id, data);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user