update prototypes

This commit is contained in:
Bunny67
2020-06-03 22:36:19 +03:00
parent 6f83c0121f
commit f155fdc23e
2 changed files with 99 additions and 143 deletions
-27
View File
@@ -3133,23 +3133,6 @@ end
-- Player Moving
do
local playerMovingFrame = nil
local moving;
local function PlayerMoveUpdate(self, event)
WeakAuras.StartProfileSystem("generictrigger");
-- channeling e.g. Mind Flay results in lots of PLAYER_STARTED_MOVING, PLAYER_STOPPED_MOVING
-- for each frame
-- So check after 0.01 s if IsPlayerMoving() actually returns something different.
timer:ScheduleTimer(function()
WeakAuras.StartProfileSystem("generictrigger");
if (moving ~= IsPlayerMoving() or moving == nil) then
moving = IsPlayerMoving();
WeakAuras.ScanEvents("PLAYER_MOVING_UPDATE")
end
WeakAuras.StopProfileSystem("generictrigger");
end, 0.01);
WeakAuras.StopProfileSystem("generictrigger");
end
local function PlayerMoveSpeedUpdate()
WeakAuras.StartProfileSystem("generictrigger");
@@ -3161,16 +3144,6 @@ do
WeakAuras.StopProfileSystem("generictrigger");
end
function WeakAuras.WatchForPlayerMoving()
if not(playerMovingFrame) then
playerMovingFrame = CreateFrame("frame");
WeakAuras.frames["Player Moving Frame"] = playerMovingFrame;
end
playerMovingFrame:RegisterEvent("PLAYER_STARTED_MOVING");
playerMovingFrame:RegisterEvent("PLAYER_STOPPED_MOVING");
playerMovingFrame:SetScript("OnEvent", PlayerMoveUpdate)
end
function WeakAuras.WatchPlayerMoveSpeed()
if not(playerMovingFrame) then
playerMovingFrame = CreateFrame("frame");