Updated LibOpenRaid and DetailsFramework
This commit is contained in:
@@ -45,23 +45,23 @@ if (not _G.DetailsFramework.IsTimewalkWoW()) then
|
||||
end
|
||||
|
||||
autoRunCodeEventFrame.OnEventFunc = function(self, event)
|
||||
--> ignore events triggered more than once in a small time window
|
||||
--ignore events triggered more than once in a small time window
|
||||
if (autoRunCodeEventFrame [event] and not autoRunCodeEventFrame [event]:IsCancelled()) then
|
||||
return
|
||||
end
|
||||
|
||||
if (event == "PLAYER_SPECIALIZATION_CHANGED") then
|
||||
--> create a trigger for the event, many times it is triggered more than once
|
||||
--> so if the event is triggered a second time, it will be ignored
|
||||
--create a trigger for the event, many times it is triggered more than once
|
||||
--so if the event is triggered a second time, it will be ignored
|
||||
local newTimer = C_Timer.NewTimer(1, function()
|
||||
Details:DispatchAutoRunCode("on_specchanged")
|
||||
|
||||
--> clear and invalidate the timer
|
||||
--clear and invalidate the timer
|
||||
autoRunCodeEventFrame[event]:Cancel()
|
||||
autoRunCodeEventFrame[event] = nil
|
||||
end)
|
||||
|
||||
--> store the trigger
|
||||
--store the trigger
|
||||
autoRunCodeEventFrame[event] = newTimer
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user