mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
Began working on server zone changes.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
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 SessionBeginPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x1000;
|
||||
public const uint PACKET_SIZE = 0x24;
|
||||
|
||||
public static SubPacket BuildPacket(Session session)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
return new SubPacket(true, OPCODE, 0, session.sessionId, data);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
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;
|
||||
public const uint PACKET_SIZE = 0x24;
|
||||
|
||||
public static SubPacket BuildPacket(Session session)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
return new SubPacket(true, OPCODE, 0, session.sessionId, data);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,44 @@
|
||||
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 SessionEndAndZonePacket
|
||||
{
|
||||
public const ushort OPCODE = 0x1002;
|
||||
public const uint PACKET_SIZE = 0x48;
|
||||
|
||||
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);
|
||||
binWriter.Write((UInt32)destinationZoneId);
|
||||
binWriter.Write((UInt32)spawnType);
|
||||
binWriter.Write((Single)spawnX);
|
||||
binWriter.Write((Single)spawnY);
|
||||
binWriter.Write((Single)spawnZ);
|
||||
binWriter.Write((Single)spawnRotation);
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
|
||||
return new SubPacket(true, OPCODE, 0, session.sessionId, data);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user