- fixed issues with death log.
- added upper images for CoolTip, parameter "top" for AddImage. - added GetBossPortrait (mapid, bossindex) - added new slash command "show" - switch menu now open with OnMouseDown instead MouseUp. - all menus on main window had the wait time down to 0.15s. - slight revamp on segment menu. - bugs fixed on TinyThreat.
This commit is contained in:
+66
-19
@@ -188,9 +188,25 @@
|
||||
_overall_gtotal [1] = _overall_gtotal [1]+amount
|
||||
|
||||
elseif (jogador_alvo.grupo) then
|
||||
|
||||
--> record death log
|
||||
_table_insert (jogador_alvo.last_events_table, 1, {true, spellid, amount, time, _UnitHealth (alvo_name), who_name }) --: [1] true = damage, false = heal [2] spellid [3] amount
|
||||
_table_remove (jogador_alvo.last_events_table, 20) --> max 20 spots
|
||||
local t = jogador_alvo.last_events_table
|
||||
local i = t.n
|
||||
t.n = i + 1
|
||||
|
||||
t = t [i]
|
||||
|
||||
t [1] = true --> true if this is a damage || false for healing
|
||||
t [2] = spellid --> spellid || false if this is a battle ress line
|
||||
t [3] = amount --> amount of damage or healing
|
||||
t [4] = time --> parser time
|
||||
t [5] = _UnitHealth (alvo_name) --> current unit heal
|
||||
t [6] = who_name --> source name
|
||||
|
||||
i = i + 1
|
||||
if (i == 9) then
|
||||
jogador_alvo.last_events_table.n = 1
|
||||
end
|
||||
|
||||
--> record avoidance only for player actors
|
||||
if (spellid < 3) then --> autoshot melee
|
||||
@@ -253,6 +269,11 @@
|
||||
--> firendly fire
|
||||
|
||||
if (_bit_band (who_flags, REACTION_FRIENDLY) ~= 0 and _bit_band (alvo_flags, REACTION_FRIENDLY) ~= 0) then
|
||||
|
||||
--> investigation about mind control and reaction switch done
|
||||
--> details will do count mind control and reaction switch as normal damage.
|
||||
--> reaction switch normally came as 0x548 flag on players and 0x1148 for pets.
|
||||
|
||||
este_jogador.friendlyfire_total = este_jogador.friendlyfire_total + amount
|
||||
shadow.friendlyfire_total = shadow.friendlyfire_total + amount
|
||||
|
||||
@@ -275,6 +296,7 @@
|
||||
else
|
||||
_current_total [1] = _current_total [1]+amount
|
||||
_overall_total [1] = _overall_total [1]+amount
|
||||
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
@@ -478,8 +500,24 @@
|
||||
end
|
||||
|
||||
if (jogador_alvo.grupo) then
|
||||
_table_insert (jogador_alvo.last_events_table, 1, {false, spellid, amount, time, _UnitHealth (alvo_name), who_name}) --: [1] true = damage, false = heal [2] spellid [3] amount
|
||||
_table_remove (jogador_alvo.last_events_table, 20) --> limita a 20 spots
|
||||
|
||||
local t = jogador_alvo.last_events_table
|
||||
local i = t.n
|
||||
t.n = i + 1
|
||||
|
||||
t = t [i]
|
||||
|
||||
t [1] = false --> true if this is a damage || false for healing
|
||||
t [2] = spellid --> spellid || false if this is a battle ress line
|
||||
t [3] = amount --> amount of damage or healing
|
||||
t [4] = time --> parser time
|
||||
t [5] = _UnitHealth (alvo_name) --> current unit heal
|
||||
t [6] = who_name --> source name
|
||||
|
||||
i = i + 1
|
||||
if (i == 9) then
|
||||
jogador_alvo.last_events_table.n = 1
|
||||
end
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
@@ -1396,7 +1434,7 @@
|
||||
return spell:Add (alvo_serial, alvo_name, alvo_flags, who_name, token, extraSpellID, extraSpellName)
|
||||
end
|
||||
|
||||
--serach key: ~dead ~death
|
||||
--serach key: ~dead ~death ~morte
|
||||
function parser:dead (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags)
|
||||
|
||||
--> not yet well cleaned, need more improvements
|
||||
@@ -1434,7 +1472,7 @@
|
||||
_current_gtotal [4].dead = _current_gtotal [4].dead + 1
|
||||
_overall_gtotal [4].dead = _overall_gtotal [4].dead + 1
|
||||
|
||||
--> main actor
|
||||
--> main actor no container de misc que irá armazenar a morte
|
||||
local este_jogador, meu_dono = misc_cache [alvo_name]
|
||||
if (not este_jogador) then --> pode ser um desconhecido ou um pet
|
||||
este_jogador, meu_dono, who_name = _current_misc_container:PegarCombatente (alvo_serial, alvo_name, alvo_flags, true)
|
||||
@@ -1443,15 +1481,13 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> monta a estrutura da morte
|
||||
local dano = _current_combat[1]:PegarCombatente (alvo_serial, alvo_name, alvo_flags, true) --> container do dano
|
||||
local cura = _current_combat[2]:PegarCombatente (alvo_serial, alvo_name, alvo_flags, true) --> container da cura
|
||||
local esta_morte = {}
|
||||
|
||||
--[[
|
||||
if (dano.last_events_table) then
|
||||
|
||||
local novaTabela = {}
|
||||
local counter = 1
|
||||
|
||||
--> junta os danos iguais
|
||||
for i = 1, #dano.last_events_table, 1 do
|
||||
|
||||
local este_dano = dano.last_events_table[i]
|
||||
@@ -1480,27 +1516,38 @@
|
||||
counter = counter + 1
|
||||
|
||||
end
|
||||
end
|
||||
--]]
|
||||
|
||||
local amt = 0
|
||||
--> monta a estrutura da morte pegando a tabela de dano e a tabela de cura
|
||||
local dano = _current_combat[1]:PegarCombatente (alvo_serial, alvo_name, alvo_flags, true) --> container do dano
|
||||
local cura = _current_combat[2]:PegarCombatente (alvo_serial, alvo_name, alvo_flags, true) --> container da cura
|
||||
--> objeto da morte
|
||||
local esta_morte = {}
|
||||
|
||||
--> adiciona a tabela da morte apenas os DANOS recentes
|
||||
for index, tabela in _ipairs (dano.last_events_table) do
|
||||
--print ("PARSER 3 dano", unpack (tabela))
|
||||
if (tabela [4]) then
|
||||
if (tabela [4] + 12 > time) then --> mostra apenas eventos recentes
|
||||
esta_morte [#esta_morte+1] = tabela
|
||||
amt = amt + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> adiciona a tabela da morte apenas as CURAS recentes
|
||||
if (cura.last_events_table) then
|
||||
local amt = 0
|
||||
for index, tabela in _ipairs (cura.last_events_table) do
|
||||
if (tabela [4] + 12 > time) then --> mostra apenas eventos recentes
|
||||
--print ("PARSER 3 cura", unpack (tabela))
|
||||
if (tabela [4]) then
|
||||
if (tabela [4] + 12 > time) then
|
||||
esta_morte [#esta_morte+1] = tabela
|
||||
amt = amt + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
_table_sort (esta_morte, function (a, b) return a[4] > b[4] end)
|
||||
_table_sort (esta_morte, _detalhes.Sort4)
|
||||
|
||||
if (_detalhes.deadlog_limit and #esta_morte > _detalhes.deadlog_limit) then
|
||||
for i = #esta_morte, _detalhes.deadlog_limit+1, -1 do
|
||||
@@ -1519,8 +1566,8 @@
|
||||
_table_insert (_overall_combat.last_events_tables, #_current_combat.last_events_tables+1, t)
|
||||
|
||||
--> reseta a pool
|
||||
dano.last_events_table = {}
|
||||
cura.last_events_table = {}
|
||||
dano.last_events_table = _detalhes:CreateActorLastEventTable()
|
||||
cura.last_events_table = _detalhes:CreateActorLastEventTable()
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
+36
-1
@@ -45,6 +45,8 @@ function DetailsCreateCoolTip()
|
||||
CoolTip.LeftIconTableSub = {}
|
||||
CoolTip.RightIconTable = {}
|
||||
CoolTip.RightIconTableSub = {}
|
||||
CoolTip.TopIcon = nil
|
||||
CoolTip.TopIconTableSub = {}
|
||||
CoolTip.StatusBarTable = {}
|
||||
CoolTip.StatusBarTableSub = {}
|
||||
|
||||
@@ -773,6 +775,17 @@ function DetailsCreateCoolTip()
|
||||
|
||||
frame2:SetHeight ( (frame2.hHeight * CoolTip.IndexesSub [index]) + 12 + (-spacing))
|
||||
|
||||
if (CoolTip.TopIconTableSub [index]) then
|
||||
local upperImageTable = CoolTip.TopIconTableSub [index]
|
||||
frame2.upperImage:SetTexture (upperImageTable [1])
|
||||
frame2.upperImage:SetWidth (upperImageTable [2])
|
||||
frame2.upperImage:SetHeight (upperImageTable [3])
|
||||
frame2.upperImage:SetTexCoord (upperImageTable[4], upperImageTable[5], upperImageTable[6], upperImageTable[7])
|
||||
frame2.upperImage:Show()
|
||||
else
|
||||
frame2.upperImage:Hide()
|
||||
end
|
||||
|
||||
if (not CoolTip.OptionsTable.FixedWidthSub) then
|
||||
frame2:SetWidth (frame2.w + 44)
|
||||
end
|
||||
@@ -1256,6 +1269,11 @@ function DetailsCreateCoolTip()
|
||||
_table_wipe (CoolTip.RightIconTable)
|
||||
_table_wipe (CoolTip.RightIconTableSub)
|
||||
|
||||
CoolTip.TopIcon = nil
|
||||
_table_wipe (CoolTip.TopIconTableSub)
|
||||
frame1.upperImage:Hide()
|
||||
frame2.upperImage:Hide()
|
||||
|
||||
_table_wipe (CoolTip.StatusBarTable)
|
||||
_table_wipe (CoolTip.StatusBarTableSub)
|
||||
|
||||
@@ -1556,10 +1574,14 @@ function DetailsCreateCoolTip()
|
||||
local iconTable
|
||||
|
||||
if (not frame or (type (frame) == "string" and frame == "main") or (type (frame) == "number" and frame == 1)) then
|
||||
|
||||
if (not side or (type (side) == "string" and side == "left") or (type (side) == "number" and side == 1)) then
|
||||
frameTable = CoolTip.LeftIconTable
|
||||
elseif ((type (side) == "string" and side == "right") or (type (side) == "number" and side == 2)) then
|
||||
frameTable = CoolTip.RightIconTable
|
||||
elseif ((type (side) == "string" and side == "top") or (type (side) == "number" and side == 3)) then
|
||||
CoolTip.TopIcon = iconTexture
|
||||
return
|
||||
end
|
||||
|
||||
if (CoolTip.isSpecial) then
|
||||
@@ -1580,6 +1602,16 @@ function DetailsCreateCoolTip()
|
||||
frameTable = CoolTip.LeftIconTableSub
|
||||
elseif ((type (side) == "string" and side == "right") or (type (side) == "number" and side == 2)) then
|
||||
frameTable = CoolTip.RightIconTableSub
|
||||
elseif ((type (side) == "string" and side == "top") or (type (side) == "number" and side == 3)) then
|
||||
CoolTip.TopIconTableSub [CoolTip.Indexes] = CoolTip.TopIconTableSub [CoolTip.Indexes] or {}
|
||||
CoolTip.TopIconTableSub [CoolTip.Indexes] [1] = iconTexture
|
||||
CoolTip.TopIconTableSub [CoolTip.Indexes] [2] = iconWidth or 16
|
||||
CoolTip.TopIconTableSub [CoolTip.Indexes] [3] = iconHeight or 16
|
||||
CoolTip.TopIconTableSub [CoolTip.Indexes] [4] = L or 0
|
||||
CoolTip.TopIconTableSub [CoolTip.Indexes] [5] = R or 1
|
||||
CoolTip.TopIconTableSub [CoolTip.Indexes] [6] = T or 0
|
||||
CoolTip.TopIconTableSub [CoolTip.Indexes] [7] = B or 1
|
||||
return
|
||||
end
|
||||
|
||||
local subMenuContainerIcons = frameTable [CoolTip.Indexes]
|
||||
@@ -1927,9 +1959,11 @@ function DetailsCreateCoolTip()
|
||||
end
|
||||
end
|
||||
|
||||
local wait = 0.3
|
||||
|
||||
local InjectOnUpdateEnter = function (self, elapsed)
|
||||
elapsedTime = elapsedTime+elapsed
|
||||
if (elapsedTime > 0.3) then
|
||||
if (elapsedTime > wait) then
|
||||
self:SetScript ("OnUpdate", nil)
|
||||
CoolTip:ExecFunc (self)
|
||||
end
|
||||
@@ -1970,6 +2004,7 @@ function DetailsCreateCoolTip()
|
||||
CoolTip:ExecFunc (self)
|
||||
else
|
||||
elapsedTime = 0
|
||||
wait = self.CoolTip.ShowSpeed or 0.3
|
||||
self:SetScript ("OnUpdate", InjectOnUpdateEnter)
|
||||
end
|
||||
|
||||
|
||||
@@ -53,6 +53,13 @@
|
||||
</Layer>
|
||||
|
||||
<Layer level="OVERLAY">
|
||||
<!-- upper image -->
|
||||
<Texture name="$parent_UpperImage" hidden="true" parentKey="upperImage" file = "">
|
||||
<Anchors>
|
||||
<Anchor point="CENTER" relativeTo="$parent" relativePoint="CENTER" x="0" y="-3"/>
|
||||
<Anchor point="BOTTOM" relativeTo="$parent" relativePoint="TOP" x="0" y="-3"/>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
<!-- title icon -->
|
||||
<Texture name="$parent_TitleIcon" hidden="true" parentKey="titleIcon" file = "Interface\AddOns\Details\images\cooltip_selected">
|
||||
<Anchors>
|
||||
|
||||
@@ -86,6 +86,11 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
--> return the boss portrit
|
||||
function _detalhes:GetBossPortrait (mapid, bossindex)
|
||||
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters [bossindex].portrait
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> core
|
||||
|
||||
|
||||
@@ -20,6 +20,12 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
|
||||
_detalhes:CriarInstancia()
|
||||
|
||||
elseif (command ==Loc ["STRING_SLASH_SHOW_DESC"]) then
|
||||
|
||||
if (_detalhes.opened_windows == 0) then
|
||||
_detalhes:CriarInstancia()
|
||||
end
|
||||
|
||||
elseif (command == Loc ["STRING_SLASH_DISABLE"]) then
|
||||
|
||||
_detalhes:CaptureSet (false, "damage", true)
|
||||
@@ -197,6 +203,7 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
print (" ")
|
||||
print (Loc ["STRING_DETAILS1"] .. Loc ["STRING_COMMAND_LIST"])
|
||||
print ("|cffffaeae/details " .. Loc ["STRING_SLASH_NEW"] .. "|r: " .. Loc ["STRING_SLASH_NEW_DESC"])
|
||||
print ("|cffffaeae/details " .. Loc ["STRING_SLASH_SHOW"] .. "|r: " .. Loc ["STRING_SLASH_SHOW_DESC"])
|
||||
print ("|cffffaeae/details " .. Loc ["STRING_SLASH_ENABLE"] .. "|r: " .. Loc ["STRING_SLASH_ENABLE_DESC"])
|
||||
print ("|cffffaeae/details " .. Loc ["STRING_SLASH_DISABLE"] .. "|r: " .. Loc ["STRING_SLASH_DISABLE_DESC"])
|
||||
print ("|cffffaeae/details " .. Loc ["STRING_SLASH_OPTIONS"] .. "|r|cfffcffb0 <instance number>|r: " .. Loc ["STRING_SLASH_OPTIONS_DESC"])
|
||||
|
||||
@@ -369,8 +369,9 @@ do
|
||||
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
_detalhes.SpellOverwrite = {
|
||||
[124464] = {name = GetSpellInfo (124464) .. " " .. Loc ["STRING_MASTERY"]}, --> shadow word: pain mastery proc
|
||||
[124465] = {name = GetSpellInfo (124465) .. " " .. Loc ["STRING_MASTERY"]} --> vampiric touch mastery proc
|
||||
[124464] = {name = GetSpellInfo (124464) .. " (" .. Loc ["STRING_MASTERY"] .. ")"}, --> shadow word: pain mastery proc
|
||||
[124465] = {name = GetSpellInfo (124465) .. " (" .. Loc ["STRING_MASTERY"] .. ")"} --> vampiric touch mastery proc
|
||||
|
||||
}
|
||||
|
||||
end
|
||||
+110
-64
@@ -39,6 +39,12 @@ function _detalhes:ScheduleUpdate (instancia)
|
||||
instancia.barraS = {nil, nil}
|
||||
instancia.update = true
|
||||
if (instancia.showing) then
|
||||
instancia.atributo = instancia.atributo or 1
|
||||
|
||||
if (not instancia.showing [instancia.atributo]) then --> unknow very rare bug where showing transforms into a clean table
|
||||
instancia.showing = _detalhes.tabela_vigente
|
||||
end
|
||||
|
||||
instancia.showing [instancia.atributo].need_refresh = true
|
||||
end
|
||||
end
|
||||
@@ -1119,6 +1125,10 @@ local function barra_scripts (esta_barra, instancia, i)
|
||||
return
|
||||
end
|
||||
|
||||
if (button == "RightButton") then
|
||||
return _detalhes.switch:ShowMe (instancia)
|
||||
end
|
||||
|
||||
--if (button == "leftButton") then
|
||||
self.mouse_down = _GetTime()
|
||||
self.button = button
|
||||
@@ -1163,8 +1173,6 @@ local function barra_scripts (esta_barra, instancia, i)
|
||||
return _detalhes:ReportSingleLine (instancia, self)
|
||||
end
|
||||
instancia:AbreJanelaInfo (self.minha_tabela)
|
||||
else
|
||||
_detalhes.switch:ShowMe (instancia)
|
||||
end
|
||||
|
||||
end
|
||||
@@ -2472,14 +2480,14 @@ function gump:CriaCabecalho (BaseFrame, instancia)
|
||||
|
||||
local passou = 0
|
||||
if (_detalhes.popup.active) then
|
||||
passou = 0.3
|
||||
passou = 0.15
|
||||
end
|
||||
|
||||
local checked = instancia.modo or 2
|
||||
|
||||
self:SetScript ("OnUpdate", function (self, elapsed)
|
||||
passou = passou+elapsed
|
||||
if (passou > 0.3) then
|
||||
if (passou > 0.15) then
|
||||
self:SetScript ("OnUpdate", nil)
|
||||
|
||||
CoolTip:Reset()
|
||||
@@ -2549,14 +2557,12 @@ function gump:CriaCabecalho (BaseFrame, instancia)
|
||||
|
||||
local passou = 0
|
||||
if (_detalhes.popup.active) then
|
||||
passou = 0.3
|
||||
passou = 0.15
|
||||
end
|
||||
|
||||
local checked = instancia.segmento+2
|
||||
|
||||
self:SetScript ("OnUpdate", function (self, elapsed)
|
||||
passou = passou+elapsed
|
||||
if (passou > 0.3) then
|
||||
if (passou > 0.15) then
|
||||
|
||||
--> here we are using normal Add calls
|
||||
CoolTip:Reset()
|
||||
@@ -2564,26 +2570,108 @@ function gump:CriaCabecalho (BaseFrame, instancia)
|
||||
CoolTip:SetFixedParameter (instancia)
|
||||
CoolTip:SetColor ("main", "transparent")
|
||||
|
||||
----------- overall
|
||||
----------- segments
|
||||
--for i = 1, _detalhes.segments_amount do
|
||||
local menuIndex = 0
|
||||
for i = _detalhes.segments_amount, 1, -1 do
|
||||
|
||||
local thisCombat = _detalhes.tabela_historico.tabelas [i]
|
||||
if (thisCombat) then
|
||||
local enemy = thisCombat.is_boss and thisCombat.is_boss.name
|
||||
|
||||
if (thisCombat.is_boss and thisCombat.is_boss.name) then
|
||||
CoolTip:AddLine (thisCombat.is_boss.name .." ("..i..")", _, 1, "red")
|
||||
local portrait = _detalhes:GetBossPortrait (thisCombat.is_boss.mapid, thisCombat.is_boss.index)
|
||||
if (portrait) then
|
||||
CoolTip:AddIcon (portrait, 2, "top", 128, 64)
|
||||
end
|
||||
else
|
||||
enemy = thisCombat.enemy
|
||||
if (enemy) then
|
||||
CoolTip:AddLine (thisCombat.enemy .." ("..i..")", _, 1, "yellow")
|
||||
else
|
||||
CoolTip:AddLine (segmentos.past..i, _, 1, "silver")
|
||||
end
|
||||
end
|
||||
|
||||
CoolTip:AddMenu (1, instancia.TrocaTabela, i)
|
||||
CoolTip:AddIcon ("Interface\\QUESTFRAME\\UI-Quest-BulletPoint", "main", "left", 16, 16)
|
||||
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_ENEMY"] .. ":", enemy, 2, "white", "white")
|
||||
|
||||
local decorrido = (thisCombat.end_time or _detalhes._tempo) - thisCombat.start_time
|
||||
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
|
||||
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", thisCombat.data_inicio, 2, "white", "white")
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", thisCombat.data_fim or "in progress", 2, "white", "white")
|
||||
else
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_LOWER"] .. " #" .. i, _, 1, "gray")
|
||||
CoolTip:AddMenu (1, instancia.TrocaTabela, i)
|
||||
CoolTip:AddIcon ("Interface\\QUESTFRAME\\UI-Quest-BulletPoint", "main", "left", 16, 16)
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_EMPTY"], _, 2)
|
||||
end
|
||||
|
||||
if (menuIndex) then
|
||||
menuIndex = menuIndex + 1
|
||||
if (instancia.segmento == i) then
|
||||
CoolTip:SetLastSelected ("main", menuIndex)
|
||||
menuIndex = nil
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
----------- current
|
||||
CoolTip:AddLine (segmentos.current_standard, _, 1, "white")
|
||||
CoolTip:AddMenu (1, instancia.TrocaTabela, 0)
|
||||
CoolTip:AddIcon ("Interface\\QUESTFRAME\\UI-Quest-BulletPoint", "main", "left", 16, 16)
|
||||
|
||||
local enemy = _detalhes.tabela_vigente.is_boss and _detalhes.tabela_vigente.is_boss.name or _detalhes.tabela_vigente.enemy or "--x--x--"
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_ENEMY"] .. ":", enemy, 2, "white", "white")
|
||||
|
||||
if (not _detalhes.tabela_vigente.end_time) then
|
||||
if (_detalhes.in_combat) then
|
||||
local decorrido = _detalhes._tempo - _detalhes.tabela_vigente.start_time
|
||||
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
|
||||
else
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", "--x--x--", 2, "white", "white")
|
||||
end
|
||||
else
|
||||
local decorrido = (_detalhes.tabela_vigente.end_time) - _detalhes.tabela_vigente.start_time
|
||||
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
|
||||
end
|
||||
|
||||
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", _detalhes.tabela_vigente.data_inicio, 2, "white", "white")
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", _detalhes.tabela_vigente.data_fim or "in progress", 2, "white", "white")
|
||||
|
||||
if (instancia.segmento == 0) then
|
||||
CoolTip:SetLastSelected ("main", _detalhes.segments_amount + 1)
|
||||
menuIndex = nil
|
||||
end
|
||||
|
||||
----------- overall
|
||||
CoolTip:AddLine (segmentos.overall_standard, _, 1, "white")
|
||||
CoolTip:AddMenu (1, instancia.TrocaTabela, -1)
|
||||
CoolTip:AddIcon ("Interface\\QUESTFRAME\\UI-Quest-BulletPoint", "main", "left", 16, 16)
|
||||
|
||||
CoolTip:AddLine ("Enemy:", "--x--x--", 2, "white", "white")--localize-me
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_ENEMY"] .. ":", "--x--x--", 2, "white", "white")--localize-me
|
||||
|
||||
if (not _detalhes.tabela_overall.end_time) then
|
||||
if (_detalhes.in_combat) then
|
||||
local decorrido = _detalhes._tempo - _detalhes.tabela_overall.start_time
|
||||
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
|
||||
CoolTip:AddLine ("Time:", minutos.."m "..segundos.."s", 2, "white", "white") --localize-me
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
|
||||
else
|
||||
CoolTip:AddLine ("Time:", "--x--x--", 2, "white", "white") --localize-me
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", "--x--x--", 2, "white", "white")
|
||||
end
|
||||
else
|
||||
local decorrido = (_detalhes.tabela_overall.end_time) - _detalhes.tabela_overall.start_time
|
||||
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
|
||||
CoolTip:AddLine ("Time:", minutos.."m "..segundos.."s", 2, "white", "white") --localize-me
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
|
||||
end
|
||||
|
||||
local earlyFight = ""
|
||||
@@ -2593,7 +2681,7 @@ function gump:CriaCabecalho (BaseFrame, instancia)
|
||||
break
|
||||
end
|
||||
end
|
||||
CoolTip:AddLine ("Start:", earlyFight, 2, "white", "white")--localize-me
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", earlyFight, 2, "white", "white")
|
||||
|
||||
local lastFight = ""
|
||||
for i = 1, _detalhes.segments_amount do
|
||||
@@ -2602,59 +2690,14 @@ function gump:CriaCabecalho (BaseFrame, instancia)
|
||||
break
|
||||
end
|
||||
end
|
||||
CoolTip:AddLine ("End:", lastFight, 2, "white", "white")--localize-me
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", lastFight, 2, "white", "white")
|
||||
|
||||
----------- current
|
||||
|
||||
CoolTip:AddLine (segmentos.current_standard, _, 1, "white")
|
||||
CoolTip:AddMenu (1, instancia.TrocaTabela, 0)
|
||||
CoolTip:AddIcon ("Interface\\QUESTFRAME\\UI-Quest-BulletPoint", "main", "left", 16, 16)
|
||||
|
||||
local enemy = _detalhes.tabela_vigente.is_boss and _detalhes.tabela_vigente.is_boss.name or _detalhes.tabela_vigente.enemy or "--x--x--"
|
||||
CoolTip:AddLine ("Enemy:", enemy, 2, "white", "white")--localize-me
|
||||
|
||||
if (not _detalhes.tabela_vigente.end_time) then
|
||||
if (_detalhes.in_combat) then
|
||||
local decorrido = _detalhes._tempo - _detalhes.tabela_vigente.start_time
|
||||
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
|
||||
CoolTip:AddLine ("Time:", minutos.."m "..segundos.."s", 2, "white", "white") --localize-me
|
||||
else
|
||||
CoolTip:AddLine ("Time:", "--x--x--", 2, "white", "white") --localize-me
|
||||
end
|
||||
else
|
||||
local decorrido = (_detalhes.tabela_vigente.end_time) - _detalhes.tabela_vigente.start_time
|
||||
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
|
||||
CoolTip:AddLine ("Time:", minutos.."m "..segundos.."s", 2, "white", "white") --localize-me
|
||||
if (instancia.segmento == -1) then
|
||||
CoolTip:SetLastSelected ("main", _detalhes.segments_amount + 2)
|
||||
menuIndex = nil
|
||||
end
|
||||
|
||||
|
||||
CoolTip:AddLine ("Start:", _detalhes.tabela_vigente.data_inicio, 2, "white", "white")--localize-me
|
||||
CoolTip:AddLine ("End:", _detalhes.tabela_vigente.data_fim or "in progress", 2, "white", "white") --localize-me
|
||||
|
||||
----------- segments
|
||||
|
||||
for i = 1, _detalhes.segments_amount do
|
||||
CoolTip:AddLine (segmentos.past..i, _, 1, "white")
|
||||
CoolTip:AddMenu (1, instancia.TrocaTabela, i)
|
||||
CoolTip:AddIcon ("Interface\\QUESTFRAME\\UI-Quest-BulletPoint", "main", "left", 16, 16)
|
||||
|
||||
local thisCombat = _detalhes.tabela_historico.tabelas [i]
|
||||
if (thisCombat) then
|
||||
local enemy = thisCombat.is_boss and thisCombat.is_boss.name or thisCombat.enemy or "--x--x--"
|
||||
CoolTip:AddLine ("Enemy:", enemy, 2, "white", "white")--localize-me
|
||||
|
||||
local decorrido = (thisCombat.end_time or _detalhes._tempo) - thisCombat.start_time
|
||||
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
|
||||
CoolTip:AddLine ("Time:", minutos.."m "..segundos.."s", 2, "white", "white")--localize-me
|
||||
|
||||
CoolTip:AddLine ("Start:", thisCombat.data_inicio, 2, "white", "white")--localize-me
|
||||
CoolTip:AddLine ("End:", thisCombat.data_fim or "in progress", 2, "white", "white") --localize-me
|
||||
else
|
||||
CoolTip:AddLine ("Waiting a combat...", _, 2)--localize-me
|
||||
end
|
||||
end
|
||||
|
||||
CoolTip:SetLastSelected ("main", checked)
|
||||
---------------------------------------------
|
||||
|
||||
if (instancia.consolidate) then
|
||||
CoolTip:SetOwner (self, "topleft", "topright", 3)
|
||||
@@ -2729,6 +2772,7 @@ function gump:CriaCabecalho (BaseFrame, instancia)
|
||||
OnEnterFunc = function() BaseFrame.cabecalho.button_mouse_over = true; gump:Fade (BaseFrame.button_stretch, "alpha", 0.3) end,
|
||||
OnLeaveFunc = function() BaseFrame.cabecalho.button_mouse_over = false; gump:Fade (BaseFrame.button_stretch, -1) end,
|
||||
FixedValue = instancia,
|
||||
ShowSpeed = 0.15,
|
||||
Options = function()
|
||||
if (instancia.consolidate) then
|
||||
return {Anchor = instancia.consolidateFrame, MyAnchor = "topleft", RelativeAnchor = "topright", TextSize = _detalhes.font_sizes.menus}
|
||||
@@ -2835,6 +2879,8 @@ function gump:CriaCabecalho (BaseFrame, instancia)
|
||||
BaseFrame.cabecalho.novo.CoolTip = {
|
||||
--> cooltip type "menu" "tooltip" "tooltipbars"
|
||||
Type = "menu",
|
||||
--> how much time wait with mouse over the frame until cooltip show up
|
||||
ShowSpeed = 0.15,
|
||||
--> will call for build menu
|
||||
BuildFunc = BuildClosedInstanceMenu,
|
||||
--> a hook for OnEnterScript
|
||||
|
||||
@@ -18,6 +18,9 @@ if not Loc then return end
|
||||
--> Slash
|
||||
Loc ["STRING_COMMAND_LIST"] = "command list"
|
||||
|
||||
Loc ["STRING_SLASH_SHOW"] = "show"
|
||||
Loc ["STRING_SLASH_SHOW_DESC"] = "open a details window if none."
|
||||
|
||||
Loc ["STRING_SLASH_DISABLE"] = "disable"
|
||||
Loc ["STRING_SLASH_DISABLE_DESC"] = "turn off all captures of data."
|
||||
Loc ["STRING_SLASH_CAPTUREOFF"] = "all captures has been turned off."
|
||||
@@ -32,14 +35,18 @@ if not Loc then return end
|
||||
Loc ["STRING_SLASH_NEW"] = "new"
|
||||
Loc ["STRING_SLASH_NEW_DESC"] = "open or reopen a instance."
|
||||
|
||||
|
||||
|
||||
--> StatusBar Plugins
|
||||
Loc ["STRING_STATUSBAR_NOOPTIONS"] = "This widget doesn't have options."
|
||||
|
||||
--> Fights and Segments
|
||||
|
||||
Loc ["STRING_SEGMENT"] = "Segment"
|
||||
Loc ["STRING_SEGMENT_LOWER"] = "segment"
|
||||
Loc ["STRING_SEGMENT_EMPTY"] = "this segment is empty"
|
||||
Loc ["STRING_SEGMENT_START"] = "Start"
|
||||
Loc ["STRING_SEGMENT_END"] = "End"
|
||||
Loc ["STRING_SEGMENT_ENEMY"] = "Enemy"
|
||||
Loc ["STRING_SEGMENT_TIME"] = "Time"
|
||||
Loc ["STRING_TOTAL"] = "Total"
|
||||
Loc ["STRING_OVERALL"] = "Overall"
|
||||
Loc ["STRING_CURRENT"] = "Current"
|
||||
|
||||
@@ -18,6 +18,9 @@ if not Loc then return end
|
||||
--> Slash
|
||||
Loc ["STRING_COMMAND_LIST"] = "lista de comandos"
|
||||
|
||||
Loc ["STRING_SLASH_SHOW"] = "mostrar"
|
||||
Loc ["STRING_SLASH_SHOW_DESC"] = "abre uma janela caso nao tenha nenhuma aberta."
|
||||
|
||||
Loc ["STRING_SLASH_DISABLE"] = "desativar"
|
||||
Loc ["STRING_SLASH_DISABLE_DESC"] = "desliga todas as capturas de dados."
|
||||
Loc ["STRING_SLASH_CAPTUREOFF"] = "todas as capturas foram desligadas."
|
||||
@@ -38,6 +41,12 @@ if not Loc then return end
|
||||
--> Fights and Segments
|
||||
|
||||
Loc ["STRING_SEGMENT"] = "Segmento"
|
||||
Loc ["STRING_SEGMENT_LOWER"] = "segmento"
|
||||
Loc ["STRING_SEGMENT_EMPTY"] = "este segmento esta vazio"
|
||||
Loc ["STRING_SEGMENT_START"] = "Inicio"
|
||||
Loc ["STRING_SEGMENT_END"] = "Fim"
|
||||
Loc ["STRING_SEGMENT_ENEMY"] = "Contra"
|
||||
Loc ["STRING_SEGMENT_TIME"] = "Tempo"
|
||||
Loc ["STRING_TOTAL"] = "Total"
|
||||
Loc ["STRING_OVERALL"] = "Dados Gerais"
|
||||
Loc ["STRING_CURRENT"] = "Atual"
|
||||
|
||||
@@ -18,6 +18,7 @@ local throne_of_thunder = {
|
||||
icon = "Interface\\AddOns\\Details_RaidInfo-ThroneOfThunder\\images\\icon256x128",
|
||||
|
||||
background = "Interface\\AddOns\\Details_RaidInfo-ThroneOfThunder\\images\\raid_tot",
|
||||
backgroundEJ = [[Interface\EncounterJournal\UI-EJ-LOREBG-ThunderKingRaid]],
|
||||
|
||||
boss_names = {
|
||||
"Jin'rokh the Breaker",
|
||||
@@ -67,6 +68,7 @@ local throne_of_thunder = {
|
||||
[1] = {
|
||||
|
||||
boss = "Jin'rokh the Breaker",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Jinrokh the Breaker]],
|
||||
|
||||
spell_mechanics = {
|
||||
[137261] = {0x1, 0x40}, --> Lightning Storm
|
||||
@@ -107,6 +109,7 @@ local throne_of_thunder = {
|
||||
[2] = {
|
||||
|
||||
boss = "Horridon",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Horridon]],
|
||||
|
||||
spell_mechanics = {
|
||||
[136719] = {0x10}, --> Blazing Sunlight (Wastewalker)
|
||||
@@ -216,6 +219,7 @@ local throne_of_thunder = {
|
||||
------------> Concil of Elders ------------------------------------------------------------------------------
|
||||
[3] = {
|
||||
boss = "Council of Elders",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Council of Elders]],
|
||||
|
||||
--> this is a fix for twisted fate spell, due Mar'li adds comes with exactly the same name as the player name, the add spell are assigned to the player
|
||||
func = function()
|
||||
@@ -311,6 +315,7 @@ local throne_of_thunder = {
|
||||
------------> Tortos ------------------------------------------------------------------------------
|
||||
[4] = {
|
||||
boss = "Tortos",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Tortos]],
|
||||
|
||||
spell_mechanics = {
|
||||
[134476] = {0x1}, --> "Rockfall",
|
||||
@@ -345,6 +350,7 @@ local throne_of_thunder = {
|
||||
------------> Megaera ------------------------------------------------------------------------------
|
||||
[5] = {
|
||||
boss = "Megaera",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Megaera]],
|
||||
|
||||
spell_mechanics = {
|
||||
[139549] = {0x1}, --Rampage blue
|
||||
@@ -403,6 +409,7 @@ local throne_of_thunder = {
|
||||
------------> Ji-Kun ------------------------------------------------------------------------------
|
||||
[6] = {
|
||||
boss = "Ji'kun",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Ji Kun]],
|
||||
|
||||
spell_mechanics = {
|
||||
[134381] = {0x1}, --Quills
|
||||
@@ -448,6 +455,8 @@ local throne_of_thunder = {
|
||||
------------> Durumu the forgotten ------------------------------------------------------------------------------
|
||||
[7] = {
|
||||
boss = "Durumu the Forgotten",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Durumu]],
|
||||
|
||||
spell_mechanics = {
|
||||
[133732] = {0x1, 0x200}, --> Infrared Light
|
||||
[133738] = {0x1, 0x200}, --> Bright Light
|
||||
@@ -531,6 +540,8 @@ local throne_of_thunder = {
|
||||
------------> Primordius ------------------------------------------------------------------------------
|
||||
[8] = {
|
||||
boss = "Primordius",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Primordius]],
|
||||
|
||||
spell_mechanics = {
|
||||
[136220] = {0x1, 0x2000}, --> Acidic Explosion
|
||||
[136216] = {0x1, 0x40}, --> Caustic Gas
|
||||
@@ -571,6 +582,8 @@ local throne_of_thunder = {
|
||||
|
||||
[9] = {
|
||||
boss = "Dark Animus",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Dark Animus]],
|
||||
|
||||
spell_mechanics = {
|
||||
[139867] = {0x1, 0x3000}, --> Interrupting Jolt
|
||||
[138659] = {0x1}, --> Touch of the Animus
|
||||
@@ -606,6 +619,8 @@ local throne_of_thunder = {
|
||||
------------> Iron Qon ------------------------------------------------------------------------------
|
||||
[10] = {
|
||||
boss = "Iron Qon",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Iron Qon]],
|
||||
|
||||
spell_mechanics = {
|
||||
[136925] = {0x40}, --> Burning Blast
|
||||
[134628] = {0x200, 0x1}, --> Unleashed Flame
|
||||
@@ -710,6 +725,7 @@ local throne_of_thunder = {
|
||||
------------> Twin Consorts ------------------------------------------------------------------------------
|
||||
[11] = {
|
||||
boss = "Twin Consorts",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Empyreal Queens]],
|
||||
|
||||
spell_mechanics = {
|
||||
[137410] = {0x200, 0x1}, --> Blazing Radiance
|
||||
@@ -815,6 +831,7 @@ local throne_of_thunder = {
|
||||
------------> Lei Shen ------------------------------------------------------------------------------
|
||||
[12] = {
|
||||
boss = "Lei Shen",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Lei Shen]],
|
||||
|
||||
spell_mechanics = {
|
||||
[136889] = {0x2, 0x1}, --> Violent Gale Winds
|
||||
|
||||
@@ -38,16 +38,25 @@ local function CreatePluginFrames (data)
|
||||
ThreatMeter.Rows = {}
|
||||
--> current shown rows
|
||||
ThreatMeter.ShownRows = {}
|
||||
-->
|
||||
ThreatMeter.Actived = false
|
||||
|
||||
--> window reference
|
||||
local instance
|
||||
local player
|
||||
|
||||
function _detalhes:FadeOnShow()
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleIcon, "ALPHAANIM", 0.05)
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleText, "ALPHAANIM", 0.05)
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleText2, "IN", 0.5)
|
||||
end
|
||||
|
||||
--> OnEvent Table
|
||||
function ThreatMeter:OnDetailsEvent (event)
|
||||
|
||||
if (event == "HIDE") then --> plugin hidded, disabled
|
||||
ThreatMeterFrame:SetScript ("OnUpdate", nil)
|
||||
ThreatMeter.Actived = false
|
||||
ThreatMeter:Cancel()
|
||||
|
||||
elseif (event == "SHOW") then
|
||||
@@ -60,15 +69,19 @@ local function CreatePluginFrames (data)
|
||||
|
||||
ThreatMeter:SizeChanged()
|
||||
|
||||
if (ThreatMeter:IsInCombat()) then
|
||||
ThreatMeter:Start()
|
||||
end
|
||||
|
||||
player = UnitName ("player")
|
||||
ThreatMeterFrame:RegisterEvent ("PLAYER_TARGET_CHANGED")
|
||||
ThreatMeter.Actived = false
|
||||
_detalhes:ScheduleTimer ("FadeOnShow", 3)
|
||||
|
||||
if (ThreatMeter:IsInCombat()) then
|
||||
ThreatMeter.Actived = true
|
||||
ThreatMeter:Start()
|
||||
else
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleIcon, 0)
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleText, 0)
|
||||
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleText2, 0)
|
||||
end
|
||||
|
||||
elseif (event == "REFRESH") then --> requested a refresh window
|
||||
-->
|
||||
@@ -78,13 +91,17 @@ local function CreatePluginFrames (data)
|
||||
if (IsInGroup() or IsInRaid()) then
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleIcon, 1)
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleText, 1)
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleText2, 1)
|
||||
end
|
||||
ThreatMeter.Actived = true
|
||||
ThreatMeter:Start()
|
||||
|
||||
elseif (event == "COMBAT_PLAYER_LEAVE") then --> combat ended
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleIcon, 0)
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleText, 0)
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleIcon, "alpha", 0.05)
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleText, "alpha", 0.05)
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleText2, 1)
|
||||
ThreatMeter:End()
|
||||
ThreatMeter.Actived = false
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_ENDRESIZE" or event == "DETAILS_INSTANCE_SIZECHANGED") then
|
||||
ThreatMeter:SizeChanged()
|
||||
@@ -101,11 +118,14 @@ local function CreatePluginFrames (data)
|
||||
|
||||
ThreatMeterFrame:SetWidth (300)
|
||||
ThreatMeterFrame:SetHeight (100)
|
||||
|
||||
--[[
|
||||
ThreatMeterFrame:SetBackdrop ({
|
||||
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
|
||||
tile = true, tileSize = 16,
|
||||
insets = {left = 1, right = 1, top = 0, bottom = 1},})
|
||||
ThreatMeterFrame:SetBackdropColor (.3, .3, .3, .3)
|
||||
--]]
|
||||
|
||||
local icon1 = DetailsFrameWork:NewImage (ThreatMeterFrame, nil, nil, "titleIcon", 64, 64, [[Interface\HELPFRAME\HelpIcon-ItemRestoration]])
|
||||
icon1:SetPoint (10, -10)
|
||||
@@ -139,14 +159,6 @@ local function CreatePluginFrames (data)
|
||||
local timer = 0
|
||||
local interval = 1.0
|
||||
|
||||
function ThreatMeter:TargetChanged()
|
||||
local NewTarget = _UnitName ("target")
|
||||
if (NewTarget and not _UnitIsFriend ("player", "target")) then
|
||||
target = NewTarget
|
||||
end
|
||||
ThreatMeter:HideBars()
|
||||
end
|
||||
|
||||
local RoleIconCoord = {
|
||||
["TANK"] = {0, 0.28125, 0.328125, 0.625},
|
||||
["HEALER"] = {0.3125, 0.59375, 0, 0.296875},
|
||||
@@ -201,7 +213,14 @@ local function CreatePluginFrames (data)
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
--[[
|
||||
local percent = threat_actor [2]
|
||||
if (percentagem >= 50) then
|
||||
thisRow:SetColor ( percent/100, 1, 0, 1)
|
||||
else
|
||||
thisRow:SetColor ( 1, percent/100, 0, 1)
|
||||
end
|
||||
--]]
|
||||
local Threater = function()
|
||||
|
||||
local threat_table = {}
|
||||
@@ -238,11 +257,19 @@ local function CreatePluginFrames (data)
|
||||
thisRow:SetLeftText (threat_actor [1])
|
||||
thisRow:SetRightText (_cstr ("%.1f", threat_actor [2]).."%")
|
||||
thisRow:SetValue (threat_actor [2])
|
||||
|
||||
if (index == 1) then
|
||||
thisRow:SetColor (threat_actor [2]*0.01, math.abs (threat_actor [2]-100)*0.01, 0, 1)
|
||||
else
|
||||
thisRow:SetColor (threat_actor [2]*0.01, math.abs (threat_actor [2]-100)*0.01, 0, .3)
|
||||
local percent = threat_actor [2]
|
||||
if (percent >= 50) then
|
||||
thisRow:SetColor ( 1, math.abs (percent - 100)/100, 0, 1)
|
||||
else
|
||||
thisRow:SetColor ( percent/100, 1, 0, 1)
|
||||
end
|
||||
end
|
||||
|
||||
if (not thisRow.statusbar:IsShown()) then
|
||||
thisRow:Show()
|
||||
end
|
||||
@@ -268,10 +295,25 @@ local function CreatePluginFrames (data)
|
||||
end
|
||||
end
|
||||
|
||||
else
|
||||
--print ("nao tem target")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function ThreatMeter:TargetChanged()
|
||||
if (not ThreatMeter.Actived) then
|
||||
return
|
||||
end
|
||||
local NewTarget = _UnitName ("target")
|
||||
if (NewTarget and not _UnitIsFriend ("player", "target")) then
|
||||
target = NewTarget
|
||||
Threater()
|
||||
else
|
||||
ThreatMeter:HideBars()
|
||||
end
|
||||
end
|
||||
|
||||
local OnUpdate = function (self, elapsed)
|
||||
timer = timer + elapsed
|
||||
if (timer > interval) then
|
||||
@@ -280,17 +322,18 @@ local function CreatePluginFrames (data)
|
||||
--print ("aqui")
|
||||
Threater()
|
||||
--end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
function ThreatMeter:Start()
|
||||
ThreatMeter:HideBars()
|
||||
if (ThreatMeter.Actived) then
|
||||
if (_IsInRaid() or _IsInGroup()) then
|
||||
--print ("Iniciando analizador de Threat")
|
||||
ThreatMeterFrame:SetScript ("OnUpdate", OnUpdate)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function ThreatMeter:End()
|
||||
--print ("=== COMBAT LEAVE ===")
|
||||
@@ -306,7 +349,10 @@ end
|
||||
|
||||
function ThreatMeter:OnEvent (_, event, ...)
|
||||
|
||||
if (event == "ADDON_LOADED") then
|
||||
if (event == "PLAYER_TARGET_CHANGED") then
|
||||
ThreatMeter:TargetChanged()
|
||||
|
||||
elseif (event == "ADDON_LOADED") then
|
||||
local AddonName = select (1, ...)
|
||||
if (AddonName == "Details_TinyThreat") then
|
||||
|
||||
@@ -336,9 +382,6 @@ function ThreatMeter:OnEvent (_, event, ...)
|
||||
end
|
||||
end
|
||||
|
||||
elseif (event == "PLAYER_TARGET_CHANGED") then
|
||||
ThreatMeter:TargetChanged()
|
||||
|
||||
elseif (event == "PLAYER_LOGOUT") then
|
||||
_detalhes_databaseThreat = ThreatMeter.data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user