- fixed issue with panic mode where sometimes his effects isn't triggered.

- added new small tutorial bubles for common tasks.
- tutorials now are account wide and not trigger on new characters.
- small improvements on details framework.
- added new hook type: HOOK_BUFF, triggered with buff or debuff parser.
- new skin: simple gray.
- added a minimap button and a button on addons interface panel.
new Api: instance:LockInstance (boolean)
This commit is contained in:
terciob19
2014-01-02 11:21:22 -02:00
parent c4776d562d
commit c29e9875de
28 changed files with 1701 additions and 216 deletions
+28 -18
View File
@@ -502,32 +502,16 @@
--> panic mode
if (_detalhes.segments_panic_mode and _detalhes.in_combat) then
if (_detalhes.segments_panic_mode and _detalhes.can_panic_mode) then
if (_detalhes.tabela_vigente.is_boss) then
_detalhes.tabela_historico = _detalhes.historico:NovoHistorico()
end
end
--> Limpa instâncias
for _, esta_instancia in _ipairs (_detalhes.tabela_instancias) do
--> detona a janela do Solo Mode
esta_instancia.barras = nil
esta_instancia.showing = nil
--> apaga os frames
esta_instancia.scroll = nil
esta_instancia.baseframe = nil
esta_instancia.bgframe = nil
esta_instancia.bgdisplay = nil
esta_instancia.freeze_icon = nil
esta_instancia.freeze_texto = nil
esta_instancia.agrupada_a = nil
esta_instancia.grupada_pos = nil
esta_instancia.agrupado = nil
if (esta_instancia.StatusBar.left) then
esta_instancia.StatusBarSaved = {
["left"] = esta_instancia.StatusBar.left.real_name or "NONE",
@@ -536,9 +520,35 @@
["options"] = esta_instancia.StatusBar.options
}
end
--> erase all widgets frames
esta_instancia.scroll = nil
esta_instancia.baseframe = nil
esta_instancia.bgframe = nil
esta_instancia.bgdisplay = nil
esta_instancia.freeze_icon = nil
esta_instancia.freeze_texto = nil
esta_instancia.barras = nil
esta_instancia.showing = nil
esta_instancia.agrupada_a = nil
esta_instancia.grupada_pos = nil
esta_instancia.agrupado = nil
esta_instancia._version = nil
esta_instancia.h_baixo = nil
esta_instancia.h_esquerda = nil
esta_instancia.h_direita = nil
esta_instancia.h_cima = nil
esta_instancia.botao_separar = nil
esta_instancia.alert = nil
esta_instancia.StatusBar = nil
esta_instancia.consolidateFrame = nil
esta_instancia.consolidateButtonTexture = nil
esta_instancia.consolidateButton = nil
esta_instancia.lastIcon = nil
end
end
+20
View File
@@ -104,8 +104,10 @@
--> hooks
local _hook_cooldowns = false
local _hook_deaths = false
local _hook_buffs = false
local _hook_cooldowns_container = _detalhes.hooks ["HOOK_COOLDOWN"]
local _hook_deaths_container = _detalhes.hooks ["HOOK_DEATH"]
local _hook_buffs_container = _detalhes.hooks ["HOOK_BUFF"]
@@ -692,6 +694,7 @@
------------------------------------------------------------------------------------------------
--> buff uptime
if (_recording_buffs_and_debuffs) then
-- jade spirit doesn't send who_name, that's a shame. --print (spellname, who_name, alvo_name)
if (who_name == alvo_name and raid_members_cache [who_serial] and _in_combat) then
--> call record buffs uptime
--[[not tail call, need to fix this]] parser:add_buff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_IN")
@@ -1283,6 +1286,16 @@
este_jogador.buff_uptime_targets.shadow = shadow.buff_uptime_targets
este_jogador.buff_uptime_spell_tables.shadow = shadow.buff_uptime_spell_tables
end
------------------------------------------------------------------------------------------------
--> hook
if (_hook_buffs) then
--> send event to registred functions
for _, func in _ipairs (_hook_buffs_container) do
func (nil, token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, in_out)
end
end
------------------------------------------------------------------------------------------------
--> add amount
@@ -2601,6 +2614,7 @@
--> leave combat start save tables
if (_detalhes.in_combat) then
_detalhes:SairDoCombate()
_detalhes.can_panic_mode = true
end
return _detalhes:SaveData()
@@ -2758,6 +2772,12 @@
else
_hook_deaths = false
end
if (_detalhes.hooks ["HOOK_BUFF"].enabled) then
_hook_buffs = true
else
_hook_buffs = false
end
return _detalhes:ClearParserCache()
end
+6
View File
@@ -191,6 +191,9 @@
--|TTexturePath: size X: size Y: point offset Y X : texture size : coordx1 L : coordx2 R : coordy1 T : coordy2 B |t
-- left click: 0.0019531:0.1484375:0.4257813:0.6210938 right click: 0.0019531:0.1484375:0.6269531:0.8222656
_detalhes.OnEnterMainWindow (frame.child.instance)
local passou = 0
frame:SetScript ("OnUpdate", function (self, elapsed)
passou = passou + elapsed
@@ -211,6 +214,9 @@
--> on leave
local OnLeave = function (frame)
_detalhes.OnLeaveMainWindow (frame.child.instance)
if (_detalhes.popup.active) then
local passou = 0
frame:SetScript ("OnUpdate", function (self, elapsed)
+14 -2
View File
@@ -124,14 +124,26 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> internal functions
function DetailsToolbarButtonOnEnter (button)
--[[global]] function DetailsToolbarButtonOnEnter (button)
local lower_instance = _detalhes:GetLowerInstanceNumber()
if (lower_instance) then
_detalhes.OnEnterMainWindow (_detalhes:GetInstance (lower_instance), button, 3)
end
if (button.tooltip) then
GameCooltip:Reset()
GameCooltip:AddLine (button.tooltip)
GameCooltip:ShowCooltip (button, "tooltip")
end
end
function DetailsToolbarButtonOnLeave (button)
--[[global]] function DetailsToolbarButtonOnLeave (button)
local lower_instance = _detalhes:GetLowerInstanceNumber()
if (lower_instance) then
_detalhes.OnLeaveMainWindow (_detalhes:GetInstance (lower_instance), button, 3)
end
if (button.tooltip) then
_detalhes.popup:ShowMe (false)
end
+87 -3
View File
@@ -149,7 +149,6 @@
return _detalhes:ScheduleTimer ("SaveMainWindowPosition", 1, self)
end
-- credits to ckknight (http://www.curseforge.com/profiles/ckknight/)
local _scale = self.baseframe:GetEffectiveScale()
local _UIscale = _UIParent:GetScale()
local mostrando = self.mostrando
@@ -182,7 +181,6 @@
function _detalhes:RestoreMainWindowPosition (pre_defined)
-- credits to ckknight (http://www.curseforge.com/profiles/ckknight/)
local _scale = self.baseframe:GetEffectiveScale()
local _UIscale = _UIParent:GetScale()
@@ -210,7 +208,6 @@
x = x or 0
y = y or 0
-- credits to ckknight (http://www.curseforge.com/profiles/ckknight/)
local _scale = self.baseframe:GetEffectiveScale()
local _UIscale = _UIParent:GetScale()
@@ -570,3 +567,90 @@
end
end
end
do
--[1] criar nova instancia
--[2] esticar janela
--[3] resize e trava
--[4] shortcut frame
--[5] micro displays
--[6] snap windows
function _detalhes:run_tutorial()
local lower_instance = _detalhes:GetLowerInstanceNumber()
if (lower_instance) then
local instance = _detalhes:GetInstance (lower_instance)
if (not _detalhes.tutorial.alert_frames [1]) then
_detalhes.MicroButtonAlert.Text:SetText (Loc ["STRING_MINITUTORIAL_1"])
_detalhes.MicroButtonAlert:SetPoint ("bottom", instance.baseframe.cabecalho.novo, "top", 0, 16)
_detalhes.MicroButtonAlert:SetHeight (200)
_detalhes.MicroButtonAlert:Show()
_detalhes.tutorial.alert_frames [1] = true
elseif (not _detalhes.tutorial.alert_frames [2]) then
_detalhes.MicroButtonAlert.Text:SetText (Loc ["STRING_MINITUTORIAL_2"])
_detalhes.MicroButtonAlert:SetPoint ("bottom", instance.baseframe.button_stretch, "top", 0, 15)
instance.baseframe.button_stretch:Show()
instance.baseframe.button_stretch:SetAlpha (1)
_detalhes.MicroButtonAlert:Show()
_detalhes.tutorial.alert_frames [2] = true
elseif (not _detalhes.tutorial.alert_frames [3]) then
_detalhes.MicroButtonAlert.Text:SetText (Loc ["STRING_MINITUTORIAL_3"])
_detalhes.MicroButtonAlert:SetPoint ("bottom", instance.baseframe.resize_direita, "top", -8, 16)
_detalhes.OnEnterMainWindow (instance)
instance.baseframe.button_stretch:SetAlpha (0)
_detalhes.MicroButtonAlert:Show()
_detalhes.tutorial.alert_frames [3] = true
elseif (not _detalhes.tutorial.alert_frames [4]) then
_detalhes.MicroButtonAlert.Text:SetText (Loc ["STRING_MINITUTORIAL_4"])
_detalhes.MicroButtonAlert:SetPoint ("bottom", instance.baseframe, "center", 0, 16)
_detalhes.MicroButtonAlert:Show()
_detalhes.tutorial.alert_frames [4] = true
elseif (not _detalhes.tutorial.alert_frames [5]) then
_detalhes.MicroButtonAlert.Text:SetText (Loc ["STRING_MINITUTORIAL_5"])
_detalhes.MicroButtonAlert:SetPoint ("bottom", instance.baseframe.rodape.top_bg, "top", 0, 16)
_detalhes.MicroButtonAlert:Show()
_detalhes.MicroButtonAlert:SetHeight (220)
_detalhes.tutorial.alert_frames [5] = true
elseif (not _detalhes.tutorial.alert_frames [6]) then
_detalhes.MicroButtonAlert.Text:SetText (Loc ["STRING_MINITUTORIAL_6"])
_detalhes.MicroButtonAlert:SetPoint ("bottom", instance.baseframe.barra_direita, "center", -24, 16)
_detalhes.MicroButtonAlert:SetHeight (200)
_detalhes.MicroButtonAlert:Show()
_detalhes.tutorial.alert_frames [6] = true
end
end
--
_detalhes:ScheduleTimer ("delay_tutorial", 60)
end
function _detalhes:delay_tutorial()
--verificar algo?
_detalhes:run_tutorial()
end
function _detalhes:StartTutorial()
--
if (_G ["DetailsWelcomeWindow"] and _G ["DetailsWelcomeWindow"]:IsShown()) then
return _detalhes:ScheduleTimer ("StartTutorial", 10)
end
--
_detalhes:ScheduleTimer ("delay_tutorial", 20)
end
end