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
+2 -1
View File
@@ -841,7 +841,8 @@ pfUI:RegisterModule("gui", function ()
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Enable Item Quality Color For Equipment Only", C.appearance.bags, "borderonlygear", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Loot", nil, nil, "header")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Enable Auto-Resize Loot Frame", C.appearance.loot, "autoresize", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Enable Auto-Resize Loot Frame", C.loot, "autoresize", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Enable Auto-Loot for BoP Items Without Group", C.loot, "autopickup", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Minimap", nil, nil, "header")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Enable Zone Text On Minimap Mouseover", C.appearance.minimap, "mouseoverzone", "checkbox")
+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()