Reimplemented dream packets. Fixed instance update bug that was locking up client when waking up. When going to sleep the proper position is saved. Still need to handle if the player logs out in the inn vs sleeping.

This commit is contained in:
Filip Maj 2019-07-27 21:54:05 -04:00
parent e4d43d952b
commit aa54fb11cc
4 changed files with 93 additions and 42 deletions

View file

@ -30,16 +30,16 @@ namespace Meteor.Map.packets.send.player
public const ushort OPCODE = 0x01A7;
public const uint PACKET_SIZE = 0x28;
public static SubPacket BuildPacket(uint sourceActorId, uint dreamID)
public static SubPacket BuildPacket(uint sourceActorId, byte dreamID, byte innID)
{
dreamID = 0x0216;
byte[] data = new byte[PACKET_SIZE - 0x20];
using (MemoryStream mem = new MemoryStream(data))
{
using (BinaryWriter binWriter = new BinaryWriter(mem))
{
binWriter.Write((Int32)0x216);
binWriter.Write((Byte)dreamID);
binWriter.Write((Byte)innID);
}
}