updates
This commit is contained in:
@@ -0,0 +1,208 @@
|
||||
--File Revision: 1
|
||||
--Last Modification: 27/07/2013
|
||||
-- Change Log:
|
||||
-- 27/07/2013: Finished alpha version.
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> global name declaration
|
||||
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0")
|
||||
_detalhes.version = "Alpha 001"
|
||||
_detalhes.realversion = 1
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> initialization stuff
|
||||
|
||||
do
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
|
||||
--> startup
|
||||
_detalhes.initializing = true
|
||||
_detalhes.enabled = true
|
||||
_detalhes.__index = _detalhes
|
||||
_detalhes._tempo = time()
|
||||
_detalhes.debug = false
|
||||
|
||||
--> containers
|
||||
--> armazenas as funções do parser - All parse functions
|
||||
_detalhes.parser = {}
|
||||
--> armazena os escudos - Shields information for absorbs
|
||||
_detalhes.escudos = {}
|
||||
--> armazena os overwirtes de spells pelo usuario
|
||||
_detalhes.SpellOverwriteUser = {}
|
||||
--> armazena as funções dos frames - Frames functions
|
||||
_detalhes.gump = {}
|
||||
--> armazena as funções para inicialização dos dados - Metatable functions
|
||||
_detalhes.refresh = {}
|
||||
--> armazena as funções para limpar e guardas os dados - Metatable functions
|
||||
_detalhes.clear = {}
|
||||
--> armazena as fontstring usadas no addon - Store labels (fontstrings)
|
||||
_detalhes.font_pool = {}
|
||||
--> armazena a config do painel de fast switch
|
||||
_detalhes.switch = {}
|
||||
--> armazena os estilos salvos
|
||||
_detalhes.savedStyles = {}
|
||||
--> armazena quais atributos possue janela de atributos - contain attributes and sub attributos wich have a detailed window (left click on a row)
|
||||
_detalhes.row_singleclick_overwrite = {}
|
||||
--> report
|
||||
_detalhes.ReportOptions = {}
|
||||
--> armazena os buffs registrados - store buffs ids and functions
|
||||
_detalhes.Buffs = {} --> initialize buff table
|
||||
|
||||
--> Plugins
|
||||
--> raid -------------------------------------------------------------------
|
||||
--> general function for raid mode plugins
|
||||
_detalhes.RaidTables = {}
|
||||
--> menu for raid modes
|
||||
_detalhes.RaidTables.Menu = {}
|
||||
--> plugin objects for raid mode
|
||||
_detalhes.RaidTables.Plugins = {}
|
||||
--> name to plugin object
|
||||
_detalhes.RaidTables.NameTable = {}
|
||||
|
||||
--> solo -------------------------------------------------------------------
|
||||
--> general functions for solo mode plugins
|
||||
_detalhes.SoloTables = {}
|
||||
--> maintain plugin menu
|
||||
_detalhes.SoloTables.Menu = {}
|
||||
--> plugins objects for solo mode
|
||||
_detalhes.SoloTables.Plugins = {}
|
||||
--> name to plugin object
|
||||
_detalhes.SoloTables.NameTable = {}
|
||||
|
||||
--> toolbar -------------------------------------------------------------------
|
||||
--> plugins container
|
||||
_detalhes.ToolBar = {}
|
||||
--> current showing icons
|
||||
_detalhes.ToolBar.Shown = {}
|
||||
--> plugin objects
|
||||
_detalhes.ToolBar.Plugins = {}
|
||||
--> name to plugin object
|
||||
_detalhes.ToolBar.NameTable = {}
|
||||
|
||||
--> statusbar -------------------------------------------------------------------
|
||||
--> plugins container
|
||||
_detalhes.StatusBar = {}
|
||||
--> maintain plugin menu
|
||||
_detalhes.StatusBar.Menu = {}
|
||||
--> plugins object
|
||||
_detalhes.StatusBar.Plugins = {}
|
||||
--> name to plugin object
|
||||
_detalhes.StatusBar.NameTable = {}
|
||||
|
||||
--> constants
|
||||
_detalhes._detalhes_props = {
|
||||
DATA_TYPE_START = 1, --> Something on start
|
||||
DATA_TYPE_END = 2, --> Something on end
|
||||
|
||||
MODO_ALONE = 1, --> Solo
|
||||
MODO_GROUP = 2, --> Group
|
||||
MODO_ALL = 3, --> Everything
|
||||
MODO_RAID = 4, --> Raid
|
||||
}
|
||||
_detalhes.modos = {
|
||||
alone = 1, --> Solo
|
||||
group = 2, --> Group
|
||||
all = 3, --> Everything
|
||||
raid = 4 --> Raid
|
||||
}
|
||||
_detalhes.flags = {
|
||||
--> Player and Pet
|
||||
player = 0x00000001,--> player character
|
||||
pet = 0x00000002, --> pet mobile
|
||||
--> Group
|
||||
in_group = 0x00000100,--> in group
|
||||
player_in_group = 0x00000101, --> player in group
|
||||
--> Friendship
|
||||
friend = 0x00000010,--> friend (same faction)
|
||||
friend_in_group = 0x00000110, --> friend in group
|
||||
--> Enemies
|
||||
neutral = 0x00000020,--> neutral
|
||||
enemy = 0x00000040--> enemy
|
||||
}
|
||||
|
||||
_detalhes.divisores = {
|
||||
abre = "(", --> open
|
||||
fecha = ")", --> close
|
||||
colocacao = ". " --> dot
|
||||
}
|
||||
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ("Details")
|
||||
|
||||
_detalhes.segmentos = {
|
||||
label = Loc ["STRING_SEGMENT"]..": ",
|
||||
overall = Loc ["STRING_TOTAL"],
|
||||
overall_standard = Loc ["STRING_OVERALL"],
|
||||
current = Loc ["STRING_CURRENT"],
|
||||
current_standard = Loc ["STRING_CURRENTFIGHT"],
|
||||
past = Loc ["STRING_FIGHTNUMBER"]
|
||||
}
|
||||
|
||||
_detalhes._detalhes_props["modo_nome"] = {
|
||||
[_detalhes._detalhes_props["MODO_ALONE"]] = Loc ["STRING_MODE_SELF"],
|
||||
[_detalhes._detalhes_props["MODO_GROUP"]] = Loc ["STRING_MODE_GROUP"],
|
||||
[_detalhes._detalhes_props["MODO_ALL"]] = Loc ["STRING_MODE_ALL"],
|
||||
[_detalhes._detalhes_props["MODO_RAID"]] = Loc ["STRING_MODE_RAID"]
|
||||
}
|
||||
|
||||
_detalhes.icones = {
|
||||
--> report window
|
||||
report = {
|
||||
up = "Interface\\FriendsFrame\\UI-Toast-FriendOnlineIcon",
|
||||
down = "Interface\\ItemAnimations\\MINIMAP\\TRACKING\\Profession",
|
||||
disabled = "Interface\\ItemAnimations\\MINIMAP\\TRACKING\\Profession",
|
||||
highlight = nil
|
||||
}
|
||||
}
|
||||
|
||||
_detalhes.missTypes = {"ABSORB", "BLOCK", "DEFLECT", "DODGE", "EVADE", "IMMUNE", "MISS", "PARRY", "REFLECT", "RESIST"} --> do not localize-me
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> frames
|
||||
|
||||
local _CreateFrame = CreateFrame --api locals
|
||||
local _UIParent = UIParent --api locals
|
||||
|
||||
--> Info Window
|
||||
_detalhes.janela_info = _CreateFrame ("Frame", "Details_JanelaInfo", _UIParent)
|
||||
|
||||
--> Event Frame
|
||||
_detalhes.listener = _CreateFrame ("Frame", nil, _UIParent)
|
||||
_detalhes.listener:RegisterEvent ("ADDON_LOADED")
|
||||
_detalhes.listener:RegisterEvent ("PLAYER_LOGOUT")
|
||||
_detalhes.listener:SetFrameStrata ("LOW")
|
||||
_detalhes.listener:SetFrameLevel (9)
|
||||
_detalhes.listener.FrameTime = 0
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> functions
|
||||
|
||||
--> register textures and fonts for shared media
|
||||
local SharedMedia = LibStub:GetLibrary ("LibSharedMedia-3.0")
|
||||
SharedMedia:Register ("statusbar", "Details D'ictum", [[Interface\AddOns\Details\images\bar4]])
|
||||
|
||||
--> global 'vardump' for dump table contents over chat panel
|
||||
function vardump (t)
|
||||
if (type (t) ~= "table") then
|
||||
return
|
||||
end
|
||||
for a,b in pairs (t) do
|
||||
print (a,b)
|
||||
end
|
||||
end
|
||||
|
||||
--> delay messages
|
||||
function _detalhes:DelayMsg (msg)
|
||||
_detalhes.delaymsgs = _detalhes.delaymsgs or {}
|
||||
_detalhes.delaymsgs [#_detalhes.delaymsgs+1] = msg
|
||||
end
|
||||
function _detalhes:ShowDelayMsg()
|
||||
if (_detalhes.delaymsgs and #_detalhes.delaymsgs > 0) then
|
||||
for _, msg in ipairs (_detalhes.delaymsgs) do
|
||||
print (msg)
|
||||
end
|
||||
end
|
||||
_detalhes.delaymsgs = {}
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user