raid: precache unitstr and name for dropdown menu

This commit is contained in:
shagu
2025-04-06 18:13:35 +02:00
parent e44b57973b
commit 05e51caebd
+3 -1
View File
@@ -127,9 +127,11 @@ local UnitFrame_OnClick = function()
if button == "LeftButton" then
TargetUnit(this.unitstr)
elseif button == "RightButton" then
local unitstr = this.unitstr
local name = UnitName(this.unitstr)
FriendsDropDown.displayMode = "MENU"
FriendsDropDown.initialize = function()
UnitPopup_ShowMenu(_G[UIDROPDOWNMENU_OPEN_MENU], "PARTY", this.unitstr, UnitName(this.unitstr))
UnitPopup_ShowMenu(_G[UIDROPDOWNMENU_OPEN_MENU], "PARTY", unitstr, name)
end
ToggleDropDownMenu(1, nil, FriendsDropDown, "cursor")
end