mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-11 06:54:43 +02:00
PROJECT: added common library to make common files actually common
- renamed sln to FFXIVClassic.sln - threaded logging - todo: print packets using Log.Packet
This commit is contained in:
parent
16d4779970
commit
c23f9c7ca9
53 changed files with 547 additions and 1817 deletions
|
@ -2,8 +2,8 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Diagnostics;
|
||||
using FFXIVClassic_Map_Server.common;
|
||||
using System.IO;
|
||||
using FFXIVClassic.Common;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.packets
|
||||
{
|
||||
|
@ -334,7 +334,7 @@ namespace FFXIVClassic_Map_Server.packets
|
|||
#if DEBUG
|
||||
Console.BackgroundColor = ConsoleColor.DarkYellow;
|
||||
|
||||
Log.Debug(String.Format("IsAuth: {0} IsEncrypted: {1}, Size: 0x{2:X}, NumSubpackets: {3}{4}{5}", header.isAuthenticated, header.isCompressed, header.packetSize, header.numSubpackets, Environment.NewLine, Utils.ByteArrayToHex(getHeaderBytes())));
|
||||
Program.Log.Debug(String.Format("IsAuth: {0} IsEncrypted: {1}, Size: 0x{2:X}, NumSubpackets: {3}{4}{5}", header.isAuthenticated, header.isCompressed, header.packetSize, header.numSubpackets, Environment.NewLine, Utils.ByteArrayToHex(getHeaderBytes())));
|
||||
|
||||
foreach (SubPacket sub in getSubpackets())
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using FFXIVClassic_Map_Server.common;
|
||||
using FFXIVClassic.Common;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.packets
|
||||
{
|
||||
|
@ -142,15 +142,15 @@ namespace FFXIVClassic_Map_Server.packets
|
|||
#if DEBUG
|
||||
Console.BackgroundColor = ConsoleColor.DarkRed;
|
||||
|
||||
Log.Debug(String.Format("Size: 0x{0:X}{1}{2}", header.subpacketSize, Environment.NewLine, Utils.ByteArrayToHex(getHeaderBytes())));
|
||||
Program.Log.Debug(String.Format("Size: 0x{0:X}{1}{2}", header.subpacketSize, Environment.NewLine, Utils.ByteArrayToHex(getHeaderBytes())));
|
||||
|
||||
if (header.type == 0x03)
|
||||
{
|
||||
Log.Debug(String.Format("Opcode: 0x{0:X}{1}{2}", gameMessage.opcode, Environment.NewLine, Utils.ByteArrayToHex(getGameMessageBytes(), SUBPACKET_SIZE)));
|
||||
Program.Log.Debug(String.Format("Opcode: 0x{0:X}{1}{2}", gameMessage.opcode, Environment.NewLine, Utils.ByteArrayToHex(getGameMessageBytes(), SUBPACKET_SIZE)));
|
||||
|
||||
Console.BackgroundColor = ConsoleColor.DarkMagenta;
|
||||
|
||||
Log.Debug(String.Format("Data: {0}{1}", Environment.NewLine, Utils.ByteArrayToHex(data, SUBPACKET_SIZE + GAMEMESSAGE_SIZE)));
|
||||
Program.Log.Debug(String.Format("Data: {0}{1}", Environment.NewLine, Utils.ByteArrayToHex(data, SUBPACKET_SIZE + GAMEMESSAGE_SIZE)));
|
||||
}
|
||||
|
||||
Console.BackgroundColor = ConsoleColor.Black;
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace FFXIVClassic_Map_Server.packets.receive.events
|
|||
error = ASCIIEncoding.ASCII.GetString(binReader.ReadBytes(0x80)).Replace("\0", "");
|
||||
|
||||
if (errorIndex == 0)
|
||||
Log.Error("LUA ERROR:");
|
||||
Program.Log.Error("LUA ERROR:");
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using FFXIVClassic_Map_Server.common;
|
||||
using FFXIVClassic.Common;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using FFXIVClassic_Map_Server.common;
|
||||
using FFXIVClassic.Common;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using FFXIVClassic_Map_Server.common;
|
||||
using FFXIVClassic.Common;
|
||||
using System.IO;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.packets.send.player
|
||||
|
@ -36,7 +36,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player
|
|||
if (binStream.Length <= PACKET_SIZE - 0x20)
|
||||
binWriter.Write(binStream);
|
||||
else
|
||||
Log.Error("Failed making SetCompletedAchievements packet. Bin Stream was too big!");
|
||||
Program.Log.Error("Failed making SetCompletedAchievements packet. Bin Stream was too big!");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using FFXIVClassic_Map_Server.common;
|
||||
using FFXIVClassic.Common;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
@ -81,7 +81,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player
|
|||
if (binStream.Length <= PACKET_SIZE - 0x20)
|
||||
binWriter.Write(binStream);
|
||||
else
|
||||
Log.Error("Failed making SetCutsceneBook packet. Bin Stream was too big!");
|
||||
Program.Log.Error("Failed making SetCutsceneBook packet. Bin Stream was too big!");
|
||||
|
||||
binWriter.Seek(0x109, SeekOrigin.Begin);
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(sNpcName), 0, Encoding.ASCII.GetByteCount(sNpcName) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(sNpcName));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue