mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-07-24 11:28:22 +02:00
Kicked/Promote leader added but broke login. D/Cing now.
This commit is contained in:
parent
e89b7557b3
commit
16c9b741bf
30 changed files with 1120 additions and 211 deletions
|
@ -25,11 +25,10 @@ namespace FFXIVClassic_Map_Server.packets.WorldPackets.Receive
|
|||
try
|
||||
{
|
||||
partyGroupId = binReader.ReadUInt64();
|
||||
uint owner = binReader.ReadUInt32();
|
||||
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();
|
||||
}
|
||||
|
|
|
@ -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 PartyModifyPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x1020;
|
||||
public const uint PACKET_SIZE = 0x48;
|
||||
|
||||
public static SubPacket BuildPacket(Session session, ushort command, string name)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
binWriter.Write((UInt16)command);
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(name), 0, Encoding.ASCII.GetByteCount(name) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(name));
|
||||
}
|
||||
}
|
||||
return new SubPacket(true, OPCODE, session.id, session.id, data);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -23,15 +23,15 @@ namespace FFXIVClassic_Map_Server.packets.send.group
|
|||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
binWriter.Write((UInt64)group.groupId);
|
||||
binWriter.Write((UInt32)group.groupTypeId);
|
||||
binWriter.Write((Int32)group.localizedNamed);
|
||||
binWriter.Write((UInt64)group.groupIndex);
|
||||
binWriter.Write((UInt32)group.GetTypeId());
|
||||
binWriter.Write((Int32)group.GetGroupLocalizedName());
|
||||
|
||||
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));
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(group.GetGroupName()), 0, Encoding.ASCII.GetByteCount(group.GetGroupName()) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(group.GetGroupName()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,15 +33,15 @@ namespace FFXIVClassic_Map_Server.packets.send.group
|
|||
|
||||
Group group = groups[offset+i];
|
||||
|
||||
binWriter.Write((UInt64)group.groupId);
|
||||
binWriter.Write((UInt32)group.groupTypeId);
|
||||
binWriter.Write((Int32)group.localizedNamed);
|
||||
binWriter.Write((UInt64)group.groupIndex);
|
||||
binWriter.Write((UInt32)group.GetTypeId());
|
||||
binWriter.Write((Int32)group.GetGroupLocalizedName());
|
||||
|
||||
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));
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(group.GetGroupName()), 0, Encoding.ASCII.GetByteCount(group.GetGroupName()) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(group.GetGroupName()));
|
||||
}
|
||||
|
||||
binWriter.Seek(0x200, SeekOrigin.Begin);
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace FFXIVClassic_Map_Server.packets.send.groups
|
|||
|
||||
public static SubPacket buildPacket(uint playerActorID, Group group)
|
||||
{
|
||||
return buildPacket(playerActorID, group.groupId);
|
||||
return buildPacket(playerActorID, group.groupIndex);
|
||||
}
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, ulong groupId)
|
||||
|
|
|
@ -33,17 +33,17 @@ namespace FFXIVClassic_Map_Server.packets.send.group
|
|||
|
||||
//Write list id
|
||||
binWriter.Write((UInt64)3);
|
||||
binWriter.Write((UInt64)group.groupId);
|
||||
binWriter.Write((UInt64)group.groupIndex);
|
||||
binWriter.Write((UInt64)0);
|
||||
binWriter.Write((UInt64)group.groupId);
|
||||
binWriter.Write((UInt64)group.groupIndex);
|
||||
|
||||
//This seems to change depending on what the list is for
|
||||
binWriter.Write((UInt32)group.groupTypeId);
|
||||
binWriter.Write((UInt32)group.GetTypeId());
|
||||
binWriter.Seek(0x40, SeekOrigin.Begin);
|
||||
|
||||
//This is for Linkshell
|
||||
binWriter.Write((UInt32)group.localizedNamed);
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(group.groupName), 0, Encoding.ASCII.GetByteCount(group.groupName) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(group.groupName));
|
||||
binWriter.Write((UInt32)group.GetGroupLocalizedName());
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(group.GetGroupName()), 0, Encoding.ASCII.GetByteCount(group.GetGroupName()) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(group.GetGroupName()));
|
||||
|
||||
binWriter.Seek(0x64, SeekOrigin.Begin);
|
||||
|
||||
|
@ -52,7 +52,7 @@ namespace FFXIVClassic_Map_Server.packets.send.group
|
|||
binWriter.Write((UInt32)0x6D);
|
||||
binWriter.Write((UInt32)0x6D);
|
||||
|
||||
binWriter.Write((UInt32)group.members.Count);
|
||||
binWriter.Write((UInt32)group.GetMemberCount());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,8 +27,8 @@ namespace FFXIVClassic_Map_Server.packets.send.group
|
|||
binWriter.Write((UInt64)locationCode);
|
||||
binWriter.Write((UInt64)sequenceId);
|
||||
//Write List Info
|
||||
binWriter.Write((UInt64)group.groupId);
|
||||
binWriter.Write((UInt32)group.members.Count);
|
||||
binWriter.Write((UInt64)group.groupIndex);
|
||||
binWriter.Write((UInt32)group.GetMemberCount());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace FFXIVClassic_Map_Server.packets.send.group
|
|||
binWriter.Write((UInt64)locationCode);
|
||||
binWriter.Write((UInt64)sequenceId);
|
||||
//Write List Info
|
||||
binWriter.Write((UInt64)group.groupId);
|
||||
binWriter.Write((UInt64)group.groupIndex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue