mirror of
				https://bitbucket.org/Ioncannon/project-meteor-server.git
				synced 2025-05-20 08:26:59 -04:00 
			
		
		
		
	Fixed packet ByteArrayToHex output
This commit is contained in:
		| @@ -39,16 +39,18 @@ namespace FFXIVClassic_Map_Server.common | ||||
|  | ||||
|             StringBuilder sb = new StringBuilder(numLines * lineLength); | ||||
|  | ||||
|             for (int i = offset; i < bytes.Length; i += bytesPerLine) | ||||
|             { | ||||
|                 line[0] = hexChars[(i >> 28) & 0xF]; | ||||
|                 line[1] = hexChars[(i >> 24) & 0xF]; | ||||
|                 line[2] = hexChars[(i >> 20) & 0xF]; | ||||
|                 line[3] = hexChars[(i >> 16) & 0xF]; | ||||
|                 line[4] = hexChars[(i >> 12) & 0xF]; | ||||
|                 line[5] = hexChars[(i >> 8) & 0xF]; | ||||
|                 line[6] = hexChars[(i >> 4) & 0xF]; | ||||
|                 line[7] = hexChars[(i >> 0) & 0xF]; | ||||
|             for (int i = 0; i < bytes.Length; i += bytesPerLine) | ||||
|             { | ||||
|                 int h = i + offset; | ||||
|  | ||||
|                 line[0] = hexChars[(h >> 28) & 0xF]; | ||||
|                 line[1] = hexChars[(h >> 24) & 0xF]; | ||||
|                 line[2] = hexChars[(h >> 20) & 0xF]; | ||||
|                 line[3] = hexChars[(h >> 16) & 0xF]; | ||||
|                 line[4] = hexChars[(h >> 12) & 0xF]; | ||||
|                 line[5] = hexChars[(h >> 8) & 0xF]; | ||||
|                 line[6] = hexChars[(h >> 4) & 0xF]; | ||||
|                 line[7] = hexChars[(h >> 0) & 0xF]; | ||||
|  | ||||
|                 int hexColumn = offsetBlock; | ||||
|                 int charColumn = byteBlock; | ||||
|   | ||||
| @@ -147,12 +147,12 @@ namespace FFXIVClassic_Map_Server.packets | ||||
|             if (header.type == 0x03) | ||||
|             { | ||||
|                 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))); | ||||
|             } | ||||
|  | ||||
|             Console.BackgroundColor = ConsoleColor.DarkMagenta; | ||||
|  | ||||
|             Log.Debug(String.Format("Data: {0}{1}", Environment.NewLine, Utils.ByteArrayToHex(data, SUBPACKET_SIZE + GAMEMESSAGE_SIZE))); | ||||
|  | ||||
|             Console.BackgroundColor = ConsoleColor.Black; | ||||
| #endif | ||||
|         } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user