diff --git a/WeakAuras/GenericTrigger.lua b/WeakAuras/GenericTrigger.lua index c38e3a3..b900410 100644 --- a/WeakAuras/GenericTrigger.lua +++ b/WeakAuras/GenericTrigger.lua @@ -3279,7 +3279,7 @@ do end function WeakAuras.WatchPlayerMoveSpeed() - if not(playerMovingFrame) then + if not (playerMovingFrame) then playerMovingFrame = CreateFrame("frame"); WeakAuras.frames["Player Moving Frame"] = playerMovingFrame; end diff --git a/WeakAuras/Prototypes.lua b/WeakAuras/Prototypes.lua index 5eea288..7dd92da 100644 --- a/WeakAuras/Prototypes.lua +++ b/WeakAuras/Prototypes.lua @@ -6037,8 +6037,12 @@ Private.event_prototypes = { internal_events = function(trigger, untrigger) local events = { "CONDITIONS_CHECK"}; + if trigger.use_ismoving ~= nil then + tinsert(events, "PLAYER_MOVE_SPEED_UPDATE"); + end + if (trigger.use_HasPet ~= nil) then - AddUnitChangeInternalEvents("pet", events) + AddUnitChangeInternalEvents("pet", events); end return events; @@ -6046,6 +6050,10 @@ Private.event_prototypes = { force_events = "CONDITIONS_CHECK", name = L["Conditions"], loadFunc = function(trigger) + if (trigger.use_ismoving ~= nil) then + WeakAuras.WatchPlayerMoveSpeed(); + end + if (trigger.use_mounted ~= nil) then WeakAuras.WatchForMounts(); end @@ -6102,6 +6110,12 @@ Private.event_prototypes = { type = "tristate", init = "UnitExists('pet') and not UnitIsDead('pet')" }, + { + name = "ismoving", + display = L["Is Moving"], + type = "tristate", + init = "GetUnitSpeed('player') > 0" + }, { name = "afk", display = L["Is Away from Keyboard"],