diff --git a/BetterPartyFinder/Filter.cs b/BetterPartyFinder/Filter.cs index 054565d..0d16a5c 100755 --- a/BetterPartyFinder/Filter.cs +++ b/BetterPartyFinder/Filter.cs @@ -76,7 +76,7 @@ namespace BetterPartyFinder { } // filter based on jobs (slow?) - if (filter.Jobs.Count > 0) { + if (filter.Jobs.Count > 0 && !listing[SearchAreaFlags.AllianceRaid]) { var slots = listing.Slots.ToArray(); var present = listing.RawJobsPresent.ToArray(); diff --git a/BetterPartyFinder/PartyFinder.cs b/BetterPartyFinder/PartyFinder.cs index a6c7873..d768c6e 100755 --- a/BetterPartyFinder/PartyFinder.cs +++ b/BetterPartyFinder/PartyFinder.cs @@ -19,6 +19,7 @@ namespace BetterPartyFinder { public bool BeginnersWelcome { get; } public ushort SecondsRemaining { get; } public ushort MinimumItemLevel { get; } + public byte Parties { get; } public byte SlotsAvailable { get; } public IEnumerable Slots => this._slots; @@ -68,6 +69,7 @@ namespace BetterPartyFinder { this.BeginnersWelcome = listing.beginnersWelcome == 1; this.SecondsRemaining = listing.secondsRemaining; this.MinimumItemLevel = listing.minimumItemLevel; + this.Parties = listing.numParties; this.SlotsAvailable = listing.numSlots; this._objective = listing.objective; @@ -116,7 +118,7 @@ namespace BetterPartyFinder { public enum SearchAreaFlags : uint { DataCentre = 1 << 0, Private = 1 << 1, - Unknown2 = 1 << 2, // set for copied factory pf + AllianceRaid = 1 << 2, World = 1 << 3, OnePlayerPerJob = 1 << 5, } diff --git a/BetterPartyFinder/PfPacket.cs b/BetterPartyFinder/PfPacket.cs index 719c57b..5f2df9c 100755 --- a/BetterPartyFinder/PfPacket.cs +++ b/BetterPartyFinder/PfPacket.cs @@ -9,14 +9,14 @@ namespace BetterPartyFinder { } [StructLayout(LayoutKind.Sequential)] - public struct PfPacket { + public readonly struct PfPacket { private readonly int unk0; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] private readonly byte[] padding1; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] - public PfListing[] listings; + public readonly PfListing[] listings; } [StructLayout(LayoutKind.Sequential)] @@ -80,8 +80,12 @@ namespace BetterPartyFinder { internal readonly byte searchArea; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] - private readonly byte[] header11; // 00 01 00 00 00 for every pf except alliance raids where it's 01 03 00 00 00 (second byte # parties?) + private readonly byte header11; + + internal readonly byte numParties; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] + private readonly byte[] header12; // 00 00 00 always. maybe numParties is a u32? [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] internal readonly uint[] slots;