mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-07-25 20:08:20 +02:00
Initial Commit.
This commit is contained in:
commit
46c4c26d01
82 changed files with 70188 additions and 0 deletions
21
FFXIVClassic Map Server/packets/send/Actor/AddActorPacket.cs
Normal file
21
FFXIVClassic Map Server/packets/send/Actor/AddActorPacket.cs
Normal file
|
@ -0,0 +1,21 @@
|
|||
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 AddActorPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x00CA;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint actorID)
|
||||
{
|
||||
return new SubPacket(OPCODE, playerActorID, actorID, new byte[8]);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
using FFXIVClassic_Lobby_Server.packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
{
|
||||
class MoveActorToPositionPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x00CF;
|
||||
public const uint PACKET_SIZE = 0x48;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint actorID)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
|
||||
}
|
||||
data = mem.GetBuffer();
|
||||
}
|
||||
|
||||
SubPacket packet = new SubPacket(OPCODE, playerActorID, actorID, data);
|
||||
return packet;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
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 RemoveActorPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x00CB;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint actorID)
|
||||
{
|
||||
return new SubPacket(OPCODE, playerActorID, actorID, new byte[8]);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
using FFXIVClassic_Lobby_Server.packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
{
|
||||
class SetActorAppearancePacket
|
||||
{
|
||||
public const ushort OPCODE = 0x00D6;
|
||||
public const uint PACKET_SIZE = 0x128;
|
||||
|
||||
public const int SIZE = 0;
|
||||
public const int COLORINFO = 1;
|
||||
public const int FACEINFO = 2;
|
||||
public const int HIGHLIGHT_HAIR = 3;
|
||||
public const int VOICE = 4;
|
||||
public const int WEAPON1 = 5;
|
||||
public const int WEAPON2 = 6;
|
||||
public const int WEAPON3 = 7;
|
||||
public const int HEADGEAR = 8;
|
||||
public const int BODYGEAR = 9;
|
||||
public const int LEGSGEAR = 10;
|
||||
public const int HANDSGEAR = 11;
|
||||
public const int FEETGEAR = 12;
|
||||
public const int WAISTGEAR = 13;
|
||||
public const int UNKNOWN1 = 14;
|
||||
public const int R_EAR = 15;
|
||||
public const int L_EAR = 16;
|
||||
public const int UNKNOWN2 = 17;
|
||||
public const int UNKNOWN3 = 18;
|
||||
public const int R_FINGER = 19;
|
||||
public const int L_FINGER = 20;
|
||||
|
||||
public uint modelID;
|
||||
public uint[] appearanceIDs;
|
||||
|
||||
public SetActorAppearancePacket(uint monsterModelID)
|
||||
{
|
||||
modelID = monsterModelID;
|
||||
appearanceIDs = new uint[22];
|
||||
}
|
||||
|
||||
public SetActorAppearancePacket(uint[] appearanceTable)
|
||||
{
|
||||
appearanceIDs = appearanceTable;
|
||||
}
|
||||
|
||||
public SubPacket buildPacket(uint playerActorID, uint actorID)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
binWriter.Write((uint)modelID);
|
||||
for (int i = 0; i < 0x1A; i++)
|
||||
{
|
||||
binWriter.Write((uint)i);
|
||||
binWriter.Write((uint)appearanceIDs[i]);
|
||||
}
|
||||
binWriter.Write((uint) 0x1B);
|
||||
binWriter.Seek(0x20, SeekOrigin.Current);
|
||||
binWriter.Write((uint) 0x1C);
|
||||
binWriter.Write((uint) 0x00);
|
||||
}
|
||||
data = mem.GetBuffer();
|
||||
}
|
||||
|
||||
SubPacket packet = new SubPacket(OPCODE, playerActorID, actorID, data);
|
||||
return packet;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
using FFXIVClassic_Lobby_Server.packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
{
|
||||
class SetActorPositionPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x00CE;
|
||||
public const uint PACKET_SIZE = 0x48;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint actorID)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE-0x20];
|
||||
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
|
||||
}
|
||||
data = mem.GetBuffer();
|
||||
}
|
||||
|
||||
SubPacket packet = new SubPacket(OPCODE, playerActorID, actorID, data);
|
||||
return packet;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
35
FFXIVClassic Map Server/packets/send/PongPacket.cs
Normal file
35
FFXIVClassic Map Server/packets/send/PongPacket.cs
Normal file
|
@ -0,0 +1,35 @@
|
|||
using FFXIVClassic_Lobby_Server.common;
|
||||
using FFXIVClassic_Lobby_Server.packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.packets.receive
|
||||
{
|
||||
class PongPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x0001;
|
||||
public const uint PACKET_SIZE = 0x40;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, ulong pingTicks)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE-0x20];
|
||||
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using(BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
ulong time = pingTicks;
|
||||
binWriter.Write(time);
|
||||
}
|
||||
}
|
||||
|
||||
SubPacket subpacket = new SubPacket(OPCODE, playerActorID, playerActorID, data);
|
||||
return subpacket;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
33
FFXIVClassic Map Server/packets/send/SetMapPacket.cs
Normal file
33
FFXIVClassic Map Server/packets/send/SetMapPacket.cs
Normal file
|
@ -0,0 +1,33 @@
|
|||
using FFXIVClassic_Lobby_Server.packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.packets.send
|
||||
{
|
||||
class SetMapPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x0005;
|
||||
public const uint PACKET_SIZE = 0x30;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint mapID)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
binWriter.Write((uint)mapID);
|
||||
binWriter.Write((uint)0x9B);
|
||||
binWriter.Write((uint)0x28);
|
||||
}
|
||||
}
|
||||
|
||||
return new SubPacket(OPCODE, playerActorID, playerActorID, data);
|
||||
}
|
||||
}
|
||||
}
|
21
FFXIVClassic Map Server/packets/send/SetMusicPacket.cs
Normal file
21
FFXIVClassic Map Server/packets/send/SetMusicPacket.cs
Normal file
|
@ -0,0 +1,21 @@
|
|||
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
|
||||
{
|
||||
class SetMusicPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x000C;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint musicID, uint musicTrackMode)
|
||||
{
|
||||
ulong combined = musicID | (musicTrackMode << 32);
|
||||
return new SubPacket(OPCODE, 0, playerActorID, BitConverter.GetBytes(combined));
|
||||
}
|
||||
}
|
||||
}
|
20
FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs
Normal file
20
FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs
Normal file
|
@ -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
|
||||
{
|
||||
class SetWeatherPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x000D;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, long weatherID)
|
||||
{
|
||||
return new SubPacket(OPCODE, 0, playerActorID, BitConverter.GetBytes(weatherID));
|
||||
}
|
||||
}
|
||||
}
|
32
FFXIVClassic Map Server/packets/send/login/0x2Packet.cs
Normal file
32
FFXIVClassic Map Server/packets/send/login/0x2Packet.cs
Normal file
|
@ -0,0 +1,32 @@
|
|||
using FFXIVClassic_Lobby_Server.packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.packets.send.login
|
||||
{
|
||||
class _0x2Packet
|
||||
{
|
||||
public const ushort OPCODE = 0x0002;
|
||||
public const uint PACKET_SIZE = 0x30;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE-0x20];
|
||||
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
binWriter.BaseStream.Seek(0x8, SeekOrigin.Begin);
|
||||
binWriter.Write((uint)playerActorID);
|
||||
}
|
||||
}
|
||||
|
||||
return new SubPacket(OPCODE, playerActorID, playerActorID, data);
|
||||
}
|
||||
}
|
||||
}
|
41
FFXIVClassic Map Server/packets/send/login/InitPacket.cs
Normal file
41
FFXIVClassic Map Server/packets/send/login/InitPacket.cs
Normal file
|
@ -0,0 +1,41 @@
|
|||
using FFXIVClassic_Lobby_Server.packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.packets.send.login
|
||||
{
|
||||
class InitPacket
|
||||
{
|
||||
public static BasePacket buildPacket(uint unknown, uint time)
|
||||
{
|
||||
byte[] data = new byte[18];
|
||||
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
try
|
||||
{
|
||||
binWriter.Write((short)0x18);
|
||||
binWriter.Write((short)0x7);
|
||||
binWriter.Write((uint)0);
|
||||
binWriter.Write((uint)0);
|
||||
binWriter.Write((uint)0xFFFFFD7F);
|
||||
|
||||
binWriter.Write((uint)unknown);
|
||||
binWriter.Write((uint)time);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return BasePacket.createPacket(data, false, false);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue