Premade Groups Filter

Premade Groups Filter

9M Downloads

Player vs Player sorting

Al-th opened this issue ยท 7 comments

commented

Hi,

Would it make sense to consider replacing the default sort by age behavior of PGF to a sort by rating for rated pvp activity.

In my own local version of PGF, I added the following in the SortByFriendsAndAge function (now badly named ;))

-- if pvp activity, sort by rating
local activityInfo = C_LFGList.GetActivityInfoTable(searchResultInfo1.activityID, nil, searchResultInfo1.isWarMode);
if activityInfo.isRatedPvpActivity and (searchResultInfo1.leaderPvpRatingInfo ~= nil and searchResultInfo2.leaderPvpRatingInfo ~= nil) then
return searchResultInfo1.leaderPvpRatingInfo.rating > searchResultInfo2.leaderPvpRatingInfo.rating
end

Sorry for not adding a PR but I don't really want to fork a repo for 3 lines of code ;)

ps : I noticed that leaderPvpRatingInfo might sometime not be present in the searchResultInfo table for some reason, hence the double check on both the fields for nil values.

commented

While I assume that quite a few players would prefer to play with the highest rated group leader, this might not be the case for everyone. Also this gives groups with a not-yet-high-rated leader even less change to participate in the game. So I am not sure if wen should change the default sort order.

I however do think that a custom sort order is a great idea and still fits to the scope of Premade Groups Filter. Issue #16 is pretty much the same request. I always hesitated implementing it as I do not want to add sorting to the advanced expression box, but there also was no space for another sorting input field. Since there is an advanced mode now which leaves space for another input field, I will try to implement sorting next.

commented

Hey,

While I assume that quite a few players would prefer to play with the highest rated group leader, this might not be the case for everyone. Also this gives groups with a not-yet-high-rated leader even less change to participate in the game. So I am not sure if wen should change the default sort order.

I do agree that the "preferred sort" would probably differ on a per player basis. Despite that, "SortByAge" always seems like a worse choice for sorting in a context of rated pvp content.

On my different chars, I sometime want to play with high rated player, being high rated myself, or with lower rated players (with alts & such). In my local version, I indeed changed the sorting direction to find what I preferred, but in the end, even if I sort from high to low, even on my alts it's always better (because I just scroll down and then find the most appropriate offer for me, compared to before when I just tried to find it line by line).

Custom sort order would indeed be a great addition, if not built-in in the search engine ๐Ÿ‘

Btw, thanks for the awesome work. While digging into the addon to add the functionality to mine, it is clear that you worked a lot on it, and it saved me so much time you can't even know...

commented

Could you please try 2.6.0-alpha? It features a sorting box when in expert mode (click the arrow button next to the close button of the PGF window).

You may sort by a single field: pvprating desc for sorting by pvprating descending (highest values first)
Or even by multiple fields separated by comma: friends desc, pvprating desc, members asc (asc meaning ascending)

commented

Seems to work fine. Tested it mainly in a pvp setting, and tested single sorting operation as well as combination of sorting operation.

Also tested it quickly in Dungeon search, and could sort with other numeric variables, which is nice (even though maybe it will not be used as much) such as "dps desc"

commented

Update to my last comment.

I noticed a behavior (that I already saw when implementing my own modification of the addon, so this is not due to your code I believe) : sometimes, the leaderPvpRatingInfo is not fetched correctly by the API.

It can result in incorrect sorting but refreshing the search solves the issue.

It is unclear to me why there is this inconsistent behavior in the populating of the leaderPvpRatingInfo field & subfield.

commented

Glad to hear that it works fine. I was thinking about adding the info button to the expert mode as well and maybe add a line about sorting before building a release.

The issue with delayed loading also exists for the name of the group leader and the mythic+ rating. New groups (green colored) very often do not have this information attached. I don't know why but I assume that fetching it is a more expensive operation for Blizzard's backends and not really needed except when the tooltip is shown. Hence they decided to deliver an incomplete response faster but put it in the cache for the next lookup. There is not much we can do about it. You can either decide to live with limited info on new groups or remove them with a filter and hope that the next refresh includes the missing parts.

commented

Version 2.6.1 is now released and features the new sorting field in expert mode.