8.3.0 > 9.0.1
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
## Interface: 80300
|
||||
## Interface: 90001
|
||||
## Title: Details!: Storage
|
||||
## Notes: Stores information for Details! Damage Meter
|
||||
## DefaultState: Enabled
|
||||
|
||||
@@ -164,7 +164,7 @@ local function CreatePluginFrames (data)
|
||||
|
||||
--_detalhes:TimeDataRegister ("Raid Damage Done", damage_done_func, {last_damage = 0, max_damage = 0}, "Encounter Details", "v1.0", [[Interface\ICONS\Ability_DualWield]], true)
|
||||
_detalhes:TimeDataRegister ("Raid Damage Done", string_damage_done_func, nil, "Encounter Details", "v1.0", [[Interface\ICONS\Ability_DualWield]], true, true)
|
||||
|
||||
|
||||
if (EncounterDetails.db.show_icon == 4) then
|
||||
EncounterDetails:ShowIcon()
|
||||
elseif (EncounterDetails.db.show_icon == 5) then
|
||||
@@ -262,7 +262,7 @@ local function CreatePluginFrames (data)
|
||||
end
|
||||
|
||||
|
||||
--desativado, agora ele é gerenciado dentro do proprio details!
|
||||
--desativado, agora ele � gerenciado dentro do proprio details!
|
||||
function EncounterDetails:CreateCallbackListeners()
|
||||
|
||||
EncounterDetails.DBM_timers = {}
|
||||
@@ -272,7 +272,7 @@ local function CreatePluginFrames (data)
|
||||
local current_table_dbm = {}
|
||||
local current_table_bigwigs = {}
|
||||
|
||||
local event_frame = CreateFrame ("frame", nil, UIParent)
|
||||
local event_frame = CreateFrame ("frame", nil, UIParent, "BackdropTemplate")
|
||||
event_frame:SetScript ("OnEvent", function (self, event, ...)
|
||||
if (event == "ENCOUNTER_START") then
|
||||
local encounterID, encounterName, difficultyID, raidSize = select (1, ...)
|
||||
@@ -395,6 +395,7 @@ local function CreatePluginFrames (data)
|
||||
return
|
||||
end
|
||||
|
||||
--[=[
|
||||
local alert = CreateFrame ("frame", "EncounterDetailsTutorialAlertButton1", EncounterDetails.ToolbarButton, "MicroButtonAlertTemplate")
|
||||
alert:SetFrameLevel (302)
|
||||
alert.label = "Click here (on the skull icon) to bring the Encounter Breakdown panel"
|
||||
@@ -404,7 +405,7 @@ local function CreatePluginFrames (data)
|
||||
alert:SetPoint ("bottom", EncounterDetails.ToolbarButton, "top", 0, 22)
|
||||
alert.CloseButton:HookScript ("OnClick", hook_AlertButtonCloseButton)
|
||||
alert:Show()
|
||||
|
||||
--]=]
|
||||
--print ("showing ballon")
|
||||
end
|
||||
|
||||
@@ -435,54 +436,7 @@ local function CreatePluginFrames (data)
|
||||
end
|
||||
|
||||
function EncounterDetails:ShowTutorial()
|
||||
--EncounterDetails.db.AlertTutorialStep = 1
|
||||
if (not EncounterDetails.Frame:IsShown()) then
|
||||
return
|
||||
end
|
||||
|
||||
local antTable = {
|
||||
Throttle = 0.050,
|
||||
AmountParts = 15,
|
||||
TexturePartsWidth = 167.4,
|
||||
TexturePartsHeight = 83.6,
|
||||
TextureWidth = 512,
|
||||
TextureHeight = 512,
|
||||
BlendMode = "ADD",
|
||||
Color = color,
|
||||
Texture = [[Interface\AddOns\Plater\images\ants_rectangle]],
|
||||
}
|
||||
|
||||
local left, right, top, bottom = 0, 0, 4, -6
|
||||
local DF = DetailsFrameWork
|
||||
|
||||
if (not Details:GetTutorialCVar ("ENCOUNTER_BREAKDOWN_CHART")) then
|
||||
local f = DF:CreateAnts (EncounterDetails.Frame.buttonSwitchGraphic.widget, antTable, -27 + (left or 0), 25 + (right or 0), 5 + (top or 0), -7 + (bottom or 0))
|
||||
f:SetFrameLevel (EncounterDetails.Frame:GetFrameLevel() + 1)
|
||||
f:SetAlpha (ALPHA_BLEND_AMOUNT - 0.549845)
|
||||
EncounterDetails.Frame.buttonSwitchGraphic.AntsFrame = f
|
||||
end
|
||||
|
||||
if (not Details:GetTutorialCVar ("ENCOUNTER_BREAKDOWN_PHASES")) then
|
||||
local f = DF:CreateAnts (EncounterDetails.Frame.buttonSwitchPhases.widget, antTable, -27 + (left or 0), 25 + (right or 0), 5 + (top or 0), -7 + (bottom or 0))
|
||||
f:SetFrameLevel (EncounterDetails.Frame:GetFrameLevel() + 1)
|
||||
f:SetAlpha (ALPHA_BLEND_AMOUNT - 0.549845)
|
||||
EncounterDetails.Frame.buttonSwitchPhases.AntsFrame = f
|
||||
end
|
||||
|
||||
if (not Details:GetTutorialCVar ("ENCOUNTER_BREAKDOWN_EMOTES")) then
|
||||
local f = DF:CreateAnts (EncounterDetails.Frame.buttonSwitchBossEmotes.widget, antTable, -27 + (left or 0), 25 + (right or 0), 5 + (top or 0), -7 + (bottom or 0))
|
||||
f:SetFrameLevel (EncounterDetails.Frame:GetFrameLevel() + 1)
|
||||
f:SetAlpha (ALPHA_BLEND_AMOUNT - 0.549845)
|
||||
EncounterDetails.Frame.buttonSwitchBossEmotes.AntsFrame = f
|
||||
end
|
||||
|
||||
if (not Details:GetTutorialCVar ("ENCOUNTER_BREAKDOWN_SPELLAURAS")) then
|
||||
local f = DF:CreateAnts (EncounterDetails.Frame.buttonSwitchSpellsAuras.widget, antTable, -27 + (left or 0), 25 + (right or 0), 5 + (top or 0), -7 + (bottom or 0))
|
||||
f:SetFrameLevel (EncounterDetails.Frame:GetFrameLevel() + 1)
|
||||
f:SetAlpha (ALPHA_BLEND_AMOUNT - 0.549845)
|
||||
EncounterDetails.Frame.buttonSwitchSpellsAuras.AntsFrame = f
|
||||
end
|
||||
|
||||
--deprecated
|
||||
end
|
||||
|
||||
EncounterDetailsFrame:HookScript ("OnShow", function()
|
||||
@@ -631,7 +585,7 @@ local function CreatePluginFrames (data)
|
||||
_detalhes.EncounterDetailsTempWindow (EncounterDetails)
|
||||
_detalhes.EncounterDetailsTempWindow = nil
|
||||
|
||||
--> ~remover ~autoabrir ãbrir ~abrir ~auto
|
||||
--> ~remover ~autoabrir �brir ~abrir ~auto
|
||||
--C_Timer.After (.5, EncounterDetails.OpenWindow)
|
||||
|
||||
|
||||
@@ -844,8 +798,8 @@ local function KickBy (magia, barra)
|
||||
|
||||
_table_sort (tabela_jogadores, _detalhes.Sort2)
|
||||
|
||||
local spellName, _, spellIcon = GetSpellInfo (barra.texto_esquerdo:GetText())
|
||||
GameCooltip:AddLine (barra.texto_esquerdo:GetText())
|
||||
local spellName, _, spellIcon = GetSpellInfo (barra.lineText1:GetText())
|
||||
GameCooltip:AddLine (barra.lineText1:GetText())
|
||||
if (spellIcon) then
|
||||
GameCooltip:AddIcon (spellIcon, nil, 1, EncounterDetails.CooltipLineHeight, EncounterDetails.CooltipLineHeight, 5/64, 59/64, 5/64, 59/64)
|
||||
end
|
||||
@@ -893,7 +847,7 @@ local function EnemySkills (habilidade, barra)
|
||||
|
||||
_table_sort (tabela_jogadores, _detalhes.Sort2)
|
||||
|
||||
GameCooltip:AddLine (barra.texto_esquerdo:GetText() .. " Damage Done")
|
||||
GameCooltip:AddLine (barra.lineText1:GetText() .. " Damage Done")
|
||||
|
||||
local ToK = _detalhes.ToKFunctions [_detalhes.ps_abbreviation]
|
||||
|
||||
@@ -948,7 +902,7 @@ local function DamageTakenDetails (jogador, barra)
|
||||
|
||||
for nome, _ in _pairs (agressores) do --> agressores seria a lista de nomes
|
||||
local este_agressor = showing._ActorTable[showing._NameIndexTable[nome]]
|
||||
if (este_agressor) then --> checagem por causa do total e do garbage collector que não limpa os nomes que deram dano
|
||||
if (este_agressor) then --> checagem por causa do total e do garbage collector que n�o limpa os nomes que deram dano
|
||||
local habilidades = este_agressor.spells._ActorTable
|
||||
for id, habilidade in _pairs (habilidades) do
|
||||
local alvos = habilidade.targets
|
||||
@@ -963,7 +917,7 @@ local function DamageTakenDetails (jogador, barra)
|
||||
|
||||
_table_sort (meus_agressores, _detalhes.Sort2)
|
||||
|
||||
GameCooltip:AddLine (barra.texto_esquerdo:GetText() .. " Damage Taken")
|
||||
GameCooltip:AddLine (barra.lineText1:GetText() .. " Damage Taken")
|
||||
|
||||
local max = #meus_agressores
|
||||
if (max > 20) then
|
||||
@@ -1013,9 +967,9 @@ function _detalhes:BossInfoRowClick (barra, param1)
|
||||
|
||||
local reportar
|
||||
|
||||
if (barra.TTT == "morte" or true) then --> deaths -- todos os boxes estão usando cooltip, por isso o 'true'.
|
||||
if (barra.TTT == "morte" or true) then --> deaths -- todos os boxes est�o usando cooltip, por isso o 'true'.
|
||||
|
||||
reportar = {barra.report_text .. " " .. (barra.texto_esquerdo and barra.texto_esquerdo:GetText() or barra:GetParent() and barra:GetParent().texto_esquerdo and barra:GetParent().texto_esquerdo:GetText() or "")}
|
||||
reportar = {barra.report_text .. " " .. (barra.lineText1 and barra.lineText1:GetText() or barra:GetParent() and barra:GetParent().lineText1 and barra:GetParent().lineText1:GetText() or "")}
|
||||
local beginAt = 1
|
||||
if (barra.TTT == "damage_taken" or barra.TTT == "habilidades_inimigas" or barra.TTT == "total_interrupt" or barra.TTT == "add") then
|
||||
beginAt = 2
|
||||
@@ -1176,6 +1130,8 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
|
||||
_G [frame:GetName().."SegmentsDropdown"].MyObject:Refresh()
|
||||
|
||||
EncounterDetailsFrame.ShowType = EncounterDetails.db.last_section_selected
|
||||
|
||||
if (segment) then
|
||||
_combat_object = EncounterDetails:GetCombat (segment)
|
||||
EncounterDetails._segment = segment
|
||||
@@ -1221,9 +1177,9 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
|
||||
if (EncounterDetails.debugmode and not _combat_object.is_boss) then
|
||||
_combat_object.is_boss = {
|
||||
index = 1,
|
||||
index = 1,
|
||||
name = "Immerseus",
|
||||
zone = "Siege of Orggrimar",
|
||||
zone = "Siege of Orggrimar",
|
||||
mapid = 1136,
|
||||
encounter = "Immerseus"
|
||||
}
|
||||
@@ -1266,12 +1222,12 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
|
||||
--> the segment is a boss
|
||||
|
||||
DebugMessage ("segment are OKAY, updating the panel")
|
||||
|
||||
boss_id = _combat_object.is_boss.index
|
||||
map_id = _combat_object.is_boss.mapid
|
||||
boss_info = _detalhes:GetBossDetails (_combat_object.is_boss.mapid, _combat_object.is_boss.index)
|
||||
|
||||
EncounterDetails.Frame.switch(EncounterDetailsFrame.ShowType)
|
||||
|
||||
if (EncounterDetailsFrame.ShowType == "phases") then
|
||||
EncounterDetailsPhaseFrame.OnSelectPhase (1)
|
||||
|
||||
@@ -1280,13 +1236,9 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
|
||||
elseif (EncounterDetailsFrame.ShowType == "spellsauras") then
|
||||
--refresh spells and auras
|
||||
local actor = EncounterDetails.build_actor_menu() [1]
|
||||
actor = actor and actor.value
|
||||
if (actor) then
|
||||
_G [EncounterDetailsFrame:GetName() .. "EnemyActorSpellsDropdown"].MyObject:Select (actor)
|
||||
EncounterDetails.update_enemy_spells (actor)
|
||||
end
|
||||
--EncounterDetails.SpellScrollframe:Refresh()
|
||||
EncounterDetails.update_enemy_spells()
|
||||
EncounterDetails.update_bossmods()
|
||||
end
|
||||
|
||||
EncounterDetails.LastSegmentShown = _combat_object
|
||||
@@ -1340,7 +1292,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
for index, jogador in _ipairs (DamageContainer._ActorTable) do
|
||||
--> ta em ordem de quem tomou mais dano.
|
||||
|
||||
if (not jogador.grupo) then --> só aparecer nego da raid
|
||||
if (not jogador.grupo) then --> s� aparecer nego da raid
|
||||
break
|
||||
end
|
||||
|
||||
@@ -1348,19 +1300,19 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
local barra = container.barras [index]
|
||||
if (not barra) then
|
||||
barra = EncounterDetails:CreateRow (index, container, 1, 0, -1)
|
||||
_detalhes:SetFontSize (barra.texto_esquerdo, CONST_FONT_SIZE)
|
||||
_detalhes:SetFontSize (barra.texto_direita, CONST_FONT_SIZE)
|
||||
_detalhes:SetFontSize (barra.lineText1, CONST_FONT_SIZE)
|
||||
_detalhes:SetFontSize (barra.lineText4, CONST_FONT_SIZE)
|
||||
barra.TTT = "damage_taken" -- tool tip type --> damage taken
|
||||
barra.report_text = Loc ["STRING_PLUGIN_NAME"].."! "..Loc ["STRING_DAMAGE_TAKEN_REPORT"]
|
||||
end
|
||||
|
||||
if (jogador.nome:find ("-")) then
|
||||
barra.texto_esquerdo:SetText (jogador.nome:gsub (("-.*"), ""))
|
||||
barra.lineText1:SetText (jogador.nome:gsub (("-.*"), ""))
|
||||
else
|
||||
barra.texto_esquerdo:SetText (jogador.nome)
|
||||
barra.lineText1:SetText (jogador.nome)
|
||||
end
|
||||
|
||||
barra.texto_direita:SetText (ToK (_, jogador.damage_taken))
|
||||
barra.lineText4:SetText (ToK (_, jogador.damage_taken))
|
||||
|
||||
_detalhes:name_space (barra)
|
||||
|
||||
@@ -1408,7 +1360,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
--> Container Overall Habilidades Inimigas ~damage taken by spell
|
||||
local habilidades_poll = {}
|
||||
|
||||
--> pega as magias contínuas presentes em todas as fases
|
||||
--> pega as magias cont�nuas presentes em todas as fases
|
||||
--deprecated
|
||||
if (boss_info and boss_info.continuo) then
|
||||
for index, spellid in _ipairs (boss_info.continuo) do
|
||||
@@ -1450,7 +1402,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
for id, habilidade in _pairs (habilidades) do
|
||||
--if (habilidades_poll [id]) then
|
||||
--> esse jogador usou uma habilidade do boss
|
||||
local esta_habilidade = habilidades_usadas [id] --> tabela não numerica, pq diferentes monstros podem castar a mesma magia
|
||||
local esta_habilidade = habilidades_usadas [id] --> tabela n�o numerica, pq diferentes monstros podem castar a mesma magia
|
||||
if (not esta_habilidade) then
|
||||
esta_habilidade = {0, {}, {}, id} --> [1] total dano causado [2] jogadores que foram alvos [3] jogadores que castaram essa magia [4] ID da magia
|
||||
habilidades_usadas [id] = esta_habilidade
|
||||
@@ -1470,7 +1422,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
local alvos = habilidade.targets
|
||||
for target_name, amount in _pairs (alvos) do
|
||||
|
||||
--> ele tem o nome do jogador, vamos ver se este alvo é realmente um jogador verificando na tabela do combate
|
||||
--> ele tem o nome do jogador, vamos ver se este alvo � realmente um jogador verificando na tabela do combate
|
||||
local tabela_dano_do_jogador = DamageContainer._ActorTable [DamageContainer._NameIndexTable [target_name]]
|
||||
if (tabela_dano_do_jogador and tabela_dano_do_jogador.grupo) then
|
||||
if (not esta_habilidade[2] [target_name]) then
|
||||
@@ -1489,7 +1441,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
for id, habilidade in _pairs (habilidades) do
|
||||
if (habilidades_poll [id]) then
|
||||
--> esse jogador usou uma habilidade do boss
|
||||
local esta_habilidade = habilidades_usadas [id] --> tabela não numerica, pq diferentes monstros podem castar a mesma magia
|
||||
local esta_habilidade = habilidades_usadas [id] --> tabela n�o numerica, pq diferentes monstros podem castar a mesma magia
|
||||
if (not esta_habilidade) then
|
||||
esta_habilidade = {0, {}, {}, id} --> [1] total dano causado [2] jogadores que foram alvos [3] jogadores que castaram essa magia [4] ID da magia
|
||||
habilidades_usadas [id] = esta_habilidade
|
||||
@@ -1509,7 +1461,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
local alvos = habilidade.targets
|
||||
for target_name, amount in _pairs (alvos) do
|
||||
|
||||
--> ele tem o nome do jogador, vamos ver se este alvo é realmente um jogador verificando na tabela do combate
|
||||
--> ele tem o nome do jogador, vamos ver se este alvo � realmente um jogador verificando na tabela do combate
|
||||
local tabela_dano_do_jogador = DamageContainer._ActorTable [DamageContainer._NameIndexTable [target_name]]
|
||||
if (tabela_dano_do_jogador and tabela_dano_do_jogador.grupo) then
|
||||
if (not esta_habilidade[2] [target_name]) then
|
||||
@@ -1567,15 +1519,15 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
barra = EncounterDetails:CreateRow (index, container, 1, 0, -1)
|
||||
barra.TTT = "habilidades_inimigas" -- tool tip type --enemy abilities
|
||||
barra.report_text = Loc ["STRING_PLUGIN_NAME"].."! " .. Loc ["STRING_ABILITY_DAMAGE"]
|
||||
_detalhes:SetFontSize (barra.texto_esquerdo, CONST_FONT_SIZE)
|
||||
_detalhes:SetFontSize (barra.texto_direita, CONST_FONT_SIZE)
|
||||
_detalhes:SetFontSize (barra.lineText1, CONST_FONT_SIZE)
|
||||
_detalhes:SetFontSize (barra.lineText4, CONST_FONT_SIZE)
|
||||
barra.t:SetVertexColor (1, .8, .8, .8)
|
||||
end
|
||||
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (habilidade[4])
|
||||
|
||||
barra.texto_esquerdo:SetText (nome_magia) -- .. " (|cFFa0a0a0" .. habilidade[4] .. "|r)
|
||||
barra.texto_direita:SetText (ToK (_, habilidade[1]))
|
||||
barra.lineText1:SetText (nome_magia) -- .. " (|cFFa0a0a0" .. habilidade[4] .. "|r)
|
||||
barra.lineText4:SetText (ToK (_, habilidade[1]))
|
||||
|
||||
_detalhes:name_space (barra)
|
||||
|
||||
@@ -1614,7 +1566,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
|
||||
--> Identificar os ADDs da luta:
|
||||
|
||||
--> declara a pool onde serão armazenados os adds existentas na luta
|
||||
--> declara a pool onde ser�o armazenados os adds existentas na luta
|
||||
local adds_pool = {}
|
||||
|
||||
--> pega as habilidades que pertence especificamente a cada fase
|
||||
@@ -1637,14 +1589,14 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
|
||||
for index, jogador in _ipairs (DamageContainer._ActorTable) do
|
||||
|
||||
--> só estou interessado nos adds, conferir pelo nome
|
||||
--> s� estou interessado nos adds, conferir pelo nome
|
||||
if (adds_pool [_detalhes:GetNpcIdFromGuid (jogador.serial)] or (
|
||||
jogador.flag_original and
|
||||
bit.band (jogador.flag_original, 0x00000060) ~= 0 and
|
||||
(not jogador.owner or (_bit_band (jogador.owner.flag_original, 0x00000060) ~= 0 and not jogador.owner.grupo and _bit_band (jogador.owner.flag_original, 0x00000400) == 0)) and --isn't a pet or the owner isn't a player
|
||||
not jogador.grupo and
|
||||
_bit_band (jogador.flag_original, 0x00000400) == 0
|
||||
)) then --> é um inimigo ou neutro
|
||||
)) then --> � um inimigo ou neutro
|
||||
|
||||
local nome = jogador.nome
|
||||
|
||||
@@ -1703,7 +1655,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
|
||||
EncounterDetails:FormatCooltipSettings()
|
||||
|
||||
GameCooltip:AddLine (barra.texto_esquerdo:GetText().." ".. "Damage Done")
|
||||
GameCooltip:AddLine (barra.lineText1:GetText().." ".. "Damage Done")
|
||||
|
||||
local topDamage = dano_em[1] and dano_em[1][2]
|
||||
|
||||
@@ -1750,7 +1702,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
|
||||
EncounterDetails:FormatCooltipSettings()
|
||||
|
||||
GameCooltip:AddLine (barra.texto_esquerdo:GetText().." "..Loc ["STRING_DAMAGE_TAKEN"])
|
||||
GameCooltip:AddLine (barra.lineText1:GetText().." "..Loc ["STRING_DAMAGE_TAKEN"])
|
||||
|
||||
local damage_from_total = tabela.damage_from_total
|
||||
local topDamage = damage_from[1] and damage_from[1][2]
|
||||
@@ -1830,7 +1782,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
barra:SetScript ("OnLeave", _OnHide)
|
||||
barra:HookScript ("OnMouseDown", EncounterDetails.BossInfoRowClick)
|
||||
|
||||
local add_damage_done = _CreateFrame ("Button", nil, barra)
|
||||
local add_damage_done = _CreateFrame ("Button", nil, barra, "BackdropTemplate")
|
||||
barra.report_text = "Details! Tamage Taken of "
|
||||
add_damage_done.report_text = "Details! Damage Done of "
|
||||
add_damage_done.barra = barra
|
||||
@@ -1853,19 +1805,19 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
add_damage_done:SetScript ("OnLeave", _OnHide)
|
||||
add_damage_done:SetScript ("OnClick", EncounterDetails.BossInfoRowClick)
|
||||
|
||||
barra.texto_esquerdo:SetPoint ("left", add_damage_done, "right", 2, 0)
|
||||
barra.lineText1:SetPoint ("left", add_damage_done, "right", 2, 0)
|
||||
barra.textura:SetStatusBarTexture (nil)
|
||||
|
||||
_detalhes:SetFontSize (barra.texto_esquerdo, CONST_FONT_SIZE)
|
||||
_detalhes:SetFontSize (barra.texto_direita, CONST_FONT_SIZE)
|
||||
_detalhes:SetFontSize (barra.lineText1, CONST_FONT_SIZE)
|
||||
_detalhes:SetFontSize (barra.lineText4, CONST_FONT_SIZE)
|
||||
|
||||
barra.TTT = "add"
|
||||
add_damage_done.TTT = "add"
|
||||
end
|
||||
|
||||
barra.texto_esquerdo:SetText (addName)
|
||||
barra.texto_direita:SetText (_detalhes:ToK (esta_tabela.damage_from_total))
|
||||
barra.texto_esquerdo:SetSize (barra:GetWidth() - barra.texto_direita:GetStringWidth() - 34, 15)
|
||||
barra.lineText1:SetText (addName)
|
||||
barra.lineText4:SetText (_detalhes:ToK (esta_tabela.damage_from_total))
|
||||
barra.lineText1:SetSize (barra:GetWidth() - barra.lineText4:GetStringWidth() - 34, 15)
|
||||
|
||||
barra.jogador = esta_tabela --> barra.jogador agora tem a tabela com --> [1] total dano causado [2] jogadores que foram alvos [3] jogadores que castaram essa magia [4] ID da magia
|
||||
|
||||
@@ -1903,7 +1855,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
local habilidades_interrompidas = {}
|
||||
|
||||
for index, jogador in _ipairs (misc._ActorTable) do
|
||||
if (not jogador.grupo) then --> só aparecer nego da raid
|
||||
if (not jogador.grupo) then --> s� aparecer nego da raid
|
||||
break
|
||||
end
|
||||
|
||||
@@ -1914,11 +1866,11 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
--> vai ter [spellid] = quantidade
|
||||
|
||||
for spellid, amt in _pairs (oque_interrompi) do
|
||||
if (not habilidades_interrompidas [spellid]) then --> se a spell não tiver na pool, cria a tabela dela
|
||||
if (not habilidades_interrompidas [spellid]) then --> se a spell n�o tiver na pool, cria a tabela dela
|
||||
habilidades_interrompidas [spellid] = {{}, 0, spellid} --> tabela com quem interrompeu e o total de vezes que a habilidade foi interrompida
|
||||
end
|
||||
|
||||
if (not habilidades_interrompidas [spellid] [1] [jogador.nome]) then --> se o jogador não tiver na pool dessa habilidade interrompida, cria um indice pra ele.
|
||||
if (not habilidades_interrompidas [spellid] [1] [jogador.nome]) then --> se o jogador n�o tiver na pool dessa habilidade interrompida, cria um indice pra ele.
|
||||
habilidades_interrompidas [spellid] [1] [jogador.nome] = {0, jogador.classe}
|
||||
end
|
||||
|
||||
@@ -1943,8 +1895,8 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
local barra = container.barras [index]
|
||||
if (not barra) then
|
||||
barra = EncounterDetails:CreateRow (index, container, 3, 0, -6)
|
||||
_detalhes:SetFontSize (barra.texto_esquerdo, CONST_FONT_SIZE)
|
||||
_detalhes:SetFontSize (barra.texto_direita, CONST_FONT_SIZE)
|
||||
_detalhes:SetFontSize (barra.lineText1, CONST_FONT_SIZE)
|
||||
_detalhes:SetFontSize (barra.lineText4, CONST_FONT_SIZE)
|
||||
barra.TTT = "total_interrupt" -- tool tip type
|
||||
barra.report_text = "Details! ".. Loc ["STRING_INTERRUPTS_OF"]
|
||||
barra:SetWidth (155)
|
||||
@@ -1962,9 +1914,9 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
end
|
||||
end
|
||||
|
||||
barra.texto_esquerdo:SetText (nome_magia)
|
||||
barra.lineText1:SetText (nome_magia)
|
||||
local total = successful + tabela [2]
|
||||
barra.texto_direita:SetText (tabela [2] .. " / ".. total)
|
||||
barra.lineText4:SetText (tabela [2] .. " / ".. total)
|
||||
|
||||
_detalhes:name_space (barra)
|
||||
|
||||
@@ -2012,7 +1964,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
local habilidades_dispeladas = {}
|
||||
|
||||
for index, jogador in _ipairs (misc._ActorTable) do
|
||||
if (not jogador.grupo) then --> só aparecer nego da raid
|
||||
if (not jogador.grupo) then --> s� aparecer nego da raid
|
||||
break
|
||||
end
|
||||
|
||||
@@ -2026,11 +1978,11 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
--print ("dispell: " .. jogador.classe .. " nome: " .. jogador.nome)
|
||||
|
||||
for spellid, amt in _pairs (oque_dispelei) do
|
||||
if (not habilidades_dispeladas [spellid]) then --> se a spell não tiver na pool, cria a tabela dela
|
||||
if (not habilidades_dispeladas [spellid]) then --> se a spell n�o tiver na pool, cria a tabela dela
|
||||
habilidades_dispeladas [spellid] = {{}, 0, spellid} --> tabela com quem dispolou e o total de vezes que a habilidade foi dispelada
|
||||
end
|
||||
|
||||
if (not habilidades_dispeladas [spellid] [1] [jogador.nome]) then --> se o jogador não tiver na pool dessa habilidade interrompida, cria um indice pra ele.
|
||||
if (not habilidades_dispeladas [spellid] [1] [jogador.nome]) then --> se o jogador n�o tiver na pool dessa habilidade interrompida, cria um indice pra ele.
|
||||
habilidades_dispeladas [spellid] [1] [jogador.nome] = {0, jogador.classe}
|
||||
--print (jogador.nome)
|
||||
--print (jogador.classe)
|
||||
@@ -2057,8 +2009,8 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
local barra = container.barras [index]
|
||||
if (not barra) then
|
||||
barra = EncounterDetails:CreateRow (index, container, 3, 3, -6)
|
||||
_detalhes:SetFontSize (barra.texto_esquerdo, CONST_FONT_SIZE)
|
||||
_detalhes:SetFontSize (barra.texto_direita, CONST_FONT_SIZE)
|
||||
_detalhes:SetFontSize (barra.lineText1, CONST_FONT_SIZE)
|
||||
_detalhes:SetFontSize (barra.lineText4, CONST_FONT_SIZE)
|
||||
barra.TTT = "dispell" -- tool tip type
|
||||
barra.report_text = "Details! ".. Loc ["STRING_DISPELLS_OF"]
|
||||
barra:SetWidth (160)
|
||||
@@ -2066,8 +2018,8 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (tabela [3])
|
||||
|
||||
barra.texto_esquerdo:SetText (nome_magia)
|
||||
barra.texto_direita:SetText (tabela [2])
|
||||
barra.lineText1:SetText (nome_magia)
|
||||
barra.lineText4:SetText (tabela [2])
|
||||
|
||||
_detalhes:name_space (barra)
|
||||
|
||||
@@ -2107,10 +2059,10 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
|
||||
quantidade = 0
|
||||
|
||||
-- boss_info.spells_info o erro de lua do boss é a habilidade dele que não foi declarada ainda
|
||||
-- boss_info.spells_info o erro de lua do boss � a habilidade dele que n�o foi declarada ainda
|
||||
|
||||
local mortes = _combat_object.last_events_tables
|
||||
local habilidades_info = boss_info and boss_info.spell_mechanics or {} --barra.extra pega esse cara aqui --> então esse erro é das habilidades que não tao
|
||||
local habilidades_info = boss_info and boss_info.spell_mechanics or {} --barra.extra pega esse cara aqui --> ent�o esse erro � das habilidades que n�o tao
|
||||
|
||||
for index, tabela in _ipairs (mortes) do
|
||||
--> {esta_morte, time, este_jogador.nome, este_jogador.classe, _UnitHealthMax (alvo_name), minutos.."m "..segundos.."s", ["dead"] = true}
|
||||
@@ -2119,8 +2071,8 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
barra = EncounterDetails:CreateRow (index, container, 3, 0, 1)
|
||||
barra.TTT = "morte" -- tool tip type
|
||||
barra.report_text = "Details! " .. Loc ["STRING_DEAD_LOG"]
|
||||
_detalhes:SetFontSize (barra.texto_esquerdo, CONST_FONT_SIZE)
|
||||
_detalhes:SetFontSize (barra.texto_direita, CONST_FONT_SIZE)
|
||||
_detalhes:SetFontSize (barra.lineText1, CONST_FONT_SIZE)
|
||||
_detalhes:SetFontSize (barra.lineText4, CONST_FONT_SIZE)
|
||||
barra:SetWidth (169)
|
||||
|
||||
local overlayTexture = barra:CreateTexture (nil, "overlay")
|
||||
@@ -2132,12 +2084,12 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
end
|
||||
|
||||
if (tabela [3]:find ("-")) then
|
||||
barra.texto_esquerdo:SetText (index..". "..tabela [3]:gsub (("-.*"), ""))
|
||||
barra.lineText1:SetText (index..". "..tabela [3]:gsub (("-.*"), ""))
|
||||
else
|
||||
barra.texto_esquerdo:SetText (index..". "..tabela [3])
|
||||
barra.lineText1:SetText (index..". "..tabela [3])
|
||||
end
|
||||
|
||||
barra.texto_direita:SetText (tabela [6])
|
||||
barra.lineText4:SetText (tabela [6])
|
||||
|
||||
_detalhes:name_space (barra)
|
||||
|
||||
@@ -2239,6 +2191,7 @@ function EncounterDetails:OnEvent (_, event, ...)
|
||||
encounter_timers_dbm = {},
|
||||
encounter_timers_bw = {},
|
||||
window_scale = 1,
|
||||
last_section_selected = "main",
|
||||
}
|
||||
|
||||
--> Install
|
||||
@@ -2285,7 +2238,7 @@ function EncounterDetails:OnEvent (_, event, ...)
|
||||
EncounterDetailsFrame:RegisterEvent ("ENCOUNTER_END")
|
||||
EncounterDetails.EnemySpellPool = EncounterDetails.charsaved.encounter_spells
|
||||
enemy_spell_pool = EncounterDetails.EnemySpellPool
|
||||
EncounterDetails.CLEvents = CreateFrame ("frame", nil, UIParent)
|
||||
EncounterDetails.CLEvents = CreateFrame ("frame", nil, UIParent, "BackdropTemplate")
|
||||
EncounterDetails.CLEvents:SetScript ("OnEvent", CLEvents)
|
||||
EncounterDetails.CLEvents:Hide()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Interface: 80300
|
||||
## Interface: 90001
|
||||
## Title: Details!: Encounter Breakdown (plugin)
|
||||
## Notes: Show detailed information about a boss encounter. Also provide damage per phase, graphic charts, easy weakauras creation.
|
||||
## RequiredDeps: Details
|
||||
@@ -14,4 +14,4 @@ enUS.lua
|
||||
ptBR.lua
|
||||
frames.lua
|
||||
|
||||
Details_EncounterDetails.lua
|
||||
Details_EncounterDetails.lua
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
|
||||
..\FrameXML\UI.xsd">
|
||||
<Script file="AceLocale-3.0.lua"/>
|
||||
</Ui>
|
||||
</Ui>
|
||||
|
||||
@@ -38,4 +38,4 @@ assert(newOldMinor == 3) -- previous version was 3 (even though it gave a string
|
||||
|
||||
local newLib, newOldMinor = LibStub:NewLibrary("Pants", 5) -- register a new library, using a normal number instead of a string
|
||||
assert(newLib)
|
||||
assert(newOldMinor == 4) -- previous version was 4 (even though it gave a string)
|
||||
assert(newOldMinor == 4) -- previous version was 4 (even though it gave a string)
|
||||
|
||||
@@ -11,4 +11,4 @@ assert(not success or not ret) -- either error because proxy is not a string or
|
||||
|
||||
assert(not pcall(LibStub.NewLibrary, LibStub, "Something", "No number in here")) -- should error, minor has no string in it.
|
||||
|
||||
assert(not LibStub:GetLibrary("Something", true)) -- shouldn't've created it from the above statement
|
||||
assert(not LibStub:GetLibrary("Something", true)) -- shouldn't've created it from the above statement
|
||||
|
||||
@@ -38,4 +38,4 @@ loadfile("../LibStub.lua")()
|
||||
assert(LibStub.IterateLibraries == 123)
|
||||
|
||||
|
||||
print("OK")
|
||||
print("OK")
|
||||
|
||||
@@ -65,4 +65,4 @@ Loc ["STRING_KILLADD"] = "killadd"
|
||||
Loc ["STRING_SPREADOUT"] = "spreadout"
|
||||
Loc ["STRING_STOPCAST"] = "stopcast"
|
||||
Loc ["STRING_FACING"] = "facing"
|
||||
Loc ["STRING_STACK"] = "stack"
|
||||
Loc ["STRING_STACK"] = "stack"
|
||||
|
||||
@@ -179,7 +179,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
end
|
||||
|
||||
function EncounterDetails:CreateRowTexture (row)
|
||||
row.textura = CreateFrame ("StatusBar", nil, row)
|
||||
row.textura = CreateFrame ("StatusBar", nil, row, "BackdropTemplate")
|
||||
row.textura:SetAllPoints (row)
|
||||
local t = row.textura:CreateTexture (nil, "overlay")
|
||||
t:SetTexture (EncounterDetails.Frame.DefaultBarTexture)
|
||||
@@ -189,22 +189,22 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
row.textura:SetStatusBarColor (.5, .5, .5, 0)
|
||||
row.textura:SetMinMaxValues (0,100)
|
||||
|
||||
row.texto_esquerdo = row.textura:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
|
||||
row.texto_esquerdo:SetPoint ("LEFT", row.textura, "LEFT", 22, -1)
|
||||
row.texto_esquerdo:SetJustifyH ("LEFT")
|
||||
row.texto_esquerdo:SetTextColor (1,1,1,1)
|
||||
row.lineText1 = row.textura:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
|
||||
row.lineText1:SetPoint ("LEFT", row.textura, "LEFT", 22, -1)
|
||||
row.lineText1:SetJustifyH ("LEFT")
|
||||
row.lineText1:SetTextColor (1,1,1,1)
|
||||
|
||||
row.texto_direita = row.textura:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
|
||||
row.texto_direita:SetPoint ("RIGHT", row.textura, "RIGHT", -2, 0)
|
||||
row.texto_direita:SetJustifyH ("RIGHT")
|
||||
row.texto_direita:SetTextColor (1,1,1,1)
|
||||
row.lineText4 = row.textura:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
|
||||
row.lineText4:SetPoint ("RIGHT", row.textura, "RIGHT", -2, 0)
|
||||
row.lineText4:SetJustifyH ("RIGHT")
|
||||
row.lineText4:SetTextColor (1,1,1,1)
|
||||
|
||||
row.textura:Show()
|
||||
end
|
||||
|
||||
function EncounterDetails:CreateRow (index, container, x_mod, y_mod, width_mod)
|
||||
|
||||
local barra = CreateFrame ("Button", "Details_"..container:GetName().."_barra_"..index, container)
|
||||
local barra = CreateFrame ("Button", "Details_"..container:GetName().."_barra_"..index, container,"BackdropTemplate")
|
||||
|
||||
x_mod = x_mod or 0
|
||||
width_mod = width_mod or 0
|
||||
@@ -212,7 +212,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
local default_height = EncounterDetails.Frame.DefaultBarHeight
|
||||
|
||||
barra:SetWidth (200 + width_mod) --> tamanho da barra de acordo com o tamanho da janela
|
||||
barra:SetHeight (default_height) --> altura determinada pela instância
|
||||
barra:SetHeight (default_height) --> altura determinada pela inst�ncia
|
||||
|
||||
local y = (index-1)*(default_height + 1)
|
||||
y_mod = y_mod or 0
|
||||
@@ -398,7 +398,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
function EncounterDetails:DrawSegmentGraphic (g, graphicData, combat, drawDeathsCombat)
|
||||
|
||||
local _data = {}
|
||||
local dps_max = graphicData.max_value
|
||||
local dps_max = graphicData.max_value or 0
|
||||
local amount = #graphicData
|
||||
|
||||
local scaleW = 1/670
|
||||
@@ -494,7 +494,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
|
||||
if (not vRowFrame) then
|
||||
|
||||
vRowFrame = CreateFrame ("frame", "DetailsEncountersVerticalLine"..i, g)
|
||||
vRowFrame = CreateFrame ("frame", "DetailsEncountersVerticalLine"..i, g, "BackdropTemplate")
|
||||
vRowFrame:SetWidth (20)
|
||||
vRowFrame:SetHeight (43)
|
||||
vRowFrame:SetFrameLevel (g:GetFrameLevel()+2)
|
||||
@@ -582,7 +582,8 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
g:SetAxisDrawing (false,false)
|
||||
g:SetAxisColor({1.0,1.0,1.0,1.0})
|
||||
g:SetAutoScale (true)
|
||||
g:SetLineTexture ("smallline")
|
||||
--g:SetLineTexture ("smallline")
|
||||
g:SetLineTexture([[Interface\AddOns\Details_EncounterDetails\images\line.tga]])
|
||||
g:SetBorderSize ("right", 0.001)
|
||||
g.VerticalLines = {}
|
||||
g.TryIndicator = {}
|
||||
@@ -594,7 +595,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
}
|
||||
|
||||
--> build the phase panel
|
||||
local phase_panel = CreateFrame ("frame", "EncounterDetailsPhasePanel", g)
|
||||
local phase_panel = CreateFrame ("frame", "EncounterDetailsPhasePanel", g, "BackdropTemplate")
|
||||
phase_panel:SetFrameStrata ("TOOLTIP")
|
||||
phase_panel:SetWidth (CONST_PHASE_PANEL_WIDTH)
|
||||
phase_panel:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16,
|
||||
@@ -882,7 +883,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
local texture = g.PhaseTextures [index]
|
||||
|
||||
if (not texture) then
|
||||
local f = CreateFrame ("frame", "EncounterDetailsPhaseTexture" .. index, g)
|
||||
local f = CreateFrame ("frame", "EncounterDetailsPhaseTexture" .. index, g, "BackdropTemplate")
|
||||
f:SetHeight (CONST_PHASE_BAR_HEIGHT)
|
||||
|
||||
local t = f:CreateTexture (nil, "artwork")
|
||||
@@ -1043,7 +1044,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
BossFrame.bg1:SetAllPoints()
|
||||
|
||||
--title bar
|
||||
local titlebar = CreateFrame ("frame", nil, BossFrame)
|
||||
local titlebar = CreateFrame ("frame", nil, BossFrame,"BackdropTemplate")
|
||||
titlebar:SetPoint ("topleft", BossFrame, "topleft", 2, -3)
|
||||
titlebar:SetPoint ("topright", BossFrame, "topright", -2, -3)
|
||||
titlebar:SetHeight (20)
|
||||
@@ -1061,7 +1062,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
name_bg_texture:SetVertexColor (0, 0, 0, 0.2)
|
||||
|
||||
--> header background
|
||||
local headerFrame = CreateFrame ("frame", "EncounterDetailsHeaderFrame", BossFrame)
|
||||
local headerFrame = CreateFrame ("frame", "EncounterDetailsHeaderFrame", BossFrame,"BackdropTemplate")
|
||||
headerFrame:EnableMouse (false)
|
||||
headerFrame:SetPoint ("topleft", titlebar, "bottomleft", 0, -1)
|
||||
headerFrame:SetPoint ("topright", titlebar, "bottomright", 0, -1)
|
||||
@@ -1120,7 +1121,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
BossFrame.raidbackground:SetDrawLayer ("BORDER", 2)
|
||||
BossFrame.raidbackground:SetAlpha (0.1)
|
||||
|
||||
--> botão fechar
|
||||
--> bot�o fechar
|
||||
titlebar.CloseButton = CreateFrame ("Button", nil, titlebar, "UIPanelCloseButton")
|
||||
titlebar.CloseButton:SetWidth (20)
|
||||
titlebar.CloseButton:SetHeight (20)
|
||||
@@ -1187,6 +1188,14 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
end
|
||||
end
|
||||
|
||||
local resetSelectedButtonTemplate = function()
|
||||
BossFrame.buttonSwitchNormal:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
BossFrame.buttonSwitchSpellsAuras:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
BossFrame.buttonSwitchPhases:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
BossFrame.buttonSwitchGraphic:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
BossFrame.buttonSwitchBossEmotes:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
end
|
||||
|
||||
BossFrame.switch = function (to, _, to2)
|
||||
if (type (to) == "string") then
|
||||
to = to
|
||||
@@ -1194,25 +1203,17 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
to = to2
|
||||
end
|
||||
|
||||
for _, button in ipairs (BossFrame.AllButtons) do
|
||||
button:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
end
|
||||
|
||||
if (not BossFrame:IsShown()) then
|
||||
Details:OpenPlugin ("DETAILS_PLUGIN_ENCOUNTER_DETAILS")
|
||||
end
|
||||
|
||||
BossFrame.DBMBars:Hide()
|
||||
BossFrame.BigWigsBars:Hide()
|
||||
BossFrame.label_dbm_bars:Hide()
|
||||
BossFrame.label_bw_bars:Hide()
|
||||
|
||||
EncounterDetailsPhaseFrame:Hide()
|
||||
resetSelectedButtonTemplate()
|
||||
|
||||
if (to == "main") then
|
||||
BossFrame.raidbackground:Show()
|
||||
|
||||
for _, frame in _ipairs (BossFrame.Widgets) do
|
||||
for _, frame in _ipairs (BossFrame.Widgets) do
|
||||
frame:Show()
|
||||
end
|
||||
|
||||
@@ -1224,8 +1225,10 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
BossFrame.segmentosDropdown:Enable()
|
||||
|
||||
BossFrame.buttonSwitchNormal:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTONSELECTED_TEMPLATE"))
|
||||
|
||||
EncounterDetails.db.last_section_selected = BossFrame.ShowType
|
||||
|
||||
elseif (to == "spellsauras") then
|
||||
elseif (to == "spellsauras") then
|
||||
|
||||
_detalhes:SetTutorialCVar ("ENCOUNTER_BREAKDOWN_SPELLAURAS", true)
|
||||
if (EncounterDetails.Frame.buttonSwitchSpellsAuras.AntsFrame) then
|
||||
@@ -1245,28 +1248,17 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
end
|
||||
|
||||
BossFrame.ShowType = "spellsauras"
|
||||
|
||||
-- show spells box
|
||||
local actor = EncounterDetails.build_actor_menu() [1]
|
||||
actor = actor and actor.value
|
||||
if (actor) then
|
||||
_G [BossFrame:GetName() .. "EnemyActorSpellsDropdown"].MyObject:Select (actor)
|
||||
EncounterDetails.update_enemy_spells (actor)
|
||||
end
|
||||
|
||||
EncounterDetails.update_enemy_spells()
|
||||
EncounterDetails.update_bossmods()
|
||||
|
||||
BossFrame.segmentosDropdown:Enable()
|
||||
|
||||
BossFrame.DBMBars:Show()
|
||||
BossFrame.BigWigsBars:Show()
|
||||
BossFrame.label_dbm_bars:Show()
|
||||
BossFrame.label_bw_bars:Show()
|
||||
|
||||
BossFrame.DBMBars:Refresh()
|
||||
BossFrame.BigWigsBars:Refresh()
|
||||
|
||||
BossFrame.buttonSwitchSpellsAuras:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTONSELECTED_TEMPLATE"))
|
||||
|
||||
EncounterDetails.db.last_section_selected = BossFrame.ShowType
|
||||
|
||||
elseif (to == "emotes") then
|
||||
elseif (to == "emotes") then
|
||||
|
||||
_detalhes:SetTutorialCVar ("ENCOUNTER_BREAKDOWN_EMOTES", true)
|
||||
if (EncounterDetails.Frame.buttonSwitchBossEmotes.AntsFrame) then
|
||||
@@ -1274,14 +1266,14 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
end
|
||||
|
||||
--hide boss frames
|
||||
for _, frame in _ipairs (BossFrame.Widgets) do
|
||||
for _, frame in _ipairs (BossFrame.Widgets) do
|
||||
frame:Hide()
|
||||
end
|
||||
|
||||
BossFrame.raidbackground:Show()
|
||||
|
||||
--hide graph
|
||||
if (_G.DetailsRaidDpsGraph) then
|
||||
if (_G.DetailsRaidDpsGraph) then
|
||||
_G.DetailsRaidDpsGraph:Hide()
|
||||
for i = 1, 8, 1 do
|
||||
BossFrame["dpsamt"..i]:Hide()
|
||||
@@ -1309,8 +1301,10 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
BossFrame.segmentosDropdown:Disable()
|
||||
|
||||
BossFrame.buttonSwitchBossEmotes:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTONSELECTED_TEMPLATE"))
|
||||
|
||||
EncounterDetails.db.last_section_selected = BossFrame.ShowType
|
||||
|
||||
elseif (to == "phases") then
|
||||
elseif (to == "phases") then
|
||||
|
||||
_detalhes:SetTutorialCVar ("ENCOUNTER_BREAKDOWN_PHASES", true)
|
||||
if (EncounterDetails.Frame.buttonSwitchPhases.AntsFrame) then
|
||||
@@ -1327,8 +1321,10 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
EncounterDetailsPhaseFrame:Show()
|
||||
|
||||
BossFrame.buttonSwitchPhases:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTONSELECTED_TEMPLATE"))
|
||||
|
||||
EncounterDetails.db.last_section_selected = BossFrame.ShowType
|
||||
|
||||
elseif (to == "graph") then
|
||||
elseif (to == "graph") then
|
||||
|
||||
_detalhes:SetTutorialCVar ("ENCOUNTER_BREAKDOWN_CHART", true)
|
||||
if (EncounterDetails.Frame.buttonSwitchGraphic.AntsFrame) then
|
||||
@@ -1370,6 +1366,8 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
BossFrame.segmentosDropdown:Enable()
|
||||
|
||||
BossFrame.buttonSwitchGraphic:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTONSELECTED_TEMPLATE"))
|
||||
|
||||
EncounterDetails.db.last_section_selected = BossFrame.ShowType
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1383,77 +1381,41 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
|
||||
--summary
|
||||
BossFrame.buttonSwitchNormal = _detalhes.gump:CreateButton (BossFrame, BossFrame.switch, BUTTON_WIDTH, BUTTON_HEIGHT, "Summary", "main")
|
||||
BossFrame.buttonSwitchNormal:SetPoint ("TOPLEFT", BossFrame, "TOPLEFT", HEADER_MENUBUTTONS_X, HEADER_MENUBUTTONS_Y)
|
||||
BossFrame.buttonSwitchNormal:SetIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 18, 18, "overlay", {0, 0.1015625, 0, 0.505625})
|
||||
BossFrame.buttonSwitchNormal:SetIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 18, 18, "overlay", {0, 32/256, 0, 0.505625})
|
||||
BossFrame.buttonSwitchNormal:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTONSELECTED_TEMPLATE"))
|
||||
BossFrame.buttonSwitchNormal:SetWidth (BUTTON_WIDTH)
|
||||
|
||||
--spells e auras
|
||||
BossFrame.buttonSwitchSpellsAuras = _detalhes.gump:CreateButton (BossFrame, BossFrame.switch, BUTTON_WIDTH, BUTTON_HEIGHT, "Timers & Spells", "spellsauras")
|
||||
BossFrame.buttonSwitchSpellsAuras:SetIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 18, 18, "overlay", {33/256, 64/256, 0, 0.505625})
|
||||
BossFrame.buttonSwitchSpellsAuras:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
BossFrame.buttonSwitchSpellsAuras:SetWidth (BUTTON_WIDTH)
|
||||
BossFrame.AllButtons = {BossFrame.buttonSwitchNormal, BossFrame.buttonSwitchGraphic, BossFrame.buttonSwitchBossEmotes, BossFrame.buttonSwitchSpellsAuras, BossFrame.buttonSwitchPhases}
|
||||
|
||||
--phases
|
||||
BossFrame.buttonSwitchPhases = _detalhes.gump:CreateButton (BossFrame, BossFrame.switch, BUTTON_WIDTH, BUTTON_HEIGHT, "Phases", "phases")
|
||||
BossFrame.buttonSwitchPhases:SetPoint ("left", BossFrame.buttonSwitchNormal, "right", HEADER_MENUBUTTONS_SPACEMENT, 0)
|
||||
BossFrame.buttonSwitchPhases:SetIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 18, 18, "overlay", {151/256, 176/256, 0, 0.505625})
|
||||
BossFrame.buttonSwitchPhases:SetIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 18, 18, "overlay", {65/256, 96/256, 0, 0.505625})
|
||||
BossFrame.buttonSwitchPhases:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
BossFrame.buttonSwitchPhases:SetWidth (BUTTON_WIDTH)
|
||||
|
||||
--chart
|
||||
BossFrame.buttonSwitchGraphic = _detalhes.gump:CreateButton (BossFrame, BossFrame.switch, BUTTON_WIDTH, BUTTON_HEIGHT, "Charts", "graph")
|
||||
BossFrame.buttonSwitchGraphic:SetPoint ("left", BossFrame.buttonSwitchPhases, "right", HEADER_MENUBUTTONS_SPACEMENT, 0)
|
||||
BossFrame.buttonSwitchGraphic:SetIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 18, 18, "overlay", {0.1271875, 0.21875, 0, 0.505625})
|
||||
BossFrame.buttonSwitchGraphic = _detalhes.gump:CreateButton (BossFrame, BossFrame.switch, BUTTON_WIDTH, BUTTON_HEIGHT, "Damage Graphic", "graph")
|
||||
BossFrame.buttonSwitchGraphic:SetIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 18, 18, "overlay", {97/256, 128/256, 0, 0.505625})
|
||||
BossFrame.buttonSwitchGraphic:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
BossFrame.buttonSwitchGraphic:SetWidth (BUTTON_WIDTH)
|
||||
|
||||
--emotes
|
||||
BossFrame.buttonSwitchBossEmotes = _detalhes.gump:CreateButton (BossFrame, BossFrame.switch, BUTTON_WIDTH, BUTTON_HEIGHT, "Emotes", "emotes")
|
||||
BossFrame.buttonSwitchBossEmotes:SetPoint ("left", BossFrame.buttonSwitchGraphic, "right", HEADER_MENUBUTTONS_SPACEMENT, 0)
|
||||
BossFrame.buttonSwitchBossEmotes:SetIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 18, 18, "overlay", {91/256, 116/256, 0, 0.505625})
|
||||
BossFrame.buttonSwitchBossEmotes:SetIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 18, 18, "overlay", {129/256, 160/256, 0, 0.505625})
|
||||
BossFrame.buttonSwitchBossEmotes:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
BossFrame.buttonSwitchBossEmotes:SetWidth (BUTTON_WIDTH)
|
||||
|
||||
--spells e auras
|
||||
BossFrame.buttonSwitchSpellsAuras = _detalhes.gump:CreateButton (BossFrame, BossFrame.switch, BUTTON_WIDTH, BUTTON_HEIGHT, "WeakAuras", "spellsauras")
|
||||
BossFrame.buttonSwitchSpellsAuras:SetPoint ("left", BossFrame.buttonSwitchBossEmotes, "right", HEADER_MENUBUTTONS_SPACEMENT, 0)
|
||||
BossFrame.buttonSwitchSpellsAuras:SetIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 18, 18, "overlay", {121/256, 146/256, 0, 0.505625})
|
||||
BossFrame.buttonSwitchSpellsAuras:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
BossFrame.buttonSwitchSpellsAuras:SetWidth (BUTTON_WIDTH)
|
||||
|
||||
BossFrame.AllButtons = {BossFrame.buttonSwitchNormal, BossFrame.buttonSwitchGraphic, BossFrame.buttonSwitchBossEmotes, BossFrame.buttonSwitchSpellsAuras, BossFrame.buttonSwitchPhases}
|
||||
|
||||
--tooltips
|
||||
BossFrame.buttonSwitchNormal.MouseOnEnterHook = function()
|
||||
GameCooltip:Reset()
|
||||
GameCooltip:AddLine (Loc ["STRING_FIGHT_SUMMARY"], nil, nil, "orange", nil, 12)
|
||||
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
|
||||
GameCooltip:ShowCooltip (BossFrame.buttonSwitchNormal, "tooltip")
|
||||
end
|
||||
BossFrame.buttonSwitchNormal.MouseOnLeaveHook = function() _detalhes.popup:ShowMe (false); t:SetBlendMode ("BLEND") end
|
||||
--
|
||||
BossFrame.buttonSwitchGraphic.MouseOnEnterHook = function()
|
||||
GameCooltip:Reset()
|
||||
GameCooltip:AddLine (Loc ["STRING_FIGHT_GRAPHIC"], nil, nil, "orange", nil, 12)
|
||||
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
|
||||
GameCooltip:ShowCooltip (BossFrame.buttonSwitchGraphic, "tooltip")
|
||||
end
|
||||
BossFrame.buttonSwitchGraphic.MouseOnLeaveHook = function() _detalhes.popup:ShowMe (false); g:SetBlendMode ("BLEND") end
|
||||
--
|
||||
BossFrame.buttonSwitchBossEmotes:SetHook ("OnEnter", function()
|
||||
GameCooltip:Reset()
|
||||
GameCooltip:AddLine (Loc ["STRING_FIGHT_EMOTES"], nil, nil, "orange", nil, 12)
|
||||
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
|
||||
GameCooltip:ShowCooltip (BossFrame.buttonSwitchBossEmotes, "tooltip")
|
||||
end)
|
||||
BossFrame.buttonSwitchBossEmotes:SetHook ("OnLeave", function()
|
||||
_detalhes.popup:ShowMe (false);
|
||||
end)
|
||||
--
|
||||
BossFrame.buttonSwitchSpellsAuras:SetHook ("OnEnter", function()
|
||||
GameCooltip:Reset()
|
||||
GameCooltip:AddLine (Loc ["STRING_FIGHT_SPELLS"], nil, nil, "orange", nil, 12)
|
||||
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
|
||||
GameCooltip:ShowCooltip (BossFrame.buttonSwitchSpellsAuras, "tooltip")
|
||||
end)
|
||||
BossFrame.buttonSwitchSpellsAuras:SetHook ("OnLeave", function()
|
||||
_detalhes.popup:ShowMe (false);
|
||||
end)
|
||||
--anchors
|
||||
BossFrame.buttonSwitchNormal:SetPoint ("TOPLEFT", BossFrame, "TOPLEFT", HEADER_MENUBUTTONS_X, HEADER_MENUBUTTONS_Y)
|
||||
BossFrame.buttonSwitchSpellsAuras:SetPoint ("left", BossFrame.buttonSwitchNormal, "right", HEADER_MENUBUTTONS_SPACEMENT, 0)
|
||||
BossFrame.buttonSwitchPhases:SetPoint ("left", BossFrame.buttonSwitchSpellsAuras, "right", HEADER_MENUBUTTONS_SPACEMENT, 0)
|
||||
BossFrame.buttonSwitchGraphic:SetPoint ("left", BossFrame.buttonSwitchPhases, "right", HEADER_MENUBUTTONS_SPACEMENT, 0)
|
||||
BossFrame.buttonSwitchBossEmotes:SetPoint ("left", BossFrame.buttonSwitchGraphic, "right", HEADER_MENUBUTTONS_SPACEMENT, 0)
|
||||
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> ~emotes
|
||||
@@ -1541,7 +1503,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
bar_div_emotes:Hide()
|
||||
tinsert (BossFrame.EmoteWidgets, bar_div_emotes)
|
||||
|
||||
scrollframe = CreateFrame ("ScrollFrame", "EncounterDetails_EmoteScroll", BossFrame, "FauxScrollFrameTemplate")
|
||||
scrollframe = CreateFrame ("ScrollFrame", "EncounterDetails_EmoteScroll", BossFrame, "FauxScrollFrameTemplate, BackdropTemplate")
|
||||
scrollframe:SetScript ("OnVerticalScroll", function (self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, 14, refresh_emotes) end)
|
||||
scrollframe:SetPoint ("topleft", BossFrame, "topleft", 249, -75)
|
||||
scrollframe:SetPoint ("bottomright", BossFrame, "bottomright", -33, 42)
|
||||
@@ -1597,7 +1559,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
end
|
||||
|
||||
for i = 1, CONST_EMOTES_MAX_LINES do
|
||||
local line = CreateFrame ("frame", nil, BossFrame)
|
||||
local line = CreateFrame ("frame", nil, BossFrame,"BackdropTemplate")
|
||||
local y = (i-1) * 15 * -1
|
||||
line:SetPoint ("topleft", scrollframe, "topleft", 0, y)
|
||||
line:SetPoint ("topright", scrollframe, "topright", 0, y)
|
||||
@@ -1783,17 +1745,13 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
|
||||
BossFrame.EnemySpellsWidgets = {}
|
||||
|
||||
--> spells and auras ~auras ~spell ~weakaura ãura
|
||||
--> spells and auras ~auras ~spell ~weakaura �ura
|
||||
|
||||
local CONST_MAX_AURA_LINES = 22
|
||||
local CONST_MAX_AURA_LINES = 21
|
||||
|
||||
|
||||
-- actor dropdown
|
||||
|
||||
local EnemyActorSpells_label = DetailsFrameWork:CreateLabel (BossFrame, "Enemy Unit:", 11, nil, "GameFontHighlightSmall")
|
||||
EnemyActorSpells_label:SetPoint ("topleft", BossFrame, "topleft", 10, -85)
|
||||
|
||||
local spell_blocks = {}
|
||||
local bossmods_blocks = {}
|
||||
|
||||
local on_focus_gain = function (self)
|
||||
self:HighlightText()
|
||||
@@ -1806,7 +1764,16 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
local on_enter_spell = function (self)
|
||||
if (self.MyObject._spellid) then
|
||||
GameTooltip:SetOwner (self, "ANCHOR_TOPLEFT")
|
||||
GameTooltip:SetSpellByID (self.MyObject._spellid)
|
||||
|
||||
if (type(self.MyObject._spellid) == "string") then
|
||||
local spellId = self.MyObject._spellid:gsub("%a", "")
|
||||
spellId = tonumber(spellId)
|
||||
if (spellId) then
|
||||
GameTooltip:SetSpellByID(spellId)
|
||||
end
|
||||
else
|
||||
GameTooltip:SetSpellByID(self.MyObject._spellid)
|
||||
end
|
||||
GameTooltip:Show()
|
||||
|
||||
self:SetBackdropColor (1, 1, 1, .5)
|
||||
@@ -1852,17 +1819,67 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
GameCooltip:Hide()
|
||||
self:SetBackdropColor (.3, .3, .3, .5)
|
||||
end
|
||||
|
||||
|
||||
local bossModsTitle = DetailsFrameWork:CreateLabel (BossFrame, "Boss Mods Time Bars:", 12, "orange")
|
||||
bossModsTitle:SetPoint(10, -85)
|
||||
tinsert (BossFrame.EnemySpellsWidgets, bossModsTitle)
|
||||
bossModsTitle:Hide()
|
||||
|
||||
local bossSpellsTitle = DetailsFrameWork:CreateLabel (BossFrame, "Boss Spells and Auras:", 12, "orange")
|
||||
bossSpellsTitle:SetPoint(444, -85)
|
||||
tinsert (BossFrame.EnemySpellsWidgets, bossSpellsTitle)
|
||||
bossSpellsTitle:Hide()
|
||||
|
||||
--create boss mods list
|
||||
for i = 1, CONST_MAX_AURA_LINES do
|
||||
local anchor_frame = CreateFrame ("frame", "BossFrameSpellAnchor" .. i, BossFrame)
|
||||
local anchor_frame = CreateFrame ("frame", "BossFrameBossModsAnchor" .. i, BossFrame, "BackdropTemplate")
|
||||
|
||||
local spellicon = DetailsFrameWork:NewImage (anchor_frame, [[Interface\ICONS\TEMP]], 19, 19, "background", nil, "icon", "$parentIcon")
|
||||
|
||||
--timerId
|
||||
local spellid = DetailsFrameWork:CreateTextEntry (anchor_frame, EncounterDetails.empty_function, 80, 20, nil, "$parentSpellId")
|
||||
spellid:SetTemplate (AurasButtonTemplate)
|
||||
spellid:SetHook ("OnEditFocusGained", on_focus_gain)
|
||||
spellid:SetHook ("OnEditFocusLost", on_focus_lost)
|
||||
spellid:SetHook ("OnEnter", on_enter_spell)
|
||||
spellid:SetHook ("OnLeave", on_leave_spell)
|
||||
|
||||
--ability name
|
||||
local spellname = DetailsFrameWork:CreateTextEntry (anchor_frame, EncounterDetails.empty_function, 180, 20, nil, "$parentSpellName")
|
||||
spellname:SetTemplate (AurasButtonTemplate)
|
||||
spellname:SetHook ("OnEditFocusGained", on_focus_gain)
|
||||
spellname:SetHook ("OnEditFocusLost", on_focus_lost)
|
||||
spellname:SetHook ("OnEnter", on_enter_spell)
|
||||
spellname:SetHook ("OnLeave", on_leave_spell)
|
||||
|
||||
local create_aura = DetailsFrameWork:NewButton (anchor_frame, nil, "$parentCreateAuraButton", "AuraButton", 90, 18, create_aura_func, nil, nil, nil, "Make Aura")
|
||||
create_aura:SetTemplate (AurasButtonTemplate)
|
||||
|
||||
spellicon:SetPoint ("topleft", BossFrame, "topleft", 10, -85 + (i * 21 * -1))
|
||||
spellid:SetPoint ("left", spellicon, "right", 4, 0)
|
||||
spellname:SetPoint ("left", spellid, "right", 4, 0)
|
||||
create_aura:SetPoint ("left", spellname, "right", 4, 0)
|
||||
|
||||
spellid:SetBackdropBorderColor(0, 0, 0)
|
||||
spellname:SetBackdropBorderColor(0, 0, 0)
|
||||
|
||||
anchor_frame.icon = spellicon
|
||||
anchor_frame.spellid = spellid
|
||||
anchor_frame.spellname = spellname
|
||||
anchor_frame.aurabutton = create_aura
|
||||
anchor_frame.aurabutton._icon = spellicon
|
||||
|
||||
tinsert (bossmods_blocks, anchor_frame)
|
||||
tinsert (BossFrame.EnemySpellsWidgets, anchor_frame)
|
||||
|
||||
anchor_frame:Hide()
|
||||
end
|
||||
|
||||
local icon_button_func = function (texture)
|
||||
anchor_frame.icon.texture = texture
|
||||
end
|
||||
|
||||
local spellicon_button = DetailsFrameWork:NewButton (anchor_frame, nil, "$parentIconButton", "IconButton", 20, 20, function() DetailsFrameWork:IconPick (icon_button_func, true) end)
|
||||
local spellicon = DetailsFrameWork:NewImage (spellicon_button, [[Interface\ICONS\TEMP]], 19, 19, "background", nil, "icon", "$parentIcon")
|
||||
spellicon_button:InstallCustomTexture()
|
||||
--create buff list
|
||||
for i = 1, CONST_MAX_AURA_LINES do
|
||||
local anchor_frame = CreateFrame ("frame", "BossFrameSpellAnchor" .. i, BossFrame, "BackdropTemplate")
|
||||
|
||||
local spellicon = DetailsFrameWork:NewImage (anchor_frame, [[Interface\ICONS\TEMP]], 19, 19, "background", nil, "icon", "$parentIcon")
|
||||
|
||||
local spellid = DetailsFrameWork:CreateTextEntry (anchor_frame, EncounterDetails.empty_function, 80, 20)
|
||||
spellid:SetTemplate (AurasButtonTemplate)
|
||||
@@ -1871,19 +1888,19 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
spellid:SetHook ("OnEnter", on_enter_spell)
|
||||
spellid:SetHook ("OnLeave", on_leave_spell)
|
||||
|
||||
local spellname = DetailsFrameWork:CreateTextEntry (anchor_frame, EncounterDetails.empty_function, 180, 20)
|
||||
local spellname = DetailsFrameWork:CreateTextEntry (anchor_frame, EncounterDetails.empty_function, 160, 20)
|
||||
spellname:SetTemplate (AurasButtonTemplate)
|
||||
spellname:SetHook ("OnEditFocusGained", on_focus_gain)
|
||||
spellname:SetHook ("OnEditFocusLost", on_focus_lost)
|
||||
spellname:SetHook ("OnEnter", on_enter_spell)
|
||||
spellname:SetHook ("OnLeave", on_leave_spell)
|
||||
|
||||
spellicon_button:SetPoint ("topleft", BossFrame, "topleft", 255, -65 + (i * 21 * -1))
|
||||
spellicon:SetAllPoints()
|
||||
spellid:SetPoint ("left", spellicon_button, "right", 4, 0)
|
||||
--spellicon_button:SetPoint ("topleft", BossFrame, "topleft", 255, -65 + (i * 21 * -1))
|
||||
spellicon:SetPoint ("topleft", BossFrame, "topleft", 443, -85 + (i * 21 * -1))
|
||||
spellid:SetPoint ("left", spellicon, "right", 4, 0)
|
||||
spellname:SetPoint ("left", spellid, "right", 4, 0)
|
||||
|
||||
local spellinfo = CreateFrame ("frame", nil, anchor_frame)
|
||||
local spellinfo = CreateFrame ("frame", nil, anchor_frame,"BackdropTemplate")
|
||||
spellinfo:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
spellinfo:SetBackdropColor (.3, .3, .3, .5)
|
||||
spellinfo:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
@@ -1896,7 +1913,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
spellinfotext:SetText ("info")
|
||||
spellinfo:SetPoint ("left", spellname.widget, "right", 4, 0)
|
||||
|
||||
local create_aura = DetailsFrameWork:NewButton (anchor_frame, nil, "$parentCreateAuraButton", "AuraButton", 135, 18, create_aura_func, nil, nil, nil, "Create Aura")
|
||||
local create_aura = DetailsFrameWork:NewButton (anchor_frame, nil, "$parentCreateAuraButton", "AuraButton", 90, 18, create_aura_func, nil, nil, nil, "Make Aura")
|
||||
create_aura:SetPoint ("left", spellinfo, "right", 4, 0)
|
||||
create_aura:SetTemplate (AurasButtonTemplate)
|
||||
|
||||
@@ -1913,50 +1930,123 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
anchor_frame:Hide()
|
||||
end
|
||||
|
||||
local last_npc_name
|
||||
|
||||
local update_enemy_spells = function (npc_name)
|
||||
npc_name = npc_name or last_npc_name
|
||||
last_npc_name = npc_name
|
||||
|
||||
local update_enemy_spells = function()
|
||||
local combat = EncounterDetails:GetCombat (EncounterDetails._segment)
|
||||
|
||||
if (combat and npc_name) then
|
||||
|
||||
local spell_list = {}
|
||||
|
||||
--damage
|
||||
local npc = combat (1, npc_name)
|
||||
if (npc) then
|
||||
for spellid, spell in pairs (npc.spells._ActorTable) do
|
||||
if (spellid > 10) then
|
||||
local name, _, icon = EncounterDetails.getspellinfo (spellid)
|
||||
tinsert (spell_list, {spellid, name, icon, nil, npc.serial})
|
||||
local spell_list = {}
|
||||
|
||||
if (combat) then
|
||||
for i, npc in combat[1]:ListActors() do
|
||||
--damage
|
||||
if (npc:IsNeutralOrEnemy()) then
|
||||
for spellid, spell in pairs (npc.spells._ActorTable) do
|
||||
if (spellid > 10) then
|
||||
local name, _, icon = EncounterDetails.getspellinfo (spellid)
|
||||
tinsert (spell_list, {spellid, name, icon, nil, npc.serial})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
BossFrame.aura_npc_id2.text = EncounterDetails:GetNpcIdFromGuid (npc.serial)
|
||||
end
|
||||
|
||||
--heal
|
||||
local npc = combat (2, npc_name)
|
||||
if (npc) then
|
||||
for spellid, spell in pairs (npc.spells._ActorTable) do
|
||||
if (spellid > 10) then
|
||||
local name, _, icon = EncounterDetails.getspellinfo (spellid)
|
||||
tinsert (spell_list, {spellid, name, icon, true, npc.serial})
|
||||
|
||||
for i, npc in combat[2]:ListActors() do
|
||||
--heal
|
||||
if (npc:IsNeutralOrEnemy()) then
|
||||
for spellid, spell in pairs (npc.spells._ActorTable) do
|
||||
if (spellid > 10) then
|
||||
local name, _, icon = EncounterDetails.getspellinfo (spellid)
|
||||
tinsert (spell_list, {spellid, name, icon, true, npc.serial})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
BossFrame.aura_npc_id2.text = EncounterDetails:GetNpcIdFromGuid (npc.serial)
|
||||
end
|
||||
|
||||
|
||||
table.sort(spell_list, function(t1, t2)
|
||||
return t1[2] < t2[2]
|
||||
end)
|
||||
|
||||
EncounterDetails_SpellAurasScroll.spell_pool = spell_list
|
||||
EncounterDetails_SpellAurasScroll.encounter_id = combat.is_boss and combat.is_boss.id
|
||||
EncounterDetails_SpellAurasScroll:Update()
|
||||
end
|
||||
end
|
||||
|
||||
local refresh_bossmods_timers = function(self)
|
||||
local combat = EncounterDetails:GetCombat(EncounterDetails._segment)
|
||||
local offset = FauxScrollFrame_GetOffset(self)
|
||||
local already_added = {}
|
||||
local db = _detalhes.boss_mods_timers
|
||||
local encounter_id = combat.is_boss and combat.is_boss.id
|
||||
|
||||
if (db) then
|
||||
wipe(already_added)
|
||||
local timersToAdd = {}
|
||||
|
||||
for timerId, timerTable in pairs (db.encounter_timers_dbm) do
|
||||
if (timerTable.id == encounter_id) then
|
||||
local spellId = timerTable [7]
|
||||
local spellIcon = timerTable [5]
|
||||
local spellName
|
||||
|
||||
local spell = timerId
|
||||
spell = spell:gsub("ej", "")
|
||||
spell = tonumber(spell)
|
||||
|
||||
if (spell and not already_added[spell]) then
|
||||
if (spell > 40000) then
|
||||
local spellname, _, spellicon = _GetSpellInfo(spell)
|
||||
tinsert (timersToAdd, {label = spellname, value = {timerTable[2], spellname, spellIcon or spellicon, timerTable.id, timerTable[7]}, icon = spellIcon or spellicon})
|
||||
|
||||
else
|
||||
--local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = C_EncounterJournal.GetSectionInfo(spell)
|
||||
local sectionInfo = C_EncounterJournal.GetSectionInfo(spell)
|
||||
tinsert (timersToAdd, {label = sectionInfo.title, value = {timerTable[2], sectionInfo.title, spellIcon or sectionInfo.abilityIcon, timerTable.id, timerTable[7]}, icon = spellIcon or sectionInfo.abilityIcon})
|
||||
end
|
||||
|
||||
already_added[spell] = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
table.sort(timersToAdd, function(t1, t2)
|
||||
return t1.label < t2.label
|
||||
end)
|
||||
|
||||
local offset = FauxScrollFrame_GetOffset(self)
|
||||
|
||||
for barIndex = 1, CONST_MAX_AURA_LINES do
|
||||
|
||||
local data = timersToAdd[barIndex + offset]
|
||||
local bar = bossmods_blocks[barIndex]
|
||||
|
||||
if (data) then
|
||||
bar:Show()
|
||||
|
||||
bar.icon.texture = data.icon
|
||||
bar.icon:SetTexCoord(.1, .9, .1, .9)
|
||||
bar.spellid.text = data.value[1] or "--x--x--"
|
||||
bar.spellname.text = data.label or "--x--x--"
|
||||
|
||||
bar.spellid._spellid = data.value[1]
|
||||
bar.spellname._spellid = data.value[1]
|
||||
|
||||
local func = function()
|
||||
local timerId, spellname, spellicon, encounterid, spellid = unpack(data.value)
|
||||
EncounterDetails:OpenAuraPanel (timerId, spellname, spellicon, encounterid, DETAILS_WA_TRIGGER_DBM_TIMER, DETAILS_WA_AURATYPE_TEXT, {dbm_timer_id = timerId, spellid = spellid, text = "Next " .. spellname .. " In", text_size = 72, icon = spellicon})
|
||||
end
|
||||
|
||||
bar.aurabutton:SetClickFunction(func)
|
||||
else
|
||||
bar:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
FauxScrollFrame_Update(self, #timersToAdd, CONST_MAX_AURA_LINES, 20)
|
||||
|
||||
if (#timersToAdd > 0) then
|
||||
self:Show()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local refresh_spellauras = function (self)
|
||||
|
||||
local pool = EncounterDetails_SpellAurasScroll.spell_pool
|
||||
@@ -1971,6 +2061,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
bar:Show()
|
||||
|
||||
bar.icon.texture = data [3]
|
||||
bar.icon:SetTexCoord(.1, .9, .1, .9)
|
||||
bar.spellid.text = data [1]
|
||||
bar.spellname.text = data [2]
|
||||
|
||||
@@ -1998,112 +2089,30 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
|
||||
end
|
||||
|
||||
local spell_scrollframe = CreateFrame ("ScrollFrame", "EncounterDetails_SpellAurasScroll", BossFrame, "FauxScrollFrameTemplate")
|
||||
local spell_scrollframe = CreateFrame ("ScrollFrame", "EncounterDetails_SpellAurasScroll", BossFrame, "FauxScrollFrameTemplate, BackdropTemplate")
|
||||
spell_scrollframe:SetScript ("OnVerticalScroll", function (self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, 14, refresh_spellauras) end)
|
||||
spell_scrollframe:SetPoint ("topleft", BossFrame, "topleft", 200, -75)
|
||||
spell_scrollframe:SetPoint ("bottomright", BossFrame, "bottomright", -33, 42)
|
||||
spell_scrollframe.Update = refresh_spellauras
|
||||
spell_scrollframe:Hide()
|
||||
EncounterDetails.SpellScrollframe = spell_scrollframe
|
||||
_G.DetailsFramework:ReskinSlider(spell_scrollframe)
|
||||
|
||||
tinsert (BossFrame.EnemySpellsWidgets, spell_scrollframe)
|
||||
|
||||
EncounterDetails.update_enemy_spells = update_enemy_spells
|
||||
|
||||
local on_select_actor_spell = function (self, fixedparam, option)
|
||||
last_npc_name = option
|
||||
update_enemy_spells (option)
|
||||
end
|
||||
|
||||
local build_actor_menu = function()
|
||||
local t = {}
|
||||
local combat = EncounterDetails:GetCombat (EncounterDetails._segment)
|
||||
|
||||
if (combat) then
|
||||
local AllDamageCharacters = combat:GetActorList (DETAILS_ATTRIBUTE_DAMAGE)
|
||||
for index, character in ipairs (AllDamageCharacters) do
|
||||
if (character:IsEnemy()) then
|
||||
tinsert (t, {label = character:name(), value = character:name(), icon = "Interface\\AddOns\\Details_EncounterDetails\\images\\icon", onclick = on_select_actor_spell, iconcolor = "silver"})
|
||||
end
|
||||
end
|
||||
return t
|
||||
else
|
||||
return t
|
||||
end
|
||||
end
|
||||
EncounterDetails.build_actor_menu = build_actor_menu
|
||||
|
||||
local EnemyActorSpells = DetailsFrameWork:NewDropDown (BossFrame, _, "$parentEnemyActorSpellsDropdown", "EnemyActorSpells", 160, 20, build_actor_menu, 1)
|
||||
EnemyActorSpells:SetPoint ("topleft", EnemyActorSpells_label, "bottomleft", -1, -2)
|
||||
|
||||
EnemyActorSpells:Hide()
|
||||
EnemyActorSpells_label:Hide()
|
||||
|
||||
local bar_div = DetailsFrameWork:CreateImage (BossFrame, "Interface\\AddOns\\Details_EncounterDetails\\images\\boss_bg", 4, 480, "artwork", {724/1024, 728/1024, 0, 245/512})
|
||||
bar_div:SetPoint ("TOPLEFT", BossFrame, "TOPLEFT", 244, -74)
|
||||
bar_div:Hide()
|
||||
|
||||
local npc_id = DetailsFrameWork:CreateLabel (BossFrame, "NpcID:", 11, nil, "GameFontHighlightSmall")
|
||||
BossFrame.aura_npc_id = npc_id
|
||||
npc_id:SetPoint ("topleft", BossFrame, "topleft", 10, -130)
|
||||
npc_id:Hide()
|
||||
local npc_id2 = DetailsFrameWork:CreateLabel (BossFrame, "", 11, nil, "GameFontHighlightSmall")
|
||||
BossFrame.aura_npc_id2 = npc_id2
|
||||
npc_id2:SetPoint ("left", npc_id, "right", 2, 0)
|
||||
npc_id2:Hide()
|
||||
|
||||
--
|
||||
local label_dbm_bars = DetailsFrameWork:CreateLabel (BossFrame, "Create Big Timer Announcer (DBM):", 11, nil, "GameFontHighlightSmall")
|
||||
label_dbm_bars:SetPoint ("topleft", BossFrame, "topleft", 10, -200)
|
||||
|
||||
local label_bw_bars = DetailsFrameWork:CreateLabel (BossFrame, "Create Big Timer Announcer (BW):", 11, nil, "GameFontHighlightSmall")
|
||||
label_bw_bars:SetPoint ("topleft", BossFrame, "topleft", 10, -250)
|
||||
|
||||
BossFrame.label_dbm_bars = label_dbm_bars
|
||||
BossFrame.label_bw_bars = label_bw_bars
|
||||
|
||||
local on_select_dbm_bar = function (_, _, value)
|
||||
local timer_id, spellname, spellicon, encounterid, spellid = unpack (value)
|
||||
EncounterDetails:OpenAuraPanel (timer_id, spellname, spellicon, encounterid, DETAILS_WA_TRIGGER_DBM_TIMER, DETAILS_WA_AURATYPE_TEXT, {dbm_timer_id = timer_id, spellid = spellid, text = "Next " .. spellname .. " In", text_size = 72, icon = spellicon})
|
||||
end
|
||||
|
||||
local on_select_bw_bar = function (_, _, value)
|
||||
local timer_id, spellname, spellicon, encounterid = unpack (value)
|
||||
EncounterDetails:OpenAuraPanel (timer_id, spellname, spellicon, encounterid, DETAILS_WA_TRIGGER_BW_TIMER, DETAILS_WA_AURATYPE_TEXT, {bw_timer_id = timer_id, text = "Next " .. spellname .. " In", text_size = 72, icon = spellicon})
|
||||
end
|
||||
|
||||
local already_added = {}
|
||||
local build_dbm_bars = function()
|
||||
local t = {}
|
||||
local db = _detalhes.boss_mods_timers
|
||||
if (db) then
|
||||
wipe (already_added)
|
||||
local encounter_id = EncounterDetails_SpellAurasScroll.encounter_id
|
||||
|
||||
for timer_id, timer_table in pairs (db.encounter_timers_dbm) do
|
||||
if (timer_table.id == encounter_id) then
|
||||
local spellId = timer_table [7]
|
||||
local spellIcon = timer_table [5]
|
||||
local spellName
|
||||
|
||||
local spell = timer_id
|
||||
spell = spell:gsub ("ej", "")
|
||||
spell = tonumber (spell)
|
||||
|
||||
if (spell and not already_added [spell]) then
|
||||
if (spell > 30000) then
|
||||
local spellname, _, spellicon = _GetSpellInfo (spell)
|
||||
tinsert (t, {label = spellname, value = {timer_table [2], spellname, spellIcon or spellicon, timer_table.id, timer_table [7]}, icon = spellIcon or spellicon, onclick = on_select_dbm_bar})
|
||||
else
|
||||
local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = C_EncounterJournal.GetSectionInfo (spell)
|
||||
tinsert (t, {label = title, value = {timer_table [2], title, spellIcon or abilityIcon, timer_table.id, timer_table [7]}, icon = spellIcon or abilityIcon, onclick = on_select_dbm_bar})
|
||||
end
|
||||
already_added [spell] = true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return t
|
||||
end
|
||||
local bossmods_scrollframe = CreateFrame ("ScrollFrame", "EncounterDetails_BossModsScroll", BossFrame, "FauxScrollFrameTemplate, BackdropTemplate")
|
||||
bossmods_scrollframe:SetScript ("OnVerticalScroll", function (self, offset) FauxScrollFrame_OnVerticalScroll(self, offset, 14, refresh_bossmods_timers) end)
|
||||
bossmods_scrollframe:SetPoint ("topleft", BossFrame, "topleft", 10, -75)
|
||||
bossmods_scrollframe:SetPoint ("bottomleft", BossFrame, "bottomleft", 250, 42)
|
||||
bossmods_scrollframe.Update = refresh_bossmods_timers
|
||||
bossmods_scrollframe:Hide()
|
||||
EncounterDetails.BossModsScrollframe = bossmods_scrollframe
|
||||
|
||||
tinsert (BossFrame.EnemySpellsWidgets, bossmods_scrollframe)
|
||||
EncounterDetails.update_bossmods = function() bossmods_scrollframe:Update() end
|
||||
|
||||
|
||||
local build_bigwigs_bars = function()
|
||||
local t = {}
|
||||
@@ -2135,36 +2144,11 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
end
|
||||
return t
|
||||
end
|
||||
|
||||
local dropdown_dbm_bars = DetailsFrameWork:NewDropDown (BossFrame, _, "$parentDBMBarsDropdown", "DBMBars", 160, 20, build_dbm_bars, 1)
|
||||
dropdown_dbm_bars:SetPoint ("topleft", label_dbm_bars, "bottomleft", -1, -2)
|
||||
dropdown_dbm_bars:SetTemplate (DetailsFrameWork:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
|
||||
dropdown_dbm_bars:SetWidth (200)
|
||||
dropdown_dbm_bars.tooltip = "Create a weakaura to show a big countdown when a boss ability is coming"
|
||||
|
||||
local dropdown_bw_bars = DetailsFrameWork:NewDropDown (BossFrame, _, "$parentBigWigsBarsDropdown", "BigWigsBars", 160, 20, build_bigwigs_bars, 1)
|
||||
dropdown_bw_bars:SetPoint ("topleft", label_bw_bars, "bottomleft", -1, -2)
|
||||
dropdown_bw_bars:SetTemplate (DetailsFrameWork:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
|
||||
dropdown_bw_bars:SetWidth (200)
|
||||
dropdown_bw_bars.tooltip = "Create a weakaura to show a big countdown when a boss ability is coming"
|
||||
|
||||
dropdown_dbm_bars:Hide()
|
||||
dropdown_bw_bars:Hide()
|
||||
label_dbm_bars:Hide()
|
||||
label_bw_bars:Hide()
|
||||
|
||||
--
|
||||
|
||||
tinsert (BossFrame.EnemySpellsWidgets, EnemyActorSpells_label)
|
||||
tinsert (BossFrame.EnemySpellsWidgets, EnemyActorSpells)
|
||||
tinsert (BossFrame.EnemySpellsWidgets, bar_div)
|
||||
tinsert (BossFrame.EnemySpellsWidgets, npc_id)
|
||||
tinsert (BossFrame.EnemySpellsWidgets, npc_id2)
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- ~phases
|
||||
|
||||
local PhaseFrame = CreateFrame ("frame", "EncounterDetailsPhaseFrame", BossFrame)
|
||||
local PhaseFrame = CreateFrame ("frame", "EncounterDetailsPhaseFrame", BossFrame, "BackdropTemplate")
|
||||
PhaseFrame:SetAllPoints()
|
||||
PhaseFrame:SetFrameLevel (BossFrame:GetFrameLevel()+1)
|
||||
PhaseFrame.DamageTable = {}
|
||||
@@ -2370,7 +2354,7 @@ local line_onleave = function (self)
|
||||
end
|
||||
|
||||
local ScrollCreateLine = function (self, index)
|
||||
local line = CreateFrame ("button", "$parentLine" .. index, self)
|
||||
local line = CreateFrame ("button", "$parentLine" .. index, self,"BackdropTemplate")
|
||||
line:SetPoint ("topleft", self, "topleft", 0, -((index-1)*(ScrollLineHeight+1)))
|
||||
line:SetSize (ScrollWidth, ScrollLineHeight)
|
||||
line:SetScript ("OnEnter", line_onenter)
|
||||
@@ -2451,7 +2435,7 @@ end
|
||||
|
||||
--cria as linhas mostrando o tempo decorride de cada phase
|
||||
for i = 1, 10 do
|
||||
local line = CreateFrame ("button", "$parentPhaseBar" .. i, PhaseFrame)
|
||||
local line = CreateFrame ("button", "$parentPhaseBar" .. i, PhaseFrame,"BackdropTemplate")
|
||||
line:SetPoint ("topleft", PhaseTimersLabel.widget, "bottomleft", 0, -((i-1)*(31)) - 4)
|
||||
line:SetSize (175, 30)
|
||||
line:SetScript ("OnEnter", PhaseBarOnEnter)
|
||||
@@ -2482,10 +2466,10 @@ for i = 1, 10 do
|
||||
tinsert (PhaseFrame.PhasesBars, line)
|
||||
end
|
||||
|
||||
--cria a linha do segmento para a comparação, é o que fica na parte direita da tela
|
||||
--ele é acessado para mostrar quando passar o mouse sobre uma das barras de phase
|
||||
--cria a linha do segmento para a compara��o, � o que fica na parte direita da tela
|
||||
--ele � acessado para mostrar quando passar o mouse sobre uma das barras de phase
|
||||
for i = 1, 20 do
|
||||
local line = CreateFrame ("button", "$parentSegmentCompareBar" .. i, PhaseFrame)
|
||||
local line = CreateFrame ("button", "$parentSegmentCompareBar" .. i, PhaseFrame,"BackdropTemplate")
|
||||
line:SetPoint ("topleft", PhaseTimersLabel.widget, "bottomleft", 175+10, -((i-1)*(ScrollLineHeight+1)) - 4)
|
||||
line:SetSize (150, ScrollLineHeight)
|
||||
|
||||
@@ -2678,10 +2662,10 @@ end
|
||||
local BOX_HEIGHT_UPPER = CONST_BOX_HEIGHT --175
|
||||
|
||||
|
||||
local container_damagetaken_window = CreateFrame ("ScrollFrame", "Details_Boss_ContainerDamageTaken", frame)
|
||||
local container_damagetaken_window = CreateFrame ("ScrollFrame", "Details_Boss_ContainerDamageTaken", frame,"BackdropTemplate")
|
||||
set_backdrop (container_damagetaken_window)
|
||||
|
||||
local container_damagetaken_frame = CreateFrame ("Frame", "Details_Boss_FrameDamageTaken", container_damagetaken_window)
|
||||
local container_damagetaken_frame = CreateFrame ("Frame", "Details_Boss_FrameDamageTaken", container_damagetaken_window,"BackdropTemplate")
|
||||
|
||||
frame.Widgets [#frame.Widgets+1] = container_damagetaken_window
|
||||
|
||||
@@ -2690,7 +2674,7 @@ end
|
||||
container_damagetaken_frame.barras = {}
|
||||
|
||||
--label titulo & background
|
||||
local dano_recebido_bg = CreateFrame ("Frame", nil, frame)
|
||||
local dano_recebido_bg = CreateFrame ("Frame", nil, frame, "BackdropTemplate")
|
||||
dano_recebido_bg:SetWidth (BOX_WIDTH)
|
||||
dano_recebido_bg:SetHeight (16)
|
||||
dano_recebido_bg:EnableMouse (true)
|
||||
@@ -2732,16 +2716,16 @@ end
|
||||
|
||||
--> Caixa das Habilidades do boss
|
||||
--~ability ~damage taken by spell
|
||||
local container_habilidades_window = CreateFrame ("ScrollFrame", "Details_Boss_ContainerHabilidades", frame)
|
||||
local container_habilidades_window = CreateFrame ("ScrollFrame", "Details_Boss_ContainerHabilidades", frame,"BackdropTemplate")
|
||||
set_backdrop (container_habilidades_window)
|
||||
|
||||
local container_habilidades_frame = CreateFrame ("Frame", "Details_Boss_FrameHabilidades", container_habilidades_window)
|
||||
local container_habilidades_frame = CreateFrame ("Frame", "Details_Boss_FrameHabilidades", container_habilidades_window,"BackdropTemplate")
|
||||
container_habilidades_frame:SetScript ("OnMouseDown", mouse_down)
|
||||
container_habilidades_frame:SetScript ("OnMouseUp", mouse_up)
|
||||
container_habilidades_frame.barras = {}
|
||||
|
||||
--label titulo % background
|
||||
local habilidades_inimigas_bg = CreateFrame ("Frame", nil, frame)
|
||||
local habilidades_inimigas_bg = CreateFrame ("Frame", nil, frame, "BackdropTemplate")
|
||||
habilidades_inimigas_bg:SetWidth (BOX_WIDTH)
|
||||
habilidades_inimigas_bg:SetHeight (16)
|
||||
habilidades_inimigas_bg:EnableMouse (true)
|
||||
@@ -2785,14 +2769,14 @@ end
|
||||
|
||||
|
||||
--> Caixa dos Adds
|
||||
-- ~adds ãdds
|
||||
-- ~adds �dds
|
||||
local BOX_WIDTH = 270
|
||||
local BOX_HEIGHT = CONST_BOX_HEIGHT --173
|
||||
|
||||
local container_adds_window = CreateFrame ("ScrollFrame", "Details_Boss_ContainerAdds", frame)
|
||||
local container_adds_window = CreateFrame ("ScrollFrame", "Details_Boss_ContainerAdds", frame,"BackdropTemplate")
|
||||
set_backdrop (container_adds_window)
|
||||
|
||||
local container_adds_frame = CreateFrame ("Frame", "Details_Boss_FrameAdds", container_adds_window)
|
||||
local container_adds_frame = CreateFrame ("Frame", "Details_Boss_FrameAdds", container_adds_window, "BackdropTemplate")
|
||||
frame.Widgets [#frame.Widgets+1] = container_adds_frame
|
||||
frame.Widgets [#frame.Widgets+1] = container_adds_window
|
||||
container_adds_frame.barras = {}
|
||||
@@ -2831,10 +2815,10 @@ end
|
||||
|
||||
--> Caixa dos interrupts (kicks)
|
||||
-- ~interrupt
|
||||
local container_interrupt_window = CreateFrame ("ScrollFrame", "Details_Boss_Containerinterrupt", frame)
|
||||
local container_interrupt_window = CreateFrame ("ScrollFrame", "Details_Boss_Containerinterrupt", frame,"BackdropTemplate")
|
||||
set_backdrop (container_interrupt_window)
|
||||
|
||||
local container_interrupt_frame = CreateFrame ("Frame", "Details_Boss_Frameinterrupt", container_interrupt_window)
|
||||
local container_interrupt_frame = CreateFrame ("Frame", "Details_Boss_Frameinterrupt", container_interrupt_window, "BackdropTemplate")
|
||||
|
||||
local interrupt_total_string = DetailsFrameWork:CreateLabel (container_interrupt_window, "interrupts / casts")
|
||||
interrupt_total_string.textcolor = "gray"
|
||||
@@ -2877,10 +2861,10 @@ end
|
||||
|
||||
--> Caixa dos Dispells
|
||||
-- ~dispel
|
||||
local container_dispell_window = CreateFrame ("ScrollFrame", "Details_Boss_Containerdispell", frame)
|
||||
local container_dispell_window = CreateFrame ("ScrollFrame", "Details_Boss_Containerdispell", frame,"BackdropTemplate")
|
||||
set_backdrop (container_dispell_window)
|
||||
|
||||
local container_dispell_frame = CreateFrame ("Frame", "Details_Boss_Framedispell", container_dispell_window)
|
||||
local container_dispell_frame = CreateFrame ("Frame", "Details_Boss_Framedispell", container_dispell_window, "BackdropTemplate")
|
||||
|
||||
local dispell_total_string = DetailsFrameWork:CreateLabel (container_dispell_window, "total dispels")
|
||||
dispell_total_string.textcolor = "gray"
|
||||
@@ -2922,10 +2906,10 @@ end
|
||||
|
||||
--> Caixa das mortes
|
||||
-- ~mortes ~deaths ~dead
|
||||
local container_dead_window = CreateFrame ("ScrollFrame", "Details_Boss_ContainerDead", frame)
|
||||
local container_dead_window = CreateFrame ("ScrollFrame", "Details_Boss_ContainerDead", frame,"BackdropTemplate")
|
||||
set_backdrop (container_dead_window)
|
||||
|
||||
local container_dead_frame = CreateFrame ("Frame", "Details_Boss_FrameDead", container_dead_window)
|
||||
local container_dead_frame = CreateFrame ("Frame", "Details_Boss_FrameDead", container_dead_window, "BackdropTemplate")
|
||||
|
||||
local dead_total_string = DetailsFrameWork:CreateLabel (container_dead_window, "time of death")
|
||||
dead_total_string.textcolor = "gray"
|
||||
@@ -2972,7 +2956,7 @@ end
|
||||
|
||||
|
||||
--emotes frame
|
||||
local emote_frame = CreateFrame ("frame", "DetailsEncountersEmoteFrame", UIParent)
|
||||
local emote_frame = CreateFrame ("frame", "DetailsEncountersEmoteFrame", UIParent, "BackdropTemplate")
|
||||
emote_frame:RegisterEvent ("CHAT_MSG_RAID_BOSS_EMOTE")
|
||||
emote_frame:RegisterEvent ("CHAT_MSG_RAID_BOSS_WHISPER")
|
||||
emote_frame:RegisterEvent ("CHAT_MSG_MONSTER_EMOTE")
|
||||
@@ -3013,4 +2997,4 @@ end
|
||||
|
||||
end
|
||||
end
|
||||
--endd
|
||||
--endd
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 64 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -58,4 +58,4 @@ Loc ["STRING_KILLADD"] = "mataradd"
|
||||
Loc ["STRING_SPREADOUT"] = "separar"
|
||||
Loc ["STRING_STOPCAST"] = "pararcast"
|
||||
Loc ["STRING_FACING"] = "virar"
|
||||
Loc ["STRING_STACK"] = "juntar"
|
||||
Loc ["STRING_STACK"] = "juntar"
|
||||
|
||||
@@ -11,7 +11,7 @@ local DF = DetailsFramework
|
||||
local UnitGroupRolesAssigned = DF.UnitGroupRolesAssigned
|
||||
|
||||
--> build the list of buffs to track
|
||||
local flask_list = DetailsFramework.FlaskIDs
|
||||
local flask_list = DF.FlaskIDs
|
||||
|
||||
local is_drinking = 257428
|
||||
local localizedFoodDrink
|
||||
@@ -22,22 +22,22 @@ local food_list = {
|
||||
tier3 = {},
|
||||
}
|
||||
|
||||
for spellID, power in pairs (DetailsFramework.FoodIDs) do
|
||||
if (power == 41) then
|
||||
for spellID, power in pairs (DF.FoodIDs) do
|
||||
if (power == 1) then
|
||||
food_list.tier1 [spellID] = true
|
||||
|
||||
elseif (power == 55) then
|
||||
|
||||
elseif (power == 2) then
|
||||
food_list.tier2 [spellID] = true
|
||||
|
||||
elseif (power >= 75) then
|
||||
|
||||
elseif (power == 3) then
|
||||
food_list.tier3 [spellID] = true
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
local runes_id = DetailsFramework.RuneIDs
|
||||
local runes_id = DF.RuneIDs
|
||||
|
||||
--
|
||||
--
|
||||
|
||||
local get_unit_id = function (i)
|
||||
local unitID
|
||||
@@ -97,7 +97,7 @@ end
|
||||
|
||||
if (event == "ZONE_TYPE_CHANGED") then
|
||||
|
||||
DetailsRaidCheck:CheckZone (...)
|
||||
DetailsRaidCheck:CheckCanShowIcon (...)
|
||||
|
||||
elseif (event == "COMBAT_PREPOTION_UPDATED") then
|
||||
|
||||
@@ -110,7 +110,7 @@ end
|
||||
elseif (event == "DETAILS_STARTED") then
|
||||
|
||||
localizedFoodDrink = GetSpellInfo (is_drinking)
|
||||
DetailsRaidCheck:CheckZone()
|
||||
DetailsRaidCheck:CheckCanShowIcon()
|
||||
|
||||
elseif (event == "PLUGIN_DISABLED") then
|
||||
|
||||
@@ -123,13 +123,13 @@ end
|
||||
|
||||
elseif (event == "PLUGIN_ENABLED") then
|
||||
|
||||
DetailsRaidCheck:CheckZone()
|
||||
DetailsRaidCheck:CheckCanShowIcon()
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
DetailsRaidCheck.ToolbarButton = _detalhes.ToolBar:NewPluginToolbarButton (DetailsRaidCheck.empty_function, [[Interface\AddOns\Details_RaidCheck\icon]], Loc ["STRING_RAIDCHECK_PLUGIN_NAME"], "", 16, 16, "RAIDCHECK_PLUGIN_BUTTON")
|
||||
DetailsRaidCheck.ToolbarButton = _detalhes.ToolBar:NewPluginToolbarButton (DetailsRaidCheck.empty_function, [[Interface\Buttons\UI-CheckBox-Check]], Loc ["STRING_RAIDCHECK_PLUGIN_NAME"], "", 16, 16, "RAIDCHECK_PLUGIN_BUTTON")
|
||||
DetailsRaidCheck.ToolbarButton.shadow = true --> loads icon_shadow.tga when the instance is showing icons with shadows
|
||||
|
||||
function DetailsRaidCheck.GetPlayerAmount()
|
||||
@@ -141,11 +141,6 @@ end
|
||||
playerAmount = 20
|
||||
end
|
||||
|
||||
--reduce in 1 if the player is only in party
|
||||
if (not IsInRaid()) then
|
||||
playerAmount = playerAmount - 1
|
||||
end
|
||||
|
||||
return playerAmount
|
||||
end
|
||||
|
||||
@@ -157,15 +152,23 @@ end
|
||||
local instance = _detalhes:GetInstance (lower_instance)
|
||||
|
||||
if (instance.menu_icons.shadow) then
|
||||
DetailsRaidCheck.ToolbarButton:SetNormalTexture ([[Interface\AddOns\Details_RaidCheck\icon_shadow]])
|
||||
DetailsRaidCheck.ToolbarButton:SetPushedTexture ([[Interface\AddOns\Details_RaidCheck\icon_shadow]])
|
||||
DetailsRaidCheck.ToolbarButton:SetDisabledTexture ([[Interface\AddOns\Details_RaidCheck\icon_shadow]])
|
||||
DetailsRaidCheck.ToolbarButton:SetHighlightTexture ([[Interface\AddOns\Details_RaidCheck\icon_shadow]], "ADD")
|
||||
DetailsRaidCheck.ToolbarButton:SetNormalTexture ([[Interface\Buttons\UI-CheckBox-Check]])
|
||||
DetailsRaidCheck.ToolbarButton:SetPushedTexture ([[Interface\Buttons\UI-CheckBox-Check]])
|
||||
DetailsRaidCheck.ToolbarButton:SetDisabledTexture ([[Interface\Buttons\UI-CheckBox-Check]])
|
||||
DetailsRaidCheck.ToolbarButton:SetHighlightTexture ([[Interface\Buttons\UI-CheckBox-Check]], "ADD")
|
||||
DetailsRaidCheck.ToolbarButton:GetNormalTexture():SetVertexColor(.2, 1, .2)
|
||||
DetailsRaidCheck.ToolbarButton:GetHighlightTexture():SetVertexColor(.2, 1, .2)
|
||||
DetailsRaidCheck.ToolbarButton:GetDisabledTexture():SetVertexColor(.2, 1, .2)
|
||||
DetailsRaidCheck.ToolbarButton:GetPushedTexture():SetVertexColor(.2, 1, .2)
|
||||
else
|
||||
DetailsRaidCheck.ToolbarButton:SetNormalTexture ([[Interface\AddOns\Details_RaidCheck\icon]])
|
||||
DetailsRaidCheck.ToolbarButton:SetPushedTexture ([[Interface\AddOns\Details_RaidCheck\icon]])
|
||||
DetailsRaidCheck.ToolbarButton:SetDisabledTexture ([[Interface\AddOns\Details_RaidCheck\icon]])
|
||||
DetailsRaidCheck.ToolbarButton:SetHighlightTexture ([[Interface\AddOns\Details_RaidCheck\icon]], "ADD")
|
||||
DetailsRaidCheck.ToolbarButton:SetNormalTexture ([[Interface\Buttons\UI-CheckBox-Check]])
|
||||
DetailsRaidCheck.ToolbarButton:SetPushedTexture ([[Interface\Buttons\UI-CheckBox-Check]])
|
||||
DetailsRaidCheck.ToolbarButton:SetDisabledTexture ([[Interface\Buttons\UI-CheckBox-Check]])
|
||||
DetailsRaidCheck.ToolbarButton:SetHighlightTexture ([[Interface\Buttons\UI-CheckBox-Check]], "ADD")
|
||||
DetailsRaidCheck.ToolbarButton:GetNormalTexture():SetVertexColor(.2, 1, .2)
|
||||
DetailsRaidCheck.ToolbarButton:GetHighlightTexture():SetVertexColor(.2, 1, .2)
|
||||
DetailsRaidCheck.ToolbarButton:GetDisabledTexture():SetVertexColor(.2, 1, .2)
|
||||
DetailsRaidCheck.ToolbarButton:GetPushedTexture():SetVertexColor(.2, 1, .2)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -177,19 +180,29 @@ end
|
||||
local instance = _detalhes:GetInstance (lower_instance)
|
||||
|
||||
if (instance.menu_icons.shadow) then
|
||||
DetailsRaidCheck.ToolbarButton:SetNormalTexture ([[Interface\AddOns\Details_RaidCheck\icon_red_shadow]])
|
||||
DetailsRaidCheck.ToolbarButton:SetPushedTexture ([[Interface\AddOns\Details_RaidCheck\icon_red_shadow]])
|
||||
DetailsRaidCheck.ToolbarButton:SetDisabledTexture ([[Interface\AddOns\Details_RaidCheck\icon_red_shadow]])
|
||||
DetailsRaidCheck.ToolbarButton:SetHighlightTexture ([[Interface\AddOns\Details_RaidCheck\icon_red_shadow]], "ADD")
|
||||
DetailsRaidCheck.ToolbarButton:SetNormalTexture ([[Interface\Buttons\UI-CheckBox-Check]]) --RED
|
||||
DetailsRaidCheck.ToolbarButton:SetPushedTexture ([[Interface\Buttons\UI-CheckBox-Check]])
|
||||
DetailsRaidCheck.ToolbarButton:SetDisabledTexture ([[Interface\Buttons\UI-CheckBox-Check]])
|
||||
DetailsRaidCheck.ToolbarButton:SetHighlightTexture ([[Interface\Buttons\UI-CheckBox-Check]], "ADD")
|
||||
DetailsRaidCheck.ToolbarButton:GetNormalTexture():SetVertexColor(1, .6, .1)
|
||||
DetailsRaidCheck.ToolbarButton:GetNormalTexture():SetVertexColor(1, .6, .1)
|
||||
DetailsRaidCheck.ToolbarButton:GetHighlightTexture():SetVertexColor(1, .6, .1)
|
||||
DetailsRaidCheck.ToolbarButton:GetDisabledTexture():SetVertexColor(1, .6, .1)
|
||||
DetailsRaidCheck.ToolbarButton:GetPushedTexture():SetVertexColor(1, .6, .1)
|
||||
else
|
||||
DetailsRaidCheck.ToolbarButton:SetNormalTexture ([[Interface\AddOns\Details_RaidCheck\icon_red]])
|
||||
DetailsRaidCheck.ToolbarButton:SetPushedTexture ([[Interface\AddOns\Details_RaidCheck\icon_red]])
|
||||
DetailsRaidCheck.ToolbarButton:SetDisabledTexture ([[Interface\AddOns\Details_RaidCheck\icon_red]])
|
||||
DetailsRaidCheck.ToolbarButton:SetHighlightTexture ([[Interface\AddOns\Details_RaidCheck\icon_red]], "ADD")
|
||||
DetailsRaidCheck.ToolbarButton:SetNormalTexture ([[Interface\Buttons\UI-CheckBox-Check]]) --RED
|
||||
DetailsRaidCheck.ToolbarButton:SetPushedTexture ([[Interface\Buttons\UI-CheckBox-Check]])
|
||||
DetailsRaidCheck.ToolbarButton:SetDisabledTexture ([[Interface\Buttons\UI-CheckBox-Check]])
|
||||
DetailsRaidCheck.ToolbarButton:SetHighlightTexture ([[Interface\Buttons\UI-CheckBox-Check]], "ADD")
|
||||
DetailsRaidCheck.ToolbarButton:GetNormalTexture():SetVertexColor(1, .6, .1)
|
||||
DetailsRaidCheck.ToolbarButton:GetNormalTexture():SetVertexColor(1, .6, .1)
|
||||
DetailsRaidCheck.ToolbarButton:GetHighlightTexture():SetVertexColor(1, .6, .1)
|
||||
DetailsRaidCheck.ToolbarButton:GetDisabledTexture():SetVertexColor(1, .6, .1)
|
||||
DetailsRaidCheck.ToolbarButton:GetPushedTexture():SetVertexColor(1, .6, .1)
|
||||
end
|
||||
end
|
||||
|
||||
local show_panel = CreateFrame ("frame", nil, UIParent)
|
||||
local show_panel = CreateFrame ("frame", nil, UIParent, "BackdropTemplate")
|
||||
show_panel:SetPoint ("bottom", DetailsRaidCheck.ToolbarButton, "top", 0, 10)
|
||||
show_panel:SetClampedToScreen (true)
|
||||
show_panel:SetFrameStrata ("TOOLTIP")
|
||||
@@ -218,17 +231,17 @@ end
|
||||
report_string1:SetPoint ("bottomleft", show_panel, "bottomleft", 10, 8)
|
||||
report_string1:SetText ("|TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:12:12:0:1:512:512:8:70:225:307|t Report No Food/Flask |TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:12:12:0:1:512:512:8:70:328:409|t Report No Pre-Pot |TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:12:12:0:1:512:512:8:70:126:204|t Report No Rune | |cFFFFFFFFShift+Click: Options|r")
|
||||
|
||||
local using_details_string1 = show_panel:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
using_details_string1:SetPoint ("bottomleft", show_panel, "bottomleft", 10, 22)
|
||||
using_details_string1:SetText ("Receives dynamic updates from other Details! users when they change talents and gear")
|
||||
--local using_details_string1 = show_panel:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
--using_details_string1:SetPoint ("bottomleft", show_panel, "bottomleft", 10, 22)
|
||||
--using_details_string1:SetText ("Receives dynamic updates from other Details! users when they change talents and gear")
|
||||
|
||||
DetailsRaidCheck:SetFontSize (report_string1, 10)
|
||||
DetailsRaidCheck:SetFontColor (report_string1, "white")
|
||||
report_string1:SetAlpha (0.6)
|
||||
|
||||
DetailsRaidCheck:SetFontSize (using_details_string1, 10)
|
||||
DetailsRaidCheck:SetFontColor (using_details_string1, "white")
|
||||
using_details_string1:SetAlpha (0.6)
|
||||
--DetailsRaidCheck:SetFontSize (using_details_string1, 10)
|
||||
--DetailsRaidCheck:SetFontColor (using_details_string1, "white")
|
||||
--using_details_string1:SetAlpha (0.6)
|
||||
|
||||
--
|
||||
|
||||
@@ -240,7 +253,7 @@ end
|
||||
{text = "Food", width = 50},
|
||||
{text = "Flask", width = 50},
|
||||
{text = "Rune", width = 50},
|
||||
{text = "Pre-Pot Last Try", width = 100},
|
||||
--{text = "Pre-Pot Last Try", width = 100},
|
||||
{text = "Using Details!", width = 100},
|
||||
}
|
||||
local headerOptions = {
|
||||
@@ -261,12 +274,16 @@ end
|
||||
local headerY = y - 2
|
||||
local scrollY = headerY - 20
|
||||
|
||||
show_panel:SetSize (722 + 20, 580)
|
||||
show_panel:SetSize (722 + 20, 565)
|
||||
|
||||
function show_panel:AdjustHeight(height)
|
||||
show_panel:SetHeight (height or 565)
|
||||
end
|
||||
|
||||
--create line for the scroll
|
||||
local scroll_createline = function (self, index)
|
||||
|
||||
local line = CreateFrame ("button", "$parentLine" .. index, self)
|
||||
local line = CreateFrame ("button", "$parentLine" .. index, self, "BackdropTemplate")
|
||||
line:SetPoint ("topleft", self, "topleft", 1, -((index-1)*(scroll_line_height+1)) - 1)
|
||||
line:SetSize (scroll_width - 2, scroll_line_height)
|
||||
line:SetScript ("OnEnter", line_onenter)
|
||||
@@ -290,8 +307,8 @@ end
|
||||
|
||||
--talents
|
||||
local talent_row_options = {
|
||||
icon_width = 16,
|
||||
icon_height = 16,
|
||||
icon_width = 16,
|
||||
icon_height = 16,
|
||||
texcoord = {.1, .9, .1, .9},
|
||||
show_text = false,
|
||||
icon_padding = 2,
|
||||
@@ -308,7 +325,7 @@ end
|
||||
--no rune
|
||||
local RuneIndicator = DF:CreateImage (line, "", scroll_line_height, scroll_line_height)
|
||||
--no pre pot
|
||||
local PrePotIndicator = DF:CreateImage (line, "", scroll_line_height, scroll_line_height)
|
||||
--local PrePotIndicator = DF:CreateImage (line, "", scroll_line_height, scroll_line_height)
|
||||
--using details!
|
||||
local DetailsIndicator = DF:CreateImage (line, "", scroll_line_height, scroll_line_height)
|
||||
|
||||
@@ -318,7 +335,7 @@ end
|
||||
line:AddFrameToHeaderAlignment (FoodIndicator)
|
||||
line:AddFrameToHeaderAlignment (FlaskIndicator)
|
||||
line:AddFrameToHeaderAlignment (RuneIndicator)
|
||||
line:AddFrameToHeaderAlignment (PrePotIndicator)
|
||||
--line:AddFrameToHeaderAlignment (PrePotIndicator)
|
||||
line:AddFrameToHeaderAlignment (DetailsIndicator)
|
||||
|
||||
line:AlignWithHeader (DetailsRaidCheck.Header, "left")
|
||||
@@ -331,11 +348,11 @@ end
|
||||
line.FoodIndicator = FoodIndicator
|
||||
line.FlaskIndicator = FlaskIndicator
|
||||
line.RuneIndicator = RuneIndicator
|
||||
line.PrePotIndicator = PrePotIndicator
|
||||
--line.PrePotIndicator = PrePotIndicator
|
||||
line.DetailsIndicator = DetailsIndicator
|
||||
|
||||
return line
|
||||
end
|
||||
end
|
||||
|
||||
--refresh scroll
|
||||
local has_food_icon = {texture = [[Interface\Scenarios\ScenarioIcon-Check]], coords = {0, 1, 0, 1}}
|
||||
@@ -410,7 +427,7 @@ end
|
||||
|
||||
line.FlaskIndicator.texture = playerTable.Flask and [[Interface\Scenarios\ScenarioIcon-Check]] or ""
|
||||
line.RuneIndicator.texture = playerTable.Rune and [[Interface\Scenarios\ScenarioIcon-Check]] or ""
|
||||
line.PrePotIndicator.texture = playerTable.PrePot and [[Interface\Scenarios\ScenarioIcon-Check]] or ""
|
||||
--line.PrePotIndicator.texture = playerTable.PrePot and [[Interface\Scenarios\ScenarioIcon-Check]] or ""
|
||||
line.DetailsIndicator.texture = playerTable.UseDetails and [[Interface\Scenarios\ScenarioIcon-Check]] or ""
|
||||
end
|
||||
end
|
||||
@@ -419,10 +436,11 @@ end
|
||||
end
|
||||
|
||||
--create scroll
|
||||
local mainScroll = DF:CreateScrollBox (show_panel, "$parentMainScroll", scroll_refresh, PlayerData, scroll_width, scroll_height, scroll_lines, scroll_line_height)
|
||||
local mainScroll = DF:CreateScrollBox (show_panel, "$parentMainScroll", scroll_refresh, PlayerData, 1, 1, scroll_lines, scroll_line_height)
|
||||
DF:ReskinSlider (mainScroll)
|
||||
mainScroll.HideScrollBar = true
|
||||
mainScroll:SetPoint ("topleft", show_panel, "topleft", 10, scrollY)
|
||||
mainScroll:SetPoint ("bottomright", show_panel, "bottomright", -10, 20)
|
||||
mainScroll:Refresh()
|
||||
|
||||
--create lines
|
||||
@@ -578,8 +596,12 @@ end
|
||||
local groupTypeID = IsInRaid() and "raid" or "party"
|
||||
|
||||
local playerAmount = DetailsRaidCheck.GetPlayerAmount()
|
||||
local iterateAmount = playerAmount
|
||||
if (not IsInRaid()) then
|
||||
iterateAmount = iterateAmount - 1
|
||||
end
|
||||
|
||||
for i = 1, playerAmount do
|
||||
for i = 1, iterateAmount do
|
||||
local unitID = groupTypeID .. i
|
||||
local unitName = UnitName (unitID)
|
||||
local cleuName = _detalhes:GetCLName (unitID)
|
||||
@@ -643,6 +665,10 @@ end
|
||||
end
|
||||
|
||||
mainScroll:Refresh()
|
||||
|
||||
local height = (playerAmount * scroll_line_height) + 75
|
||||
show_panel:AdjustHeight(height)
|
||||
|
||||
end
|
||||
|
||||
DetailsRaidCheck.ToolbarButton:SetScript ("OnEnter", function (self)
|
||||
@@ -659,21 +685,23 @@ end
|
||||
show_panel:SetScript ("OnUpdate", nil)
|
||||
show_panel:Hide()
|
||||
DetailsRaidCheck:StopTrackBuffs()
|
||||
DetailsRaidCheck:StartTrackBuffs(5.0)
|
||||
end)
|
||||
|
||||
function DetailsRaidCheck:CheckZone (...)
|
||||
zone_type = select (1, ...)
|
||||
function DetailsRaidCheck:CheckCanShowIcon(...)
|
||||
local isInRaid = IsInRaid()
|
||||
local isInGroup = IsInGroup()
|
||||
|
||||
if (not zone_type) then
|
||||
zone_type = select (2, GetInstanceInfo())
|
||||
end
|
||||
|
||||
if (zone_type == "raid" or zone_type == "party") then
|
||||
if (isInRaid or isInGroup) then
|
||||
DetailsRaidCheck:ShowToolbarIcon (DetailsRaidCheck.ToolbarButton, "star")
|
||||
DetailsRaidCheck.on_raid = true
|
||||
DetailsRaidCheck:StartTrackBuffs(5.0)
|
||||
else
|
||||
DetailsRaidCheck:HideToolbarIcon (DetailsRaidCheck.ToolbarButton)
|
||||
DetailsRaidCheck.on_raid = false
|
||||
if (DetailsRaidCheck.UpdateBuffsTick and not DetailsRaidCheck.UpdateBuffsTick._cancelled) then
|
||||
DetailsRaidCheck.UpdateBuffsTick:Cancel()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -730,26 +758,27 @@ end
|
||||
wipe (DetailsRaidCheck.havefocusaug_table)
|
||||
wipe (DetailsRaidCheck.iseating_table)
|
||||
|
||||
local playerAmount = DetailsRaidCheck.GetPlayerAmount()
|
||||
|
||||
local hasConsumables = {
|
||||
Flask = 0,
|
||||
Food = 0,
|
||||
}
|
||||
|
||||
for i = 1, playerAmount do
|
||||
local unitID = get_unit_id (i)
|
||||
DetailsRaidCheck:CheckUnitBuffs (unitID, hasConsumables)
|
||||
end
|
||||
|
||||
if (not IsInRaid()) then
|
||||
--> track buffs on the player it self
|
||||
local playerAmount = DetailsRaidCheck.GetPlayerAmount()
|
||||
|
||||
if (IsInRaid()) then
|
||||
for i = 1, playerAmount do
|
||||
local unitId = "raid" .. i
|
||||
DetailsRaidCheck:CheckUnitBuffs(unitId, hasConsumables)
|
||||
end
|
||||
|
||||
elseif (IsInGroup()) then
|
||||
for i = 1, playerAmount-1 do
|
||||
local unitId = "party" .. i
|
||||
DetailsRaidCheck:CheckUnitBuffs(unitId, hasConsumables)
|
||||
end
|
||||
DetailsRaidCheck:CheckUnitBuffs ("player", hasConsumables)
|
||||
|
||||
--> increase the amount of players in 1 since DetailsRaidCheck.GetPlayerAmount() returns total - 1
|
||||
playerAmount = playerAmount + 1
|
||||
end
|
||||
|
||||
|
||||
if (hasConsumables.Food == playerAmount and hasConsumables.Flask == playerAmount) then
|
||||
DetailsRaidCheck:SetGreenIcon()
|
||||
else
|
||||
@@ -757,7 +786,7 @@ end
|
||||
end
|
||||
end
|
||||
|
||||
function DetailsRaidCheck:StartTrackBuffs()
|
||||
function DetailsRaidCheck:StartTrackBuffs(customUpdateSpeed)
|
||||
if (not DetailsRaidCheck.tracking_buffs) then
|
||||
DetailsRaidCheck.tracking_buffs = true
|
||||
|
||||
@@ -766,7 +795,12 @@ end
|
||||
if (DetailsRaidCheck.UpdateBuffsTick and not DetailsRaidCheck.UpdateBuffsTick._cancelled) then
|
||||
DetailsRaidCheck.UpdateBuffsTick:Cancel()
|
||||
end
|
||||
DetailsRaidCheck.UpdateBuffsTick = C_Timer.NewTicker (UpdateSpeed-0.01, DetailsRaidCheck.BuffTrackTick)
|
||||
|
||||
if (customUpdateSpeed) then
|
||||
DetailsRaidCheck.UpdateBuffsTick = C_Timer.NewTicker (customUpdateSpeed-0.01, DetailsRaidCheck.BuffTrackTick)
|
||||
else
|
||||
DetailsRaidCheck.UpdateBuffsTick = C_Timer.NewTicker (UpdateSpeed-0.01, DetailsRaidCheck.BuffTrackTick)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
@@ -864,7 +898,13 @@ end
|
||||
|
||||
function DetailsRaidCheck:OnEvent (_, event, ...)
|
||||
|
||||
if (event == "ADDON_LOADED") then
|
||||
if (event == "GROUP_ROSTER_UPDATE") then
|
||||
if (DetailsRaidCheck.RosterDelay < GetTime()) then
|
||||
DetailsRaidCheck:CheckCanShowIcon()
|
||||
DetailsRaidCheck.RosterDelay = GetTime()+2
|
||||
end
|
||||
|
||||
elseif (event == "ADDON_LOADED") then
|
||||
local AddonName = select (1, ...)
|
||||
if (AddonName == "Details_RaidCheck") then
|
||||
|
||||
@@ -890,20 +930,25 @@ end
|
||||
food_tier2 = true,
|
||||
food_tier3 = true,
|
||||
}
|
||||
|
||||
DetailsRaidCheck.RosterDelay = GetTime()
|
||||
|
||||
--> install
|
||||
local install, saveddata, is_enabled = _G._detalhes:InstallPlugin ("TOOLBAR", Loc ["STRING_RAIDCHECK_PLUGIN_NAME"], [[Interface\AddOns\Details_RaidCheck\icon]], DetailsRaidCheck, "DETAILS_PLUGIN_RAIDCHECK", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", version, default_settings)
|
||||
if (type (install) == "table" and install.error) then
|
||||
return print (install.error)
|
||||
end
|
||||
|
||||
--> register needed events
|
||||
|
||||
_G._detalhes:RegisterEvent (DetailsRaidCheck, "COMBAT_PLAYER_LEAVE")
|
||||
_G._detalhes:RegisterEvent (DetailsRaidCheck, "COMBAT_PLAYER_ENTER")
|
||||
_G._detalhes:RegisterEvent (DetailsRaidCheck, "COMBAT_PREPOTION_UPDATED")
|
||||
_G._detalhes:RegisterEvent (DetailsRaidCheck, "ZONE_TYPE_CHANGED")
|
||||
|
||||
--make it load after the other plugins
|
||||
C_Timer.After(1, function()
|
||||
--> install
|
||||
local install, saveddata, is_enabled = _G._detalhes:InstallPlugin ("TOOLBAR", Loc ["STRING_RAIDCHECK_PLUGIN_NAME"], [[Interface\Buttons\UI-CheckBox-Check]], DetailsRaidCheck, "DETAILS_PLUGIN_RAIDCHECK", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", version, default_settings)
|
||||
if (type (install) == "table" and install.error) then
|
||||
return print (install.error)
|
||||
end
|
||||
|
||||
--> register needed events
|
||||
_G._detalhes:RegisterEvent (DetailsRaidCheck, "COMBAT_PLAYER_LEAVE")
|
||||
_G._detalhes:RegisterEvent (DetailsRaidCheck, "COMBAT_PLAYER_ENTER")
|
||||
_G._detalhes:RegisterEvent (DetailsRaidCheck, "COMBAT_PREPOTION_UPDATED")
|
||||
_G._detalhes:RegisterEvent (DetailsRaidCheck, "ZONE_TYPE_CHANGED")
|
||||
|
||||
DetailsRaidCheck.Frame:RegisterEvent ("GROUP_ROSTER_UPDATE")
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Interface: 80300
|
||||
## Interface: 90001
|
||||
## Title: Details!: Raid Check (plugin)
|
||||
## Notes: Show talents and item level for all members in your group, also shows food and flask state.
|
||||
## RequiredDeps: Details
|
||||
|
||||
@@ -138,7 +138,7 @@ local function CreatePluginFrames()
|
||||
end
|
||||
|
||||
--> title bar, only shown when the frame isn't locked
|
||||
local titlebar = CreateFrame ("frame", "DetailsStreamerTitlebar", SOF)
|
||||
local titlebar = CreateFrame ("frame", "DetailsStreamerTitlebar", SOF, "BackdropTemplate")
|
||||
titlebar:SetHeight (20)
|
||||
titlebar:SetPoint ("bottomleft", SOF, "topleft")
|
||||
titlebar:SetPoint ("bottomright", SOF, "topright")
|
||||
@@ -238,8 +238,8 @@ local function CreatePluginFrames()
|
||||
end
|
||||
|
||||
--> two resizers
|
||||
local left_resize = CreateFrame ("button", "DetailsStreamerLeftResizer", SOF)
|
||||
local right_resize = CreateFrame ("button", "DetailsStreamerRightResizer", SOF)
|
||||
local left_resize = CreateFrame ("button", "DetailsStreamerLeftResizer", SOF, "BackdropTemplate")
|
||||
local right_resize = CreateFrame ("button", "DetailsStreamerRightResizer", SOF, "BackdropTemplate")
|
||||
left_resize:SetPoint ("bottomleft", SOF, "bottomleft")
|
||||
right_resize:SetPoint ("bottomright", SOF, "bottomright")
|
||||
left_resize:SetSize (16, 16)
|
||||
@@ -309,7 +309,7 @@ local function CreatePluginFrames()
|
||||
|
||||
|
||||
--> scroll frame
|
||||
local autoscroll = CreateFrame ("scrollframe", "Details_StreamOverlayScrollFrame", SOF, "FauxScrollFrameTemplate")
|
||||
local autoscroll = CreateFrame ("scrollframe", "Details_StreamOverlayScrollFrame", SOF, "FauxScrollFrameTemplate, BackdropTemplate")
|
||||
autoscroll:SetScript ("OnVerticalScroll", function (self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, 20, StreamOverlay.UpdateLines) end)
|
||||
|
||||
--> looks like this isn't working
|
||||
@@ -443,8 +443,8 @@ local function CreatePluginFrames()
|
||||
|
||||
local index = #StreamOverlay.battle_lines+1
|
||||
|
||||
local f = CreateFrame ("frame", "StreamOverlayBar" .. index, SOF)
|
||||
local statusbar = CreateFrame ("StatusBar", "StreamOverlayBar" .. index .. "StatusBar", f)
|
||||
local f = CreateFrame ("frame", "StreamOverlayBar" .. index, SOF, "BackdropTemplate")
|
||||
local statusbar = CreateFrame ("StatusBar", "StreamOverlayBar" .. index .. "StatusBar", f, "BackdropTemplate")
|
||||
local statusbar_texture = statusbar:CreateTexture (nil, "border")
|
||||
statusbar_texture:SetTexture (1, 1, 1, 0.15)
|
||||
statusbar:SetStatusBarColor (0, 0, 0, 0)
|
||||
@@ -1024,10 +1024,9 @@ local ACTIONS = 0
|
||||
local ACTIONS_EVENT_TIME = {}
|
||||
local AMP_Tick = C_Timer.NewTicker (1, function()
|
||||
APM = ACTIONS * 60
|
||||
--print ("APM:", APM)
|
||||
ACTIONS = 0
|
||||
end)
|
||||
local APM_FRAME = CreateFrame ("frame", "DetailsAPMFrame", UIParent)
|
||||
local APM_FRAME = CreateFrame ("frame", "DetailsAPMFrame", UIParent, "BackdropTemplate")
|
||||
APM_FRAME:RegisterEvent ("PLAYER_STARTED_MOVING")
|
||||
APM_FRAME:RegisterEvent ("PLAYER_STOPPED_MOVING")
|
||||
APM_FRAME:SetScript ("OnEvent", function()
|
||||
@@ -1039,19 +1038,14 @@ listener:SetScript ("OnEvent", function (self, event, ...)
|
||||
if (event ~= "UNIT_SPELLCAST_SENT" and event ~= "UNIT_SPELLCAST_SUCCEEDED" and ACTIONS_EVENT_TIME [event] ~= GetTime()) then
|
||||
ACTIONS = ACTIONS + 1
|
||||
ACTIONS_EVENT_TIME [event] = GetTime()
|
||||
--print (event, GetTime())
|
||||
end
|
||||
|
||||
--print (self, event, ...)
|
||||
|
||||
if (event == "UNIT_SPELLCAST_SENT") then
|
||||
|
||||
local unitID, target, castGUID, spellID = ...
|
||||
--local unitID, spell, rank, target, id = ...
|
||||
spell = GetSpellInfo (spellID)
|
||||
|
||||
--print (spell, ...)
|
||||
|
||||
if (unitID == "player") then
|
||||
CastsTable [castGUID] = {Target = target or "", Id = castGUID, CastStart = GetTime()}
|
||||
lastChannelSpell = castGUID
|
||||
@@ -1061,8 +1055,6 @@ end
|
||||
end
|
||||
|
||||
elseif (event == "UNIT_SPELLCAST_START") then
|
||||
--print ("UNIT_SPELLCAST_START", ...)
|
||||
|
||||
--spell, rank, id,
|
||||
local unitID, castGUID, spellID = ...
|
||||
|
||||
@@ -1075,7 +1067,6 @@ end
|
||||
elseif (event == "UNIT_SPELLCAST_INTERRUPTED") then
|
||||
--local unitID, spell, rank, id, spellID = ...
|
||||
local unitID, castGUID, spellID = ...
|
||||
--print ("UNIT_SPELLCAST_INTERRUPTED", ...)
|
||||
|
||||
if (unitID == "player" and CastsTable [castGUID]) then
|
||||
CastsTable [castGUID].Interrupted = true
|
||||
@@ -1090,7 +1081,6 @@ end
|
||||
castGUID = lastchannelid
|
||||
|
||||
if (not CastsTable [castGUID]) then
|
||||
--print ("not", " - ", id, " - ", lastChannelSpell)
|
||||
castGUID = lastChannelSpell
|
||||
if (not castGUID or not CastsTable [castGUID]) then
|
||||
return
|
||||
@@ -1102,8 +1092,6 @@ end
|
||||
end
|
||||
|
||||
elseif (event == "UNIT_SPELLCAST_CHANNEL_START") then
|
||||
--local unitID, spell, rank, id, spellID = ...
|
||||
--print ("UNIT_SPELLCAST_CHANNEL_START", ...)
|
||||
|
||||
local unitID, castGUID, spellID = ...
|
||||
|
||||
@@ -1118,7 +1106,6 @@ end
|
||||
end
|
||||
|
||||
if (not CastsTable [castGUID]) then
|
||||
--print ("not", " - ", id, " - ", lastChannelSpell)
|
||||
castGUID = lastChannelSpell
|
||||
end
|
||||
|
||||
@@ -1139,8 +1126,6 @@ end
|
||||
local unitID, castGUID, spellID = ...
|
||||
local spell = GetSpellInfo (spellID)
|
||||
|
||||
--print (spell, ...)
|
||||
|
||||
if (unitID == "player" and CastsTable[castGUID] and not channelspells [spell]) then
|
||||
if (CastsTable[castGUID].HasCastTime and not CastsTable[castGUID].IsChanneled) then
|
||||
--> a cast (non channeled) just successful finished
|
||||
@@ -1156,8 +1141,6 @@ end
|
||||
end
|
||||
end
|
||||
|
||||
--print (event, ...)
|
||||
|
||||
end)
|
||||
|
||||
local format_time = function (v) return "-" .. format ("%.2f", v) end
|
||||
@@ -1263,7 +1246,7 @@ end
|
||||
----------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--on screen hps dps
|
||||
|
||||
local screen_frame = CreateFrame ("frame", "StreamerOverlayDpsHpsFrame", UIParent)
|
||||
local screen_frame = CreateFrame ("frame", "StreamerOverlayDpsHpsFrame", UIParent, "BackdropTemplate")
|
||||
screen_frame:SetSize (70, 20)
|
||||
screen_frame:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}})
|
||||
screen_frame:SetBackdropColor (.1, .1, .1, .9)
|
||||
@@ -1944,7 +1927,7 @@ function StreamOverlay:OnEvent (_, event, ...)
|
||||
StreamOverlay.DefaultConfigTable = default_options_table
|
||||
|
||||
--> Install
|
||||
local install, saveddata = _G._detalhes:InstallPlugin ("TOOLBAR", "Streamer", [[Interface\MINIMAP\MOVIERECORDINGICON]], StreamOverlay, "DETAILS_PLUGIN_STREAM_OVERLAY", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", StreamOverlay.CurrentVersion, default_options_table)
|
||||
local install, saveddata = _G._detalhes:InstallPlugin ("TOOLBAR", "Action Tracker", [[Interface\MINIMAP\MOVIERECORDINGICON]], StreamOverlay, "DETAILS_PLUGIN_STREAM_OVERLAY", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", StreamOverlay.CurrentVersion, default_options_table)
|
||||
if (type (install) == "table" and install.error) then
|
||||
print (install.error)
|
||||
end
|
||||
@@ -1974,7 +1957,7 @@ function StreamOverlay:OnEvent (_, event, ...)
|
||||
|
||||
StreamOverlay.ShowWelcomeFrame:Cancel()
|
||||
|
||||
local welcome_window = CreateFrame ("frame", "StreamOverlayWelcomeWindow", UIParent)
|
||||
local welcome_window = CreateFrame ("frame", "StreamOverlayWelcomeWindow", UIParent, "BackdropTemplate")
|
||||
welcome_window:SetPoint ("center", UIParent, "center")
|
||||
welcome_window:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
welcome_window:SetBackdropColor (0, 0, 0, 0.5)
|
||||
@@ -1984,13 +1967,13 @@ function StreamOverlay:OnEvent (_, event, ...)
|
||||
local icon = welcome_window:CreateTexture (nil, "overlay")
|
||||
icon:SetTexture ([[Interface\MINIMAP\MOVIERECORDINGICON]])
|
||||
local title = welcome_window:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
title:SetText ("Details!: Streamer (plugin)")
|
||||
title:SetText ("Details!: Action Tracker (plugin)")
|
||||
StreamOverlay:SetFontSize (title, 20)
|
||||
|
||||
local text1 = welcome_window:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
text1:SetText ("If you are a Streamer or Youtuber, you might want to take a look at the Details! Streamer plugin.")
|
||||
text1:SetText ("If you are a Streamer or Youtuber, you might want to take a look at the Details! Action Tracker plugin.")
|
||||
local text2 = welcome_window:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
text2:SetText ("Go to Options Panel -> Plugin Management and enable the Streamer plugin.")
|
||||
text2:SetText ("Go to Options Panel -> Plugin Management and enable the Action Tracker plugin.")
|
||||
|
||||
icon:SetPoint ("topleft", welcome_window, "topleft", 10, -60)
|
||||
|
||||
@@ -2070,7 +2053,7 @@ function StreamOverlay:CreateMinimapIcon()
|
||||
end,
|
||||
|
||||
OnTooltipShow = function (tooltip)
|
||||
tooltip:AddLine ("Details!: Streamer", 1, 1, 1)
|
||||
tooltip:AddLine ("Details!: Action Tracker", 1, 1, 1)
|
||||
tooltip:AddLine ("|cFFFF7700Left Click|r: open options.")
|
||||
tooltip:AddLine ("|cFFFF7700Right Click|r: hide this icon.")
|
||||
end,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Interface: 80300
|
||||
## Interface: 90001
|
||||
## Title: Details!: Streamer (plugin)
|
||||
## Notes: Show which spells you are casting, viewers can see what are you doing and follow your steps.
|
||||
## RequiredDeps: Details
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Interface: 80300
|
||||
## Interface: 90001
|
||||
## Title: Details!: Tiny Threat (plugin)
|
||||
## Notes: Threat meter plugin, show threat for group members in the window. Select it from the Plugin menu in the Orange Cogwheel.
|
||||
## RequiredDeps: Details
|
||||
@@ -11,4 +11,4 @@ embeds.xml
|
||||
enUS.lua
|
||||
ptBR.lua
|
||||
|
||||
Details_TinyThreat.lua
|
||||
Details_TinyThreat.lua
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
|
||||
..\FrameXML\UI.xsd">
|
||||
<Script file="AceLocale-3.0.lua"/>
|
||||
</Ui>
|
||||
</Ui>
|
||||
|
||||
@@ -38,4 +38,4 @@ assert(newOldMinor == 3) -- previous version was 3 (even though it gave a string
|
||||
|
||||
local newLib, newOldMinor = LibStub:NewLibrary("Pants", 5) -- register a new library, using a normal number instead of a string
|
||||
assert(newLib)
|
||||
assert(newOldMinor == 4) -- previous version was 4 (even though it gave a string)
|
||||
assert(newOldMinor == 4) -- previous version was 4 (even though it gave a string)
|
||||
|
||||
@@ -11,4 +11,4 @@ assert(not success or not ret) -- either error because proxy is not a string or
|
||||
|
||||
assert(not pcall(LibStub.NewLibrary, LibStub, "Something", "No number in here")) -- should error, minor has no string in it.
|
||||
|
||||
assert(not LibStub:GetLibrary("Something", true)) -- shouldn't've created it from the above statement
|
||||
assert(not LibStub:GetLibrary("Something", true)) -- shouldn't've created it from the above statement
|
||||
|
||||
@@ -38,4 +38,4 @@ loadfile("../LibStub.lua")()
|
||||
assert(LibStub.IterateLibraries == 123)
|
||||
|
||||
|
||||
print("OK")
|
||||
print("OK")
|
||||
|
||||
@@ -13,4 +13,4 @@ Loc ["STRING_SLASH_AMOUNT"] = "amount"
|
||||
Loc ["STRING_COMMAND_LIST"] = "Available Commands:"
|
||||
Loc ["STRING_SLASH_SPEED_DESC"] = "Changes the frequency (in seconds) which the window is updated, allow values between 0.1 and 3.0"
|
||||
Loc ["STRING_SLASH_SPEED_CHANGED"] = "Update Speed changed to "
|
||||
Loc ["STRING_SLASH_SPEED_CURRENT"] = "Update Speed current value is "
|
||||
Loc ["STRING_SLASH_SPEED_CURRENT"] = "Update Speed current value is "
|
||||
|
||||
@@ -4,4 +4,4 @@ if (not Loc) then
|
||||
return
|
||||
end
|
||||
|
||||
Loc ["STRING_PLUGIN_NAME"] = "Mini Ameaca"
|
||||
Loc ["STRING_PLUGIN_NAME"] = "Mini Ameaca"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
local AceLocale = LibStub ("AceLocale-3.0")
|
||||
local Loc = AceLocale:GetLocale ("Details")
|
||||
local SharedMedia = LibStub:GetLibrary ("LibSharedMedia-3.0")
|
||||
local DF = _G.DetailsFramework
|
||||
|
||||
---------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -24,6 +25,9 @@ local _unpack = unpack
|
||||
local UnitGetTotalAbsorbs = UnitGetTotalAbsorbs
|
||||
---------------------------------------------------------------------------------------------
|
||||
|
||||
local DB_ANIMATION_TIME_DILATATION = 0.515321
|
||||
|
||||
|
||||
local _cstr = string.format --> lua library local
|
||||
local _table_insert = table.insert --> lua library local
|
||||
local _table_remove = table.remove --> lua library local
|
||||
@@ -41,6 +45,8 @@ local Vanguard = _detalhes:NewPluginObject ("Details_Vanguard")
|
||||
--> Main Frame
|
||||
local VanguardFrame = Vanguard.Frame
|
||||
|
||||
local onUpdateFrame = CreateFrame("frame")
|
||||
|
||||
Vanguard:SetPluginDescription ("Show debuffs on each tanks in the raid, also shows incoming heal and damage and the last hits you took.")
|
||||
|
||||
|
||||
@@ -66,14 +72,15 @@ local function CreatePluginFrames (data)
|
||||
if (not Vanguard.db.first_run) then
|
||||
Vanguard.db.first_run = true
|
||||
|
||||
local welcome = CreateFrame ("frame", nil, UIParent)
|
||||
local welcome = CreateFrame ("frame", nil, UIParent, "BackdropTemplate")
|
||||
welcome:SetFrameStrata ("TOOLTIP")
|
||||
welcome:SetPoint ("center", UIParent, "center")
|
||||
welcome:SetSize (400, 175)
|
||||
welcome:SetBackdrop ({edgeFile = "Interface\\Buttons\\UI-SliderBar-Border", edgeSize = 8,
|
||||
bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 130, insets = {left = 1, right = 1, top = 5, bottom = 5}})
|
||||
--welcome:SetBackdrop ({edgeFile = "Interface\\Buttons\\UI-SliderBar-Border", edgeSize = 8,
|
||||
--bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 130, insets = {left = 1, right = 1, top = 5, bottom = 5}})
|
||||
DF:ApplyStandardBackdrop(welcome)
|
||||
|
||||
local str = _detalhes.gump:CreateLabel (welcome, "Welcome to Vanguard!\n\n\n- The green-left bar represents the incoming healing plus absorbs on the tank.\n\n- The red-right tries to calculate the incoming damage taking the total damage suffered by the tank on the last 5 seconds.", nil, nil, "GameFontNormal")
|
||||
local str = _detalhes.gump:CreateLabel (welcome, "Welcome to Vanguard!\n\n\n- The green-left bar represents the incoming healing plus absorbs on the tank.\n\n- The red-right show the incoming damage.\n\n- Click anywhere to show options.", nil, nil, "GameFontNormal")
|
||||
str:SetPoint (15, -15)
|
||||
str:SetWidth (375)
|
||||
|
||||
@@ -145,24 +152,19 @@ local function CreatePluginFrames (data)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
-- não vamos mais mostrar o jogador
|
||||
-- somente barra de inc heal + absorbs
|
||||
-- somente barra de vida
|
||||
|
||||
-- option tank square size
|
||||
|
||||
|
||||
--> list with tank names
|
||||
Vanguard.TankList = {} --> tanks
|
||||
Vanguard.TankHashNames = {} --> tanks
|
||||
Vanguard.TankBlocks = {} --> tank frames
|
||||
Vanguard.TankIncDamage = {} --> tank damage taken from last 5 seconds
|
||||
|
||||
--> search for tanks in the raid or party group
|
||||
function Vanguard:IdentifyTanks()
|
||||
|
||||
table.wipe (Vanguard.TankList)
|
||||
table.wipe (Vanguard.TankHashNames)
|
||||
table.wipe (Vanguard.TankIncDamage)
|
||||
|
||||
if (IsInRaid()) then
|
||||
|
||||
@@ -177,6 +179,7 @@ local function CreatePluginFrames (data)
|
||||
if (not Vanguard.TankHashNames [name]) then
|
||||
Vanguard.TankList [#Vanguard.TankList+1] = name
|
||||
Vanguard.TankHashNames [name] = #Vanguard.TankList
|
||||
Vanguard.TankIncDamage [name] = {}
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -194,6 +197,7 @@ local function CreatePluginFrames (data)
|
||||
if (not Vanguard.TankHashNames [name]) then
|
||||
Vanguard.TankList [#Vanguard.TankList+1] = name
|
||||
Vanguard.TankHashNames [name] = #Vanguard.TankList
|
||||
Vanguard.TankIncDamage [name] = {}
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -208,6 +212,7 @@ local function CreatePluginFrames (data)
|
||||
if (not Vanguard.TankHashNames [name]) then
|
||||
Vanguard.TankList [#Vanguard.TankList+1] = name
|
||||
Vanguard.TankHashNames [name] = #Vanguard.TankList
|
||||
Vanguard.TankIncDamage [name] = {}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -220,6 +225,7 @@ local function CreatePluginFrames (data)
|
||||
if (not Vanguard.TankHashNames [name]) then
|
||||
Vanguard.TankList [#Vanguard.TankList+1] = name
|
||||
Vanguard.TankHashNames [name] = #Vanguard.TankList
|
||||
Vanguard.TankIncDamage [name] = {}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -237,6 +243,10 @@ local function CreatePluginFrames (data)
|
||||
bar:SetRightText ("")
|
||||
bar:SetRightColor (.25, 0, 0, 1)
|
||||
bar:SetLeftColor (0, .25, 0, 1)
|
||||
bar:SetHeight(Vanguard.db.bar_height)
|
||||
bar:SetTexture(SharedMedia:Fetch ("statusbar", Vanguard.db.tank_block_texture))
|
||||
bar.div:SetHeight(Vanguard.db.bar_height*2)
|
||||
bar.div:SetAlpha(0.79)
|
||||
bar:Show()
|
||||
end
|
||||
else
|
||||
@@ -328,14 +338,14 @@ local function CreatePluginFrames (data)
|
||||
function Vanguard:CreateTankBlock (index)
|
||||
--frame
|
||||
|
||||
local f = CreateFrame ("button", "VanguardTankBlock" .. index, VanguardFrame)
|
||||
local f = CreateFrame ("button", "VanguardTankBlock" .. index, VanguardFrame, "BackdropTemplate")
|
||||
f.SetTank = SetTank
|
||||
f:SetSize (Vanguard.db.tank_block_size or 150, 50)
|
||||
|
||||
f:SetScript ("OnMouseUp", on_click)
|
||||
|
||||
if (index == 1) then
|
||||
f:SetPoint ("bottomleft", VanguardFrame, "bottomleft", 5 + ((index-1) * 155), 5)
|
||||
f:SetPoint ("bottomleft", VanguardFrame, "bottomleft", 0 + ((index-1) * 155), 0)
|
||||
else
|
||||
f:SetPoint ("left", Vanguard.TankBlocks [index-1], "right", 5, 0)
|
||||
end
|
||||
@@ -344,113 +354,112 @@ local function CreatePluginFrames (data)
|
||||
f:SetBackdropColor (unpack (Vanguard.db.tank_block_color))
|
||||
f:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
|
||||
--statusbar
|
||||
f.statusbar = CreateFrame ("statusbar", nil, f)
|
||||
f.statusbar:SetPoint ("topleft", f, "topleft", 1, -1)
|
||||
f.statusbar:SetPoint ("bottomright", f, "bottomright", -1, 1)
|
||||
f.texture = f.statusbar:CreateTexture (nil, "artwork")
|
||||
f.statusbar:SetStatusBarTexture (f.texture)
|
||||
f.statusbar:SetMinMaxValues (0, 100)
|
||||
f.statusbar:SetValue (100)
|
||||
|
||||
f.texture:SetTexture (SharedMedia:Fetch ("statusbar", Vanguard.db.tank_block_texture))
|
||||
--tank health bar
|
||||
f.statusbar = CreateFrame ("statusbar", nil, f, "BackdropTemplate")
|
||||
f.statusbar:SetPoint ("topleft", f, "topleft", 1, -1)
|
||||
f.statusbar:SetPoint ("bottomright", f, "bottomright", -1, 1)
|
||||
--health bar texture
|
||||
f.texture = f.statusbar:CreateTexture (nil, "artwork")
|
||||
f.statusbar:SetStatusBarTexture (f.texture)
|
||||
f.statusbar:SetMinMaxValues (0, 100)
|
||||
f.statusbar:SetValue (100)
|
||||
f.texture:SetTexture (SharedMedia:Fetch ("statusbar", Vanguard.db.tank_block_texture))
|
||||
|
||||
--spec icon
|
||||
f.specicon = f.statusbar:CreateTexture (nil, "overlay")
|
||||
f.specicon:SetPoint ("topleft", f, "topleft", 5, -5)
|
||||
f.specicon:SetSize (14, 14)
|
||||
|
||||
--tank name
|
||||
f.tankname = f.statusbar:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
f.tankname:SetPoint ("left", f.specicon, "right", 2, 0)
|
||||
|
||||
--spec icon
|
||||
f.specicon = f.statusbar:CreateTexture (nil, "overlay")
|
||||
f.specicon:SetPoint ("topleft", f, "topleft", 5, -5)
|
||||
f.specicon:SetSize (14, 14)
|
||||
|
||||
--tank name
|
||||
f.tankname = f.statusbar:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
f.tankname:SetPoint ("left", f.specicon, "right", 2, 0)
|
||||
|
||||
--debuff icons
|
||||
f.debufficons = {}
|
||||
--debuff icons
|
||||
f.debufficons = {}
|
||||
|
||||
--inc heals inc damage
|
||||
f.heal_inc = framework:NewSplitBar (VanguardFrame, VanguardFrame, "VanguardDamageVsHeal" .. index, "DamageVsHeal" .. index, 294, 14)
|
||||
f.heal_inc:SetPoint ("topleft", VanguardFrame, "topleft", 3, -3 + ((index - 1) * -16))
|
||||
f.heal_inc:SetPoint ("topright", VanguardFrame, "topright", -3, -3 + ((index - 1) * -16))
|
||||
f.heal_inc = framework:NewSplitBar (VanguardFrame, VanguardFrame, "VanguardDamageVsHeal" .. index, "DamageVsHeal" .. index, 294, Vanguard.db.bar_height)
|
||||
f.heal_inc:SetTexture(SharedMedia:Fetch ("statusbar", Vanguard.db.tank_block_texture))
|
||||
f.heal_inc:SetPoint ("topleft", VanguardFrame, "topleft", 0, ((index - 1) * -Vanguard.db.bar_height))
|
||||
f.heal_inc:SetPoint ("topright", VanguardFrame, "topright", 0, ((index - 1) * -Vanguard.db.bar_height))
|
||||
|
||||
f.heal_inc.fontsize = 10
|
||||
f.heal_inc.righticon = "Interface\\ICONS\\misc_arrowleft"
|
||||
f.heal_inc.iconright:SetVertexColor (1, .5, .5, 1)
|
||||
|
||||
f.heal_inc:SetScript ("OnMouseUp", on_click)
|
||||
f.heal_inc.fontsize = 10
|
||||
|
||||
_G [f.heal_inc:GetName() .. "_IconRight"]:SetSize(1, 1)
|
||||
f.heal_inc.righticon = ""
|
||||
|
||||
--debuffs blocks
|
||||
f.debuffs_blocks = {}
|
||||
f.debuffs_using = 0
|
||||
f.debuffs_next_index = 1
|
||||
f.heal_inc.iconright:SetVertexColor (1, .5, .5, 1)
|
||||
|
||||
for i = 1, 3 do
|
||||
local support_frame = CreateFrame ("frame", nil, f)
|
||||
support_frame:SetFrameLevel (f:GetFrameLevel()+1)
|
||||
support_frame:SetSize (24, 24)
|
||||
support_frame:SetScript ("OnMouseUp", on_click)
|
||||
|
||||
--support_frame:SetScript ("OnEnter", debuff_on_enter)
|
||||
--support_frame:SetScript ("OnLeave", debuff_on_leave)
|
||||
|
||||
local texture = support_frame:CreateTexture (nil, "overlay")
|
||||
texture:SetSize (24, 24)
|
||||
|
||||
local y = 3
|
||||
|
||||
if (i == 1) then --> left
|
||||
support_frame:SetPoint ("left", f, "left", 5, 0)
|
||||
support_frame:SetPoint ("bottom", f, "bottom", 0, y)
|
||||
f.heal_inc:SetScript ("OnMouseUp", on_click)
|
||||
|
||||
--debuffs blocks
|
||||
f.debuffs_blocks = {}
|
||||
f.debuffs_using = 0
|
||||
f.debuffs_next_index = 1
|
||||
|
||||
for i = 1, 3 do
|
||||
local support_frame = CreateFrame ("frame", nil, f, "BackdropTemplate")
|
||||
support_frame:SetFrameLevel (f:GetFrameLevel()+1)
|
||||
support_frame:SetSize (24, 24)
|
||||
support_frame:SetScript ("OnMouseUp", on_click)
|
||||
|
||||
texture:SetPoint ("left", f, "left", 5, 0)
|
||||
texture:SetPoint ("bottom", f, "bottom", 0, y)
|
||||
local texture = support_frame:CreateTexture (nil, "overlay")
|
||||
texture:SetSize (24, 24)
|
||||
|
||||
elseif (i == 2) then --> center
|
||||
support_frame:SetPoint ("center", f, "center", 0, 0)
|
||||
support_frame:SetPoint ("bottom", f, "bottom", 0, y)
|
||||
local y = 3
|
||||
|
||||
texture:SetPoint ("center", f, "center", 0, 0)
|
||||
texture:SetPoint ("bottom", f, "bottom", 0, y)
|
||||
|
||||
elseif (i == 3) then --> right
|
||||
support_frame:SetPoint ("right", f, "right", -5, 0)
|
||||
support_frame:SetPoint ("bottom", f, "bottom", 0, y)
|
||||
|
||||
texture:SetPoint ("right", f, "right", -5, 0)
|
||||
texture:SetPoint ("bottom", f, "bottom", 0, y)
|
||||
if (i == 1) then --> left
|
||||
support_frame:SetPoint ("left", f, "left", 5, 0)
|
||||
support_frame:SetPoint ("bottom", f, "bottom", 0, y)
|
||||
|
||||
texture:SetPoint ("left", f, "left", 5, 0)
|
||||
texture:SetPoint ("bottom", f, "bottom", 0, y)
|
||||
|
||||
elseif (i == 2) then --> center
|
||||
support_frame:SetPoint ("center", f, "center", 0, 0)
|
||||
support_frame:SetPoint ("bottom", f, "bottom", 0, y)
|
||||
|
||||
texture:SetPoint ("center", f, "center", 0, 0)
|
||||
texture:SetPoint ("bottom", f, "bottom", 0, y)
|
||||
|
||||
elseif (i == 3) then --> right
|
||||
support_frame:SetPoint ("right", f, "right", -5, 0)
|
||||
support_frame:SetPoint ("bottom", f, "bottom", 0, y)
|
||||
|
||||
texture:SetPoint ("right", f, "right", -5, 0)
|
||||
texture:SetPoint ("bottom", f, "bottom", 0, y)
|
||||
|
||||
end
|
||||
|
||||
local dblock = CreateFrame ("cooldown", "VanguardTankBlock" .. index.. "Cooldown" .. i, support_frame, "CooldownFrameTemplate, BackdropTemplate")
|
||||
dblock:SetAlpha (0.7)
|
||||
dblock:SetPoint ("topleft", texture, "topleft")
|
||||
dblock:SetPoint ("bottomright", texture, "bottomright")
|
||||
dblock:SetScript ("OnMouseUp", on_click)
|
||||
dblock.texture = texture
|
||||
|
||||
dblock:SetScript ("OnEnter", debuff_on_enter)
|
||||
dblock:SetScript ("OnLeave", debuff_on_leave)
|
||||
|
||||
local stack = dblock:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
stack:SetPoint ("bottomright", dblock, "bottomright", 8, 0)
|
||||
local stack_bg = dblock:CreateTexture (nil, "artwork")
|
||||
stack_bg:SetTexture (0, 0, 0)
|
||||
stack_bg:SetPoint ("bottomright", dblock, "bottomright", 8, 0)
|
||||
stack_bg:SetSize (12, 12)
|
||||
|
||||
dblock.stack = stack
|
||||
dblock.stack_bg = stack_bg
|
||||
dblock.support = support_frame
|
||||
|
||||
f.debuffs_blocks [i] = dblock
|
||||
end
|
||||
|
||||
local dblock = CreateFrame ("cooldown", "VanguardTankBlock" .. index.. "Cooldown" .. i, support_frame, "CooldownFrameTemplate")
|
||||
dblock:SetAlpha (0.7)
|
||||
dblock:SetPoint ("topleft", texture, "topleft")
|
||||
dblock:SetPoint ("bottomright", texture, "bottomright")
|
||||
dblock:SetScript ("OnMouseUp", on_click)
|
||||
dblock.texture = texture
|
||||
|
||||
dblock:SetScript ("OnEnter", debuff_on_enter)
|
||||
dblock:SetScript ("OnLeave", debuff_on_leave)
|
||||
|
||||
local stack = dblock:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
stack:SetPoint ("bottomright", dblock, "bottomright", 8, 0)
|
||||
local stack_bg = dblock:CreateTexture (nil, "artwork")
|
||||
stack_bg:SetTexture (0, 0, 0)
|
||||
stack_bg:SetPoint ("bottomright", dblock, "bottomright", 8, 0)
|
||||
stack_bg:SetSize (12, 12)
|
||||
|
||||
dblock.stack = stack
|
||||
dblock.stack_bg = stack_bg
|
||||
dblock.support = support_frame
|
||||
|
||||
f.debuffs_blocks [i] = dblock
|
||||
end
|
||||
|
||||
Vanguard.TankBlocks [index] = f
|
||||
|
||||
Vanguard:ResetBars()
|
||||
|
||||
return f
|
||||
end
|
||||
|
||||
|
||||
function Vanguard:RefreshTanks()
|
||||
|
||||
Vanguard:ResetBlocks()
|
||||
@@ -470,6 +479,59 @@ local function CreatePluginFrames (data)
|
||||
end
|
||||
end
|
||||
|
||||
function Vanguard.AnimateLeftWithAccel(self, deltaTime)
|
||||
local distance = (self.AnimationStart - self.AnimationEnd) / self.CurrentHealthMax * 100 --scale 1 - 100
|
||||
local minTravel = min (distance / 10, 3) -- 10 = trigger distance to max speed 3 = speed scale on max travel
|
||||
local maxTravel = max (minTravel, 0.45) -- 0.45 = min scale speed on low travel speed
|
||||
local calcAnimationSpeed = (self.CurrentHealthMax * (deltaTime * DB_ANIMATION_TIME_DILATATION)) * maxTravel --re-scale back to unit health, scale with delta time and scale with the travel speed
|
||||
|
||||
self.AnimationStart = self.AnimationStart - (calcAnimationSpeed)
|
||||
self:SetSplit (self.AnimationStart)
|
||||
self.CurrentHealth = self.AnimationStart
|
||||
|
||||
if (self.Spark) then
|
||||
self.Spark:SetPoint ("center", self, "left", self.AnimationStart / self.CurrentHealthMax * self:GetWidth(), 0)
|
||||
self.Spark:Show()
|
||||
end
|
||||
|
||||
if (self.AnimationStart-1 <= self.AnimationEnd) then
|
||||
self:SetSplit (self.AnimationEnd)
|
||||
self.CurrentHealth = self.AnimationEnd
|
||||
self.IsAnimating = false
|
||||
if (self.Spark) then
|
||||
self.Spark:Hide()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function Vanguard.AnimateRightWithAccel(self, deltaTime)
|
||||
local distance = (self.AnimationEnd - self.AnimationStart) / self.CurrentHealthMax * 100 --scale 1 - 100 basis
|
||||
local minTravel = math.min (distance / 10, 3) -- 10 = trigger distance to max speed 3 = speed scale on max travel
|
||||
local maxTravel = math.max (minTravel, 0.45) -- 0.45 = min scale speed on low travel speed
|
||||
local calcAnimationSpeed = (self.CurrentHealthMax * (deltaTime * DB_ANIMATION_TIME_DILATATION)) * maxTravel --re-scale back to unit health, scale with delta time and scale with the travel speed
|
||||
|
||||
self.AnimationStart = self.AnimationStart + (calcAnimationSpeed)
|
||||
self:SetSplit (self.AnimationStart)
|
||||
self.CurrentHealth = self.AnimationStart
|
||||
|
||||
if (self.AnimationStart+1 >= self.AnimationEnd) then
|
||||
self:SetSplit (self.AnimationEnd)
|
||||
self.CurrentHealth = self.AnimationEnd
|
||||
self.IsAnimating = false
|
||||
end
|
||||
end
|
||||
|
||||
onUpdateFrame.onUpdate = function(self, deltaTime)
|
||||
--do healthbar animation ~animation ~healthbar
|
||||
for tank_name, block_index in pairs (Vanguard.TankHashNames) do
|
||||
local tframe = Vanguard.TankBlocks [block_index]
|
||||
local bar = tframe.heal_inc
|
||||
if (bar.IsAnimating) then
|
||||
bar.AnimateFunc(bar, deltaTime)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function Vanguard:TrackIncoming()
|
||||
|
||||
for tank_name, block_index in pairs (Vanguard.TankHashNames) do
|
||||
@@ -477,23 +539,33 @@ local function CreatePluginFrames (data)
|
||||
local shields = UnitGetTotalAbsorbs (tank_name) or 0
|
||||
local heals = UnitGetIncomingHeals (tank_name) or 0
|
||||
|
||||
local events_table = Vanguard.CurrentCombat.player_last_events [tank_name]
|
||||
local events_table = Vanguard.CurrentCombat.player_last_events [tank_name]
|
||||
local taken = 0
|
||||
local timeNow = time()
|
||||
|
||||
if (events_table) then
|
||||
for _, event in ipairs (events_table) do
|
||||
if (event [1] and event [4]+5 > time()) then --> damage
|
||||
if (event[1] and event[4]+5 > timeNow) then --damage event
|
||||
taken = taken + event [3]
|
||||
end
|
||||
end
|
||||
|
||||
taken = taken / 3.5
|
||||
|
||||
tinsert(Vanguard.TankIncDamage, 1, taken)
|
||||
tremove(Vanguard.TankIncDamage, 41)
|
||||
|
||||
--taken = taken / 3.5
|
||||
end
|
||||
|
||||
|
||||
local tframe = Vanguard.TankBlocks [block_index]
|
||||
tframe.heal_inc:SetLeftText (Vanguard:ToK (shields + heals) .. " (|cFFFFFF55A: " .. Vanguard:ToK (shields) .. "|r)")
|
||||
|
||||
--split animation
|
||||
tframe.heal_inc:SetLeftText (Vanguard:ToK (shields + heals) .. " [|cFFFFFF55" .. Vanguard:ToK (shields) .. "|r]")
|
||||
tframe.heal_inc:SetRightText (Vanguard:ToK ( _math_floor (taken)))
|
||||
|
||||
heals = heals + shields
|
||||
|
||||
local oldValue = tframe.heal_inc:GetValue()
|
||||
local currentValue = 0
|
||||
|
||||
if (taken > 0 and heals > 0) then
|
||||
if (taken > heals) then
|
||||
@@ -503,50 +575,69 @@ local function CreatePluginFrames (data)
|
||||
p = p / 2
|
||||
p = p + 50
|
||||
p = _math_abs (p - 100)
|
||||
tframe.heal_inc:SetSplit (p)
|
||||
--tframe.heal_inc:SetSplit (p)
|
||||
currentValue = p
|
||||
else
|
||||
local p = taken / heals * 100
|
||||
p = _math_abs (p - 100)
|
||||
p = p / 2
|
||||
p = p + 50
|
||||
|
||||
tframe.heal_inc:SetSplit (p)
|
||||
--tframe.heal_inc:SetSplit (p)
|
||||
currentValue = p
|
||||
end
|
||||
|
||||
elseif (taken > 0) then
|
||||
tframe.heal_inc:SetSplit (6)
|
||||
--tframe.heal_inc:SetSplit (6)
|
||||
currentValue = 1
|
||||
|
||||
elseif (heals > 0) then
|
||||
tframe.heal_inc:SetSplit (94)
|
||||
--tframe.heal_inc:SetSplit (94)
|
||||
currentValue = 99
|
||||
end
|
||||
|
||||
--~animation
|
||||
tframe.heal_inc.oldValue = oldValue
|
||||
tframe.heal_inc.currentValue = currentValue--tframe.heal_inc:GetValue()
|
||||
|
||||
tframe.heal_inc.CurrentHealthMax = 100
|
||||
tframe.heal_inc.AnimationStart = tframe.heal_inc.oldValue
|
||||
tframe.heal_inc.AnimationEnd = tframe.heal_inc.currentValue
|
||||
|
||||
tframe.heal_inc.IsAnimating = true
|
||||
|
||||
if (tframe.heal_inc.AnimationEnd > tframe.heal_inc.AnimationStart) then
|
||||
tframe.heal_inc.AnimateFunc = Vanguard.AnimateRightWithAccel
|
||||
else
|
||||
tframe.heal_inc.AnimateFunc = Vanguard.AnimateLeftWithAccel
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
function Vanguard:CombatStart()
|
||||
|
||||
Vanguard.Running = true
|
||||
VanguardFrame:RegisterEvent ("UNIT_HEALTH")
|
||||
VanguardFrame:RegisterEvent ("UNIT_HEALTH_FREQUENT")
|
||||
--Vanguard:TrackDebuffsAlreadyApplied()
|
||||
VanguardFrame:RegisterEvent ("COMBAT_LOG_EVENT_UNFILTERED")
|
||||
|
||||
if (Vanguard.track_incoming) then
|
||||
Vanguard:CancelTimer (Vanguard.track_incoming)
|
||||
end
|
||||
Vanguard.track_incoming = Vanguard:ScheduleRepeatingTimer ("TrackIncoming", 0.1)
|
||||
|
||||
onUpdateFrame:SetScript("OnUpdate", onUpdateFrame.onUpdate)
|
||||
end
|
||||
|
||||
function Vanguard:CombatEnd()
|
||||
|
||||
Vanguard.Running = false
|
||||
VanguardFrame:UnregisterEvent ("UNIT_HEALTH")
|
||||
VanguardFrame:UnregisterEvent ("UNIT_HEALTH_FREQUENT")
|
||||
VanguardFrame:UnregisterEvent ("COMBAT_LOG_EVENT_UNFILTERED")
|
||||
|
||||
if (Vanguard.track_incoming) then
|
||||
Vanguard:CancelTimer (Vanguard.track_incoming)
|
||||
end
|
||||
|
||||
onUpdateFrame:SetScript("OnUpdate", nil)
|
||||
end
|
||||
|
||||
function Vanguard:DebuffRefreshed (who_name, spellid)
|
||||
@@ -560,7 +651,7 @@ local function CreatePluginFrames (data)
|
||||
|
||||
local icon, count, duration, expirationTime = "", 0, 0, 0
|
||||
|
||||
for i = 1, 40 do --doq
|
||||
for i = 1, 40 do
|
||||
local auraName, icon1, count1, _, duration1, expirationTime1 = _UnitDebuff (who_name, i)
|
||||
if (auraName == debuff_name) then
|
||||
icon, count, duration, expirationTime = icon1, count1, duration1, expirationTime1
|
||||
@@ -711,25 +802,34 @@ local build_options_panel = function()
|
||||
|
||||
local options_frame = Vanguard:CreatePluginOptionsFrame ("VanguardOptionsWindow", "Vanguard Options", 1)
|
||||
|
||||
local tank_texture_set = function (_, _, value)
|
||||
Vanguard.db.tank_block_texture = value;
|
||||
Vanguard:RefreshTanks();
|
||||
end
|
||||
|
||||
local texture_icon = [[Interface\TARGETINGFRAME\UI-PhasingIcon]]
|
||||
local texture_icon = [[Interface\AddOns\Details\images\icons]]
|
||||
local texture_icon_size = {14, 14}
|
||||
local texture_texcoord = {469/512, 505/512, 249/512, 284/512}
|
||||
|
||||
local textures = SharedMedia:HashTable ("statusbar")
|
||||
local texTable = {}
|
||||
for name, texturePath in pairs (textures) do
|
||||
texTable[#texTable+1] = {value = name, label = name, iconsize = texture_icon_size, statusbar = texturePath, onclick = tank_texture_set, icon = texture_icon, texcoord = texture_texcoord}
|
||||
end
|
||||
table.sort (texTable, function (t1, t2) return t1.label < t2.label end)
|
||||
|
||||
local tank_texture_menu = texTable
|
||||
local tank_texture_set = function (_, _, value)
|
||||
Vanguard.db.tank_block_texture = value;
|
||||
Vanguard:ResetBars()
|
||||
Vanguard:RefreshTanks()
|
||||
end
|
||||
|
||||
local texture_icon = [[Interface\TARGETINGFRAME\UI-PhasingIcon]]
|
||||
local texture_icon = [[Interface\AddOns\Details\images\icons]]
|
||||
local texture_icon_size = {14, 14}
|
||||
local texture_texcoord = {469/512, 505/512, 249/512, 284/512}
|
||||
|
||||
local textures = SharedMedia:HashTable ("statusbar")
|
||||
local texTable = {}
|
||||
for name, texturePath in pairs (textures) do
|
||||
texTable[#texTable+1] = {value = name, label = name, iconsize = texture_icon_size, statusbar = texturePath, onclick = tank_texture_set, icon = texture_icon, texcoord = texture_texcoord}
|
||||
end
|
||||
table.sort (texTable, function (t1, t2) return t1.label < t2.label end)
|
||||
|
||||
local tank_texture_menu = texTable
|
||||
|
||||
|
||||
--templates
|
||||
local options_text_template = DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")
|
||||
local options_dropdown_template = DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
|
||||
local options_switch_template = DF:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")
|
||||
local options_slider_template = DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
|
||||
local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
|
||||
|
||||
local menu = {
|
||||
{
|
||||
type = "toggle",
|
||||
@@ -766,11 +866,23 @@ local build_options_panel = function()
|
||||
desc = "Choose the texture used on tank blocks.",
|
||||
name = "Tank Block Texture"
|
||||
},
|
||||
|
||||
{
|
||||
type = "range",
|
||||
get = function() return Vanguard.db.bar_height end,
|
||||
set = function (self, fixedparam, value)
|
||||
Vanguard.db.bar_height = value
|
||||
Vanguard:ResetBars()
|
||||
Vanguard:RefreshTanks()
|
||||
end,
|
||||
min = 10,
|
||||
max = 50,
|
||||
step = 1,
|
||||
desc = "Inc Damage Heigth",
|
||||
name = "Inc Damage Heigth",
|
||||
},
|
||||
}
|
||||
|
||||
Vanguard:GetFramework():BuildMenu (options_frame, menu, 15, -75, 260)
|
||||
|
||||
|
||||
Vanguard:GetFramework():BuildMenu (options_frame, menu, 15, -50, 260, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
|
||||
end
|
||||
|
||||
Vanguard.OpenOptionsPanel = function()
|
||||
@@ -817,7 +929,7 @@ function Vanguard:OnEvent (_, event, arg1, token, time, who_serial, who_name, wh
|
||||
|
||||
end
|
||||
|
||||
elseif (event == "UNIT_HEALTH" or event == "UNIT_HEALTH_FREQUENT") then
|
||||
elseif (event == "UNIT_HEALTH") then
|
||||
Vanguard:HealthChanged (arg1)
|
||||
|
||||
elseif (event == "ADDON_LOADED") then
|
||||
@@ -833,20 +945,24 @@ function Vanguard:OnEvent (_, event, arg1, token, time, who_serial, who_name, wh
|
||||
|
||||
local MINIMAL_DETAILS_VERSION_REQUIRED = 1
|
||||
local default_saved_table = {
|
||||
show_inc_bars = false,
|
||||
tank_block_size = 150,
|
||||
show_inc_bars = true,
|
||||
tank_block_size = 150,
|
||||
tank_block_height = 40,
|
||||
tank_block_color = {0.24705882, 0.0039215, 0, 0.8},
|
||||
tank_block_texture = "Details Serenity",
|
||||
first_run = false,
|
||||
bar_height = 24,
|
||||
}
|
||||
|
||||
--> Install
|
||||
function Vanguard:OnDetailsEvent() end --> dummy func to stop warnings.
|
||||
|
||||
local install, saveddata = _G._detalhes:InstallPlugin ("TANK", "Vanguard", "Interface\\Icons\\INV_Shield_77", Vanguard, "DETAILS_PLUGIN_VANGUARD", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v2.0", default_saved_table)
|
||||
local install, saveddata = _G._detalhes:InstallPlugin ("TANK", "Vanguard", "Interface\\Icons\\INV_Shield_77", Vanguard, "DETAILS_PLUGIN_VANGUARD", MINIMAL_DETAILS_VERSION_REQUIRED, "Tercio", "v2.1", default_saved_table)
|
||||
if (type (install) == "table" and install.error) then
|
||||
print (install.error)
|
||||
end
|
||||
|
||||
Vanguard.db.first_run = false
|
||||
|
||||
--> create widgets
|
||||
CreatePluginFrames()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Interface: 80300
|
||||
## Interface: 90001
|
||||
## Title: Details!: Vanguard (plugin)
|
||||
## Notes: Show the health and debuffs for tanks in your group.
|
||||
## SavedVariablesPerCharacter: _detalhes_databaseVanguard
|
||||
@@ -9,4 +9,4 @@
|
||||
embeds.xml
|
||||
#@end-no-lib-strip@
|
||||
|
||||
Details_Vanguard.lua
|
||||
Details_Vanguard.lua
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
|
||||
..\FrameXML\UI.xsd">
|
||||
<Script file="AceLocale-3.0.lua"/>
|
||||
</Ui>
|
||||
</Ui>
|
||||
|
||||
@@ -38,4 +38,4 @@ assert(newOldMinor == 3) -- previous version was 3 (even though it gave a string
|
||||
|
||||
local newLib, newOldMinor = LibStub:NewLibrary("Pants", 5) -- register a new library, using a normal number instead of a string
|
||||
assert(newLib)
|
||||
assert(newOldMinor == 4) -- previous version was 4 (even though it gave a string)
|
||||
assert(newOldMinor == 4) -- previous version was 4 (even though it gave a string)
|
||||
|
||||
@@ -11,4 +11,4 @@ assert(not success or not ret) -- either error because proxy is not a string or
|
||||
|
||||
assert(not pcall(LibStub.NewLibrary, LibStub, "Something", "No number in here")) -- should error, minor has no string in it.
|
||||
|
||||
assert(not LibStub:GetLibrary("Something", true)) -- shouldn't've created it from the above statement
|
||||
assert(not LibStub:GetLibrary("Something", true)) -- shouldn't've created it from the above statement
|
||||
|
||||
@@ -38,4 +38,4 @@ loadfile("../LibStub.lua")()
|
||||
assert(LibStub.IterateLibraries == 123)
|
||||
|
||||
|
||||
print("OK")
|
||||
print("OK")
|
||||
|
||||
@@ -20,4 +20,4 @@ Loc ["STRING_PARRY"] = "Parry"
|
||||
Loc ["STRING_DAMAGETAKEN"] = "Damage Taken"
|
||||
Loc ["STRING_DTPS"] = "DTPS"
|
||||
Loc ["STRING_DEBUFF"] = "Debuff"
|
||||
Loc ["STRING_DURATION"] = "Duration"
|
||||
Loc ["STRING_DURATION"] = "Duration"
|
||||
|
||||
@@ -20,4 +20,4 @@ Loc ["STRING_PARRY"] = "Bloqueio"
|
||||
Loc ["STRING_DAMAGETAKEN"] = "Dano recebido"
|
||||
Loc ["STRING_DTPS"] = "DRPS"
|
||||
Loc ["STRING_DEBUFF"] = "Debuff"
|
||||
Loc ["STRING_DURATION"] = "Duracao"
|
||||
Loc ["STRING_DURATION"] = "Duracao"
|
||||
|
||||
Reference in New Issue
Block a user