Skip to content

Commit

Permalink
fix: GetPlayerStyleString Taint
Browse files Browse the repository at this point in the history
  • Loading branch information
arnvid committed May 26, 2024
1 parent 7244f84 commit 92b2fe8
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Skin/Interface/FrameXML/LFGList.lua
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,30 @@ function private.FrameXML.LFGList()
_G.hooksecurefunc("LFGListApplicantMember_OnEnter", Hook.LFGListApplicantMember_OnEnter)
_G.hooksecurefunc("LFGListUtil_SetSearchEntryTooltip", Hook.LFGListUtil_SetSearchEntryTooltip)

do -- GetPlayerStyleString TaintFix
_G.C_LFGList.GetPlaystyleString = function(playstyle, activityInfo)
local activityID = 1164;
if (not _G.C_LFGList.IsPlayerAuthenticatedForLFG(activityID)) then
return
end
if not (activityInfo and playstyle and playstyle ~= 0 and _G.C_LFGList.GetLfgCategoryInfo(activityInfo.categoryID).showPlaystyleDropdown) then
return nil
end
local PlaystyleString
if activityInfo.isMythicPlusActivity then
PlaystyleString = "GROUP_FINDER_PVE_PLAYSTYLE"
elseif activityInfo.isRatedPvpActivity then
PlaystyleString = "GROUP_FINDER_PVP_PLAYSTYLE"
elseif activityInfo.isCurrentRaidActivity then
PlaystyleString = "GROUP_FINDER_PVE_RAID_PLAYSTYLE"
elseif activityInfo.isMythicActivity then
PlaystyleString = "GROUP_FINDER_PVE_MYTHICZERO_PLAYSTYLE"
end
return PlaystyleString and _G[PlaystyleString .. tostring(playstyle)] or nil
end
_G.LFGListEntryCreation_SetTitleFromActivityInfo = function(_) end
end

------------------
-- LFGListFrame --
------------------
Expand Down

0 comments on commit 92b2fe8

Please sign in to comment.