diff --git a/XivCommon/Functions/PartyFinder.cs b/XivCommon/Functions/PartyFinder.cs index ec42387..ec5a48a 100755 --- a/XivCommon/Functions/PartyFinder.cs +++ b/XivCommon/Functions/PartyFinder.cs @@ -5,7 +5,6 @@ using Dalamud.Game; using Dalamud.Game.Internal.Gui; using Dalamud.Game.Internal.Gui.Structs; using Dalamud.Hooking; -using Dalamud.Plugin; namespace XivCommon.Functions { /// @@ -66,6 +65,10 @@ namespace XivCommon.Functions { this.ListingsEnabled = hooks.HasFlag(Hooks.PartyFinderListings); this.JoinsEnabled = hooks.HasFlag(Hooks.PartyFinderJoins); + if (this.ListingsEnabled || this.JoinsEnabled) { + this.PartyFinderGui.ReceiveListing += this.ReceiveListing; + } + if (scanner.TryScanText(Signatures.RequestListings, out var requestPfPtr, "Party Finder listings")) { this.RequestPartyFinderListings = Marshal.GetDelegateForFunctionPointer(requestPfPtr); @@ -78,8 +81,6 @@ namespace XivCommon.Functions { if (this.JoinsEnabled && scanner.TryScanText(Signatures.JoinCrossParty, out var joinPtr, "Party Finder joins")) { this.JoinPfHook = new Hook(joinPtr, new JoinPfDelegate(this.JoinPfDetour)); this.JoinPfHook.Enable(); - - this.PartyFinderGui.ReceiveListing += this.ReceiveListing; } }