-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathmovies.lua
More file actions
50 lines (43 loc) · 1.11 KB
/
movies.lua
File metadata and controls
50 lines (43 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
local _, addon = ...
local lastMovieID
function addon:PLAY_MOVIE(movieID)
if not QuickQuestMoviesDB then
QuickQuestMoviesDB = {}
end
if addon:IsPaused() then
return
end
local skip = addon:GetOption('skipmovies')
if skip == 3 or (skip == 2 and QuickQuestMoviesDB[movieID]) then
if MovieFrame and MovieFrame:IsShown() then
if pcall(MovieFrame.Hide, MovieFrame) then -- wrap just in case
-- for some reason this event fires twice, so we'll add
-- a simple check to avoid duplicate chat messages
if lastMovieID ~= movieID then
lastMovieID = movieID
addon:Print('Skipped movie')
else
lastMovieID = nil
end
end
end
end
QuickQuestMoviesDB[movieID] = true
end
function addon:CINEMATIC_START(canBeCancelled)
if addon:IsPaused() then
return
end
local skip = addon:GetOption('skipcinematics')
if skip == 3 then
if canBeCancelled then
if pcall(StopCinematic) then -- wrap just in case
addon:Print('Skipped cinematic')
end
elseif CanCancelScene() then
if pcall(CancelScene) then -- wrap just in case
addon:Print('Skipped cinematic')
end
end
end
end