Looks like i'm in trouble again. This time i'm lost.
I have this code
Code:
local function menu(self)
local unit = self.unit:sub(1, -2)
local cunit = self.unit:gsub("(.)", string.upper, 1)
if( UnitIsUnit(self.unit, "player") ) then
ToggleDropDownMenu(1, nil, PlayerFrameDropDown, "cursor")
elseif( self.unit == "pet" or self.unit == "vehicle" ) then
ToggleDropDownMenu(1, nil, PetFrameDropDown, "cursor")
elseif( self.unit == "target") then
ToggleDropDownMenu(1, nil, TargetFrameDropDown, "cursor")
elseif( self.unitType == "boss" ) then
ToggleDropDownMenu(1, nil, _G["Boss" .. self.unitID .. "TargetFrameDropDown"], "cursor")
elseif( self.unit == "focus" ) then
ToggleDropDownMenu(1, nil, FocusFrameDropDown, "cursor")
elseif(unit == "party" or unit == "raid") then
ToggleDropDownMenu(1, nil, _G["PartyMemberFrame"..self.id.."DropDown"], "cursor", 0, 0)
else ToggleDropDownMenu(1, nil, _G[cunit.."FrameDropDown"], "cursor", 0, 0)
end
end
It works for player, focus, pet, target, party, raid, but not for my targetoftarget. I don't fully understand how does it work so please, can someone give me advice?
Thanks!