1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-23 13:17:45 +00:00

Fixed NLog config for map server. Added some debug printouts while testing.

This commit is contained in:
Filip Maj 2016-08-29 09:03:48 -04:00
parent 37b098e87a
commit 06e7ea59f4
4 changed files with 12 additions and 5 deletions

View file

@ -38,13 +38,13 @@
<target xsi:type="ColoredConsole" name="packets"
layout="${message}">
<highlight-row
condition="equals('${logger}', 'FFXIVClassic_Map_Server.packets.BasePacket') and equals('${event-context:item=color}', '6')"
condition="equals('${logger}', 'FFXIVClassic.Common.BasePacket') and equals('${event-context:item=color}', '6')"
backgroundColor="DarkYellow" foregroundColor="NoChange" />
<highlight-row
condition="equals('${logger}', 'FFXIVClassic_Map_Server.packets.SubPacket') and equals('${event-context:item=color}', '4')"
condition="equals('${logger}', 'FFXIVClassic.Common.SubPacket') and equals('${event-context:item=color}', '4')"
backgroundColor="DarkRed" foregroundColor="NoChange" />
<highlight-row
condition="equals('${logger}', 'FFXIVClassic_Map_Server.packets.SubPacket') and equals('${event-context:item=color}', '5')"
condition="equals('${logger}', 'FFXIVClassic.Common.SubPacket') and equals('${event-context:item=color}', '5')"
backgroundColor="DarkMagenta" foregroundColor="NoChange" />
</target>
</targets>
@ -55,6 +55,7 @@
<logger name='FFXIVClassic_Map_Server.Program' minlevel='Trace' writeTo='console' />
<logger name='FFXIVClassic_Map_Server.lua.*' minlevel='Trace' writeTo='console' />
<logger name='FFXIVClassic_Map_Server.packets.*' minlevel='Debug' writeTo='packets' />
<logger name='FFXIVClassic.Common.*' minlevel='Debug' writeTo='packets' />
<!--
Write all events with minimal level of Debug (So Debug, Info, Warn, Error and Fatal, but not Trace) to "f"
<logger name="*" minlevel="Debug" writeTo="f" />

View file

@ -4,6 +4,7 @@ using System.Net.Sockets;
using FFXIVClassic.Common;
using System.Collections.Concurrent;
using System.Net;
using System.Collections.Generic;
namespace FFXIVClassic_Map_Server
{
@ -17,7 +18,9 @@ namespace FFXIVClassic_Map_Server
public void QueuePacket(BasePacket packet)
{
//SendPacketQueue.Add(packet);
List<SubPacket> subPackets = packet.GetSubpackets();
foreach (SubPacket s in subPackets)
SendPacketQueue.Add(s);
}
public void QueuePacket(SubPacket subpacket, bool isAuthed, bool isEncrypted)

View file

@ -35,7 +35,9 @@ namespace FFXIVClassic_World_Server
while (SendPacketQueue.Count > 0)
{
BasePacket packet = SendPacketQueue.Take();
BasePacket packet = SendPacketQueue.Take();
packet.DebugPrintPacket();
byte[] packetBytes = packet.GetPacketBytes();

View file

@ -136,6 +136,7 @@ namespace FFXIVClassic_World_Server
public void OnReceiveSubPacketFromZone(ZoneServer zoneServer, SubPacket subpacket)
{
subpacket.DebugPrintSubPacket();
uint sessionId = subpacket.header.targetId;
if (mZoneSessionList.ContainsKey(sessionId))