feat: output useful information in debug mode
This commit is contained in:
parent
597c6f43e5
commit
555ee73739
|
@ -1,5 +1,7 @@
|
|||
using System;
|
||||
#if DEBUG
|
||||
using System.Linq;
|
||||
#endif
|
||||
using System.Runtime.InteropServices;
|
||||
using Dalamud.Hooking;
|
||||
using Dalamud.Plugin;
|
||||
|
@ -48,6 +50,15 @@ namespace BetterPartyFinder {
|
|||
|
||||
var needToRewrite = false;
|
||||
|
||||
#if DEBUG
|
||||
var raw = Marshal.AllocHGlobal(PacketInfo.PacketSize);
|
||||
Marshal.StructureToPtr(packet, raw, false);
|
||||
var bytes = new byte[PacketInfo.PacketSize];
|
||||
Marshal.Copy(raw, bytes, 0, PacketInfo.PacketSize);
|
||||
PluginLog.Log(string.Join("", bytes.Select(b => b.ToString("x2"))));
|
||||
Marshal.FreeHGlobal(raw);
|
||||
#endif
|
||||
|
||||
for (var i = 0; i < packet.listings.Length; i++) {
|
||||
if (packet.listings[i].IsNull()) {
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue