forked from Dusk/ShaguTweaks-ClassicAPI
Apply Patch
This commit is contained in:
@@ -824,3 +824,34 @@ API.UnitInRange = function(unit)
|
||||
|
||||
return false, false
|
||||
end
|
||||
|
||||
|
||||
-- Native cooldown rendering landed in ClassicAPI v1.17.1.
|
||||
API.nativecooldowns = API.classicapi_version >= 11701
|
||||
|
||||
API.RegisterUnitEvent = function(frame, eventName, unit1, unit2, unit3)
|
||||
if type(frame.RegisterUnitEvent) == "function" then
|
||||
return frame:RegisterUnitEvent(eventName, unit1, unit2, unit3)
|
||||
end
|
||||
return frame:RegisterEvent(eventName)
|
||||
end
|
||||
|
||||
API.GetCurrentChatEvent = function()
|
||||
if type(_G.GetCurrentChatEvent) == "function" then
|
||||
return _G.GetCurrentChatEvent()
|
||||
end
|
||||
end
|
||||
|
||||
-- Never opt into persistent storage on the user's behalf.
|
||||
API.HasPersistentPlayerCache = function()
|
||||
return API.playercache and type(_G.C_PlayerCache.IsEnabled) == "function"
|
||||
and type(_G.C_PlayerCache.RememberPlayer) == "function"
|
||||
and _G.C_PlayerCache.IsEnabled()
|
||||
end
|
||||
|
||||
API.RememberPlayerInfo = function(name, class, guid)
|
||||
if API.HasPersistentPlayerCache() and name and class and guid then
|
||||
return _G.C_PlayerCache.RememberPlayer(guid, name, class) and true or false
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user