mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-22 12:47:46 +00:00
Fixed up message packet and set dream packets.
This commit is contained in:
parent
01d32d4d15
commit
d60938346b
2 changed files with 3 additions and 7 deletions
|
@ -46,15 +46,10 @@ namespace FFXIVClassic_Map_Server.packets.send
|
||||||
{
|
{
|
||||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||||
{
|
{
|
||||||
if (Encoding.Unicode.GetByteCount(sender) >= 0x20)
|
binWriter.Write(Encoding.ASCII.GetBytes(sender), 0, Encoding.ASCII.GetByteCount(sender) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(sender));
|
||||||
sender = "ERR: Too Big";
|
|
||||||
if (Encoding.Unicode.GetByteCount(message) >= 0x200)
|
|
||||||
message = "ERR: Too Big";
|
|
||||||
|
|
||||||
binWriter.Write(Encoding.Unicode.GetBytes(sender));
|
|
||||||
binWriter.BaseStream.Seek(0x20, SeekOrigin.Begin);
|
binWriter.BaseStream.Seek(0x20, SeekOrigin.Begin);
|
||||||
binWriter.Write((UInt32)messageType);
|
binWriter.Write((UInt32)messageType);
|
||||||
binWriter.Write(Encoding.Unicode.GetBytes(sender));
|
binWriter.Write(Encoding.ASCII.GetBytes(message), 0, Encoding.ASCII.GetByteCount(message) >= 0x200 ? 0x200 : Encoding.ASCII.GetByteCount(message));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player
|
||||||
|
|
||||||
public static SubPacket buildPacket(uint playerActorID, uint dreamID)
|
public static SubPacket buildPacket(uint playerActorID, uint dreamID)
|
||||||
{
|
{
|
||||||
|
dreamID += 0x20E;
|
||||||
return new SubPacket(OPCODE, playerActorID, playerActorID, BitConverter.GetBytes((uint)dreamID));
|
return new SubPacket(OPCODE, playerActorID, playerActorID, BitConverter.GetBytes((uint)dreamID));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue