mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-11 08:00:01 +00:00
loot: option to auto-loot BoP items
This commit is contained in:
+2
-1
@@ -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
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user