Skip to content

Commit

Permalink
Fix custom GetSearchResultInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
0xbs committed Dec 18, 2024
1 parent 38b60a0 commit 53bc190
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Compat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ local C = PGF.C
function PGF.GetSearchResultInfo(resultID)
local searchResultInfo = C_LFGList.GetSearchResultInfo(resultID)
if PGF.IsRetail() then
if searchResultInfo.activityIDs and searchResultInfo.activityIDs[1] then
if searchResultInfo.activityIDs then
searchResultInfo.activityID = searchResultInfo.activityIDs[1]
end
if searchResultInfo.leaderDungeonScoreInfo and searchResultInfo.leaderDungeonScoreInfo[1] then
if searchResultInfo.leaderDungeonScoreInfo then
searchResultInfo.leaderDungeonScoreInfo = searchResultInfo.leaderDungeonScoreInfo[1]
end
if searchResultInfo.leaderPvpRatingInfo and searchResultInfo.leaderPvpRatingInfo[1] then
if searchResultInfo.leaderPvpRatingInfo then
searchResultInfo.leaderPvpRatingInfo = searchResultInfo.leaderPvpRatingInfo[1]
end
end
Expand All @@ -41,6 +41,15 @@ end
function PGF.GetSearchResultMemberInfo(...)
if PGF.IsRetail() then
local info = C_LFGList.GetSearchResultPlayerInfo(...)
-- DevTools_Dump(info)
-- assignedRole="HEALER"
-- classFilename="SHAMAN"
-- className="Schamane"
-- specName="Wiederherstellung"
-- isLeader=false
-- name="Foo"
-- level=80
-- lfgRoles = { tank=false, dps=false, healer=false }
if info then
return info.assignedRole, info.classFilename, info.className, info.specName, info.isLeader
end
Expand Down

0 comments on commit 53bc190

Please sign in to comment.