-
Notifications
You must be signed in to change notification settings - Fork 16
/
bestride.lua
56 lines (48 loc) · 1.42 KB
/
bestride.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
51
52
53
54
55
56
function BeStride:Version_OnEnable()
end
function BeStride:IsClassicEra()
return false
end
function BeStride:IsWrath()
return false
end
function BeStride:IsMainline()
return true
end
function BeStride:GetMountInfoBySpellID(id)
local mountID = C_MountJournal.GetMountFromSpell(id)
if mountID then
return self:GetMountInfoByMountID(mountID)
end
end
function BeStride:GetMountInfoByMountID(id)
local creatureName,spellID,icon,active,isUsable,sourceType,isFavorite,isFactionSpecific,faction,hideOnChar,isCollected,mountID,isForDragonriding = C_MountJournal.GetMountInfoByID(id)
return {
creatureName = creatureName,
spellID = spellID,
mountID = mountID,
icon = icon,
active = active,
isUsable = isUsable,
sourceType = sourceType,
isFavorite = isFavorite,
isFactionSpecific = isFactionSpecific,
faction = faction,
hideOnChar = hideOnChar,
isCollected = isCollected,
isForDragonriding = isForDragonriding
}
end
function BeStride:GetMountInfoByIndex(index)
return nil
end
function BeStride:GetKnownMountFromTarget()
for i=1,40,1 do
local spellId = select(10, UnitBuff("target", i))
if not spellId then return end
local mountId = C_MountJournal.GetMountFromSpell(spellId)
if mountId ~= nil then
return self:isMountUsable(mountId)
end
end
end