mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-07-22 02:26:07 +02:00
Fixed emotes not being sent to the emoter. Fixed appearance packets' gloves/legs being ordered wrong. Chat is implemented. Changed commands to start with '!'.
This commit is contained in:
parent
c6ac8b2f14
commit
a47d5f96a5
8 changed files with 86 additions and 43 deletions
|
@ -13,26 +13,27 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
|||
public const ushort OPCODE = 0x00E1;
|
||||
public const uint PACKET_SIZE = 0x30;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetActorID, uint emoteID)
|
||||
public static SubPacket buildPacket(uint sourceActorId, uint targetActorId, uint targettedActorId, uint emoteID)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
if (targetActorID == 0xC0000000)
|
||||
targetActorID = playerActorID;
|
||||
if (targettedActorId == 0xC0000000)
|
||||
targettedActorId = sourceActorId;
|
||||
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
uint realAnimID = 0x5000000 | ((emoteID - 100) << 12);
|
||||
uint realDescID = 20000 + ((emoteID - 1) * 10) + (targetActorID == playerActorID ? (uint)2 : (uint)1);
|
||||
uint realDescID = 20000 + ((emoteID - 1) * 10) + (targettedActorId == sourceActorId ? (uint)2 : (uint)1);
|
||||
binWriter.Write((UInt32)realAnimID);
|
||||
binWriter.Write((UInt32)targetActorID);
|
||||
binWriter.Write((UInt32)targettedActorId);
|
||||
binWriter.Write((UInt32)realDescID);
|
||||
}
|
||||
}
|
||||
|
||||
SubPacket packet = new SubPacket(OPCODE, playerActorID, targetActorID, data);
|
||||
SubPacket packet = new SubPacket(OPCODE, sourceActorId, targetActorId, data);
|
||||
packet.debugPrintSubPacket();
|
||||
return packet;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue