mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
Figured out a lot of the 19X and 1AX packets. Adding test packet data used in experiments.
This commit is contained in:
@@ -92,12 +92,19 @@
|
||||
<Compile Include="packets\send\actor\SetActorNamePacket.cs" />
|
||||
<Compile Include="packets\send\actor\SetActorSpeedPacket.cs" />
|
||||
<Compile Include="packets\send\actor\SetActorStatePacket.cs" />
|
||||
<Compile Include="packets\send\actor\SetActorTarget.cs" />
|
||||
<Compile Include="packets\send\login\0x2Packet.cs" />
|
||||
<Compile Include="packets\send\actor\AddActorPacket.cs" />
|
||||
<Compile Include="packets\send\actor\MoveActorToPositionPacket.cs" />
|
||||
<Compile Include="packets\send\actor\SetActorAppearancePacket.cs" />
|
||||
<Compile Include="packets\send\actor\SetActorPositionPacket.cs" />
|
||||
<Compile Include="packets\send\login\InitPacket.cs" />
|
||||
<Compile Include="packets\send\player\CutsceneBookSetPacket.cs" />
|
||||
<Compile Include="packets\send\player\SetChocoboNamePacket.cs" />
|
||||
<Compile Include="packets\send\player\SetGCInfoPacket.cs" />
|
||||
<Compile Include="packets\send\player\SetLatestAchievementsPacket.cs" />
|
||||
<Compile Include="packets\send\player\SetPlayerDreamPacket.cs" />
|
||||
<Compile Include="packets\send\player\SetPlayerTitlePacket.cs" />
|
||||
<Compile Include="packets\send\PongPacket.cs" />
|
||||
<Compile Include="packets\send\SetMapPacket.cs" />
|
||||
<Compile Include="packets\send\SetMusicPacket.cs" />
|
||||
|
||||
@@ -293,7 +293,7 @@ namespace FFXIVClassic_Lobby_Server
|
||||
client.queuePacket(reply8);
|
||||
client.queuePacket(reply9);
|
||||
client.queuePacket(reply10);
|
||||
client.queuePacket(reply11);
|
||||
//client.queuePacket(reply11);
|
||||
client.queuePacket(reply12);
|
||||
break;
|
||||
//Chat Received
|
||||
@@ -309,6 +309,7 @@ namespace FFXIVClassic_Lobby_Server
|
||||
case 0x00CD:
|
||||
SetTargetPacket setTarget = new SetTargetPacket(subpacket.data);
|
||||
player.setTarget(setTarget.actorID);
|
||||
client.queuePacket(BasePacket.createPacket(SetActorTarget.buildPacket(player.actorID, player.actorID, setTarget.actorID), true, false));
|
||||
break;
|
||||
//Lock Target
|
||||
case 0x00CC:
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -11,9 +11,9 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
class MoveActorToPositionPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x00CF;
|
||||
public const uint PACKET_SIZE = 0x48;
|
||||
public const uint PACKET_SIZE = 0x50;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint actorID)
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetActorID, float x, float y, float z, float rot, ushort moveState)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
@@ -21,12 +21,16 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
|
||||
binWriter.BaseStream.Seek(0x8, SeekOrigin.Begin);
|
||||
binWriter.Write((Single)x);
|
||||
binWriter.Write((Single)y);
|
||||
binWriter.Write((Single)z);
|
||||
binWriter.Write((Single)rot);
|
||||
binWriter.Write((ushort)moveState);
|
||||
}
|
||||
data = mem.GetBuffer();
|
||||
}
|
||||
|
||||
SubPacket packet = new SubPacket(OPCODE, playerActorID, actorID, data);
|
||||
SubPacket packet = new SubPacket(OPCODE, playerActorID, targetActorID, data);
|
||||
return packet;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
using FFXIVClassic_Lobby_Server.packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
{
|
||||
class SetActorTarget
|
||||
{
|
||||
public const ushort OPCODE = 0x00DB;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetActorID, uint targetID)
|
||||
{
|
||||
return new SubPacket(OPCODE, playerActorID, targetID, BitConverter.GetBytes((ulong)targetID));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
using FFXIVClassic_Lobby_Server.packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.packets.send.player
|
||||
{
|
||||
class CutsceneBookSetPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x01A3;
|
||||
public const uint PACKET_SIZE = 0150;
|
||||
|
||||
private byte[] mainstoryFlags = new byte[7];
|
||||
private byte[] classFlags = new byte[2*17];
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
byte currentOut = 0;
|
||||
int byteIndex = 0;
|
||||
int currentBit = 0;
|
||||
|
||||
//Main Scenario
|
||||
for (int i = 0; i < 60; i++)
|
||||
{
|
||||
currentOut = (byte) (1|(currentOut << currentBit));
|
||||
currentBit++;
|
||||
|
||||
if (currentBit >= 8)
|
||||
{
|
||||
currentBit = 0;
|
||||
data[byteIndex] = currentOut;
|
||||
byteIndex++;
|
||||
currentOut = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//Classes
|
||||
for (int i = 0; i < 340; i++)
|
||||
{
|
||||
currentOut = (byte)(1 | (currentOut << currentBit));
|
||||
currentBit++;
|
||||
|
||||
if (currentBit >= 8)
|
||||
{
|
||||
currentBit = 0;
|
||||
data[byteIndex] = currentOut;
|
||||
byteIndex++;
|
||||
currentOut = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//GAP
|
||||
for (int i = 0; i < 60; i++)
|
||||
{
|
||||
currentBit++;
|
||||
if (currentBit >= 8)
|
||||
{
|
||||
currentBit = 0;
|
||||
byteIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
//Side Quests
|
||||
for (int i = 0; i < 372; i++)
|
||||
{
|
||||
currentOut = (byte)(1 | (currentOut << currentBit));
|
||||
currentBit++;
|
||||
|
||||
if (currentBit >= 8)
|
||||
{
|
||||
currentBit = 0;
|
||||
data[byteIndex] = currentOut;
|
||||
byteIndex++;
|
||||
currentOut = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//GAP
|
||||
for (int i = 0; i < 228; i++)
|
||||
{
|
||||
currentBit++;
|
||||
if (currentBit >= 8)
|
||||
{
|
||||
currentBit = 0;
|
||||
byteIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
//Jobs
|
||||
for (int i = 0; i < 140; i++)
|
||||
{
|
||||
currentOut = (byte)(1 | (currentOut << currentBit));
|
||||
currentBit++;
|
||||
|
||||
if (currentBit >= 8)
|
||||
{
|
||||
currentBit = 0;
|
||||
data[byteIndex] = currentOut;
|
||||
byteIndex++;
|
||||
currentOut = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//GAP
|
||||
for (int i = 0; i < 61; i++)
|
||||
{
|
||||
currentBit++;
|
||||
if (currentBit >= 8)
|
||||
{
|
||||
currentBit = 0;
|
||||
byteIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
//Maelstrom
|
||||
for (int i = 0; i < 200; i++)
|
||||
{
|
||||
currentOut = (byte)(1 | (currentOut << currentBit));
|
||||
currentBit++;
|
||||
|
||||
if (currentBit >= 8)
|
||||
{
|
||||
currentBit = 0;
|
||||
data[byteIndex] = currentOut;
|
||||
byteIndex++;
|
||||
currentOut = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//Adders
|
||||
for (int i = 0; i < 200; i++)
|
||||
{
|
||||
currentOut = (byte)(1 | (currentOut << currentBit));
|
||||
currentBit++;
|
||||
|
||||
if (currentBit >= 8)
|
||||
{
|
||||
currentBit = 0;
|
||||
data[byteIndex] = currentOut;
|
||||
byteIndex++;
|
||||
currentOut = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//Flames
|
||||
for (int i = 0; i < 200; i++)
|
||||
{
|
||||
currentOut = (byte)(1 | (currentOut << currentBit));
|
||||
currentBit++;
|
||||
|
||||
if (currentBit >= 8)
|
||||
{
|
||||
currentBit = 0;
|
||||
data[byteIndex] = currentOut;
|
||||
byteIndex++;
|
||||
currentOut = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return new SubPacket(OPCODE, playerActorID, playerActorID, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using FFXIVClassic_Lobby_Server.packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.packets.send.player
|
||||
{
|
||||
class SetChocoboNamePacket
|
||||
{
|
||||
public const ushort OPCODE = 0x0198;
|
||||
public const uint PACKET_SIZE = 0x40;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetActorID, string name)
|
||||
{
|
||||
if (Encoding.Unicode.GetByteCount(name) >= 0x20)
|
||||
name = "ERR: Too Long";
|
||||
return new SubPacket(OPCODE, playerActorID, targetActorID, Encoding.Unicode.GetBytes(name));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.packets.send.player
|
||||
{
|
||||
class SetGCInfoPacket
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using FFXIVClassic_Lobby_Server.packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.packets.send.player
|
||||
{
|
||||
class SetLatestAchievementsPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x01A3;
|
||||
public const uint PACKET_SIZE = 0150;
|
||||
|
||||
private byte[] mainstoryFlags = new byte[7];
|
||||
private byte[] classFlags = new byte[2*17];
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using FFXIVClassic_Lobby_Server.packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.packets.send.player
|
||||
{
|
||||
class SetPlayerTitlePacket
|
||||
{
|
||||
public const ushort OPCODE = 0x019D;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetActorID, uint titleID)
|
||||
{
|
||||
return new SubPacket(OPCODE, playerActorID, targetActorID, BitConverter.GetBytes((ulong)titleID));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user