-
Notifications
You must be signed in to change notification settings - Fork 10
/
LM_GhostWolf.lua
50 lines (36 loc) · 1.21 KB
/
LM_GhostWolf.lua
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
--[[----------------------------------------------------------------------------
LiteMount/LM_GhostWolf.lua
Copyright 2011 Mike Battersby
----------------------------------------------------------------------------]]--
local _, LM = ...
local C_Spell = LM.C_Spell or C_Spell
local TABLET_OF_GHOST_WOLF_AURA = C_Spell.GetSpellName(168799)
LM.GhostWolf = setmetatable({ }, LM.Spell)
LM.GhostWolf.__index = LM.GhostWolf
function LM.GhostWolf:IsCancelable()
return false
end
function LM.GhostWolf:IsCastable()
if LM.UnitAura('player', self.spellID) then
return false
end
return LM.Spell.IsCastable(self)
end
function LM.GhostWolf:GetFlags()
local flags = LM.Mount.GetFlags(self)
-- Ghost Wolf is also 100% speed if the Rehgar Earthfury bodyguard
-- is following you around in Lost Isles (Legion). Unfortunately there's
-- no way to detect him as far as I can tell.
if flags.SLOW then
local hasAura
hasAura = LM.UnitAura('player', TABLET_OF_GHOST_WOLF_AURA)
if hasAura then
flags = CopyTable(flags)
flags.SLOW = nil
end
end
return flags
end
function LM.GhostWolf:IsHidden()
return not IsPlayerSpell(self.spellID)
end