function aUF.aUFunit.prototype:DropDownUnit(unit) local type if unit == "player" then type = PlayerFrameDropDown elseif unit == "target" then type = TargetFrameDropDown elseif unit == "pet" then type = PetFrameDropDown end if type then HideDropDownMenu(1); type.unit = unit type.name = UnitName(self.unit) ToggleDropDownMenu(1, nil, type, "cursor") elseif string.find(unit,"party") then HideDropDownMenu(1); this.unit = unit FriendsDropDown.initialize = function() UnitPopup_ShowMenu(getglobal(UIDROPDOWNMENU_OPEN_MENU), "PARTY", unit, UnitName(unit)) end FriendsDropDown.displayMode = "MENU"; ToggleDropDownMenu(1, nil, FriendsDropDown, "cursor"); elseif string.find(self.unit,"raid") then HideDropDownMenu(1); FriendsDropDown.initialize = function() UnitPopup_ShowMenu(getglobal(UIDROPDOWNMENU_OPEN_MENU), "RAID", unit, UnitName(unit), this:GetID()) end FriendsDropDown.displayMode = "MENU"; ToggleDropDownMenu(1, nil, FriendsDropDown, "cursor"); end end