mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
Cleaned up LogFile and ByteArrayToHex utils.
This commit is contained in:
@@ -333,8 +333,8 @@ namespace FFXIVClassic_Map_Server.packets
|
||||
{
|
||||
#if DEBUG
|
||||
Console.BackgroundColor = ConsoleColor.DarkYellow;
|
||||
Log.debug(String.Format("IsAuthed: {0}, IsEncrypted: {1}, Size: 0x{2:X}, Num Subpackets: {3}", header.isAuthenticated, header.isCompressed, header.packetSize, header.numSubpackets));
|
||||
Log.debug(String.Format("{0}", Utils.ByteArrayToHex(getHeaderBytes())));
|
||||
Log.Debug(String.Format("IsAuthed: {0}, IsEncrypted: {1}, Size: 0x{2:X}, Num Subpackets: {3}", header.isAuthenticated, header.isCompressed, header.packetSize, header.numSubpackets));
|
||||
Log.Debug(String.Format("{0}", Utils.ByteArrayToHex(getHeaderBytes())));
|
||||
foreach (SubPacket sub in getSubpackets())
|
||||
sub.debugPrintSubPacket();
|
||||
Console.BackgroundColor = ConsoleColor.Black;
|
||||
|
@@ -141,14 +141,14 @@ namespace FFXIVClassic_Map_Server.packets
|
||||
{
|
||||
#if DEBUG
|
||||
Console.BackgroundColor = ConsoleColor.DarkRed;
|
||||
Log.debug(String.Format("Size: 0x{0:X}", header.subpacketSize));
|
||||
Log.Debug(String.Format("Size: 0x{0:X}", header.subpacketSize));
|
||||
if (header.type == 0x03)
|
||||
Log.debug(String.Format("Opcode: 0x{0:X}", gameMessage.opcode));
|
||||
Log.debug(String.Format("{0}", Utils.ByteArrayToHex(getHeaderBytes())));
|
||||
Log.Debug(String.Format("Opcode: 0x{0:X}", gameMessage.opcode));
|
||||
Log.Debug(String.Format("{0}", Utils.ByteArrayToHex(getHeaderBytes())));
|
||||
if (header.type == 0x03)
|
||||
Log.debug(String.Format("{0}", Utils.ByteArrayToHex(getGameMessageBytes())));
|
||||
Log.Debug(String.Format("{0}", Utils.ByteArrayToHex(getGameMessageBytes())));
|
||||
Console.BackgroundColor = ConsoleColor.DarkMagenta;
|
||||
Log.debug(String.Format("{0}", Utils.ByteArrayToHex(data)));
|
||||
Log.Debug(String.Format("{0}", Utils.ByteArrayToHex(data)));
|
||||
Console.BackgroundColor = ConsoleColor.Black;
|
||||
#endif
|
||||
}
|
||||
|
@@ -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:");
|
||||
Log.Error("LUA ERROR:");
|
||||
|
||||
return;
|
||||
}
|
||||
|
@@ -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!");
|
||||
Log.Error("Failed making SetCompletedAchievements packet. Bin Stream was too big!");
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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!");
|
||||
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));
|
||||
|
Reference in New Issue
Block a user