mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-30 19:19:59 +00:00
loot: option to auto-loot BoP items
This commit is contained in:
+12
-1
@@ -53,7 +53,6 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("appearance", "cd", "threshold", "2")
|
||||
pfUI:UpdateConfig("appearance", "castbar", "castbarcolor", ".7,.7,.9,.8")
|
||||
pfUI:UpdateConfig("appearance", "castbar", "channelcolor", ".9,.9,.7,.8")
|
||||
pfUI:UpdateConfig("appearance", "loot", "autoresize", "1")
|
||||
pfUI:UpdateConfig("appearance", "infight", "screen", "0")
|
||||
pfUI:UpdateConfig("appearance", "infight", "common", "1")
|
||||
pfUI:UpdateConfig("appearance", "infight", "group", "0")
|
||||
@@ -61,6 +60,9 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("appearance", "bags", "borderonlygear", "0")
|
||||
pfUI:UpdateConfig("appearance", "minimap", "mouseoverzone", "0")
|
||||
|
||||
pfUI:UpdateConfig("loot", nil, "autoresize", "1")
|
||||
pfUI:UpdateConfig("loot", nil, "autopickup", "1")
|
||||
|
||||
pfUI:UpdateConfig("unitframes", nil, "disable", "0")
|
||||
pfUI:UpdateConfig("unitframes", nil, "pastel", "1")
|
||||
pfUI:UpdateConfig("unitframes", nil, "custom", "0")
|
||||
@@ -243,5 +245,14 @@ function pfUI:MigrateConfig()
|
||||
end
|
||||
end
|
||||
|
||||
-- migrating to new loot config section (> 2.0.5)
|
||||
if major <= 2 and minor <= 0 and fix <= 5 then
|
||||
if pfUI_config.appearance.loot and pfUI_config.appearance.loot.autoresize then
|
||||
pfUI_config.loot.autoresize = pfUI_config.appearance.loot.autoresize
|
||||
pfUI_config.appearance.loot.autoresize = nil
|
||||
pfUI_config.appearance.loot = nil
|
||||
end
|
||||
end
|
||||
|
||||
pfUI_config.version = pfUI.version.string
|
||||
end
|
||||
|
||||
+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