-
Notifications
You must be signed in to change notification settings - Fork 1
/
compat.lua
110 lines (108 loc) · 3.5 KB
/
compat.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
local addonName, bepgp = ...
local falsey = function() return false end
local GetGuildTabardFileNames = _G.GetGuildTabardFileNames or _G.GetGuildTabardFiles
local GuildRoster = function(...)
if _G.GuildRoster then
return _G.GuildRoster(...)
elseif C_GuildInfo and C_GuildInfo.GuildRoster then
return C_GuildInfo.GuildRoster(...)
end
end
local CanEditOfficerNote = function(...)
if _G.CanEditOfficerNote then
return _G.CanEditOfficerNote(...)
elseif C_GuildInfo and C_GuildInfo.CanEditOfficerNote then
return C_GuildInfo.CanEditOfficerNote(...)
end
end
local CanViewOfficerNote = function(...)
if _G.CanViewOfficerNote then
return _G.CanViewOfficerNote(...)
elseif C_GuildInfo and C_GuildInfo.CanViewOfficerNote then
return C_GuildInfo.CanViewOfficerNote(...)
end
end
local CanSpeakInGuildChat = function(...)
if _G.CanSpeakInGuildChat then
return _G.CanSpeakInGuildChat(...)
elseif C_GuildInfo and C_GuildInfo.CanSpeakInGuildChat then
return C_GuildInfo and C_GuildInfo.CanSpeakInGuildChat(...)
end
end
local GuildControlGetRankFlags = function(...)
if _G.GuildControlGetRankFlags then
return _G.GuildControlGetRankFlags(...)
elseif C_GuildInfo and C_GuildInfo.GuildControlGetRankFlags then
return C_GuildInfo and C_GuildInfo.GuildControlGetRankFlags(...)
end
end
local GetAddOnMetadata = function(...)
if _G.GetAddOnMetadata then
return _G.GetAddOnMetadata(...)
elseif C_AddOns and C_AddOns.GetAddOnMetadata then
return C_AddOns.GetAddOnMetadata(...)
end
end
local IsAddOnLoaded = function(...)
if _G.IsAddOnLoaded then
return _G.IsAddOnLoaded(...)
elseif C_AddOns and C_AddOns.IsAddOnLoaded then
return C_AddOns.IsAddOnLoaded(...)
end
end
local GetAddOnInfo = function(...)
if _G.GetAddOnInfo then
return _G.GetAddOnInfo(...)
elseif C_AddOns and C_AddOns.GetAddOnInfo then
return C_AddOns.GetAddOnInfo(...)
end
end
local GetItemInfoInstant = function(...)
if _G.GetItemInfoInstant then
return _G.GetItemInfoInstant(...)
elseif C_Item and C_Item.GetItemInfoInstant then
return C_Item.GetItemInfoInstant(...)
end
end
local GetItemInfo = function(...)
if _G.GetItemInfo then
return _G.GetItemInfo(...)
elseif C_Item and C_Item.GetItemInfo then
return C_Item.GetItemInfo(...)
end
end
local GetItemSubClassInfo = function(...)
if _G.GetItemSubClassInfo then
return _G.GetItemSubClassInfo(...)
elseif C_Item and C_Item.GetItemSubClassInfo then
return C_Item.GetItemSubClassInfo(...)
end
end
local GetItemInventoryTypeByID = function(...)
if _G.GetItemInventoryTypeByID then
return _G.GetItemInventoryTypeByID(...)
elseif C_Item and C_Item.GetItemInventoryTypeByID then
return C_Item.GetItemInventoryTypeByID(...)
end
end
local GetItemStats = function(...)
if _G.GetItemStats then
return _G.GetItemStats(...)
elseif C_Item and C_Item.GetItemStats then
return C_Item.GetItemStats(...)
end
end
bepgp.GetGuildTabardFileNames = GetGuildTabardFileNames
bepgp.GuildRoster = GuildRoster
bepgp.CanEditOfficerNote = CanEditOfficerNote
bepgp.CanViewOfficerNote = CanViewOfficerNote
bepgp.CanSpeakInGuildChat = CanSpeakInGuildChat
bepgp.GuildControlGetRankFlags = GuildControlGetRankFlags
bepgp.GetAddOnMetadata = GetAddOnMetadata
bepgp.IsAddOnLoaded = IsAddOnLoaded
bepgp.GetAddOnInfo = GetAddOnInfo
bepgp.GetItemInfoInstant = GetItemInfoInstant
bepgp.GetItemInfo = GetItemInfo
bepgp.GetItemSubClassInfo = GetItemSubClassInfo
bepgp.GetItemInventoryTypeByID = GetItemInventoryTypeByID
bepgp.GetItemStats = GetItemStats