loot: option to auto-loot BoP items

This commit is contained in:
shagu
2017-03-19 13:48:27 +01:00
parent f2b5e65034
commit 0e93ef166a
3 changed files with 26 additions and 3 deletions
+12 -1
View File
@@ -7,6 +7,7 @@ pfUI:RegisterModule("loot", function ()
pfUI.loot:RegisterEvent("LOOT_SLOT_CLEARED")
pfUI.loot:RegisterEvent("OPEN_MASTER_LOOT_LIST")
pfUI.loot:RegisterEvent("UPDATE_MASTER_LOOT_LIST")
pfUI.loot:RegisterEvent("LOOT_BIND_CONFIRM")
pfUI.loot:SetWidth(160+C.appearance.border.default*2)
pfUI.loot.slots = {}
@@ -126,7 +127,7 @@ pfUI:RegisterModule("loot", function ()
end
end)
if C.appearance.loot.autoresize == "1" then
if C.loot.autoresize == "1" then
frame:SetScript("OnUpdate", function()
pfUI.loot:UpdateLootFrame()
end)
@@ -219,6 +220,16 @@ pfUI:RegisterModule("loot", function ()
v:Hide()
end
end
if C.loot.autopickup == "1" and event == "LOOT_BIND_CONFIRM" then
if GetNumPartyMembers() == 0 and GetNumRaidMembers() == 0 then
local dialog = StaticPopup_Show("LOOT_BIND")
if dialog then
dialog.data = arg1
StaticPopup1Button1:Click()
end
end
end
end)
LootFrame:UnregisterAllEvents()