mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-10 06:24:38 +02:00
more work on commands
- moved script object to wrapper class to catch and log exceptions - added loggers for basepacket/subpacket (todo: colour and use them in NLog.config) - finished up most commands (todo: !property and !property2) - todo: create and use mysql wrapper class to log exceptions
This commit is contained in:
parent
57b9d5ab99
commit
1ad2b5d7d0
35 changed files with 780 additions and 958 deletions
|
@ -4,6 +4,7 @@ using System.Runtime.InteropServices;
|
|||
using System.Diagnostics;
|
||||
using FFXIVClassic.Common;
|
||||
using System.IO;
|
||||
using NLog;
|
||||
|
||||
namespace FFXIVClassic_Lobby_Server.packets
|
||||
{
|
||||
|
@ -21,7 +22,7 @@ namespace FFXIVClassic_Lobby_Server.packets
|
|||
|
||||
public class BasePacket
|
||||
{
|
||||
|
||||
public static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
public const int TYPE_ZONE = 1;
|
||||
public const int TYPE_CHAT = 2;
|
||||
public const int BASEPACKET_SIZE = 0x10;
|
||||
|
@ -332,12 +333,12 @@ namespace FFXIVClassic_Lobby_Server.packets
|
|||
#endregion
|
||||
|
||||
public void DebugPrintPacket()
|
||||
{
|
||||
{
|
||||
#if DEBUG
|
||||
// todo: create new target for colourful packet logging
|
||||
//Console.BackgroundColor = ConsoleColor.DarkYellow;
|
||||
|
||||
Program.Log.Debug("IsAuth: {0} Size: 0x{1:X}, NumSubpackets: {2}{3}{4}", header.isAuthenticated, header.packetSize, header.numSubpackets, Environment.NewLine, Utils.ByteArrayToHex(GetHeaderBytes()));
|
||||
// todo: create new target for colourful packet logging
|
||||
//Console.BackgroundColor = ConsoleColor.DarkYellow;
|
||||
|
||||
Log.Debug("IsAuth: {0} Size: 0x{1:X}, NumSubpackets: {2}{3}{4}", header.isAuthenticated, header.packetSize, header.numSubpackets, Environment.NewLine, Utils.ByteArrayToHex(GetHeaderBytes()));
|
||||
|
||||
foreach (SubPacket sub in GetSubpackets())
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue