ce87de9a33
- Added option for show or hide the left buttons on menu bar. - Added option for change the left buttons size in the menu bar. - Added option for delete a instance. - 'Instance Segment' Mini display now is more accuracy about telling the enemy in the segment. - Player Details Window now show all pet abilities instead of just the total pet damage. - Rework done on report texts, now the title is more shorter and also format Dps and Hps numbers. - Simple Gray and again ElvUI skins got some rework. - Added Mind Sear (mastery) for priest in the spell customization. - Fixed the stretch button strata which was making the button shows up to any other frame when hover over. - Lib HotCorner now is broker based and shows up all broker plugins in the bar. - Removed the lower instance consolidate menu. - Removed ErrorReport and SavaData plugins. - NewAPI: _detalhes:GetCombatName() returns the combat enemy, boss, battleground. - NewAPI: _detalhes:DeleteInstance (ID) erase a instance. - NewAPI: _detalhes:GetClassColor (class or actor) return the table with the color.
154 lines
5.2 KiB
Lua
154 lines
5.2 KiB
Lua
--File Revision: 1
|
|
--Last Modification: 27/07/2013
|
|
-- Change Log:
|
|
-- 27/07/2013: Finished alpha version.
|
|
|
|
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
local _detalhes = _G._detalhes
|
|
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
|
|
|
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
--> local pointers
|
|
|
|
local _math_floor = math.floor --lua local
|
|
|
|
local gump = _detalhes.gump --details local
|
|
|
|
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
--> constants
|
|
|
|
local modo_raid = _detalhes._detalhes_props["MODO_RAID"]
|
|
|
|
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
--> internal functions
|
|
|
|
function _detalhes:RaidMode (enable, instancia)
|
|
if (enable) then
|
|
|
|
_detalhes.RaidTables.instancia = instancia
|
|
_detalhes.RaidTables.Mode = _detalhes.RaidTables.Mode or 1 --> solo mode
|
|
|
|
instancia.modo = _detalhes._detalhes_props["MODO_RAID"]
|
|
|
|
gump:Fade (instancia, 1, nil, "barras")
|
|
|
|
if (instancia.rolagem) then
|
|
instancia:EsconderScrollBar (true) --> hida a scrollbar
|
|
end
|
|
|
|
_detalhes:ResetaGump (instancia)
|
|
|
|
_detalhes.raid = instancia.meu_id
|
|
instancia:AtualizaGumpPrincipal (true)
|
|
|
|
local first_enabled_plugin, first_enabled_plugin_index
|
|
for index, plugin in ipairs (_detalhes.RaidTables.Plugins) do
|
|
if (plugin.__enabled) then
|
|
first_enabled_plugin = plugin
|
|
first_enabled_plugin_index = index
|
|
end
|
|
end
|
|
|
|
if (not first_enabled_plugin) then
|
|
_detalhes:WaitForSoloPlugin (instancia)
|
|
else
|
|
if (not _detalhes.RaidTables.Plugins [_detalhes.RaidTables.Mode]) then
|
|
_detalhes.RaidTables.Mode = first_enabled_plugin_index
|
|
end
|
|
_detalhes.RaidTables:switch (nil, _detalhes.RaidTables.Mode)
|
|
end
|
|
|
|
else
|
|
|
|
_detalhes.RaidTables:switch()
|
|
_detalhes.raid = nil
|
|
|
|
if (_G.DetailsWaitForPluginFrame:IsShown()) then
|
|
_detalhes:CancelWaitForPlugin()
|
|
end
|
|
|
|
gump:Fade (instancia, 1, nil, "barras")
|
|
gump:Fade (instancia.scroll, 0)
|
|
|
|
if (instancia.need_rolagem) then
|
|
instancia:MostrarScrollBar (true)
|
|
else
|
|
--> precisa verificar se ele precisa a rolagem certo?
|
|
instancia:ReajustaGump()
|
|
end
|
|
|
|
--> calcula se existem barras, etc...
|
|
if (not instancia.rows_fit_in_window) then --> as barras não forma iniciadas ainda
|
|
instancia.rows_fit_in_window = _math_floor (instancia.baseframe.BoxBarrasAltura / instancia.row_height)
|
|
if (instancia.rows_created < instancia.rows_fit_in_window) then
|
|
for i = #instancia.barras+1, instancia.rows_fit_in_window do
|
|
local nova_barra = gump:CriaNovaBarra (instancia, i, 30) --> cria nova barra
|
|
nova_barra.texto_esquerdo:SetText (Loc ["STRING_NEWROW"])
|
|
nova_barra.statusbar:SetValue (100)
|
|
instancia.barras [i] = nova_barra
|
|
end
|
|
instancia.rows_created = #instancia.barras
|
|
end
|
|
end
|
|
|
|
end
|
|
end
|
|
|
|
function _detalhes:InstanciaCheckForDisabledRaid (instancia)
|
|
|
|
if (not instancia) then
|
|
instancia = self
|
|
end
|
|
|
|
if (instancia.modo == modo_raid) then
|
|
if (instancia.iniciada) then
|
|
_detalhes:AlteraModo (instancia, _detalhes._detalhes_props["MODO_GROUP"])
|
|
instancia:RaidMode (false, instancia)
|
|
_detalhes:ResetaGump (instancia)
|
|
else
|
|
instancia.modo = _detalhes._detalhes_props["MODO_GROUP"]
|
|
instancia.last_modo = _detalhes._detalhes_props["MODO_GROUP"]
|
|
end
|
|
end
|
|
end
|
|
|
|
function _detalhes.RaidTables:switch (_, _switchTo)
|
|
|
|
--> just hide all
|
|
if (not _switchTo) then
|
|
if (#_detalhes.RaidTables.Plugins > 0) then --> have at least one plugin
|
|
_detalhes.RaidTables.Plugins [_detalhes.RaidTables.Mode].Frame:Hide()
|
|
end
|
|
return
|
|
end
|
|
|
|
--> jump to the next
|
|
if (_switchTo == -1) then
|
|
_switchTo = _detalhes.RaidTables.Mode + 1
|
|
if (_switchTo > #_detalhes.RaidTables.Plugins) then
|
|
_switchTo = 1
|
|
end
|
|
end
|
|
|
|
local ThisFrame = _detalhes.RaidTables.Plugins [_detalhes.RaidTables.Mode]
|
|
if (not ThisFrame or not ThisFrame.__enabled) then
|
|
--> frame not found, try in few second again
|
|
_detalhes.RaidTables.Mode = _switchTo
|
|
_detalhes:WaitForSoloPlugin (_detalhes:GetRaidMode())
|
|
return
|
|
end
|
|
|
|
--> hide current frame
|
|
_detalhes.RaidTables.Plugins [_detalhes.RaidTables.Mode].Frame:Hide()
|
|
--> switch mode
|
|
_detalhes.RaidTables.Mode = _switchTo
|
|
--> show and setpoint new frame
|
|
|
|
_detalhes.RaidTables.Plugins [_detalhes.RaidTables.Mode].Frame:Show()
|
|
_detalhes.RaidTables.Plugins [_detalhes.RaidTables.Mode].Frame:SetPoint ("TOPLEFT",_detalhes.RaidTables.instancia.bgframe)
|
|
|
|
_detalhes.RaidTables.instancia:ChangeIcon (_detalhes.RaidTables.Menu [_detalhes.RaidTables.Mode] [2])
|
|
|
|
end
|