From ff1e949f30faae0abe2ddbab7e8e6538bde7ef40 Mon Sep 17 00:00:00 2001 From: Road-block Date: Wed, 3 Jan 2018 14:29:23 +0200 Subject: [PATCH] api: prevent race condition in table wipe * fix raid unitpopup menu for 3rd party addons * fixes set banker, disenchanter options --- api/api.lua | 1 - api/unitframes.lua | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/api/api.lua b/api/api.lua index 8febbd73..f49b6141 100644 --- a/api/api.lua +++ b/api/api.lua @@ -412,7 +412,6 @@ function pfUI.api.wipe(src) for k in pairs(src) do src[k] = nil end - table.setn(src,0) return src end diff --git a/api/unitframes.lua b/api/unitframes.lua index ff5fcee4..6439ed30 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -1131,6 +1131,9 @@ function pfUI.uf:ClickAction(button) elseif label == "party" then ToggleDropDownMenu(1, nil, getglobal("PartyMemberFrame" .. this.id .. "DropDown"), "cursor") elseif label == "raid" then + -- RaidFrameDropDown_Initialize expects .name and .unit attributes on raid unit buttons + if not (this.name) then this.name = this.lastUnit end + if not (this.unit) then this.unit = unitstr end ToggleDropDownMenu(1, nil, getglobal("RaidMemberFrame" .. this.id .. "DropDown"), "cursor") FriendsDropDown.initialize = RaidFrameDropDown_Initialize FriendsDropDown.displayMode = "MENU"