add ismoving condition trigger
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"],
|
||||
|
||||
Reference in New Issue
Block a user