From 09bc3d6374a8f3afe4d43683fbc4e32bbf25f48c Mon Sep 17 00:00:00 2001 From: Bunny67 Date: Fri, 10 Jul 2020 16:51:17 +0300 Subject: [PATCH] from retail --- WeakAuras/Prototypes.lua | 8 +++++++- WeakAurasOptions/OptionsFrames/ModelPicker.lua | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/WeakAuras/Prototypes.lua b/WeakAuras/Prototypes.lua index 2bcb83a..c0254ce 100644 --- a/WeakAuras/Prototypes.lua +++ b/WeakAuras/Prototypes.lua @@ -4991,7 +4991,7 @@ WeakAuras.event_prototypes = { tinsert(events, "PLAYER_REGEN_DISABLED") tinsert(events, "PLAYER_ENTERING_WORLD") end - if trigger.use_pvpflagged ~= nil then + if trigger.use_pvpflagged ~= nil or trigger.use_afk ~= nil then tinsert(events, "PLAYER_FLAGS_CHANGED") end if trigger.use_alive ~= nil then @@ -5110,6 +5110,12 @@ WeakAuras.event_prototypes = { type = "tristate", init = "UnitExists('pet') and not UnitIsDead('pet')" }, + { + name = "afk", + display = L["Is Away from Keyboard"], + type = "tristate", + init = "UnitIsAFK('player')" + }, { name = "ingroup", display = L["In Group"], diff --git a/WeakAurasOptions/OptionsFrames/ModelPicker.lua b/WeakAurasOptions/OptionsFrames/ModelPicker.lua index 711ea53..503983f 100644 --- a/WeakAurasOptions/OptionsFrames/ModelPicker.lua +++ b/WeakAurasOptions/OptionsFrames/ModelPicker.lua @@ -184,7 +184,7 @@ local function ConstructModelPicker(frame) end end else - group:Pick(group.givenPath, group.givenZ, group.givenX, group.givenY); + group:Pick(group.givenModel, group.givenZ, group.givenX, group.givenY); end group.Close(); end