mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-07-29 13:56:17 +02:00
Manually added the group packets and dataobjects into dev branch because the working_on_groups branch is so old it probably will break stuff.
This commit is contained in:
parent
101070954d
commit
df6e16103c
20 changed files with 745 additions and 0 deletions
|
@ -0,0 +1,41 @@
|
|||
using FFXIVClassic.Common;
|
||||
using FFXIVClassic_Map_Server.actors.group;
|
||||
using FFXIVClassic_Map_Server.dataobjects;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.packets.send.group
|
||||
{
|
||||
class CreateNamedGroup
|
||||
{
|
||||
public const ushort OPCODE = 0x0188;
|
||||
public const uint PACKET_SIZE = 0x60;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, Group group)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
binWriter.Write((UInt64)group.groupId);
|
||||
binWriter.Write((UInt32)group.groupTypeId);
|
||||
binWriter.Write((Int32)group.localizedNamed);
|
||||
|
||||
binWriter.Write((UInt16)0x121C);
|
||||
|
||||
binWriter.Seek(0x20, SeekOrigin.Begin);
|
||||
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(group.groupName), 0, Encoding.ASCII.GetByteCount(group.groupName) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(group.groupName));
|
||||
}
|
||||
}
|
||||
|
||||
return new SubPacket(OPCODE, playerActorID, playerActorID, data);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue