diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/NetworkMonitorWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/NetworkMonitorWidget.cs index 6fe05e23f..4460a9f9a 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/NetworkMonitorWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/NetworkMonitorWidget.cs @@ -55,22 +55,19 @@ internal unsafe class NetworkMonitorWidget : IDataWindowWidget public bool Ready { get; set; } /// - public void Load() - { - this.hookDown = Hook.FromAddress( - (nint)PacketDispatcher.StaticVirtualTablePointer->OnReceivePacket, - this.OnReceivePacketDetour); - - this.hookUp = Hook.FromAddress( - (nint)ZoneClient.MemberFunctionPointers.SendPacket, - this.SendPacketDetour); - - this.Ready = true; - } + public void Load() => this.Ready = true; /// public void Draw() { + this.hookDown ??= Hook.FromAddress( + (nint)PacketDispatcher.StaticVirtualTablePointer->OnReceivePacket, + this.OnReceivePacketDetour); + + this.hookUp ??= Hook.FromAddress( + (nint)ZoneClient.MemberFunctionPointers.SendPacket, + this.SendPacketDetour); + if (ImGui.Checkbox("Track Network Packets"u8, ref this.trackNetwork)) { if (this.trackNetwork)