- Fixed plugins initialization broken in latest version.
This commit is contained in:
@@ -4,11 +4,11 @@
|
||||
_ = nil
|
||||
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")
|
||||
|
||||
_detalhes.build_counter = 6923
|
||||
_detalhes.alpha_build_counter = 6923 --if this is higher than the regular counter, use it instead
|
||||
_detalhes.build_counter = 6924
|
||||
_detalhes.alpha_build_counter = 6924 --if this is higher than the regular counter, use it instead
|
||||
_detalhes.game_version = "v8.1.0"
|
||||
_detalhes.userversion = "v8.1.0." .. _detalhes.build_counter
|
||||
_detalhes.realversion = 136 --core version, this is used to check API version for scripts and plugins (see alias below)
|
||||
_detalhes.realversion = 137 --core version, this is used to check API version for scripts and plugins (see alias below)
|
||||
_detalhes.APIVersion = _detalhes.realversion --core version
|
||||
_detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" --simple stirng to show to players
|
||||
|
||||
|
||||
+10
-3
@@ -284,11 +284,17 @@
|
||||
local NewPlugin = {__options = PluginOptions, __enabled = true, RegisterEvent = register_event_func, UnregisterEvent = unregister_event_func}
|
||||
|
||||
local Frame = CreateFrame ("Frame", FrameName, UIParent)
|
||||
Frame:RegisterEvent ("ADDON_LOADED")
|
||||
Frame:RegisterEvent ("PLAYER_LOGIN")
|
||||
Frame:RegisterEvent ("PLAYER_LOGOUT")
|
||||
Frame:SetScript ("OnEvent", function(event, ...)
|
||||
|
||||
Frame:SetScript ("OnEvent", function(self, event, ...)
|
||||
if (NewPlugin.OnEvent) then
|
||||
return NewPlugin:OnEvent (event, ...)
|
||||
if (event == "PLAYER_LOGIN") then
|
||||
NewPlugin:OnEvent (self, "ADDON_LOADED", NewPlugin.Frame:GetName())
|
||||
NewPlugin.Frame:Hide()
|
||||
return
|
||||
end
|
||||
return NewPlugin:OnEvent (self, event, ...)
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -634,6 +640,7 @@
|
||||
|
||||
--> a plugin request to be embed into the main plugin window
|
||||
function f.EmbedPlugin (pluginObject, frame, isUtility)
|
||||
|
||||
--> check if the plugin has a frame
|
||||
if (not pluginObject.Frame) then
|
||||
f.DebugMsg ("plugin doesn't have a frame.")
|
||||
|
||||
@@ -20,7 +20,7 @@ local _math_abs = math.abs
|
||||
local RAID_CLASS_COLORS = RAID_CLASS_COLORS
|
||||
|
||||
--> Create the plugin Object
|
||||
local ThreatMeter = _detalhes:NewPluginObject ("Details_Threat")
|
||||
local ThreatMeter = _detalhes:NewPluginObject ("Details_TinyThreat")
|
||||
--> Main Frame
|
||||
local ThreatMeterFrame = ThreatMeter.Frame
|
||||
|
||||
|
||||
Reference in New Issue
Block a user