2016-09-26 16:20:01 -04:00
|
|
|
|
using FFXIVClassic.Common;
|
|
|
|
|
using FFXIVClassic_World_Server.DataObjects;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace FFXIVClassic_World_Server.Packets.WorldPackets.Send
|
|
|
|
|
{
|
|
|
|
|
class SessionEndPacket
|
|
|
|
|
{
|
|
|
|
|
public const ushort OPCODE = 0x1001;
|
2016-12-03 12:19:59 -05:00
|
|
|
|
public const uint PACKET_SIZE = 0x38;
|
2016-09-26 16:20:01 -04:00
|
|
|
|
|
|
|
|
|
public static SubPacket BuildPacket(Session session)
|
|
|
|
|
{
|
|
|
|
|
byte[] data = new byte[PACKET_SIZE - 0x20];
|
|
|
|
|
|
2016-12-03 12:19:59 -05:00
|
|
|
|
using (MemoryStream mem = new MemoryStream(data))
|
|
|
|
|
{
|
|
|
|
|
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
binWriter.Write((UInt32)0);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception)
|
|
|
|
|
{ }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-06-27 17:31:17 -04:00
|
|
|
|
return new SubPacket(true, OPCODE, 0, data);
|
2016-12-03 12:19:59 -05:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static SubPacket BuildPacket(Session session, uint destinationZoneId, string destinationPrivateArea, byte spawnType, float spawnX, float spawnY, float spawnZ, float spawnRotation)
|
|
|
|
|
{
|
|
|
|
|
byte[] data = new byte[PACKET_SIZE - 0x20];
|
|
|
|
|
|
|
|
|
|
using (MemoryStream mem = new MemoryStream(data))
|
|
|
|
|
{
|
|
|
|
|
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
binWriter.Write((UInt32)destinationZoneId);
|
2016-12-03 13:23:32 -05:00
|
|
|
|
binWriter.Write((UInt16)spawnType);
|
2016-12-03 12:19:59 -05:00
|
|
|
|
binWriter.Write((Single)spawnX);
|
|
|
|
|
binWriter.Write((Single)spawnY);
|
|
|
|
|
binWriter.Write((Single)spawnZ);
|
|
|
|
|
binWriter.Write((Single)spawnRotation);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (Exception)
|
|
|
|
|
{ }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-06-27 17:31:17 -04:00
|
|
|
|
return new SubPacket(true, OPCODE, 0, data);
|
2016-09-26 16:20:01 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|