bb6e7bdb6e
- Fixed some translations between ptBR -> enUS. - More fixes with target damage and debuff uptime on overall segment. - Major rewrite on CC Breaks, now it's working properly. - Non player or pet Enemies will be flagged with .monster member. - New member for combat object: start_time, end_time = combat_object:GetDate() - Added new sub attribute for damage: Voidzones & Auras. - First implementation of Hooks for plugins capture parser events in realtime. - Added API: _detalhes:InstallHook (hooktype, func). func receive parameters: token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname - Added Global: DETAILS_HOOK_COOLDOWN - Added API: _detalhes:StatusBarAlert (text, icon, color, time) - Added API: _detalhes:InstallSkin (skin_name, skin_table) More information on skin table, see the file functions/skins.lua
50 lines
1.3 KiB
Lua
50 lines
1.3 KiB
Lua
--File Revision: 1
|
|
--Last Modification: 06/12/2013
|
|
-- Change Log:
|
|
-- 06/12/2013: file added.
|
|
|
|
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
--[[global]] DETAILS_HOOK_COOLDOWN = "HOOK_COOLDOWN"
|
|
|
|
local _detalhes = _G._detalhes
|
|
local _
|
|
|
|
_detalhes.hooks ["HOOK_COOLDOWN"] = {}
|
|
|
|
function _detalhes:InstallHook (hook_type, func)
|
|
|
|
if (not _detalhes.hooks [hook_type]) then
|
|
return false, "Invalid hook type."
|
|
end
|
|
|
|
_detalhes.hooks [hook_type] [#_detalhes.hooks [hook_type] + 1] = func
|
|
|
|
_detalhes.hooks [hook_type].enabled = true
|
|
|
|
_detalhes:UpdateParserGears()
|
|
return true
|
|
end
|
|
|
|
function _detalhes:UnInstallHook (hook_type, func)
|
|
|
|
if (not _detalhes.hooks [hook_type]) then
|
|
return false, "Invalid hook type."
|
|
end
|
|
|
|
for index, this_func in ipairs (_detalhes.hooks [hook_type]) do
|
|
|
|
if (this_func == func) then
|
|
|
|
table.remove (_detalhes.hooks [hook_type], index)
|
|
|
|
if (#_detalhes.hooks [hook_type] == 0) then
|
|
_detalhes.hooks [hook_type].enabled = false
|
|
end
|
|
|
|
_detalhes:UpdateParserGears()
|
|
return true
|
|
end
|
|
end
|
|
|
|
end |