Moved packet structures to common.

This commit is contained in:
Filip Maj 2016-08-22 10:43:04 -04:00
parent d5f0cbef8c
commit c67f74130f
169 changed files with 3939 additions and 919 deletions

View File

@ -3,11 +3,10 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
using FFXIVClassic.Common;
using NLog;
using NLog.Targets;
namespace FFXIVClassic_Map_Server.packets
namespace FFXIVClassic.Common
{
[StructLayout(LayoutKind.Sequential)]
public struct BasePacketHeader

View File

@ -54,12 +54,14 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="BasePacket.cs" />
<Compile Include="Bitfield.cs" />
<Compile Include="Blowfish.cs" />
<Compile Include="EfficientHashTables.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Sql.cs" />
<Compile Include="STA_INIFile.cs" />
<Compile Include="SubPacket.cs" />
<Compile Include="Utils.cs" />
</ItemGroup>
<ItemGroup>

View File

@ -4,7 +4,7 @@ using FFXIVClassic.Common;
using NLog;
using NLog.Targets;
namespace FFXIVClassic_Map_Server.packets
namespace FFXIVClassic.Common
{
[StructLayout(LayoutKind.Sequential)]
public struct SubPacketHeader

View File

@ -1,6 +1,5 @@
using System;
using System.Net.Sockets;
using FFXIVClassic_Lobby_Server.packets;
using FFXIVClassic.Common;
using System.Collections.Concurrent;
using Cyotek.Collections.Generic;

View File

@ -89,7 +89,6 @@
<Compile Include="Database.cs" />
<Compile Include="dataobjects\World.cs" />
<Compile Include="PacketProcessor.cs" />
<Compile Include="packets\BasePacket.cs" />
<Compile Include="packets\receive\CharacterModifyPacket.cs" />
<Compile Include="packets\receive\SecurityHandshakePacket.cs" />
<Compile Include="packets\receive\SelectCharacterPacket.cs" />
@ -99,7 +98,6 @@
<Compile Include="packets\send\ErrorPacket.cs" />
<Compile Include="packets\HardCoded_Packets.cs" />
<Compile Include="packets\send\SelectCharacterConfirmPacket.cs" />
<Compile Include="packets\SubPacket.cs" />
<Compile Include="packets\send\CharacterListPacket.cs" />
<Compile Include="packets\send\ImportListPacket.cs" />
<Compile Include="packets\send\AccountListPacket.cs" />

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using FFXIVClassic_Lobby_Server.packets;
using FFXIVClassic.Common;
using NLog;

View File

@ -1,361 +0,0 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
using FFXIVClassic.Common;
using NLog;
using NLog.Targets;
namespace FFXIVClassic_Lobby_Server.packets
{
[StructLayout(LayoutKind.Sequential)]
public struct BasePacketHeader
{
public byte isAuthenticated;
public byte isEncrypted;
public ushort connectionType;
public ushort packetSize;
public ushort numSubpackets;
public ulong timestamp; //Miliseconds
}
public class BasePacket
{
public const int TYPE_ZONE = 1;
public const int TYPE_CHAT = 2;
public const int BASEPACKET_SIZE = 0x10;
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
public byte[] data;
public BasePacketHeader header;
//Loads a sniffed packet from a file
public unsafe BasePacket(string path)
{
var bytes = File.ReadAllBytes(path);
if (bytes.Length < BASEPACKET_SIZE)
throw new OverflowException("Packet Error: Packet was too small");
fixed (byte* pdata = &bytes[0])
{
header = (BasePacketHeader) Marshal.PtrToStructure(new IntPtr(pdata), typeof(BasePacketHeader));
}
if (bytes.Length < header.packetSize)
throw new OverflowException("Packet Error: Packet size didn't equal given size");
int packetSize = header.packetSize;
if (packetSize - BASEPACKET_SIZE != 0)
{
data = new byte[packetSize - BASEPACKET_SIZE];
Array.Copy(bytes, BASEPACKET_SIZE, data, 0, packetSize - BASEPACKET_SIZE);
}
else
data = new byte[0];
}
//Loads a sniffed packet from a byte array
public unsafe BasePacket(byte[] bytes)
{
if (bytes.Length < BASEPACKET_SIZE)
throw new OverflowException("Packet Error: Packet was too small");
fixed (byte* pdata = &bytes[0])
{
header = (BasePacketHeader) Marshal.PtrToStructure(new IntPtr(pdata), typeof(BasePacketHeader));
}
if (bytes.Length < header.packetSize)
throw new OverflowException("Packet Error: Packet size didn't equal given size");
int packetSize = header.packetSize;
data = new byte[packetSize - BASEPACKET_SIZE];
Array.Copy(bytes, BASEPACKET_SIZE, data, 0, packetSize - BASEPACKET_SIZE);
}
public unsafe BasePacket(byte[] bytes, ref int offset)
{
if (bytes.Length < offset + BASEPACKET_SIZE)
throw new OverflowException("Packet Error: Packet was too small");
fixed (byte* pdata = &bytes[offset])
{
header = (BasePacketHeader) Marshal.PtrToStructure(new IntPtr(pdata), typeof(BasePacketHeader));
}
int packetSize = header.packetSize;
if (bytes.Length < offset + header.packetSize)
throw new OverflowException("Packet Error: Packet size didn't equal given size");
data = new byte[packetSize - BASEPACKET_SIZE];
Array.Copy(bytes, offset + BASEPACKET_SIZE, data, 0, packetSize - BASEPACKET_SIZE);
offset += packetSize;
}
public BasePacket(BasePacketHeader header, byte[] data)
{
this.header = header;
this.data = data;
}
public List<SubPacket> GetSubpackets()
{
var subpackets = new List<SubPacket>(header.numSubpackets);
var offset = 0;
while (offset < data.Length)
subpackets.Add(new SubPacket(data, ref offset));
return subpackets;
}
public static unsafe BasePacketHeader GetHeader(byte[] bytes)
{
BasePacketHeader header;
if (bytes.Length < BASEPACKET_SIZE)
throw new OverflowException("Packet Error: Packet was too small");
fixed (byte* pdata = &bytes[0])
{
header = (BasePacketHeader) Marshal.PtrToStructure(new IntPtr(pdata), typeof(BasePacketHeader));
}
return header;
}
public byte[] GetHeaderBytes()
{
var size = Marshal.SizeOf(header);
var arr = new byte[size];
var ptr = Marshal.AllocHGlobal(size);
Marshal.StructureToPtr(header, ptr, true);
Marshal.Copy(ptr, arr, 0, size);
Marshal.FreeHGlobal(ptr);
return arr;
}
public byte[] GetPacketBytes()
{
var outBytes = new byte[header.packetSize];
Array.Copy(GetHeaderBytes(), 0, outBytes, 0, BASEPACKET_SIZE);
Array.Copy(data, 0, outBytes, BASEPACKET_SIZE, data.Length);
return outBytes;
}
//Replaces all instances of the sniffed actorID with the given one
public void ReplaceActorID(uint actorID)
{
using (var mem = new MemoryStream(data))
{
using (var binWriter = new BinaryWriter(mem))
{
using (var binreader = new BinaryReader(mem))
{
while (binreader.BaseStream.Position + 4 < data.Length)
{
var read = binreader.ReadUInt32();
if (read == 0x029B2941 || read == 0x02977DC7 || read == 0x0297D2C8 || read == 0x0230d573 ||
read == 0x23317df || read == 0x23344a3 || read == 0x1730bdb) //Original ID
{
binWriter.BaseStream.Seek(binreader.BaseStream.Position - 0x4, SeekOrigin.Begin);
binWriter.Write(actorID);
}
}
}
}
}
}
//Replaces all instances of the sniffed actorID with the given one
public void ReplaceActorID(uint fromActorID, uint actorID)
{
using (var mem = new MemoryStream(data))
{
using (var binWriter = new BinaryWriter(mem))
{
using (var binreader = new BinaryReader(mem))
{
while (binreader.BaseStream.Position + 4 < data.Length)
{
var read = binreader.ReadUInt32();
if (read == fromActorID) //Original ID
{
binWriter.BaseStream.Seek(binreader.BaseStream.Position - 0x4, SeekOrigin.Begin);
binWriter.Write(actorID);
}
}
}
}
}
}
public void DebugPrintPacket()
{
#if DEBUG
logger.ColorDebug(
string.Format("IsAuth:{0} Size:0x{1:X}, NumSubpackets:{2}{3}{4}",
header.isAuthenticated, header.packetSize, header.numSubpackets,
Environment.NewLine, Utils.ByteArrayToHex(GetHeaderBytes())), ConsoleOutputColor.DarkYellow);
foreach (var sub in GetSubpackets())
{
sub.DebugPrintSubPacket();
}
#endif
}
#region Utility Functions
public static BasePacket CreatePacket(List<SubPacket> subpackets, bool isAuthed, bool isEncrypted)
{
//Create Header
var header = new BasePacketHeader();
byte[] data = null;
header.isAuthenticated = isAuthed ? (byte) 1 : (byte) 0;
header.isEncrypted = isEncrypted ? (byte) 1 : (byte) 0;
header.numSubpackets = (ushort) subpackets.Count;
header.packetSize = BASEPACKET_SIZE;
header.timestamp = Utils.MilisUnixTimeStampUTC();
//Get packet size
foreach (var subpacket in subpackets)
header.packetSize += subpacket.header.subpacketSize;
data = new byte[header.packetSize - 0x10];
//Add Subpackets
var offset = 0;
foreach (var subpacket in subpackets)
{
var subpacketData = subpacket.GetBytes();
Array.Copy(subpacketData, 0, data, offset, subpacketData.Length);
offset += (ushort) subpacketData.Length;
}
Debug.Assert(data != null && offset == data.Length && header.packetSize == 0x10 + offset);
var packet = new BasePacket(header, data);
return packet;
}
public static BasePacket CreatePacket(SubPacket subpacket, bool isAuthed, bool isEncrypted)
{
//Create Header
var header = new BasePacketHeader();
byte[] data = null;
header.isAuthenticated = isAuthed ? (byte) 1 : (byte) 0;
header.isEncrypted = isEncrypted ? (byte) 1 : (byte) 0;
header.numSubpackets = 1;
header.packetSize = BASEPACKET_SIZE;
header.timestamp = Utils.MilisUnixTimeStampUTC();
//Get packet size
header.packetSize += subpacket.header.subpacketSize;
data = new byte[header.packetSize - 0x10];
//Add Subpackets
var subpacketData = subpacket.GetBytes();
Array.Copy(subpacketData, 0, data, 0, subpacketData.Length);
Debug.Assert(data != null);
var packet = new BasePacket(header, data);
return packet;
}
public static BasePacket CreatePacket(byte[] data, bool isAuthed, bool isEncrypted)
{
Debug.Assert(data != null);
//Create Header
var header = new BasePacketHeader();
header.isAuthenticated = isAuthed ? (byte) 1 : (byte) 0;
header.isEncrypted = isEncrypted ? (byte) 1 : (byte) 0;
header.numSubpackets = 1;
header.packetSize = BASEPACKET_SIZE;
header.timestamp = Utils.MilisUnixTimeStampUTC();
//Get packet size
header.packetSize += (ushort) data.Length;
var packet = new BasePacket(header, data);
return packet;
}
public static unsafe void EncryptPacket(Blowfish blowfish, BasePacket packet)
{
var data = packet.data;
int size = packet.header.packetSize;
var offset = 0;
while (offset < data.Length)
{
if (data.Length < offset + SubPacket.SUBPACKET_SIZE)
throw new OverflowException("Packet Error: Subpacket was too small");
SubPacketHeader header;
fixed (byte* pdata = &data[offset])
{
header = (SubPacketHeader) Marshal.PtrToStructure(new IntPtr(pdata), typeof(SubPacketHeader));
}
if (data.Length < offset + header.subpacketSize)
throw new OverflowException("Packet Error: Subpacket size didn't equal subpacket data");
blowfish.Encipher(data, offset + 0x10, header.subpacketSize - 0x10);
offset += header.subpacketSize;
}
}
public static unsafe void DecryptPacket(Blowfish blowfish, ref BasePacket packet)
{
var data = packet.data;
int size = packet.header.packetSize;
var offset = 0;
while (offset < data.Length)
{
if (data.Length < offset + SubPacket.SUBPACKET_SIZE)
throw new OverflowException("Packet Error: Subpacket was too small");
SubPacketHeader header;
fixed (byte* pdata = &data[offset])
{
header = (SubPacketHeader) Marshal.PtrToStructure(new IntPtr(pdata), typeof(SubPacketHeader));
}
if (data.Length < offset + header.subpacketSize)
throw new OverflowException("Packet Error: Subpacket size didn't equal subpacket data");
blowfish.Decipher(data, offset + 0x10, header.subpacketSize - 0x10);
offset += header.subpacketSize;
}
}
#endregion
}
public static class LoggerExtensions
{
public static void ColorDebug(this Logger logger, string message, ConsoleOutputColor color)
{
var logEvent = new LogEventInfo(LogLevel.Debug, logger.Name, message);
logEvent.Properties["color"] = (int) color;
logger.Log(logEvent);
}
}
}

View File

@ -1,163 +0,0 @@
using System;
using System.Runtime.InteropServices;
using FFXIVClassic.Common;
using NLog;
using NLog.Targets;
namespace FFXIVClassic_Lobby_Server.packets
{
[StructLayout(LayoutKind.Sequential)]
public struct SubPacketHeader
{
public ushort subpacketSize;
public ushort type;
public uint sourceId;
public uint targetId;
public uint unknown1;
}
[StructLayout(LayoutKind.Sequential)]
public struct GameMessageHeader
{
public ushort unknown4; //Always 0x14
public ushort opcode;
public uint unknown5;
public uint timestamp;
public uint unknown6;
}
public class SubPacket
{
public const int SUBPACKET_SIZE = 0x10;
public const int GAMEMESSAGE_SIZE = 0x10;
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
public byte[] data;
public GameMessageHeader gameMessage;
public SubPacketHeader header;
public unsafe SubPacket(byte[] bytes, ref int offset)
{
if (bytes.Length < offset + SUBPACKET_SIZE)
throw new OverflowException("Packet Error: Subpacket was too small");
fixed (byte* pdata = &bytes[offset])
{
header = (SubPacketHeader) Marshal.PtrToStructure(new IntPtr(pdata), typeof(SubPacketHeader));
}
if (header.type == 0x3)
{
fixed (byte* pdata = &bytes[offset + SUBPACKET_SIZE])
{
gameMessage =
(GameMessageHeader) Marshal.PtrToStructure(new IntPtr(pdata), typeof(GameMessageHeader));
}
}
if (bytes.Length < offset + header.subpacketSize)
throw new OverflowException("Packet Error: Subpacket size didn't equal subpacket data");
if (header.type == 0x3)
{
data = new byte[header.subpacketSize - SUBPACKET_SIZE - GAMEMESSAGE_SIZE];
Array.Copy(bytes, offset + SUBPACKET_SIZE + GAMEMESSAGE_SIZE, data, 0, data.Length);
}
else
{
data = new byte[header.subpacketSize - SUBPACKET_SIZE];
Array.Copy(bytes, offset + SUBPACKET_SIZE, data, 0, data.Length);
}
offset += header.subpacketSize;
}
public SubPacket(ushort opcode, uint sourceId, uint targetId, byte[] data)
{
header = new SubPacketHeader();
gameMessage = new GameMessageHeader();
gameMessage.opcode = opcode;
header.sourceId = sourceId;
header.targetId = targetId;
gameMessage.timestamp = Utils.UnixTimeStampUTC();
header.type = 0x03;
header.unknown1 = 0x00;
gameMessage.unknown4 = 0x14;
gameMessage.unknown5 = 0x00;
gameMessage.unknown6 = 0x00;
this.data = data;
header.subpacketSize = (ushort) (SUBPACKET_SIZE + GAMEMESSAGE_SIZE + data.Length);
}
public SubPacket(SubPacket original, uint newTargetId)
{
header = new SubPacketHeader();
gameMessage = original.gameMessage;
header.subpacketSize = original.header.subpacketSize;
header.type = original.header.type;
header.sourceId = original.header.sourceId;
header.targetId = newTargetId;
data = original.data;
}
public byte[] GetHeaderBytes()
{
var size = Marshal.SizeOf(header);
var arr = new byte[size];
var ptr = Marshal.AllocHGlobal(size);
Marshal.StructureToPtr(header, ptr, true);
Marshal.Copy(ptr, arr, 0, size);
Marshal.FreeHGlobal(ptr);
return arr;
}
public byte[] GetGameMessageBytes()
{
var size = Marshal.SizeOf(gameMessage);
var arr = new byte[size];
var ptr = Marshal.AllocHGlobal(size);
Marshal.StructureToPtr(gameMessage, ptr, true);
Marshal.Copy(ptr, arr, 0, size);
Marshal.FreeHGlobal(ptr);
return arr;
}
public byte[] GetBytes()
{
var outBytes = new byte[header.subpacketSize];
Array.Copy(GetHeaderBytes(), 0, outBytes, 0, SUBPACKET_SIZE);
if (header.type == 0x3)
Array.Copy(GetGameMessageBytes(), 0, outBytes, SUBPACKET_SIZE, GAMEMESSAGE_SIZE);
Array.Copy(data, 0, outBytes, SUBPACKET_SIZE + (header.type == 0x3 ? GAMEMESSAGE_SIZE : 0), data.Length);
return outBytes;
}
public void DebugPrintSubPacket()
{
#if DEBUG
logger.ColorDebug(
string.Format("Size:0x{0:X} Opcode:0x{1:X}{2}{3}", header.subpacketSize, gameMessage.opcode,
Environment.NewLine,
Utils.ByteArrayToHex(GetHeaderBytes())), ConsoleOutputColor.DarkRed);
if (header.type == 0x03)
{
logger.ColorDebug(Utils.ByteArrayToHex(GetGameMessageBytes(), SUBPACKET_SIZE),
ConsoleOutputColor.DarkRed);
logger.ColorDebug(Utils.ByteArrayToHex(data, SUBPACKET_SIZE + GAMEMESSAGE_SIZE),
ConsoleOutputColor.DarkMagenta);
}
#endif
}
}
}

View File

@ -1,4 +1,5 @@
using FFXIVClassic_Lobby_Server.dataobjects;
using FFXIVClassic.Common;
using FFXIVClassic_Lobby_Server.dataobjects;
using System;
using System.Collections.Generic;
using System.IO;

View File

@ -1,4 +1,5 @@
using System;
using FFXIVClassic.Common;
using System;
using System.IO;
using System.Text;

View File

@ -1,4 +1,5 @@
using FFXIVClassic_Lobby_Server.dataobjects;
using FFXIVClassic.Common;
using FFXIVClassic_Lobby_Server.dataobjects;
using System;
using System.Collections.Generic;
using System.IO;

View File

@ -1,4 +1,5 @@
using System;
using FFXIVClassic.Common;
using System;
using System.IO;
using System.Text;

View File

@ -1,4 +1,5 @@
using System;
using FFXIVClassic.Common;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

View File

@ -1,4 +1,5 @@
using System;
using FFXIVClassic.Common;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

View File

@ -1,4 +1,5 @@
using System;
using FFXIVClassic.Common;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

View File

@ -1,4 +1,5 @@
using FFXIVClassic_Lobby_Server.dataobjects;
using FFXIVClassic.Common;
using FFXIVClassic_Lobby_Server.dataobjects;
using System;
using System.Collections.Generic;
using System.IO;

View File

@ -1,6 +1,6 @@
using System;
using System.Net.Sockets;
using FFXIVClassic_Map_Server.packets;
using FFXIVClassic.Common;
using System.Collections.Concurrent;
using System.Net;

View File

@ -8,7 +8,7 @@ using System.Threading.Tasks;
using System.Threading;
using FFXIVClassic.Common;
using FFXIVClassic_Map_Server.dataobjects;
using FFXIVClassic_Map_Server.packets;
using System.IO;
using FFXIVClassic_Map_Server.packets.send.actor;
using FFXIVClassic_Map_Server;

View File

@ -5,7 +5,7 @@ using System.Collections.Generic;
using System.Linq;
using FFXIVClassic.Common;
using FFXIVClassic_Map_Server.utils;
using FFXIVClassic_Map_Server.packets;
using FFXIVClassic_Map_Server.packets.send.player;
using FFXIVClassic_Map_Server.dataobjects;
using FFXIVClassic_Map_Server.Actors;

View File

@ -121,7 +121,6 @@
<Compile Include="lua\LuaPlayer.cs" />
<Compile Include="lua\LuaScript.cs" />
<Compile Include="PacketProcessor.cs" />
<Compile Include="packets\BasePacket.cs" />
<Compile Include="packets\receive\ChatMessagePacket.cs" />
<Compile Include="packets\receive\events\EventUpdatePacket.cs" />
<Compile Include="packets\receive\events\EventStartPacket.cs" />
@ -255,7 +254,6 @@
<Compile Include="packets\send\_0x02Packet.cs" />
<Compile Include="packets\send\_0x10Packet.cs" />
<Compile Include="packets\send\_0xE2Packet.cs" />
<Compile Include="packets\SubPacket.cs" />
<Compile Include="packets\receive\PingPacket.cs" />
<Compile Include="packets\receive\UpdatePlayerPositionPacket.cs" />
<Compile Include="Program.cs" />

View File

@ -1,5 +1,5 @@
using FFXIVClassic.Common;
using FFXIVClassic_Map_Server.packets;
using System;
using System.Collections.Generic;
using System.IO;

View File

@ -4,7 +4,7 @@ using System.Net;
using System.Net.Sockets;
using System.Threading;
using FFXIVClassic_Map_Server.dataobjects;
using FFXIVClassic_Map_Server.packets;
using FFXIVClassic.Common;
using NLog;
using FFXIVClassic_Map_Server.Actors;

View File

@ -1,4 +1,4 @@
using FFXIVClassic_Map_Server.packets;

using FFXIVClassic_Map_Server.actors;
using FFXIVClassic_Map_Server.lua;
using FFXIVClassic_Map_Server.packets.send.actor;

View File

@ -1,6 +1,6 @@
using FFXIVClassic_Map_Server;
using FFXIVClassic.Common;
using FFXIVClassic_Map_Server.packets;
using FFXIVClassic_Map_Server.actors.area;
using FFXIVClassic_Map_Server.actors.chara.npc;
using FFXIVClassic_Map_Server.dataobjects;

View File

@ -1,4 +1,5 @@
using FFXIVClassic_Map_Server.packets;

using FFXIVClassic.Common;
using FFXIVClassic_Map_Server.Actors;
using FFXIVClassic_Map_Server.lua;
using FFXIVClassic_Map_Server.packets.send.actor;

View File

@ -1,6 +1,6 @@
using FFXIVClassic_Map_Server;
using FFXIVClassic.Common;
using FFXIVClassic_Map_Server.packets;
using FFXIVClassic_Map_Server.actors.chara.npc;
using FFXIVClassic_Map_Server.Actors;
using FFXIVClassic_Map_Server.lua;

View File

@ -1,4 +1,5 @@
using FFXIVClassic_Map_Server.packets;

using FFXIVClassic.Common;
using FFXIVClassic_Map_Server.Actors.Chara;
using FFXIVClassic_Map_Server.packets.send.actor;

View File

@ -3,7 +3,7 @@ using FFXIVClassic_Map_Server.actors;
using FFXIVClassic_Map_Server.Actors.Chara;
using FFXIVClassic_Map_Server.dataobjects;
using FFXIVClassic_Map_Server.lua;
using FFXIVClassic_Map_Server.packets;
using FFXIVClassic_Map_Server.packets.receive.events;
using FFXIVClassic_Map_Server.packets.send.actor;
using FFXIVClassic_Map_Server.utils;

View File

@ -1,7 +1,6 @@
using FFXIVClassic_Map_Server.Actors;
using FFXIVClassic_Map_Server.dataobjects;
using FFXIVClassic_Map_Server.packets.send.actor.inventory;
using FFXIVClassic_Map_Server.packets.send.Actor.inventory;
using System.Collections.Generic;
namespace FFXIVClassic_Map_Server.actors.chara.player

View File

@ -1,8 +1,8 @@
using FFXIVClassic_Map_Server.packets;

using FFXIVClassic.Common;
using FFXIVClassic_Map_Server.Actors;
using FFXIVClassic_Map_Server.dataobjects;
using FFXIVClassic_Map_Server.packets.send.actor.inventory;
using FFXIVClassic_Map_Server.packets.send.Actor.inventory;
using System;
using System.Collections.Generic;
using System.Linq;

View File

@ -1,5 +1,5 @@
using FFXIVClassic.Common;
using FFXIVClassic_Map_Server.packets;
using FFXIVClassic_Map_Server.actors.chara.player;
using FFXIVClassic_Map_Server.actors.director;
using FFXIVClassic_Map_Server.dataobjects;
@ -7,8 +7,6 @@ using FFXIVClassic_Map_Server.dataobjects.chara;
using FFXIVClassic_Map_Server.lua;
using FFXIVClassic_Map_Server.packets.send;
using FFXIVClassic_Map_Server.packets.send.actor;
using FFXIVClassic_Map_Server.packets.send.actor.events;
using FFXIVClassic_Map_Server.packets.send.Actor.inventory;
using FFXIVClassic_Map_Server.packets.send.events;
using FFXIVClassic_Map_Server.packets.send.list;
using FFXIVClassic_Map_Server.packets.send.player;
@ -17,7 +15,8 @@ using System;
using System.Collections.Generic;
using MoonSharp.Interpreter;
using FFXIVClassic_Map_Server.packets.receive.events;
using FFXIVClassic_Map_Server.packets.send.actor.inventory;
namespace FFXIVClassic_Map_Server.Actors
{
class Player : Character

View File

@ -1,4 +1,4 @@
using FFXIVClassic_Map_Server.packets;
using FFXIVClassic.Common;
using FFXIVClassic_Map_Server.lua;
using FFXIVClassic_Map_Server.packets.send.actor;
using System.Collections.Generic;

View File

@ -1,4 +1,5 @@
using FFXIVClassic_Map_Server.packets;

using FFXIVClassic.Common;
using FFXIVClassic_Map_Server.Actors;
using FFXIVClassic_Map_Server.lua;
using FFXIVClassic_Map_Server.packets.send.actor;

View File

@ -1,4 +1,5 @@
using FFXIVClassic_Map_Server.packets;

using FFXIVClassic.Common;
using FFXIVClassic_Map_Server.Actors;
using FFXIVClassic_Map_Server.lua;
using FFXIVClassic_Map_Server.packets.send.actor;

View File

@ -1,4 +1,5 @@
using FFXIVClassic_Map_Server.packets;

using FFXIVClassic.Common;
using FFXIVClassic_Map_Server.actors.director;
using FFXIVClassic_Map_Server.lua;
using FFXIVClassic_Map_Server.packets.send.actor;

View File

@ -1,4 +1,5 @@
using FFXIVClassic_Map_Server.packets;

using FFXIVClassic.Common;
using FFXIVClassic_Map_Server.Actors;
using FFXIVClassic_Map_Server.lua;
using FFXIVClassic_Map_Server.packets.send.actor;

View File

@ -1,4 +1,5 @@
using FFXIVClassic_Map_Server.packets;

using FFXIVClassic.Common;
using FFXIVClassic_Map_Server.Actors;
using FFXIVClassic_Map_Server.lua;
using FFXIVClassic_Map_Server.packets.send.actor;

View File

@ -1,4 +1,5 @@
using FFXIVClassic_Map_Server.packets;

using FFXIVClassic.Common;
using FFXIVClassic_Map_Server.Actors;
using FFXIVClassic_Map_Server.lua;
using FFXIVClassic_Map_Server.packets.send.actor;

View File

@ -1,4 +1,5 @@
using FFXIVClassic_Map_Server.packets;

using FFXIVClassic.Common;
using FFXIVClassic_Map_Server.lua;
using FFXIVClassic_Map_Server.packets.send.actor;
using System.Collections.Generic;

View File

@ -1,6 +1,6 @@
using FFXIVClassic_Map_Server;
using FFXIVClassic.Common;
using FFXIVClassic_Map_Server.packets;
using FFXIVClassic_Map_Server.Actors;
using FFXIVClassic_Map_Server.lua;
using FFXIVClassic_Map_Server.packets.send.actor;
@ -70,7 +70,7 @@ namespace FFXIVClassic_Map_Server.dataobjects
}
public void QueuePacket(SubPacket subPacket, bool isAuthed, bool isEncrypted)
{
{
zoneConnection.QueuePacket(subPacket, isAuthed, isEncrypted);
}

View File

@ -1,207 +1,208 @@
using FFXIVClassic_Map_Server.packets;
using FFXIVClassic_Map_Server.actors.director;
using FFXIVClassic_Map_Server.Actors;
using FFXIVClassic_Map_Server.dataobjects;
using FFXIVClassic_Map_Server.packets.receive.events;
using FFXIVClassic_Map_Server.packets.send;
using FFXIVClassic_Map_Server.packets.send.events;
using MoonSharp.Interpreter;
using MoonSharp.Interpreter.Interop;
using MoonSharp.Interpreter.Loaders;
using System;
using System.Collections.Generic;
using System.IO;
using System.Diagnostics;
using FFXIVClassic_Map_Server.lua;
namespace FFXIVClassic_Map_Server.lua
{
class LuaEngine
{
const string FILEPATH_PLAYER = "./scripts/player.lua";
const string FILEPATH_ZONE = "./scripts/zones/{0}/zone.lua";
const string FILEPATH_COMMANDS = "./scripts/commands/{0}.lua";
const string FILEPATH_DIRECTORS = "./scripts/directors/{0}.lua";
const string FILEPATH_NPCS = "./scripts/zones/{0}/npcs/{1}.lua";
public LuaEngine()
{
UserData.RegistrationPolicy = InteropRegistrationPolicy.Automatic;
}
public static List<LuaParam> DoActorInstantiate(Player player, Actor target)
{
string luaPath;
if (target is Npc)
{
luaPath = String.Format(FILEPATH_NPCS, target.zoneId, target.GetName());
if (File.Exists(luaPath))
{
LuaScript script = LoadScript(luaPath);
if (script == null)
return null;
DynValue result = script.Call(script.Globals["init"], target);
List<LuaParam> lparams = LuaUtils.CreateLuaParamList(result);
return lparams;
}
else
{
SendError(player, String.Format("ERROR: Could not find script for actor {0}.", target.GetName()));
return null;
}
}
return null;

using FFXIVClassic_Map_Server.actors.director;
using FFXIVClassic_Map_Server.Actors;
using FFXIVClassic_Map_Server.dataobjects;
using FFXIVClassic_Map_Server.packets.receive.events;
using FFXIVClassic_Map_Server.packets.send;
using FFXIVClassic_Map_Server.packets.send.events;
using MoonSharp.Interpreter;
using MoonSharp.Interpreter.Interop;
using MoonSharp.Interpreter.Loaders;
using System;
using System.Collections.Generic;
using System.IO;
using System.Diagnostics;
using FFXIVClassic_Map_Server.lua;
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.lua
{
class LuaEngine
{
const string FILEPATH_PLAYER = "./scripts/player.lua";
const string FILEPATH_ZONE = "./scripts/zones/{0}/zone.lua";
const string FILEPATH_COMMANDS = "./scripts/commands/{0}.lua";
const string FILEPATH_DIRECTORS = "./scripts/directors/{0}.lua";
const string FILEPATH_NPCS = "./scripts/zones/{0}/npcs/{1}.lua";
public LuaEngine()
{
UserData.RegistrationPolicy = InteropRegistrationPolicy.Automatic;
}
public static Coroutine DoActorOnEventStarted(Player player, Actor target, EventStartPacket eventStart)
{
string luaPath;
if (target is Command)
{
luaPath = String.Format(FILEPATH_COMMANDS, target.GetName());
}
else if (target is Director)
{
luaPath = String.Format(FILEPATH_DIRECTORS, target.GetName());
}
else
luaPath = String.Format(FILEPATH_NPCS, target.zoneId, target.GetName());
if (File.Exists(luaPath))
{
LuaScript script = LoadScript(luaPath);
if (script == null)
return null;
if (!script.Globals.Get("onEventStarted").IsNil())
return script.CreateCoroutine(script.Globals["onEventStarted"]).Coroutine;
else
return null;
}
else
{
SendError(player, String.Format("ERROR: Could not find script for actor {0}.", target.GetName()));
return null;
public static List<LuaParam> DoActorInstantiate(Player player, Actor target)
{
string luaPath;
if (target is Npc)
{
luaPath = String.Format(FILEPATH_NPCS, target.zoneId, target.GetName());
if (File.Exists(luaPath))
{
LuaScript script = LoadScript(luaPath);
if (script == null)
return null;
DynValue result = script.Call(script.Globals["init"], target);
List<LuaParam> lparams = LuaUtils.CreateLuaParamList(result);
return lparams;
}
else
{
SendError(player, String.Format("ERROR: Could not find script for actor {0}.", target.GetName()));
return null;
}
}
}
public static void DoActorOnSpawn(Player player, Npc target)
{
string luaPath = String.Format(FILEPATH_NPCS, target.zoneId, target.GetName());
if (File.Exists(luaPath))
{
LuaScript script = LoadScript(luaPath);
if (script == null)
return;
//Run Script
if (!script.Globals.Get("onSpawn").IsNil())
script.Call(script.Globals["onSpawn"], player, target);
}
else
{
SendError(player, String.Format("ERROR: Could not find script for actor {0}.", target.GetName()));
}
}
public static void DoActorOnEventUpdated(Player player, Actor target, EventUpdatePacket eventUpdate)
{
if (target is Npc)
{
((Npc)target).DoEventUpdate(player, eventUpdate);
return;
}
return null;
}
public static Coroutine DoActorOnEventStarted(Player player, Actor target, EventStartPacket eventStart)
{
string luaPath;
if (target is Command)
luaPath = String.Format(FILEPATH_COMMANDS, target.GetName());
else if (target is Director)
luaPath = String.Format(FILEPATH_DIRECTORS, target.GetName());
else
luaPath = String.Format(FILEPATH_NPCS, target.zoneId, target.GetName());
if (File.Exists(luaPath))
{
LuaScript script = LoadScript(luaPath);
if (script == null)
return;
//Have to Do this to combine LuaParams
List<Object> objects = new List<Object>();
objects.Add(player);
objects.Add(target);
objects.Add(eventUpdate.val2);
objects.AddRange(LuaUtils.CreateLuaParamObjectList(eventUpdate.luaParams));
//Run Script
if (!script.Globals.Get("onEventUpdate").IsNil())
script.Call(script.Globals["onEventUpdate"], objects.ToArray());
}
else
{
SendError(player, String.Format("ERROR: Could not find script for actor {0}.", target.GetName()));
{
luaPath = String.Format(FILEPATH_COMMANDS, target.GetName());
}
}
public static void OnZoneIn(Player player)
{
else if (target is Director)
{
luaPath = String.Format(FILEPATH_DIRECTORS, target.GetName());
}
else
luaPath = String.Format(FILEPATH_NPCS, target.zoneId, target.GetName());
if (File.Exists(luaPath))
{
LuaScript script = LoadScript(luaPath);
if (script == null)
return null;
if (!script.Globals.Get("onEventStarted").IsNil())
return script.CreateCoroutine(script.Globals["onEventStarted"]).Coroutine;
else
return null;
}
else
{
SendError(player, String.Format("ERROR: Could not find script for actor {0}.", target.GetName()));
return null;
}
}
public static void DoActorOnSpawn(Player player, Npc target)
{
string luaPath = String.Format(FILEPATH_NPCS, target.zoneId, target.GetName());
if (File.Exists(luaPath))
{
LuaScript script = LoadScript(luaPath);
if (script == null)
return;
//Run Script
if (!script.Globals.Get("onSpawn").IsNil())
script.Call(script.Globals["onSpawn"], player, target);
}
else
{
SendError(player, String.Format("ERROR: Could not find script for actor {0}.", target.GetName()));
}
}
public static void DoActorOnEventUpdated(Player player, Actor target, EventUpdatePacket eventUpdate)
{
if (target is Npc)
{
((Npc)target).DoEventUpdate(player, eventUpdate);
return;
}
string luaPath;
if (target is Command)
luaPath = String.Format(FILEPATH_COMMANDS, target.GetName());
else if (target is Director)
luaPath = String.Format(FILEPATH_DIRECTORS, target.GetName());
else
luaPath = String.Format(FILEPATH_NPCS, target.zoneId, target.GetName());
if (File.Exists(luaPath))
{
LuaScript script = LoadScript(luaPath);
if (script == null)
return;
//Have to Do this to combine LuaParams
List<Object> objects = new List<Object>();
objects.Add(player);
objects.Add(target);
objects.Add(eventUpdate.val2);
objects.AddRange(LuaUtils.CreateLuaParamObjectList(eventUpdate.luaParams));
//Run Script
if (!script.Globals.Get("onEventUpdate").IsNil())
script.Call(script.Globals["onEventUpdate"], objects.ToArray());
}
else
{
SendError(player, String.Format("ERROR: Could not find script for actor {0}.", target.GetName()));
}
}
public static void OnZoneIn(Player player)
{
string luaPath = String.Format(FILEPATH_ZONE, player.GetZone().actorId);
if (File.Exists(luaPath))
{
LuaScript script = LoadScript(luaPath);
if (script == null)
return;
//Run Script
if (!script.Globals.Get("onZoneIn").IsNil())
script.Call(script.Globals["onZoneIn"], player);
if (File.Exists(luaPath))
{
LuaScript script = LoadScript(luaPath);
if (script == null)
return;
//Run Script
if (!script.Globals.Get("onZoneIn").IsNil())
script.Call(script.Globals["onZoneIn"], player);
}
}
public static void OnBeginLogin(Player player)
{
if (File.Exists(FILEPATH_PLAYER))
{
LuaScript script = LoadScript(FILEPATH_PLAYER);
if (script == null)
return;
//Run Script
if (!script.Globals.Get("onBeginLogin").IsNil())
script.Call(script.Globals["onBeginLogin"], player);
}
}
public static void OnLogin(Player player)
{
if (File.Exists(FILEPATH_PLAYER))
{
LuaScript script = LoadScript(FILEPATH_PLAYER);
if (script == null)
return;
//Run Script
if (!script.Globals.Get("onLogin").IsNil())
script.Call(script.Globals["onLogin"], player);
}
}
}
public static void OnBeginLogin(Player player)
{
if (File.Exists(FILEPATH_PLAYER))
{
LuaScript script = LoadScript(FILEPATH_PLAYER);
if (script == null)
return;
//Run Script
if (!script.Globals.Get("onBeginLogin").IsNil())
script.Call(script.Globals["onBeginLogin"], player);
}
}
public static void OnLogin(Player player)
{
if (File.Exists(FILEPATH_PLAYER))
{
LuaScript script = LoadScript(FILEPATH_PLAYER);
if (script == null)
return;
//Run Script
if (!script.Globals.Get("onLogin").IsNil())
script.Call(script.Globals["onLogin"], player);
}
}
#region RunGMCommand
public static void RunGMCommand(Player player, String cmd, string[] param, bool help = false)
{
@ -336,22 +337,22 @@ namespace FFXIVClassic_Map_Server.lua
LuaScript.Log.Error("LuaEngine.RunGMCommand: Unable to find script {0}", path);
return;
}
#endregion
public static LuaScript LoadScript(string filename)
{
LuaScript script = LoadGlobals();
try
{
script.DoFile(filename);
}
catch (SyntaxErrorException e)
{
Program.Log.Error("LUAERROR: {0}.", e.DecoratedMessage);
return null;
}
return script;
#endregion
public static LuaScript LoadScript(string filename)
{
LuaScript script = LoadGlobals();
try
{
script.DoFile(filename);
}
catch (SyntaxErrorException e)
{
Program.Log.Error("LUAERROR: {0}.", e.DecoratedMessage);
return null;
}
return script;
}
public static LuaScript LoadGlobals(LuaScript script = null)
@ -367,57 +368,57 @@ namespace FFXIVClassic_Map_Server.lua
script.Options.DebugPrint = s => { Program.Log.Debug(s); };
return script;
}
public static void SendError(Player player, string message)
{
List<SubPacket> SendError = new List<SubPacket>();
SendError.Add(EndEventPacket.BuildPacket(player.actorId, player.currentEventOwner, player.currentEventName));
player.SendMessage(SendMessagePacket.MESSAGE_TYPE_SYSTEM_ERROR, "", message);
player.playerSession.QueuePacket(BasePacket.CreatePacket(SendError, true, false));
}
internal static void DoDirectorOnTalked(Director director, Player player, Npc npc)
{
string luaPath = String.Format(FILEPATH_DIRECTORS, director.GetName());
if (File.Exists(luaPath))
{
LuaScript script = LoadScript(luaPath);
if (script == null)
return;
//Run Script
if (!script.Globals.Get("onTalked").IsNil())
script.Call(script.Globals["onTalked"], player, npc);
}
else
{
SendError(player, String.Format("ERROR: Could not find script for director {0}.", director.GetName()));
}
}
internal static void DoDirectorOnCommand(Director director, Player player, Command command)
{
string luaPath = String.Format(FILEPATH_DIRECTORS, director.GetName());
if (File.Exists(luaPath))
{
LuaScript script = LoadScript(luaPath);
if (script == null)
return;
//Run Script
if (!script.Globals.Get("onCommand").IsNil())
script.Call(script.Globals["onCommand"], player, command);
}
else
{
SendError(player, String.Format("ERROR: Could not find script for director {0}.", director.GetName()));
}
}
}
}
}
public static void SendError(Player player, string message)
{
List<SubPacket> SendError = new List<SubPacket>();
SendError.Add(EndEventPacket.BuildPacket(player.actorId, player.currentEventOwner, player.currentEventName));
player.SendMessage(SendMessagePacket.MESSAGE_TYPE_SYSTEM_ERROR, "", message);
player.playerSession.QueuePacket(BasePacket.CreatePacket(SendError, true, false));
}
internal static void DoDirectorOnTalked(Director director, Player player, Npc npc)
{
string luaPath = String.Format(FILEPATH_DIRECTORS, director.GetName());
if (File.Exists(luaPath))
{
LuaScript script = LoadScript(luaPath);
if (script == null)
return;
//Run Script
if (!script.Globals.Get("onTalked").IsNil())
script.Call(script.Globals["onTalked"], player, npc);
}
else
{
SendError(player, String.Format("ERROR: Could not find script for director {0}.", director.GetName()));
}
}
internal static void DoDirectorOnCommand(Director director, Player player, Command command)
{
string luaPath = String.Format(FILEPATH_DIRECTORS, director.GetName());
if (File.Exists(luaPath))
{
LuaScript script = LoadScript(luaPath);
if (script == null)
return;
//Run Script
if (!script.Globals.Get("onCommand").IsNil())
script.Call(script.Globals["onCommand"], player, command);
}
else
{
SendError(player, String.Format("ERROR: Could not find script for director {0}.", director.GetName()));
}
}
}
}

View File

@ -1,7 +1,9 @@
using System;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class ActorDoEmotePacket
{

View File

@ -4,7 +4,9 @@ using System.Collections.Generic;
using System.IO;
using System.Text;
namespace FFXIVClassic_Map_Server.packets.send.actor
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class ActorInstantiatePacket
{

View File

@ -1,7 +1,9 @@
using System;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class SetActorQuestGraphicPacket
{

View File

@ -1,4 +1,8 @@
namespace FFXIVClassic_Map_Server.packets.send.actor
using FFXIVClassic.Common;
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class AddActorPacket
{

View File

@ -1,6 +1,9 @@
using System.IO;
using FFXIVClassic.Common;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class BattleAction1Packet
{

View File

@ -1,4 +1,8 @@
namespace FFXIVClassic_Map_Server.packets.send.actor
using FFXIVClassic.Common;
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class DeleteAllActorsPacket
{

View File

@ -1,7 +1,9 @@
using System;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class MoveActorToPositionPacket
{

View File

@ -1,7 +1,9 @@
using System;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class RemoveActorPacket
{

View File

@ -1,6 +1,8 @@
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class SetActorAppearancePacket
{

View File

@ -1,7 +1,9 @@
using System;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class SetActorIconPacket
{

View File

@ -1,7 +1,9 @@
using System;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class SetActorIdleAnimationPacket
{

View File

@ -1,4 +1,6 @@
namespace FFXIVClassic_Map_Server.packets.send.actor
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class SetActorIsZoningPacket
{

View File

@ -2,7 +2,9 @@
using System.IO;
using System.Text;
namespace FFXIVClassic_Map_Server.packets.send.actor
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class SetActorNamePacket
{

View File

@ -1,7 +1,9 @@
using System;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class SetActorPositionPacket
{

View File

@ -5,7 +5,9 @@ using System.Linq;
using System.Reflection;
using System.Text;
namespace FFXIVClassic_Map_Server.packets.send.actor
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class SetActorPropetyPacket
{

View File

@ -1,7 +1,8 @@
using System;
using FFXIVClassic.Common;
using System;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class SetActorSpeedPacket
{

View File

@ -1,6 +1,9 @@
using System;
using FFXIVClassic.Common;
using System;
namespace FFXIVClassic_Map_Server.packets.send.actor
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class SetActorStatePacket
{

View File

@ -1,7 +1,10 @@
using System;
using FFXIVClassic.Common;
using System;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class SetActorStatusAllPacket
{

View File

@ -1,7 +1,10 @@
using System;
using FFXIVClassic.Common;
using System;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class SetActorStatusPacket
{

View File

@ -1,6 +1,8 @@
using System;
namespace FFXIVClassic_Map_Server.packets.send.actor
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class SetActorTargetAnimatedPacket
{

View File

@ -1,4 +1,5 @@
using System;
using FFXIVClassic.Common;
using System;
namespace FFXIVClassic_Map_Server.packets.send.actor
{

View File

@ -1,8 +1,10 @@
using System;
using FFXIVClassic.Common;
using System;
using System.IO;
using System.Text;
namespace FFXIVClassic_Map_Server.packets.send.actor
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class _0x132Packet
{

View File

@ -1,6 +1,8 @@
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class _0xFPacket
{

View File

@ -1,4 +1,6 @@
namespace FFXIVClassic_Map_Server.packets.send.actor.battle
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.battle
{
class BattleAction
{

View File

@ -1,7 +1,10 @@
using System;
using FFXIVClassic.Common;
using System;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor.battle
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.battle
{
class BattleActionX00Packet
{

View File

@ -1,7 +1,10 @@
using System;
using FFXIVClassic.Common;
using System;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor.battle
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.battle
{
class BattleActionX01Packet
{

View File

@ -1,7 +1,10 @@
using System;
using FFXIVClassic.Common;
using System;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor.battle
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.battle
{
class BattleActionX10Packet
{

View File

@ -1,7 +1,10 @@
using System;
using FFXIVClassic.Common;
using System;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor.battle
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.battle
{
class BattleActionX18Packet
{

View File

@ -1,9 +1,12 @@
using FFXIVClassic_Map_Server.actors;
using FFXIVClassic.Common;
using FFXIVClassic_Map_Server.actors;
using System;
using System.IO;
using System.Text;
namespace FFXIVClassic_Map_Server.packets.send.actor.events
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.events
{
class SetEmoteEventCondition
{

View File

@ -2,7 +2,9 @@
using System.IO;
using System.Text;
namespace FFXIVClassic_Map_Server.packets.send.actor.events
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.events
{
class SetEventStatus
{

View File

@ -3,7 +3,9 @@ using System;
using System.IO;
using System.Text;
namespace FFXIVClassic_Map_Server.packets.send.actor.events
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.events
{
class SetNoticeEventCondition
{

View File

@ -3,7 +3,9 @@ using System;
using System.IO;
using System.Text;
namespace FFXIVClassic_Map_Server.packets.send.actor.events
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.events
{
class SetPushEventConditionWithCircle
{

View File

@ -3,7 +3,9 @@ using System;
using System.IO;
using System.Text;
namespace FFXIVClassic_Map_Server.packets.send.actor.events
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.events
{
class SetPushEventConditionWithFan
{

View File

@ -3,7 +3,9 @@ using System;
using System.IO;
using System.Text;
namespace FFXIVClassic_Map_Server.packets.send.actor.events
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.events
{
class SetPushEventConditionWithTriggerBox
{

View File

@ -3,7 +3,9 @@ using System;
using System.IO;
using System.Text;
namespace FFXIVClassic_Map_Server.packets.send.actor.events
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.events
{
class SetTalkEventCondition
{

View File

@ -1,7 +1,9 @@
using System;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class EquipmentListX01Packet
{

View File

@ -3,7 +3,9 @@ using System;
using System.Collections.Generic;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class EquipmentListX08Packet
{

View File

@ -3,7 +3,9 @@ using System;
using System.Collections.Generic;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class EquipmentListX16Packet
{

View File

@ -3,7 +3,9 @@ using System;
using System.Collections.Generic;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class EquipmentListX32Packet
{

View File

@ -3,7 +3,9 @@ using System;
using System.Collections.Generic;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class EquipmentListX64Packet
{

View File

@ -1,4 +1,6 @@
namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class InventoryBeginChangePacket
{

View File

@ -1,4 +1,6 @@
namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class InventoryEndChangePacket
{

View File

@ -2,7 +2,9 @@
using System.Collections.Generic;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class InventoryItemEndPacket
{

View File

@ -2,7 +2,9 @@
using System.Collections.Generic;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class InventoryItemPacket
{

View File

@ -1,7 +1,9 @@
using FFXIVClassic_Map_Server.dataobjects;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class InventoryListX01Packet
{

View File

@ -3,7 +3,9 @@ using System;
using System.Collections.Generic;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class InventoryListX08Packet
{

View File

@ -2,7 +2,9 @@
using System.Collections.Generic;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class InventoryListX16Packet
{

View File

@ -2,7 +2,9 @@
using System.Collections.Generic;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class InventoryListX32Packet
{

View File

@ -2,7 +2,9 @@
using System.Collections.Generic;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class InventoryListX64Packet
{

View File

@ -1,7 +1,9 @@
using System;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class InventoryRemoveX01Packet
{

View File

@ -1,8 +1,11 @@
using System;
using FFXIVClassic.Common;
using System;
using System.Collections.Generic;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class InventoryRemoveX08Packet
{

View File

@ -2,7 +2,9 @@
using System.Collections.Generic;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class InventoryRemoveX16Packet
{

View File

@ -2,7 +2,9 @@
using System.Collections.Generic;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class InventoryRemoveX32Packet
{

View File

@ -2,7 +2,9 @@
using System.Collections.Generic;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class InventoryRemoveX64Packet
{

View File

@ -1,7 +1,9 @@
using System;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class InventorySetBeginPacket
{

View File

@ -1,4 +1,6 @@
namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class InventorySetEndPacket
{

View File

@ -4,6 +4,8 @@ using System.Collections.Generic;
using System.IO;
using System.Text;
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send
{
class GameMessagePacket

View File

@ -1,4 +1,6 @@
namespace FFXIVClassic_Map_Server.packets.send
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send
{
class LogoutPacket
{

View File

@ -1,4 +1,5 @@
using System;
using FFXIVClassic.Common;
using System;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.receive

Some files were not shown because too many files have changed in this diff Show More