Small bug fixes and improvements
This commit is contained in:
@@ -32,7 +32,7 @@ f:SetScript("OnEvent", function(self, event, addonName)
|
||||
end
|
||||
|
||||
if (_detalhes and _detalhes.debug) then
|
||||
print ("|cFFFFFF00Details! Storage|r: loaded!")
|
||||
print("|cFFFFFF00Details! Storage|r: loaded!")
|
||||
end
|
||||
DETAILS_STORAGE_LOADED = true
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local AceLocale = LibStub ("AceLocale-3.0")
|
||||
local AceLocale = LibStub("AceLocale-3.0")
|
||||
local Loc = AceLocale:GetLocale ("Details_EncounterDetails")
|
||||
local Graphics = LibStub:GetLibrary("LibGraph-2.0")
|
||||
local _
|
||||
@@ -6,7 +6,7 @@ local _
|
||||
local isDebug = false
|
||||
local function DebugMessage (...)
|
||||
if (isDebug) then
|
||||
print ("|cFFFFFF00EBreakDown|r:", ...)
|
||||
print("|cFFFFFF00EBreakDown|r:", ...)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -26,7 +26,7 @@ local GameCooltip = GameCooltip2
|
||||
|
||||
local _math_floor = math.floor --lua library local
|
||||
local _cstr = string.format --lua library local
|
||||
local _ipairs = ipairs --lua library local
|
||||
local ipairs = ipairs --lua library local
|
||||
local _pairs = pairs --lua library local
|
||||
local _table_sort = table.sort --lua library local
|
||||
local _table_insert = table.insert --lua library local
|
||||
@@ -148,7 +148,7 @@ local function CreatePluginFrames (data)
|
||||
-- this script takes the current combat and request the total of damage done by the group.
|
||||
|
||||
-- first lets take the current combat and name it "current_combat".
|
||||
local current_combat = _detalhes:GetCombat ("current") --getting the current combat
|
||||
local current_combat = _detalhes:GetCombat("current") --getting the current combat
|
||||
|
||||
-- now lets ask the combat for the total damage done by the raide group.
|
||||
local total_damage = current_combat:GetTotal ( DETAILS_ATTRIBUTE_DAMAGE, nil, DETAILS_TOTALS_ONLYGROUP )
|
||||
@@ -183,7 +183,7 @@ local function CreatePluginFrames (data)
|
||||
|
||||
elseif (event == "COMBAT_PLAYER_LEAVE") then
|
||||
--combat leave and enter always send current combat table
|
||||
_combat_object = select (1, ...)
|
||||
_combat_object = select(1, ...)
|
||||
--check if was a boss fight
|
||||
EncounterDetails:WasEncounter()
|
||||
if (EncounterDetails.combat_boss_found) then
|
||||
@@ -241,7 +241,7 @@ local function CreatePluginFrames (data)
|
||||
|
||||
elseif (event == "ZONE_TYPE_CHANGED") then
|
||||
if (EncounterDetails.db.show_icon == 1) then
|
||||
if (select (1, ...) == "raid") then
|
||||
if (select(1, ...) == "raid") then
|
||||
EncounterDetails:ShowIcon()
|
||||
else
|
||||
EncounterDetails:HideIcon()
|
||||
@@ -275,7 +275,7 @@ local function CreatePluginFrames (data)
|
||||
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, ...)
|
||||
local encounterID, encounterName, difficultyID, raidSize = select(1, ...)
|
||||
current_encounter = encounterID
|
||||
|
||||
elseif (event == "ENCOUNTER_END" or event == "PLAYER_REGEN_ENABLED") then
|
||||
@@ -317,7 +317,7 @@ local function CreatePluginFrames (data)
|
||||
--EncounterDetails.DBM_timers
|
||||
if (_G.DBM) then
|
||||
local dbm_timer_callback = function(bar_type, id, msg, timer, icon, bartype, spellId, colorId, modid)
|
||||
--print (bar_type, id, msg, timer, icon, bartype, spellId, colorId, modid)
|
||||
--print(bar_type, id, msg, timer, icon, bartype, spellId, colorId, modid)
|
||||
local spell = tostring (spellId)
|
||||
if (spell and not current_table_dbm [spell]) then
|
||||
current_table_dbm [spell] = {spell, id, msg, timer, icon, bartype, spellId, colorId, modid}
|
||||
@@ -328,7 +328,7 @@ local function CreatePluginFrames (data)
|
||||
function EncounterDetails:RegisterBigWigsCallBack()
|
||||
if (BigWigsLoader) then
|
||||
function EncounterDetails:BigWigs_StartBar (event, module, spellid, bar_text, time, icon, ...)
|
||||
--print (event, module, spellid, bar_text, time, icon, ...)
|
||||
--print(event, module, spellid, bar_text, time, icon, ...)
|
||||
spellid = tostring (spellid)
|
||||
if (not current_table_bigwigs [spellid]) then
|
||||
current_table_bigwigs [spellid] = {(type(module) == "string" and module) or (module and module.moduleName) or "", spellid or "", bar_text or "", time or 0, icon or ""}
|
||||
@@ -339,7 +339,7 @@ local function CreatePluginFrames (data)
|
||||
end
|
||||
end
|
||||
end
|
||||
EncounterDetails:ScheduleTimer ("RegisterBigWigsCallBack", 5)
|
||||
EncounterDetails:ScheduleTimer("RegisterBigWigsCallBack", 5)
|
||||
|
||||
--BigWigs_StartBar BigWigs_Bosses_Brackenspore mind_fungus Mind Fungus 51 Interface\Icons\inv_mushroom_10 true
|
||||
--bigwigs startbar mind_fungus
|
||||
@@ -378,26 +378,26 @@ local function CreatePluginFrames (data)
|
||||
|
||||
function EncounterDetails:ShowIconBallonTutorial()
|
||||
if (InCombatLockdown()) then
|
||||
C_Timer.After (5, function()
|
||||
--print ("in combat")
|
||||
C_Timer.After(5, function()
|
||||
--print("in combat")
|
||||
re_ShowIconBallonTutorial()
|
||||
end)
|
||||
return
|
||||
end
|
||||
|
||||
local hook_AlertButtonCloseButton = function()
|
||||
--print ("done tutorial")
|
||||
--print("done tutorial")
|
||||
EncounterDetails:SetTutorialCVar ("ENCOUNTER_DETAILS_BALLON_TUTORIAL1", true)
|
||||
end
|
||||
|
||||
if (EncounterDetailsTutorialAlertButton1 or not EncounterDetails.ToolbarButton or not EncounterDetails.ToolbarButton:IsShown()) then
|
||||
--print (EncounterDetailsTutorialAlertButton1, not EncounterDetails.ToolbarButton, not EncounterDetails.ToolbarButton:IsShown())
|
||||
--print(EncounterDetailsTutorialAlertButton1, not EncounterDetails.ToolbarButton, not EncounterDetails.ToolbarButton:IsShown())
|
||||
return
|
||||
end
|
||||
|
||||
--[=[
|
||||
local alert = CreateFrame("frame", "EncounterDetailsTutorialAlertButton1", EncounterDetails.ToolbarButton, "MicroButtonAlertTemplate")
|
||||
alert:SetFrameLevel (302)
|
||||
alert:SetFrameLevel(302)
|
||||
alert.label = "Click here (on the skull icon) to bring the Encounter Breakdown panel"
|
||||
alert.Text:SetSpacing (4)
|
||||
alert:SetClampedToScreen (true)
|
||||
@@ -406,7 +406,7 @@ local function CreatePluginFrames (data)
|
||||
alert.CloseButton:HookScript ("OnClick", hook_AlertButtonCloseButton)
|
||||
alert:Show()
|
||||
--]=]
|
||||
--print ("showing ballon")
|
||||
--print("showing ballon")
|
||||
end
|
||||
|
||||
function EncounterDetails:ShowIcon()
|
||||
@@ -416,8 +416,8 @@ local function CreatePluginFrames (data)
|
||||
|
||||
--EncounterDetails:SetTutorialCVar ("ENCOUNTER_DETAILS_BALLON_TUTORIAL1", false) --debug
|
||||
if (not EncounterDetails:GetTutorialCVar("ENCOUNTER_DETAILS_BALLON_TUTORIAL1")) then
|
||||
--print ("nao viu o tutorial ainda")
|
||||
C_Timer.After (2, EncounterDetails.ShowIconBallonTutorial)
|
||||
--print("nao viu o tutorial ainda")
|
||||
C_Timer.After(2, EncounterDetails.ShowIconBallonTutorial)
|
||||
end
|
||||
|
||||
end
|
||||
@@ -440,7 +440,7 @@ local function CreatePluginFrames (data)
|
||||
end
|
||||
|
||||
EncounterDetailsFrame:HookScript ("OnShow", function()
|
||||
C_Timer.After (0.1, function()
|
||||
C_Timer.After(0.1, function()
|
||||
if (not EncounterDetails.LastOpenedTime or EncounterDetails.LastOpenedTime + 2 < GetTime()) then
|
||||
if (_detalhes.AddOnStartTime and _detalhes.AddOnStartTime + 30 < GetTime()) then
|
||||
EncounterDetails:OpenAndRefresh()
|
||||
@@ -481,7 +481,7 @@ local function CreatePluginFrames (data)
|
||||
end
|
||||
end
|
||||
|
||||
C_Timer.After (3, function() EncounterDetails:ShowTutorial() end)
|
||||
C_Timer.After(3, function() EncounterDetails:ShowTutorial() end)
|
||||
|
||||
DetailsPluginContainerWindow.OpenPlugin (EncounterDetails)
|
||||
|
||||
@@ -520,31 +520,31 @@ local function CreatePluginFrames (data)
|
||||
|
||||
--build the header
|
||||
|
||||
-- CoolTip:AddLine (Loc ["STRING_PLUGIN_NAME"])
|
||||
-- CoolTip:AddLine(Loc ["STRING_PLUGIN_NAME"])
|
||||
-- CoolTip:AddIcon (ENCOUNTERDETAILS_BUTTON.__icon, 1, 1, 20, 20)
|
||||
-- CoolTip:AddMenu (1, EncounterDetails.Frame.switch, "main")
|
||||
|
||||
-- GameCooltip:AddLine ("$div")
|
||||
-- GameCooltip:AddLine("$div")
|
||||
|
||||
--build the menu options
|
||||
|
||||
--summary
|
||||
CoolTip:AddLine ("Encounter Summary")
|
||||
CoolTip:AddLine("Encounter Summary")
|
||||
CoolTip:AddMenu (1, EncounterDetails.Frame.switch, "main")
|
||||
CoolTip:AddIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 1, 1, 20, 22, 0, 0.1015625, 0, 0.505625)
|
||||
|
||||
--chart
|
||||
CoolTip:AddLine ("Damage Graphic")
|
||||
CoolTip:AddLine("Damage Graphic")
|
||||
CoolTip:AddMenu (1, EncounterDetails.Frame.switch, "graph")
|
||||
CoolTip:AddIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 1, 1, 20, 22, 0.1271875, 0.21875, 0, 0.505625)
|
||||
|
||||
--emotes
|
||||
CoolTip:AddLine ("Boss Emotes")
|
||||
CoolTip:AddLine("Boss Emotes")
|
||||
CoolTip:AddMenu (1, EncounterDetails.Frame.switch, "emotes")
|
||||
CoolTip:AddIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 1, 1, 20, 22, 91/256, 116/256, 0, 0.505625)
|
||||
|
||||
--weakauras
|
||||
CoolTip:AddLine ("Create Encounter Weakauras")
|
||||
CoolTip:AddLine("Create Encounter Weakauras")
|
||||
CoolTip:AddMenu (1, EncounterDetails.Frame.switch, "spellsauras")
|
||||
|
||||
if (_G.WeakAuras) then
|
||||
@@ -554,7 +554,7 @@ local function CreatePluginFrames (data)
|
||||
end
|
||||
|
||||
--phases
|
||||
CoolTip:AddLine ("Damage by Boss Phase")
|
||||
CoolTip:AddLine("Damage by Boss Phase")
|
||||
CoolTip:AddMenu (1, EncounterDetails.Frame.switch, "phases")
|
||||
CoolTip:AddIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 1, 1, 20, 22, 151/256, 176/256, 0, 0.505625)
|
||||
|
||||
@@ -586,7 +586,7 @@ local function CreatePluginFrames (data)
|
||||
_detalhes.EncounterDetailsTempWindow = nil
|
||||
|
||||
--~remover ~autoabrir �brir ~abrir ~auto
|
||||
--C_Timer.After (.5, EncounterDetails.OpenWindow)
|
||||
--C_Timer.After(.5, EncounterDetails.OpenWindow)
|
||||
|
||||
|
||||
end
|
||||
@@ -623,14 +623,14 @@ end
|
||||
GameCooltip:SetType ("tooltipbar")
|
||||
GameCooltip:SetOwner(row)
|
||||
|
||||
GameCooltip:AddLine ("Click to Report", nil, 1, "orange")
|
||||
GameCooltip:AddLine("Click to Report", nil, 1, "orange")
|
||||
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, 16, 0.015625, 0.13671875, 0.4375, 0.59765625)
|
||||
GameCooltip:AddStatusBar (0, 1, 1, 1, 1, 1, false, {value = 100, color = {.3, .3, .3, .5}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
|
||||
|
||||
local statusBarBackground = {value = 100, color = {.21, .21, .21, 0.8}, texture = [[Interface\AddOns\Details\images\bar_serenity]]}
|
||||
|
||||
--death parser
|
||||
for index, event in _ipairs(eventos) do
|
||||
for index, event in ipairs(eventos) do
|
||||
|
||||
local hp = _math_floor(event[5]/hp_max*100)
|
||||
if (hp > 100) then
|
||||
@@ -640,7 +640,7 @@ end
|
||||
local evtype = event [1]
|
||||
local spellname, _, spellicon = _GetSpellInfo(event [2])
|
||||
local amount = event [3]
|
||||
local time = event [4]
|
||||
local timeInSeconds = event [4]
|
||||
local source = event [6]
|
||||
|
||||
if (type(evtype) == "boolean") then
|
||||
@@ -660,7 +660,7 @@ end
|
||||
source = source:gsub ("%[%*%] ", "")
|
||||
end
|
||||
|
||||
GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (" .. source .. ")", "-" .. _detalhes:ToK (amount) .. overkill .. " (" .. hp .. "%)", 1, "white", "white")
|
||||
GameCooltip:AddLine("" .. _cstr ("%.1f", timeInSeconds - hora_da_morte) .. "s " .. spellname .. " (" .. source .. ")", "-" .. _detalhes:ToK (amount) .. overkill .. " (" .. hp .. "%)", 1, "white", "white")
|
||||
GameCooltip:AddIcon (spellicon, 1, 1, 16, 16, .1, .9, .1, .9)
|
||||
|
||||
if (event [9]) then
|
||||
@@ -675,7 +675,7 @@ end
|
||||
local class = Details:GetClass (source)
|
||||
local spec = Details:GetSpec (source)
|
||||
|
||||
GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (" .. Details:GetOnlyName (Details:AddClassOrSpecIcon (source, class, spec, 16, true)) .. ")", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%)", 1, "white", "white")
|
||||
GameCooltip:AddLine("" .. _cstr ("%.1f", timeInSeconds - hora_da_morte) .. "s " .. spellname .. " (" .. Details:GetOnlyName(Details:AddClassOrSpecIcon (source, class, spec, 16, true)) .. ")", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%)", 1, "white", "white")
|
||||
GameCooltip:AddIcon (spellicon, 1, 1, 16, 16, .1, .9, .1, .9)
|
||||
GameCooltip:AddStatusBar (hp, 1, "green", true, statusBarBackground)
|
||||
end
|
||||
@@ -683,7 +683,7 @@ end
|
||||
elseif (type(evtype) == "number") then
|
||||
if (evtype == 1) then
|
||||
--cooldown
|
||||
GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (" .. source .. ")", "cooldown (" .. hp .. "%)", 1, "white", "white")
|
||||
GameCooltip:AddLine("" .. _cstr ("%.1f", timeInSeconds - hora_da_morte) .. "s " .. spellname .. " (" .. source .. ")", "cooldown (" .. hp .. "%)", 1, "white", "white")
|
||||
GameCooltip:AddIcon (spellicon, 1, 1, 16, 16, .1, .9, .1, .9)
|
||||
GameCooltip:AddStatusBar (100, 1, "yellow", true, statusBarBackground)
|
||||
|
||||
@@ -701,7 +701,7 @@ end
|
||||
source = source:gsub ("%[%*%] ", "")
|
||||
end
|
||||
|
||||
GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s [x" .. amount .. "] " .. spellname .. " (" .. source .. ")", "debuff (" .. hp .. "%)", 1, "white", "white")
|
||||
GameCooltip:AddLine("" .. _cstr ("%.1f", timeInSeconds - hora_da_morte) .. "s [x" .. amount .. "] " .. spellname .. " (" .. source .. ")", "debuff (" .. hp .. "%)", 1, "white", "white")
|
||||
GameCooltip:AddIcon (spellicon, 1, 1, 16, 16, .1, .9, .1, .9)
|
||||
GameCooltip:AddStatusBar (100, 1, "purple", true, statusBarBackground)
|
||||
|
||||
@@ -709,13 +709,13 @@ end
|
||||
end
|
||||
end
|
||||
|
||||
GameCooltip:AddLine (deathTable [6] .. " " .. "died" , "-- -- -- ", 1, "white")
|
||||
GameCooltip:AddLine(deathTable [6] .. " " .. "died" , "-- -- -- ", 1, "white")
|
||||
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\small_icons", 1, 1, iconSize, iconSize, .75, 1, 0, 1)
|
||||
GameCooltip:AddStatusBar (0, 1, .5, .5, .5, .5, false, {value = 100, color = {.5, .5, .5, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar4_vidro]]})
|
||||
|
||||
if (battleress) then
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo(battleress [2])
|
||||
GameCooltip:AddLine ("+" .. _cstr ("%.1f", battleress[4] - hora_da_morte) .. "s " .. nome_magia .. " (" .. battleress[6] .. ")", "", 1, "white")
|
||||
GameCooltip:AddLine("+" .. _cstr ("%.1f", battleress[4] - hora_da_morte) .. "s " .. nome_magia .. " (" .. battleress[6] .. ")", "", 1, "white")
|
||||
GameCooltip:AddIcon ("Interface\\Glues\\CharacterSelect\\Glues-AddOn-Icons", 1, 1, nil, nil, .75, 1, 0, 1)
|
||||
GameCooltip:AddStatusBar (0, 1, .5, .5, .5, .5, false, {value = 100, color = {.5, .5, .5, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar4_vidro]]})
|
||||
end
|
||||
@@ -723,10 +723,10 @@ end
|
||||
if (lastcooldown) then
|
||||
if (lastcooldown[3] == 1) then
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo(lastcooldown [2])
|
||||
GameCooltip:AddLine (_cstr ("%.1f", lastcooldown[4] - hora_da_morte) .. "s " .. nome_magia .. " (" .. Loc ["STRING_LAST_COOLDOWN"] .. ")")
|
||||
GameCooltip:AddLine(_cstr ("%.1f", lastcooldown[4] - hora_da_morte) .. "s " .. nome_magia .. " (" .. Loc ["STRING_LAST_COOLDOWN"] .. ")")
|
||||
GameCooltip:AddIcon (icone_magia)
|
||||
else
|
||||
GameCooltip:AddLine (Loc ["STRING_NOLAST_COOLDOWN"])
|
||||
GameCooltip:AddLine(Loc ["STRING_NOLAST_COOLDOWN"])
|
||||
GameCooltip:AddIcon ([[Interface\CHARACTERFRAME\UI-Player-PlayTimeUnhealthy]], 1, 1, 18, 18)
|
||||
end
|
||||
GameCooltip:AddStatusBar (0, 1, 1, 1, 1, 1, false, {value = 100, color = {.3, .3, .3, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
|
||||
@@ -752,19 +752,19 @@ local function DispellInfo (dispell, barra)
|
||||
local jogadores = dispell [1] --[nome od jogador] = total
|
||||
local tabela_jogadores = {}
|
||||
|
||||
for nome, tabela in _pairs (jogadores) do --tabela = [1] total tomado [2] classe
|
||||
for nome, tabela in _pairs(jogadores) do --tabela = [1] total tomado [2] classe
|
||||
tabela_jogadores [#tabela_jogadores + 1] = {nome, tabela [1], tabela [2]}
|
||||
end
|
||||
|
||||
_table_sort (tabela_jogadores, _detalhes.Sort2)
|
||||
|
||||
for index, tabela in _ipairs(tabela_jogadores) do
|
||||
for index, tabela in ipairs(tabela_jogadores) do
|
||||
local coords = EncounterDetails.class_coords [tabela[3]]
|
||||
if (not coords) then
|
||||
GameCooltip:AddLine (EncounterDetails:GetOnlyName (tabela[1]), tabela[2], 1, "white", "orange")
|
||||
GameCooltip:AddLine(EncounterDetails:GetOnlyName(tabela[1]), tabela[2], 1, "white", "orange")
|
||||
GameCooltip:AddIcon ("Interface\\GossipFrame\\DailyActiveQuestIcon")
|
||||
else
|
||||
GameCooltip:AddLine (EncounterDetails:GetOnlyName (tabela[1]), tabela[2], 1, "white", "orange")
|
||||
GameCooltip:AddLine(EncounterDetails:GetOnlyName(tabela[1]), tabela[2], 1, "white", "orange")
|
||||
|
||||
local specID = Details:GetSpec (tabela[1])
|
||||
if (specID) then
|
||||
@@ -792,21 +792,21 @@ local function KickBy (magia, barra)
|
||||
local jogadores = magia [1] --[nome od jogador] = total
|
||||
local tabela_jogadores = {}
|
||||
|
||||
for nome, tabela in _pairs (jogadores) do --tabela = [1] total tomado [2] classe
|
||||
for nome, tabela in _pairs(jogadores) do --tabela = [1] total tomado [2] classe
|
||||
tabela_jogadores [#tabela_jogadores + 1] = {nome, tabela [1], tabela [2]}
|
||||
end
|
||||
|
||||
_table_sort (tabela_jogadores, _detalhes.Sort2)
|
||||
|
||||
local spellName, _, spellIcon = GetSpellInfo(barra.lineText1:GetText())
|
||||
GameCooltip:AddLine (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
|
||||
|
||||
for index, tabela in _ipairs(tabela_jogadores) do
|
||||
for index, tabela in ipairs(tabela_jogadores) do
|
||||
local coords = EncounterDetails.class_coords [tabela[3]]
|
||||
GameCooltip:AddLine (EncounterDetails:GetOnlyName (tabela[1]), tabela[2], 1, "white")
|
||||
GameCooltip:AddLine(EncounterDetails:GetOnlyName(tabela[1]), tabela[2], 1, "white")
|
||||
|
||||
local specID = Details:GetSpec (tabela[1])
|
||||
if (specID) then
|
||||
@@ -840,24 +840,24 @@ local function EnemySkills (habilidade, barra)
|
||||
local tabela_jogadores = {}
|
||||
local total = 0
|
||||
|
||||
for nome, tabela in _pairs (jogadores) do --tabela = [1] total tomado [2] classe
|
||||
for nome, tabela in _pairs(jogadores) do --tabela = [1] total tomado [2] classe
|
||||
tabela_jogadores [#tabela_jogadores + 1] = {nome, tabela[1], tabela[2]}
|
||||
total = total + tabela[1]
|
||||
end
|
||||
|
||||
_table_sort (tabela_jogadores, _detalhes.Sort2)
|
||||
|
||||
GameCooltip:AddLine (barra.lineText1:GetText() .. " Damage Done")
|
||||
GameCooltip:AddLine(barra.lineText1:GetText() .. " Damage Done")
|
||||
|
||||
local ToK = _detalhes.ToKFunctions [_detalhes.ps_abbreviation]
|
||||
|
||||
local topValue = tabela_jogadores [1] and tabela_jogadores [1][2]
|
||||
|
||||
for index, tabela in _ipairs(tabela_jogadores) do
|
||||
for index, tabela in ipairs(tabela_jogadores) do
|
||||
local coords = EncounterDetails.class_coords [tabela[3]]
|
||||
|
||||
GameCooltip:AddLine (EncounterDetails:GetOnlyName (tabela[1]), ToK (_, tabela[2]) .. " (" .. format ("%.1f", tabela[2] / total * 100) .. "%)", 1, "white")
|
||||
local r, g, b, a = unpack (_detalhes.tooltip.background)
|
||||
GameCooltip:AddLine(EncounterDetails:GetOnlyName(tabela[1]), ToK (_, tabela[2]) .. " (" .. format ("%.1f", tabela[2] / total * 100) .. "%)", 1, "white")
|
||||
local r, g, b, a = unpack(_detalhes.tooltip.background)
|
||||
|
||||
local actorClass = Details:GetClass (tabela[1])
|
||||
if (actorClass) then
|
||||
@@ -900,13 +900,13 @@ local function DamageTakenDetails (jogador, barra)
|
||||
|
||||
local meus_agressores = {}
|
||||
|
||||
for nome, _ in _pairs (agressores) do --agressores seria a lista de nomes
|
||||
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
|
||||
local habilidades = este_agressor.spells._ActorTable
|
||||
for id, habilidade in _pairs (habilidades) do
|
||||
for id, habilidade in _pairs(habilidades) do
|
||||
local alvos = habilidade.targets
|
||||
for target_name, amount in _pairs (alvos) do
|
||||
for target_name, amount in _pairs(alvos) do
|
||||
if (target_name == jogador.nome) then
|
||||
meus_agressores [#meus_agressores+1] = {id, amount, este_agressor.nome}
|
||||
end
|
||||
@@ -917,7 +917,7 @@ local function DamageTakenDetails (jogador, barra)
|
||||
|
||||
_table_sort (meus_agressores, _detalhes.Sort2)
|
||||
|
||||
GameCooltip:AddLine (barra.lineText1:GetText() .. " Damage Taken")
|
||||
GameCooltip:AddLine(barra.lineText1:GetText() .. " Damage Taken")
|
||||
|
||||
local max = #meus_agressores
|
||||
if (max > 20) then
|
||||
@@ -937,14 +937,14 @@ local function DamageTakenDetails (jogador, barra)
|
||||
teve_melee = true
|
||||
end
|
||||
|
||||
GameCooltip:AddLine (nome_magia, ToK (_, meus_agressores[i][2]) .. " (".._cstr("%.1f", (meus_agressores[i][2]/damage_taken) * 100).."%)", 1, "white")
|
||||
GameCooltip:AddLine(nome_magia, ToK (_, meus_agressores[i][2]) .. " (".._cstr("%.1f", (meus_agressores[i][2]/damage_taken) * 100).."%)", 1, "white")
|
||||
GameCooltip:AddStatusBar (meus_agressores[i][2] / topDamage * 100, 1, .55, .55, .55, .834, false, {value = 100, color = {.21, .21, .21, 0.8}, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
|
||||
|
||||
GameCooltip:AddIcon (icone_magia, nil, 1, EncounterDetails.CooltipLineHeight - 0, EncounterDetails.CooltipLineHeight - 0, .1, .9, .1, .9)
|
||||
end
|
||||
|
||||
if (teve_melee) then
|
||||
GameTooltip:AddLine ("* "..Loc ["STRING_MELEE_DAMAGE"], 0, 1, 0)
|
||||
GameTooltip:AddLine("* "..Loc ["STRING_MELEE_DAMAGE"], 0, 1, 0)
|
||||
end
|
||||
|
||||
GameCooltip:SetOwner(barra, "left", "right", 2, 0)
|
||||
@@ -1061,11 +1061,11 @@ function EncounterDetails:SetRowScripts (barra, index, container)
|
||||
|
||||
self.mouse_over = true
|
||||
self:SetHeight(EncounterDetails.Frame.DefaultBarHeight + 1)
|
||||
self:SetAlpha (1)
|
||||
self:SetAlpha(1)
|
||||
EncounterDetails.SetBarBackdrop_OnEnter (self)
|
||||
|
||||
--GameTooltip:SetOwner(self, "ANCHOR_TOPRIGHT")
|
||||
GameCooltip:Preset (2)
|
||||
GameCooltip:Preset(2)
|
||||
GameCooltip:SetOwner(self)
|
||||
EncounterDetails:FormatCooltipSettings()
|
||||
|
||||
@@ -1105,7 +1105,7 @@ function EncounterDetails:SetRowScripts (barra, index, container)
|
||||
end
|
||||
|
||||
self:SetHeight(EncounterDetails.Frame.DefaultBarHeight)
|
||||
self:SetAlpha (0.9)
|
||||
self:SetAlpha(0.9)
|
||||
|
||||
EncounterDetails.SetBarBackdrop_OnLeave (self)
|
||||
|
||||
@@ -1133,7 +1133,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
EncounterDetailsFrame.ShowType = EncounterDetails.db.last_section_selected
|
||||
|
||||
if (segment) then
|
||||
_combat_object = EncounterDetails:GetCombat (segment)
|
||||
_combat_object = EncounterDetails:GetCombat(segment)
|
||||
EncounterDetails._segment = segment
|
||||
|
||||
DebugMessage ("there's a segment to use:", segment, _combat_object, _combat_object and _combat_object.is_boss)
|
||||
@@ -1164,7 +1164,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
end
|
||||
|
||||
if (not _combat_object) then
|
||||
--EncounterDetails:Msg ("no combat found.")
|
||||
--EncounterDetails:Msg("no combat found.")
|
||||
DebugMessage ("_combat_object is nil, EXIT")
|
||||
return
|
||||
end
|
||||
@@ -1190,7 +1190,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
DebugMessage ("_combat_object is not a boss, trying another loop in the segments")
|
||||
|
||||
local foundSegment
|
||||
for index, combat in _ipairs(EncounterDetails:GetCombatSegments()) do
|
||||
for index, combat in ipairs(EncounterDetails:GetCombatSegments()) do
|
||||
|
||||
if (combat.is_boss and EncounterDetails:GetBossDetails (combat.is_boss.mapid, combat.is_boss.index)) then
|
||||
_combat_object = combat
|
||||
@@ -1289,7 +1289,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
local quantidade = 0
|
||||
local dano_do_primeiro = 0
|
||||
|
||||
for index, jogador in _ipairs(DamageContainer._ActorTable) do
|
||||
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
|
||||
@@ -1318,7 +1318,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
|
||||
barra.jogador = jogador
|
||||
|
||||
barra.textura:SetStatusBarColor (_unpack (_detalhes.class_colors [jogador.classe]))
|
||||
barra.textura:SetStatusBarColor (_unpack(_detalhes.class_colors [jogador.classe]))
|
||||
|
||||
if (index == 1) then
|
||||
barra.textura:SetValue(100)
|
||||
@@ -1335,7 +1335,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
else
|
||||
barra.icone:SetTexture("Interface\\AddOns\\Details\\images\\classes_small")
|
||||
if (EncounterDetails.class_coords [jogador.classe]) then
|
||||
barra.icone:SetTexCoord (_unpack (EncounterDetails.class_coords [jogador.classe]))
|
||||
barra.icone:SetTexCoord (_unpack(EncounterDetails.class_coords [jogador.classe]))
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1363,7 +1363,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
--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
|
||||
for index, spellid in ipairs(boss_info.continuo) do
|
||||
habilidades_poll [spellid] = true
|
||||
end
|
||||
end
|
||||
@@ -1371,9 +1371,9 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
--pega as habilidades que pertence especificamente a cada fase
|
||||
--deprecated
|
||||
if (boss_info and boss_info.phases) then
|
||||
for fase_id, fase in _ipairs(boss_info.phases) do
|
||||
for fase_id, fase in ipairs(boss_info.phases) do
|
||||
if (fase.spells) then
|
||||
for index, spellid in _ipairs(fase.spells) do
|
||||
for index, spellid in ipairs(fase.spells) do
|
||||
habilidades_poll [spellid] = true
|
||||
end
|
||||
end
|
||||
@@ -1382,12 +1382,12 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
|
||||
local habilidades_usadas = {}
|
||||
local have_pool = false
|
||||
for spellid, _ in _pairs (habilidades_poll) do
|
||||
for spellid, _ in _pairs(habilidades_poll) do
|
||||
have_pool = true
|
||||
break
|
||||
end
|
||||
|
||||
for index, jogador in _ipairs(DamageContainer._ActorTable) do
|
||||
for index, jogador in ipairs(DamageContainer._ActorTable) do
|
||||
|
||||
--get all spells from neutral and hostile npcs
|
||||
if (
|
||||
@@ -1399,7 +1399,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
|
||||
local habilidades = jogador.spells._ActorTable
|
||||
|
||||
for id, habilidade in _pairs (habilidades) do
|
||||
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
|
||||
@@ -1420,7 +1420,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
|
||||
--pega os alvos e adiciona ao [2]
|
||||
local alvos = habilidade.targets
|
||||
for target_name, amount in _pairs (alvos) do
|
||||
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
|
||||
local tabela_dano_do_jogador = DamageContainer._ActorTable [DamageContainer._NameIndexTable [target_name]]
|
||||
@@ -1438,7 +1438,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
--check if the spell id is in the spell poll.
|
||||
local habilidades = jogador.spells._ActorTable
|
||||
|
||||
for id, habilidade in _pairs (habilidades) do
|
||||
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
|
||||
@@ -1459,7 +1459,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
|
||||
--pega os alvos e adiciona ao [2]
|
||||
local alvos = habilidade.targets
|
||||
for target_name, amount in _pairs (alvos) do
|
||||
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
|
||||
local tabela_dano_do_jogador = DamageContainer._ActorTable [DamageContainer._NameIndexTable [target_name]]
|
||||
@@ -1479,7 +1479,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
local tabela_em_ordem = {}
|
||||
local jaFoi = {}
|
||||
|
||||
for id, tabela in _pairs (habilidades_usadas) do
|
||||
for id, tabela in _pairs(habilidades_usadas) do
|
||||
local spellname = Details.GetSpellInfo(tabela [4])
|
||||
|
||||
if (not jaFoi [spellname]) then
|
||||
@@ -1493,7 +1493,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
local tt = tabela_em_ordem [index] [2] -- tabela com [PlayerName] = {amount, class}
|
||||
|
||||
for playerName, t in pairs(tabela [2]) do
|
||||
local amount, class = unpack (t)
|
||||
local amount, class = unpack(t)
|
||||
if (tt [playerName]) then
|
||||
tt [playerName][1] = tt [playerName][1] + amount
|
||||
else
|
||||
@@ -1510,7 +1510,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
dano_do_primeiro = 0
|
||||
|
||||
--mostra o resultado nas barras
|
||||
for index, habilidade in _ipairs(tabela_em_ordem) do
|
||||
for index, habilidade in ipairs(tabela_em_ordem) do
|
||||
--ta em ordem das habilidades que deram mais dano
|
||||
|
||||
if (habilidade[1] > 0) then
|
||||
@@ -1522,7 +1522,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
barra.report_text = Loc ["STRING_PLUGIN_NAME"].."! " .. Loc ["STRING_ABILITY_DAMAGE"]
|
||||
_detalhes:SetFontSize (barra.lineText1, CONST_FONT_SIZE)
|
||||
_detalhes:SetFontSize (barra.lineText4, CONST_FONT_SIZE)
|
||||
barra.t:SetVertexColor (1, .8, .8, .8)
|
||||
barra.t:SetVertexColor(1, .8, .8, .8)
|
||||
end
|
||||
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo(habilidade[4])
|
||||
@@ -1537,7 +1537,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
local spellSchool = _detalhes.spell_school_cache [nome_magia] or 1
|
||||
local r, g, b = _detalhes:GetSpellSchoolColor (spellSchool)
|
||||
|
||||
barra.t:SetVertexColor (r, g, b)
|
||||
barra.t:SetVertexColor(r, g, b)
|
||||
|
||||
if (index == 1) then
|
||||
barra.textura:SetValue(100)
|
||||
@@ -1573,9 +1573,9 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
--pega as habilidades que pertence especificamente a cada fase
|
||||
|
||||
if (boss_info and boss_info.phases) then
|
||||
for fase_id, fase in _ipairs(boss_info.phases) do
|
||||
for fase_id, fase in ipairs(boss_info.phases) do
|
||||
if (fase.adds) then
|
||||
for index, addId in _ipairs(fase.adds) do
|
||||
for index, addId in ipairs(fase.adds) do
|
||||
adds_pool [addId] = true
|
||||
end
|
||||
end
|
||||
@@ -1588,12 +1588,12 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
|
||||
local adds = {}
|
||||
|
||||
for index, jogador in _ipairs(DamageContainer._ActorTable) do
|
||||
for index, jogador in ipairs(DamageContainer._ActorTable) do
|
||||
|
||||
--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
|
||||
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
|
||||
@@ -1608,7 +1608,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
tabela.total = jogador.total
|
||||
|
||||
--em quem ele deu dano
|
||||
for target_name, amount in _pairs (jogador.targets) do
|
||||
for target_name, amount in _pairs(jogador.targets) do
|
||||
local este_jogador = _combat_object (1, target_name)
|
||||
if (este_jogador) then
|
||||
if (este_jogador.classe ~= "PET" and este_jogador.classe ~= "UNGROUPPLAYER" and este_jogador.classe ~= "UNKNOW") then
|
||||
@@ -1620,11 +1620,11 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
_table_sort (tabela.dano_em, _detalhes.Sort2)
|
||||
|
||||
--quem deu dano nele
|
||||
for agressor, _ in _pairs (jogador.damage_from) do
|
||||
for agressor, _ in _pairs(jogador.damage_from) do
|
||||
--local este_jogador = DamageContainer._ActorTable [DamageContainer._NameIndexTable [agressor]]
|
||||
local este_jogador = _combat_object (1, agressor)
|
||||
if (este_jogador and este_jogador:IsPlayer()) then
|
||||
for target_name, amount in _pairs (este_jogador.targets) do
|
||||
for target_name, amount in _pairs(este_jogador.targets) do
|
||||
if (target_name == nome) then
|
||||
tabela.damage_from [#tabela.damage_from+1] = {agressor, amount, este_jogador.classe}
|
||||
tabela.damage_from_total = tabela.damage_from_total + amount
|
||||
@@ -1651,19 +1651,19 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
local tabela = barra.jogador
|
||||
local dano_em = tabela.dano_em
|
||||
|
||||
GameCooltip:Preset (2)
|
||||
GameCooltip:Preset(2)
|
||||
GameCooltip:SetOwner(self)
|
||||
|
||||
EncounterDetails:FormatCooltipSettings()
|
||||
|
||||
GameCooltip:AddLine (barra.lineText1:GetText().." ".. "Damage Done")
|
||||
GameCooltip:AddLine(barra.lineText1:GetText().." ".. "Damage Done")
|
||||
|
||||
local topDamage = dano_em[1] and dano_em[1][2]
|
||||
|
||||
local dano_em_total = tabela.dano_em_total
|
||||
for _, esta_tabela in _pairs (dano_em) do
|
||||
for _, esta_tabela in _pairs(dano_em) do
|
||||
local coords = EncounterDetails.class_coords [esta_tabela[3]]
|
||||
GameCooltip:AddLine (EncounterDetails:GetOnlyName (esta_tabela[1]), _detalhes:ToK (esta_tabela[2]).." (".. _cstr ("%.1f", esta_tabela[2]/dano_em_total*100) .."%)", 1, "white", "orange")
|
||||
GameCooltip:AddLine(EncounterDetails:GetOnlyName(esta_tabela[1]), _detalhes:ToK (esta_tabela[2]).." (".. _cstr ("%.1f", esta_tabela[2]/dano_em_total*100) .."%)", 1, "white", "orange")
|
||||
|
||||
local specID = Details:GetSpec (esta_tabela[1])
|
||||
if (specID) then
|
||||
@@ -1687,8 +1687,8 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
self.ArrowOnEnter = true
|
||||
GameCooltip:SetOwner(self, "right", "left", -10, 0)
|
||||
|
||||
GameCooltip:AddLine (" ")
|
||||
GameCooltip:AddLine ("CLICK to Report")
|
||||
GameCooltip:AddLine(" ")
|
||||
GameCooltip:AddLine("CLICK to Report")
|
||||
GameCooltip:Show()
|
||||
end
|
||||
|
||||
@@ -1698,21 +1698,21 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
local tabela = barra.jogador
|
||||
local damage_from = tabela.damage_from
|
||||
|
||||
GameCooltip:Preset (2)
|
||||
GameCooltip:Preset(2)
|
||||
GameCooltip:SetOwner(self)
|
||||
|
||||
EncounterDetails:FormatCooltipSettings()
|
||||
|
||||
GameCooltip:AddLine (barra.lineText1: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]
|
||||
|
||||
for _, esta_tabela in _pairs (damage_from) do
|
||||
for _, esta_tabela in _pairs(damage_from) do
|
||||
|
||||
local coords = EncounterDetails.class_coords [esta_tabela[3]]
|
||||
if (coords) then
|
||||
GameCooltip:AddLine (EncounterDetails:GetOnlyName (esta_tabela[1]), _detalhes:ToK (esta_tabela[2]).." (".. _cstr ("%.1f", esta_tabela[2]/damage_from_total*100) .."%)", 1, "white", "orange", nil, nil, "MONOCHRONE")
|
||||
GameCooltip:AddLine(EncounterDetails:GetOnlyName(esta_tabela[1]), _detalhes:ToK (esta_tabela[2]).." (".. _cstr ("%.1f", esta_tabela[2]/damage_from_total*100) .."%)", 1, "white", "orange", nil, nil, "MONOCHRONE")
|
||||
|
||||
local specID = Details:GetSpec (esta_tabela[1])
|
||||
if (specID) then
|
||||
@@ -1730,18 +1730,18 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
GameCooltip:AddStatusBar (esta_tabela[2] / topDamage * 100, 1, .3, .3, .3, .3, false, {value = 100, color = {.21, .21, .21, 0.8}, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
|
||||
end
|
||||
else
|
||||
GameCooltip:AddLine (esta_tabela[1], _detalhes:ToK (esta_tabela[2]).." (".. _cstr ("%.1f", esta_tabela[2]/damage_from_total*100) .."%)")
|
||||
GameCooltip:AddLine(esta_tabela[1], _detalhes:ToK (esta_tabela[2]).." (".. _cstr ("%.1f", esta_tabela[2]/damage_from_total*100) .."%)")
|
||||
GameCooltip:AddStatusBar (esta_tabela[2] / topDamage * 100, 1, .3, .3, .3, .3, false, {value = 100, color = {.21, .21, .21, 0.8}, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
|
||||
end
|
||||
end
|
||||
|
||||
self.mouse_over = true
|
||||
self:SetHeight(EncounterDetails.Frame.DefaultBarHeight + 1)
|
||||
self:SetAlpha (1)
|
||||
self:SetAlpha(1)
|
||||
EncounterDetails.SetBarBackdrop_OnEnter (self)
|
||||
|
||||
GameCooltip:AddLine (" ")
|
||||
GameCooltip:AddLine ("CLICK to Report")
|
||||
GameCooltip:AddLine(" ")
|
||||
GameCooltip:AddLine("CLICK to Report")
|
||||
|
||||
GameCooltip:SetOwner(self, "left", "right", -60, 0)
|
||||
GameCooltip:Show()
|
||||
@@ -1754,7 +1754,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
self.textura:SetBlendMode("BLEND")
|
||||
self.textura:SetSize(16, 16)
|
||||
else
|
||||
self:SetAlpha (0.9)
|
||||
self:SetAlpha(0.9)
|
||||
self:SetHeight(EncounterDetails.Frame.DefaultBarHeight)
|
||||
EncounterDetails.SetBarBackdrop_OnLeave (self)
|
||||
end
|
||||
@@ -1769,7 +1769,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
--table.sort (adds, sort_by_name)
|
||||
table.sort (adds, _detalhes.Sort1)
|
||||
|
||||
for index, esta_tabela in _ipairs(adds) do
|
||||
for index, esta_tabela in ipairs(adds) do
|
||||
|
||||
local addName = esta_tabela.nome
|
||||
local barra = container.barras [index]
|
||||
@@ -1789,7 +1789,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
add_damage_done.barra = barra
|
||||
add_damage_done:SetWidth(EncounterDetails.CooltipLineHeight)
|
||||
add_damage_done:SetHeight(EncounterDetails.CooltipLineHeight)
|
||||
add_damage_done:EnableMouse (true)
|
||||
add_damage_done:EnableMouse(true)
|
||||
add_damage_done:SetResizable(false)
|
||||
add_damage_done:SetPoint("left", barra, "left", 0, 0)
|
||||
|
||||
@@ -1822,7 +1822,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
|
||||
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
|
||||
|
||||
--barra.textura:SetStatusBarColor (_unpack (_detalhes.class_colors [jogador.classe]))
|
||||
--barra.textura:SetStatusBarColor (_unpack(_detalhes.class_colors [jogador.classe]))
|
||||
barra.textura:SetStatusBarColor (1, 1, 1, 1) --a cor pode ser a spell school da magia
|
||||
barra.textura:SetValue(100)
|
||||
|
||||
@@ -1855,7 +1855,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
|
||||
local habilidades_interrompidas = {}
|
||||
|
||||
for index, jogador in _ipairs(misc._ActorTable) do
|
||||
for index, jogador in ipairs(misc._ActorTable) do
|
||||
if (not jogador.grupo) then --s� aparecer nego da raid
|
||||
break
|
||||
end
|
||||
@@ -1866,7 +1866,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
local oque_interrompi = jogador.interrompeu_oque
|
||||
--vai ter [spellid] = quantidade
|
||||
|
||||
for spellid, amt in _pairs (oque_interrompi) do
|
||||
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
|
||||
habilidades_interrompidas [spellid] = {{}, 0, spellid} --tabela com quem interrompeu e o total de vezes que a habilidade foi interrompida
|
||||
end
|
||||
@@ -1884,14 +1884,14 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
|
||||
--por em ordem
|
||||
tabela_em_ordem = {}
|
||||
for spellid, tabela in _pairs (habilidades_interrompidas) do
|
||||
for spellid, tabela in _pairs(habilidades_interrompidas) do
|
||||
tabela_em_ordem [#tabela_em_ordem+1] = tabela
|
||||
end
|
||||
_table_sort (tabela_em_ordem, _detalhes.Sort2)
|
||||
|
||||
index = 1
|
||||
|
||||
for _, tabela in _ipairs(tabela_em_ordem) do
|
||||
for _, tabela in ipairs(tabela_em_ordem) do
|
||||
|
||||
local barra = container.barras [index]
|
||||
if (not barra) then
|
||||
@@ -1908,7 +1908,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo(tabela [3])
|
||||
local successful = 0
|
||||
--pegar quantas vezes a magia passou com sucesso.
|
||||
for _, enemy_actor in _ipairs(DamageContainer._ActorTable) do
|
||||
for _, enemy_actor in ipairs(DamageContainer._ActorTable) do
|
||||
if (enemy_actor.spells._ActorTable [spellid]) then
|
||||
local spell = enemy_actor.spells._ActorTable [spellid]
|
||||
successful = spell.successful_casted
|
||||
@@ -1923,7 +1923,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
|
||||
barra.jogador = tabela
|
||||
|
||||
--barra.textura:SetStatusBarColor (_unpack (_detalhes.class_colors [jogador.classe]))
|
||||
--barra.textura:SetStatusBarColor (_unpack(_detalhes.class_colors [jogador.classe]))
|
||||
|
||||
if (index == 1) then
|
||||
barra.textura:SetValue(100)
|
||||
@@ -1964,7 +1964,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
|
||||
local habilidades_dispeladas = {}
|
||||
|
||||
for index, jogador in _ipairs(misc._ActorTable) do
|
||||
for index, jogador in ipairs(misc._ActorTable) do
|
||||
if (not jogador.grupo) then --s� aparecer nego da raid
|
||||
break
|
||||
end
|
||||
@@ -1976,17 +1976,17 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
local oque_dispelei = jogador.dispell_oque
|
||||
--vai ter [spellid] = quantidade
|
||||
|
||||
--print ("dispell: " .. jogador.classe .. " nome: " .. jogador.nome)
|
||||
--print("dispell: " .. jogador.classe .. " nome: " .. jogador.nome)
|
||||
|
||||
for spellid, amt in _pairs (oque_dispelei) do
|
||||
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
|
||||
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.
|
||||
habilidades_dispeladas [spellid] [1] [jogador.nome] = {0, jogador.classe}
|
||||
--print (jogador.nome)
|
||||
--print (jogador.classe)
|
||||
--print(jogador.nome)
|
||||
--print(jogador.classe)
|
||||
end
|
||||
|
||||
habilidades_dispeladas [spellid] [2] = habilidades_dispeladas [spellid] [2] + amt
|
||||
@@ -1998,14 +1998,14 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
|
||||
--por em ordem
|
||||
tabela_em_ordem = {}
|
||||
for spellid, tabela in _pairs (habilidades_dispeladas) do
|
||||
for spellid, tabela in _pairs(habilidades_dispeladas) do
|
||||
tabela_em_ordem [#tabela_em_ordem+1] = tabela
|
||||
end
|
||||
_table_sort (tabela_em_ordem, _detalhes.Sort2)
|
||||
|
||||
index = 1
|
||||
|
||||
for _, tabela in _ipairs(tabela_em_ordem) do
|
||||
for _, tabela in ipairs(tabela_em_ordem) do
|
||||
|
||||
local barra = container.barras [index]
|
||||
if (not barra) then
|
||||
@@ -2026,7 +2026,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
|
||||
barra.jogador = tabela
|
||||
|
||||
--barra.textura:SetStatusBarColor (_unpack (_detalhes.class_colors [jogador.classe]))
|
||||
--barra.textura:SetStatusBarColor (_unpack(_detalhes.class_colors [jogador.classe]))
|
||||
|
||||
if (index == 1) then
|
||||
barra.textura:SetValue(100)
|
||||
@@ -2065,7 +2065,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
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
|
||||
|
||||
for index, tabela in _ipairs(mortes) do
|
||||
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}
|
||||
local barra = container.barras [index]
|
||||
if (not barra) then
|
||||
@@ -2079,7 +2079,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
local overlayTexture = barra:CreateTexture(nil, "overlay")
|
||||
overlayTexture:SetAllPoints()
|
||||
overlayTexture:SetColorTexture (1, 1, 1)
|
||||
overlayTexture:SetAlpha (1)
|
||||
overlayTexture:SetAlpha(1)
|
||||
overlayTexture:Hide()
|
||||
barra.OverlayTexture = overlayTexture
|
||||
end
|
||||
@@ -2097,11 +2097,11 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
barra.jogador = tabela
|
||||
barra.extra = habilidades_info
|
||||
|
||||
barra.textura:SetStatusBarColor (_unpack (_detalhes.class_colors [tabela [4]]))
|
||||
barra.textura:SetStatusBarColor (_unpack(_detalhes.class_colors [tabela [4]]))
|
||||
barra.textura:SetValue(100)
|
||||
|
||||
barra.icone:SetTexture("Interface\\AddOns\\Details\\images\\classes_small")
|
||||
barra.icone:SetTexCoord (_unpack (EncounterDetails.class_coords [tabela [4]]))
|
||||
barra.icone:SetTexCoord (_unpack(EncounterDetails.class_coords [tabela [4]]))
|
||||
|
||||
barra:Show()
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
do
|
||||
local _detalhes = _G._detalhes
|
||||
local DetailsFrameWork = _detalhes.gump
|
||||
local AceLocale = LibStub ("AceLocale-3.0")
|
||||
local AceLocale = LibStub("AceLocale-3.0")
|
||||
local Loc = AceLocale:GetLocale ("Details_EncounterDetails")
|
||||
local Graphics = LibStub:GetLibrary("LibGraph-2.0")
|
||||
local _ipairs = ipairs
|
||||
local ipairs = ipairs
|
||||
local _math_floor = math.floor
|
||||
local _cstr = string.format
|
||||
local _GetSpellInfo = _detalhes.getspellinfo
|
||||
@@ -51,10 +51,10 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
--options panel
|
||||
|
||||
EncounterDetails.SetBarBackdrop_OnEnter = function(self)
|
||||
self:SetBackdropColor(unpack (BGColorDefault_Hover))
|
||||
self:SetBackdropColor(unpack(BGColorDefault_Hover))
|
||||
end
|
||||
EncounterDetails.SetBarBackdrop_OnLeave = function(self)
|
||||
self:SetBackdropColor(unpack (BGColorDefault))
|
||||
self:SetBackdropColor(unpack(BGColorDefault))
|
||||
end
|
||||
|
||||
function EncounterDetails:AutoShowIcon()
|
||||
@@ -187,7 +187,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
row.t = t
|
||||
row.textura:SetStatusBarTexture (t)
|
||||
row.textura:SetStatusBarColor (.5, .5, .5, 0)
|
||||
row.textura:SetMinMaxValues (0,100)
|
||||
row.textura:SetMinMaxValues(0,100)
|
||||
|
||||
row.lineText1 = row.textura:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
|
||||
row.lineText1:SetPoint("LEFT", row.textura, "LEFT", 22, -1)
|
||||
@@ -222,9 +222,9 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
barra:SetPoint("LEFT", container, "LEFT", x_mod, 0)
|
||||
barra:SetPoint("RIGHT", container, "RIGHT", width_mod, 0)
|
||||
barra:SetPoint("TOP", container, "TOP", 0, y)
|
||||
barra:SetFrameLevel (container:GetFrameLevel() + 1)
|
||||
barra:SetFrameLevel(container:GetFrameLevel() + 1)
|
||||
|
||||
barra:EnableMouse (true)
|
||||
barra:EnableMouse(true)
|
||||
barra:RegisterForClicks ("LeftButtonDown","RightButtonUp")
|
||||
|
||||
EncounterDetails:CreateRowTexture (barra)
|
||||
@@ -238,8 +238,8 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
barra.icone:SetHeight(default_height)
|
||||
barra.icone:SetPoint("RIGHT", barra.textura, "LEFT", 20, 0)
|
||||
|
||||
barra:SetAlpha (0.9)
|
||||
barra.icone:SetAlpha (0.8)
|
||||
barra:SetAlpha(0.9)
|
||||
barra.icone:SetAlpha(0.8)
|
||||
|
||||
EncounterDetails:SetRowScripts (barra, index, container)
|
||||
|
||||
@@ -293,11 +293,11 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
end
|
||||
g:ResetData()
|
||||
|
||||
local combat = EncounterDetails:GetCombat (segment)
|
||||
local combat = EncounterDetails:GetCombat(segment)
|
||||
local graphicData = combat:GetTimeData ("Raid Damage Done")
|
||||
|
||||
if (not graphicData or not combat.start_time or not combat.end_time) then
|
||||
EncounterDetails:Msg ("This segment doesn't have chart data.")
|
||||
EncounterDetails:Msg("This segment doesn't have chart data.")
|
||||
return
|
||||
--elseif (EncounterDetails.CombatsAlreadyDrew [combat:GetCombatNumber()]) then
|
||||
--return
|
||||
@@ -332,7 +332,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
return
|
||||
end
|
||||
for i = segment + 4, segment+1, -1 do
|
||||
local combat = EncounterDetails:GetCombat (i)
|
||||
local combat = EncounterDetails:GetCombat(i)
|
||||
if (combat) then --the combat exists
|
||||
local elapsed_time = combat:GetCombatTime()
|
||||
|
||||
@@ -411,17 +411,17 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
|
||||
local _i = 3
|
||||
|
||||
local graphMaxDps = math.max (g.max_damage, dps_max)
|
||||
local graphMaxDps = math.max(g.max_damage, dps_max)
|
||||
while (_i <= #content-2) do
|
||||
local v = (content[_i-2]+content[_i-1]+content[_i]+content[_i+1]+content[_i+2])/5 --normalize
|
||||
_data [#_data+1] = {scaleW*(_i-2), v/graphMaxDps} --x and y coords
|
||||
_i = _i + 1
|
||||
end
|
||||
|
||||
tremove (content, 1)
|
||||
tremove (content, 1)
|
||||
tremove (content, #graphicData)
|
||||
tremove (content, #graphicData)
|
||||
tremove(content, 1)
|
||||
tremove(content, 1)
|
||||
tremove(content, #graphicData)
|
||||
tremove(content, #graphicData)
|
||||
|
||||
--update timeline
|
||||
local tempo = combat.end_time - combat.start_time
|
||||
@@ -484,7 +484,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
local mortes = drawDeathsCombat.last_events_tables
|
||||
local scaleG = CONST_CHART_LENGTH / drawDeathsCombat:GetCombatTime()
|
||||
|
||||
for _, row in _ipairs(g.VerticalLines) do
|
||||
for _, row in ipairs(g.VerticalLines) do
|
||||
row:Hide()
|
||||
end
|
||||
|
||||
@@ -497,7 +497,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
vRowFrame = CreateFrame("frame", "DetailsEncountersVerticalLine"..i, g, "BackdropTemplate")
|
||||
vRowFrame:SetWidth(20)
|
||||
vRowFrame:SetHeight(43)
|
||||
vRowFrame:SetFrameLevel (g:GetFrameLevel()+2)
|
||||
vRowFrame:SetFrameLevel(g:GetFrameLevel()+2)
|
||||
|
||||
vRowFrame:SetScript("OnEnter", function(frame)
|
||||
|
||||
@@ -506,12 +506,12 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
GameCooltip:Reset()
|
||||
|
||||
--time of death and player name
|
||||
GameCooltip:AddLine (vRowFrame.dead[6].." "..vRowFrame.dead[3])
|
||||
GameCooltip:AddLine(vRowFrame.dead[6].." "..vRowFrame.dead[3])
|
||||
local class, l, r, t, b = _detalhes:GetClass (vRowFrame.dead[3])
|
||||
if (class) then
|
||||
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], 1, 1, 12, 12, l, r, t, b)
|
||||
end
|
||||
GameCooltip:AddLine ("")
|
||||
GameCooltip:AddLine("")
|
||||
|
||||
--last hits:
|
||||
local death = vRowFrame.dead
|
||||
@@ -521,7 +521,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
if (type(this_hit[1]) == "boolean" and this_hit[1]) then
|
||||
local spellname, _, spellicon = _GetSpellInfo(this_hit[2])
|
||||
local t = death [2] - this_hit [4]
|
||||
GameCooltip:AddLine ("-" .. _cstr ("%.1f", t) .. " " .. spellname .. " (" .. this_hit[6] .. ")", EncounterDetails:comma_value (this_hit [3]))
|
||||
GameCooltip:AddLine("-" .. _cstr ("%.1f", t) .. " " .. spellname .. " (" .. this_hit[6] .. ")", EncounterDetails:comma_value (this_hit [3]))
|
||||
GameCooltip:AddIcon (spellicon, 1, 1, 12, 12, 0.1, 0.9, 0.1, 0.9)
|
||||
amt = amt + 1
|
||||
if (amt == 3) then
|
||||
@@ -548,7 +548,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
vRowFrame.texture:SetHeight(20)
|
||||
vRowFrame.texture:SetPoint("center", "DetailsEncountersVerticalLine"..i, "center")
|
||||
vRowFrame.texture:SetPoint("bottom", "DetailsEncountersVerticalLine"..i, "bottom", 0, 0)
|
||||
vRowFrame.texture:SetVertexColor (1, 1, 1, .5)
|
||||
vRowFrame.texture:SetVertexColor(1, 1, 1, .5)
|
||||
|
||||
vRowFrame.icon = vRowFrame:CreateTexture(nil, "overlay")
|
||||
vRowFrame.icon:SetTexture("Interface\\WorldStateFrame\\SkullBones")
|
||||
@@ -611,12 +611,12 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
insets = {left = 1, right = 1, top = 1, bottom = 1}})
|
||||
phase_panel:SetBackdropColor(0, 0, 0, .4)
|
||||
|
||||
local damage_icon = DetailsFrameWork:CreateImage (phase_panel, [[Interface\AddOns\Details\images\skins\classic_skin_v1]], 16, 16, "overlay", {11/1024, 24/1024, 376/1024, 390/1024})
|
||||
local damage_icon = DetailsFrameWork:CreateImage(phase_panel, [[Interface\AddOns\Details\images\skins\classic_skin_v1]], 16, 16, "overlay", {11/1024, 24/1024, 376/1024, 390/1024})
|
||||
local damage_label = DetailsFrameWork:CreateLabel(phase_panel, "Damage Done:")
|
||||
damage_icon:SetPoint("topleft", phase_panel, "topleft", 10, -10)
|
||||
damage_label:SetPoint("left", damage_icon, "right", 4, 0)
|
||||
|
||||
local heal_icon = DetailsFrameWork:CreateImage (phase_panel, [[Interface\AddOns\Details\images\skins\classic_skin_v1]], 16, 16, "overlay", {43/1024, 57/1024, 376/1024, 390/1024})
|
||||
local heal_icon = DetailsFrameWork:CreateImage(phase_panel, [[Interface\AddOns\Details\images\skins\classic_skin_v1]], 16, 16, "overlay", {43/1024, 57/1024, 376/1024, 390/1024})
|
||||
local heal_label = DetailsFrameWork:CreateLabel(phase_panel, "Healing Done:")
|
||||
heal_icon:SetPoint("topleft", phase_panel, "topleft", 250, -10)
|
||||
heal_label:SetPoint("left", heal_icon, "right", 4, 0)
|
||||
@@ -645,9 +645,9 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
local player_name = DetailsFrameWork:CreateLabel(phase_panel, "")
|
||||
local amount = DetailsFrameWork:CreateLabel(phase_panel, "")
|
||||
amount:SetJustifyH("right")
|
||||
local icon = DetailsFrameWork:CreateImage (phase_panel, "", 16, 16)
|
||||
local bg = DetailsFrameWork:CreateImage (phase_panel, [[Interface\AddOns\Details\images\BantoBar]], nil, nil, "artwork")
|
||||
bg:SetPoint("left", icon, "left"); bg.height = 16; bg:SetPoint("right", amount, "right"); bg:SetVertexColor (.2, .2, .2, 0.8)
|
||||
local icon = DetailsFrameWork:CreateImage(phase_panel, "", 16, 16)
|
||||
local bg = DetailsFrameWork:CreateImage(phase_panel, [[Interface\AddOns\Details\images\BantoBar]], nil, nil, "artwork")
|
||||
bg:SetPoint("left", icon, "left"); bg.height = 16; bg:SetPoint("right", amount, "right"); bg:SetVertexColor(.2, .2, .2, 0.8)
|
||||
|
||||
icon:SetPoint("topleft", phase_panel, "topleft", 10, ((index * 16) * -1) - 16)
|
||||
player_name:SetPoint("left", icon, "right", 2, 0)
|
||||
@@ -665,9 +665,9 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
local player_name = DetailsFrameWork:CreateLabel(phase_panel, "")
|
||||
local amount = DetailsFrameWork:CreateLabel(phase_panel, "")
|
||||
amount:SetJustifyH("right")
|
||||
local icon = DetailsFrameWork:CreateImage (phase_panel, "", 16, 16)
|
||||
local bg = DetailsFrameWork:CreateImage (phase_panel, [[Interface\AddOns\Details\images\BantoBar]], nil, nil, "artwork")
|
||||
bg:SetPoint("left", icon, "left"); bg.height = 16; bg:SetPoint("right", amount, "right"); bg:SetVertexColor (.2, .2, .2, 0.8)
|
||||
local icon = DetailsFrameWork:CreateImage(phase_panel, "", 16, 16)
|
||||
local bg = DetailsFrameWork:CreateImage(phase_panel, [[Interface\AddOns\Details\images\BantoBar]], nil, nil, "artwork")
|
||||
bg:SetPoint("left", icon, "left"); bg.height = 16; bg:SetPoint("right", amount, "right"); bg:SetVertexColor(.2, .2, .2, 0.8)
|
||||
|
||||
icon:SetPoint("topleft", phase_panel, "topleft", 250, ((index * 16) * -1) - 16)
|
||||
player_name:SetPoint("left", icon, "right", 2, 0)
|
||||
@@ -687,11 +687,11 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
phase_panel.time_label:SetPoint("left", phase_panel.phase_label, "right", 5, 0)
|
||||
phase_panel.report_label:SetPoint("bottomright", phase_panel, "bottomright", -10, 5)
|
||||
|
||||
local bg = DetailsFrameWork:CreateImage (phase_panel, [[Interface\Tooltips\UI-Tooltip-Background]], nil, nil, "artwork")
|
||||
local bg = DetailsFrameWork:CreateImage(phase_panel, [[Interface\Tooltips\UI-Tooltip-Background]], nil, nil, "artwork")
|
||||
bg:SetPoint("left", phase_panel.phase_label, "left");
|
||||
bg.height = 16;
|
||||
bg:SetPoint("right", phase_panel.report_label, "right");
|
||||
bg:SetVertexColor (0, 0, 0, 1)
|
||||
bg:SetVertexColor(0, 0, 0, 1)
|
||||
|
||||
local spark_container = {}
|
||||
local create_spark = function()
|
||||
@@ -729,14 +729,14 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
local phase = self.phase
|
||||
local spark_index = 3
|
||||
|
||||
self.texture:SetVertexColor (1, 1, 1)
|
||||
self.texture:SetVertexColor(1, 1, 1)
|
||||
|
||||
for _, f in ipairs(g.PhaseTextures) do
|
||||
if (f ~= self and f.phase == phase) then
|
||||
local spark1 = get_spark (spark_index)
|
||||
local spark2 = get_spark (spark_index+1)
|
||||
f.texture:SetBlendMode("ADD")
|
||||
f.texture:SetVertexColor (1, 1, 1)
|
||||
f.texture:SetVertexColor(1, 1, 1)
|
||||
spark1:SetPoint("left", f.texture, "left", -16, 0)
|
||||
spark2:SetPoint("right", f.texture, "right", 16, 0)
|
||||
spark1:Show()
|
||||
@@ -759,7 +759,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
|
||||
for i, player in ipairs(players) do
|
||||
local dlabel = phase_panel:GetDamageLabel (i)
|
||||
dlabel.lefttext.text = EncounterDetails:GetOnlyName (player [1])
|
||||
dlabel.lefttext.text = EncounterDetails:GetOnlyName(player [1])
|
||||
dlabel.righttext.text = _detalhes:ToK (_math_floor(player [2]))
|
||||
|
||||
local class = EncounterDetails:GetClass (player [1])
|
||||
@@ -796,13 +796,13 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
|
||||
for i, player in ipairs(players) do
|
||||
local hlabel = phase_panel:GetHealLabel (i)
|
||||
hlabel.lefttext.text = EncounterDetails:GetOnlyName (player [1])
|
||||
hlabel.lefttext.text = EncounterDetails:GetOnlyName(player [1])
|
||||
hlabel.righttext.text = _detalhes:ToK (_math_floor(player [2]))
|
||||
|
||||
local classe = _detalhes:GetClass (player [1])
|
||||
if (classe) then
|
||||
hlabel.icon:SetTexture([[Interface\AddOns\Details\images\classes_small_alpha]])
|
||||
hlabel.icon:SetTexCoord (unpack (_detalhes.class_coords [classe]))
|
||||
hlabel.icon:SetTexCoord (unpack(_detalhes.class_coords [classe]))
|
||||
else
|
||||
hlabel.icon:SetTexture([[Interface\LFGFRAME\LFGROLE_BW]])
|
||||
hlabel.icon:SetTexCoord (.25, .5, 0, 1)
|
||||
@@ -818,7 +818,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
self.heal_actors = players
|
||||
|
||||
--show the panel
|
||||
phase_panel:SetHeight((math.max (damage_players, heal_players) * 16) + 60)
|
||||
phase_panel:SetHeight((math.max(damage_players, heal_players) * 16) + 60)
|
||||
phase_panel:SetPoint("bottom", self, "top", 0, 10)
|
||||
phase_panel:Show()
|
||||
|
||||
@@ -836,7 +836,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
|
||||
for _, f in ipairs(g.PhaseTextures) do
|
||||
f.texture:SetBlendMode("BLEND")
|
||||
f.texture:SetVertexColor (unpack (f.texture.original_color))
|
||||
f.texture:SetVertexColor(unpack(f.texture.original_color))
|
||||
end
|
||||
|
||||
hide_sparks()
|
||||
@@ -851,7 +851,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
AmtLines = AmtLines + 1
|
||||
if (#result > AmtLines) then
|
||||
for i = #result, AmtLines+1, -1 do
|
||||
tremove (result, i)
|
||||
tremove(result, i)
|
||||
end
|
||||
end
|
||||
EncounterDetails:SendReportLines (result)
|
||||
@@ -860,7 +860,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
--need to build here because the mouse will leave the block to click in the send button
|
||||
tinsert(result, "Details!: Damage for Phase " .. self.phase .. " of " .. (g.combat and g.combat.is_boss and g.combat.is_boss.name or "Unknown") .. ":")
|
||||
for i = 1, #self.damage_actors do
|
||||
tinsert(result, EncounterDetails:GetOnlyName (self.damage_actors[i][1]) .. ": " .. _detalhes:ToK (_math_floor(self.damage_actors [i][2])))
|
||||
tinsert(result, EncounterDetails:GetOnlyName(self.damage_actors[i][1]) .. ": " .. _detalhes:ToK (_math_floor(self.damage_actors [i][2])))
|
||||
end
|
||||
EncounterDetails:SendReportWindow (reportFunc, nil, nil, true)
|
||||
|
||||
@@ -871,7 +871,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
AmtLines = AmtLines + 1
|
||||
if (#result > AmtLines) then
|
||||
for i = #result, AmtLines+1, -1 do
|
||||
tremove (result, i)
|
||||
tremove(result, i)
|
||||
end
|
||||
end
|
||||
EncounterDetails:SendReportLines (result)
|
||||
@@ -879,7 +879,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
|
||||
tinsert(result, "Details!: Healing for Phase " .. self.phase .. " of " .. (g.combat and g.combat.is_boss and g.combat.is_boss.name or "Unknown") .. ":")
|
||||
for i = 1, #self.heal_actors do
|
||||
tinsert(result, EncounterDetails:GetOnlyName (self.heal_actors[i][1]) .. ": " .. _detalhes:ToK (_math_floor(self.heal_actors [i][2])))
|
||||
tinsert(result, EncounterDetails:GetOnlyName(self.heal_actors[i][1]) .. ": " .. _detalhes:ToK (_math_floor(self.heal_actors [i][2])))
|
||||
end
|
||||
EncounterDetails:SendReportWindow (reportFunc, nil, nil, true)
|
||||
|
||||
@@ -912,13 +912,13 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
|
||||
phase = math.min (phase, 5)
|
||||
if (not phase_colors [phase]) then
|
||||
_detalhes:Msg ("Phase out of range:", phase)
|
||||
phase = math.max (phase, 1)
|
||||
_detalhes:Msg("Phase out of range:", phase)
|
||||
phase = math.max(phase, 1)
|
||||
end
|
||||
|
||||
texture.texture:SetVertexColor (unpack (phase_colors [phase]))
|
||||
texture.texture:SetVertexColor(unpack(phase_colors [phase]))
|
||||
local oc = texture.texture.original_color
|
||||
oc[1], oc[2], oc[3] = unpack (phase_colors [phase])
|
||||
oc[1], oc[2], oc[3] = unpack(phase_colors [phase])
|
||||
|
||||
texture:Show()
|
||||
|
||||
@@ -970,7 +970,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
--create lines for damage and time
|
||||
for i = 1, 8, 1 do
|
||||
local line = g:CreateTexture(nil, "overlay")
|
||||
line:SetColorTexture (unpack (CONST_DAMAGE_LINES_COLOR))
|
||||
line:SetColorTexture (unpack(CONST_DAMAGE_LINES_COLOR))
|
||||
line:SetWidth(CONST_CHART_WIDTH)
|
||||
line:SetHeight(1)
|
||||
|
||||
@@ -993,7 +993,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
texture:SetWidth(9)
|
||||
texture:SetHeight(9)
|
||||
texture:SetPoint("TOPLEFT", EncounterDetails.Frame, "TOPLEFT", (i*65) + 499, -81)
|
||||
texture:SetColorTexture (unpack (grafico_cores[i]))
|
||||
texture:SetColorTexture (unpack(grafico_cores[i]))
|
||||
local text = g:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
|
||||
text:SetPoint("LEFT", texture, "right", 2, 0)
|
||||
text:SetJustifyH("LEFT")
|
||||
@@ -1037,17 +1037,17 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
BossFrame:SetWidth(898) -- + 200
|
||||
BossFrame:SetHeight(504) -- + 150
|
||||
|
||||
BossFrame:EnableMouse (true)
|
||||
BossFrame:EnableMouse(true)
|
||||
BossFrame:SetResizable(false)
|
||||
BossFrame:SetMovable (true)
|
||||
BossFrame:SetMovable(true)
|
||||
|
||||
--background
|
||||
BossFrame.bg1 = BossFrame:CreateTexture(nil, "background")
|
||||
BossFrame.bg1:SetTexture([[Interface\AddOns\Details\images\background]], true)
|
||||
BossFrame.bg1:SetAlpha (0.7)
|
||||
BossFrame.bg1:SetVertexColor (0.27, 0.27, 0.27)
|
||||
BossFrame.bg1:SetVertTile (true)
|
||||
BossFrame.bg1:SetHorizTile (true)
|
||||
BossFrame.bg1:SetAlpha(0.7)
|
||||
BossFrame.bg1:SetVertexColor(0.27, 0.27, 0.27)
|
||||
BossFrame.bg1:SetVertTile(true)
|
||||
BossFrame.bg1:SetHorizTile(true)
|
||||
BossFrame.bg1:SetSize(790, 454)
|
||||
BossFrame.bg1:SetAllPoints()
|
||||
|
||||
@@ -1062,16 +1062,16 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
|
||||
local name_bg_texture = BossFrame:CreateTexture(nil, "background")
|
||||
name_bg_texture:SetTexture([[Interface\PetBattles\_PetBattleHorizTile]], true)
|
||||
name_bg_texture:SetHorizTile (true)
|
||||
name_bg_texture:SetHorizTile(true)
|
||||
name_bg_texture:SetTexCoord (0, 1, 126/256, 19/256)
|
||||
name_bg_texture:SetPoint("topleft", BossFrame, "topleft", 2, -22)
|
||||
name_bg_texture:SetPoint("bottomright", BossFrame, "bottomright")
|
||||
name_bg_texture:SetHeight(54)
|
||||
name_bg_texture:SetVertexColor (0, 0, 0, 0.2)
|
||||
name_bg_texture:SetVertexColor(0, 0, 0, 0.2)
|
||||
|
||||
--header background
|
||||
local headerFrame = CreateFrame("frame", "EncounterDetailsHeaderFrame", BossFrame,"BackdropTemplate")
|
||||
headerFrame:EnableMouse (false)
|
||||
headerFrame:EnableMouse(false)
|
||||
headerFrame:SetPoint("topleft", titlebar, "bottomleft", 0, -1)
|
||||
headerFrame:SetPoint("topright", titlebar, "bottomright", 0, -1)
|
||||
headerFrame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
@@ -1127,7 +1127,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
BossFrame.raidbackground:SetPoint("TOPLEFT", BossFrame, "TOPLEFT", 0, -74)
|
||||
BossFrame.raidbackground:SetPoint("bottomright", BossFrame, "bottomright", 0, 0)
|
||||
BossFrame.raidbackground:SetDrawLayer ("BORDER", 2)
|
||||
BossFrame.raidbackground:SetAlpha (0.1)
|
||||
BossFrame.raidbackground:SetAlpha(0.1)
|
||||
|
||||
--bot�o fechar
|
||||
titlebar.CloseButton = CreateFrame("Button", nil, titlebar, "UIPanelCloseButton")
|
||||
@@ -1138,8 +1138,8 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
titlebar.CloseButton:SetScript("OnClick", function(self)
|
||||
EncounterDetails:CloseWindow()
|
||||
end)
|
||||
titlebar.CloseButton:SetFrameLevel (titlebar:GetFrameLevel()+2)
|
||||
titlebar.CloseButton:GetNormalTexture():SetDesaturated (true)
|
||||
titlebar.CloseButton:SetFrameLevel(titlebar:GetFrameLevel()+2)
|
||||
titlebar.CloseButton:GetNormalTexture():SetDesaturated(true)
|
||||
|
||||
--background completo
|
||||
|
||||
@@ -1191,17 +1191,17 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
|
||||
local hide_Summary = function()
|
||||
--hide boss frames
|
||||
for _, frame in _ipairs(BossFrame.Widgets) do
|
||||
for _, frame in ipairs(BossFrame.Widgets) do
|
||||
frame:Hide()
|
||||
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"))
|
||||
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)
|
||||
@@ -1221,7 +1221,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
if (to == "main") then
|
||||
BossFrame.raidbackground:Show()
|
||||
|
||||
for _, frame in _ipairs(BossFrame.Widgets) do
|
||||
for _, frame in ipairs(BossFrame.Widgets) do
|
||||
frame:Show()
|
||||
end
|
||||
|
||||
@@ -1232,7 +1232,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
BossFrame.ShowType = "main"
|
||||
BossFrame.segmentosDropdown:Enable()
|
||||
|
||||
BossFrame.buttonSwitchNormal:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTONSELECTED_TEMPLATE"))
|
||||
BossFrame.buttonSwitchNormal:SetTemplate(DetailsFrameWork:GetTemplate("button", "DETAILS_PLUGIN_BUTTONSELECTED_TEMPLATE"))
|
||||
|
||||
EncounterDetails.db.last_section_selected = BossFrame.ShowType
|
||||
|
||||
@@ -1262,7 +1262,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
|
||||
BossFrame.segmentosDropdown:Enable()
|
||||
|
||||
BossFrame.buttonSwitchSpellsAuras:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTONSELECTED_TEMPLATE"))
|
||||
BossFrame.buttonSwitchSpellsAuras:SetTemplate(DetailsFrameWork:GetTemplate("button", "DETAILS_PLUGIN_BUTTONSELECTED_TEMPLATE"))
|
||||
|
||||
EncounterDetails.db.last_section_selected = BossFrame.ShowType
|
||||
|
||||
@@ -1274,7 +1274,7 @@ _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
|
||||
|
||||
@@ -1308,7 +1308,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
|
||||
BossFrame.segmentosDropdown:Disable()
|
||||
|
||||
BossFrame.buttonSwitchBossEmotes:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTONSELECTED_TEMPLATE"))
|
||||
BossFrame.buttonSwitchBossEmotes:SetTemplate(DetailsFrameWork:GetTemplate("button", "DETAILS_PLUGIN_BUTTONSELECTED_TEMPLATE"))
|
||||
|
||||
EncounterDetails.db.last_section_selected = BossFrame.ShowType
|
||||
|
||||
@@ -1328,7 +1328,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
|
||||
EncounterDetailsPhaseFrame:Show()
|
||||
|
||||
BossFrame.buttonSwitchPhases:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTONSELECTED_TEMPLATE"))
|
||||
BossFrame.buttonSwitchPhases:SetTemplate(DetailsFrameWork:GetTemplate("button", "DETAILS_PLUGIN_BUTTONSELECTED_TEMPLATE"))
|
||||
|
||||
EncounterDetails.db.last_section_selected = BossFrame.ShowType
|
||||
|
||||
@@ -1346,7 +1346,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
|
||||
BossFrame.raidbackground:Hide()
|
||||
|
||||
for _, frame in _ipairs(BossFrame.Widgets) do
|
||||
for _, frame in ipairs(BossFrame.Widgets) do
|
||||
frame:Hide()
|
||||
end
|
||||
|
||||
@@ -1373,7 +1373,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
|
||||
BossFrame.segmentosDropdown:Enable()
|
||||
|
||||
BossFrame.buttonSwitchGraphic:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTONSELECTED_TEMPLATE"))
|
||||
BossFrame.buttonSwitchGraphic:SetTemplate(DetailsFrameWork:GetTemplate("button", "DETAILS_PLUGIN_BUTTONSELECTED_TEMPLATE"))
|
||||
|
||||
EncounterDetails.db.last_section_selected = BossFrame.ShowType
|
||||
end
|
||||
@@ -1388,34 +1388,34 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
local HEADER_MENUBUTTONS_Y = -38
|
||||
|
||||
--summary
|
||||
BossFrame.buttonSwitchNormal = _detalhes.gump:CreateButton (BossFrame, BossFrame.switch, BUTTON_WIDTH, BUTTON_HEIGHT, "Summary", "main")
|
||||
BossFrame.buttonSwitchNormal = _detalhes.gump:CreateButton(BossFrame, BossFrame.switch, BUTTON_WIDTH, BUTTON_HEIGHT, "Summary", "main")
|
||||
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: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 = _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: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 = _detalhes.gump:CreateButton(BossFrame, BossFrame.switch, BUTTON_WIDTH, BUTTON_HEIGHT, "Phases", "phases")
|
||||
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: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, "Damage Graphic", "graph")
|
||||
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: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 = _detalhes.gump:CreateButton(BossFrame, BossFrame.switch, BUTTON_WIDTH, BUTTON_HEIGHT, "Emotes", "emotes")
|
||||
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:SetTemplate(DetailsFrameWork:GetTemplate("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
BossFrame.buttonSwitchBossEmotes:SetWidth(BUTTON_WIDTH)
|
||||
|
||||
--anchors
|
||||
@@ -1438,7 +1438,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
|
||||
local offset = FauxScrollFrame_GetOffset (self)
|
||||
|
||||
--print (EncounterDetails.charsaved, EncounterDetails.charsaved.emotes, EncounterDetails.charsaved.emotes [1], #EncounterDetails.charsaved.emotes)
|
||||
--print(EncounterDetails.charsaved, EncounterDetails.charsaved.emotes, EncounterDetails.charsaved.emotes [1], #EncounterDetails.charsaved.emotes)
|
||||
local emote_pool = EncounterDetails.charsaved.emotes [emote_segment]
|
||||
|
||||
if (searching) then
|
||||
@@ -1506,7 +1506,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
BossFrame.EmoteWidgets = {}
|
||||
--~emotes ~whispers
|
||||
|
||||
local bar_div_emotes = DetailsFrameWork:CreateImage (BossFrame, "Interface\\AddOns\\Details_EncounterDetails\\images\\boss_bg", 4, 480, "artwork", {724/1024, 728/1024, 0, 245/512})
|
||||
local bar_div_emotes = DetailsFrameWork:CreateImage(BossFrame, "Interface\\AddOns\\Details_EncounterDetails\\images\\boss_bg", 4, 480, "artwork", {724/1024, 728/1024, 0, 245/512})
|
||||
bar_div_emotes:SetPoint("TOPLEFT", BossFrame, "TOPLEFT", 244, -74)
|
||||
bar_div_emotes:Hide()
|
||||
tinsert(BossFrame.EmoteWidgets, bar_div_emotes)
|
||||
@@ -1527,7 +1527,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
self:SetBackdropColor(1, 1, 1, .6)
|
||||
if (self.righttext:IsTruncated()) then
|
||||
GameCooltip:Reset()
|
||||
GameCooltip:AddLine (self.righttext:GetText())
|
||||
GameCooltip:AddLine(self.righttext:GetText())
|
||||
GameCooltip:SetOwner(self, "bottomleft", "topleft", 42, -9)
|
||||
GameCooltip:Show()
|
||||
end
|
||||
@@ -1541,7 +1541,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
local row_on_mouse_up = function(self)
|
||||
--report
|
||||
local text = self.righttext:GetText()
|
||||
local time = self.lefttext:GetText()
|
||||
local timeString = self.lefttext:GetText()
|
||||
|
||||
local reportFunc = function()
|
||||
-- remove textures
|
||||
@@ -1560,7 +1560,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
-- remove the left space
|
||||
text = text:gsub ("^%s$", "")
|
||||
|
||||
EncounterDetails:SendReportLines ({"Details! Encounter Emote at " .. time, "\"" .. text .. "\""})
|
||||
EncounterDetails:SendReportLines ({"Details! Encounter Emote at " .. timeString, "\"" .. text .. "\""})
|
||||
end
|
||||
|
||||
EncounterDetails:SendReportWindow (reportFunc)
|
||||
@@ -1591,7 +1591,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
line.righttext:SetHeight(14)
|
||||
line.righttext:SetJustifyH("left")
|
||||
|
||||
line:SetFrameLevel (scrollframe:GetFrameLevel()+1)
|
||||
line:SetFrameLevel(scrollframe:GetFrameLevel()+1)
|
||||
|
||||
line:SetScript("OnEnter", row_on_enter)
|
||||
line:SetScript("OnLeave", row_on_leave)
|
||||
@@ -1631,7 +1631,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
end
|
||||
local dropdown = DetailsFrameWork:NewDropDown (BossFrame, _, "$parentEmotesSegmentDropdown", "EmotesSegment", 180, 20, build_emote_segments, 1)
|
||||
dropdown:SetPoint("topleft", emotes_segment_label, "bottomleft", -1, -2)
|
||||
dropdown:SetTemplate (DetailsFrameWork:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
|
||||
dropdown:SetTemplate(DetailsFrameWork:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
|
||||
|
||||
tinsert(BossFrame.EmoteWidgets, dropdown)
|
||||
tinsert(BossFrame.EmoteWidgets, emotes_segment_label)
|
||||
@@ -1643,8 +1643,8 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
local emotes_search_results_label = DetailsFrameWork:CreateLabel(BossFrame, "", 11, nil, "GameFontNormal", "SearchResults")
|
||||
emotes_search_results_label:SetPoint("topleft", BossFrame, "topleft", 10, -190)
|
||||
--
|
||||
local search = DetailsFrameWork:NewTextEntry (BossFrame, nil, "$parentEmoteSearchBox", nil, 180, 20)
|
||||
search:SetTemplate (DetailsFrameWork:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
|
||||
local search = DetailsFrameWork:NewTextEntry(BossFrame, nil, "$parentEmoteSearchBox", nil, 180, 20)
|
||||
search:SetTemplate(DetailsFrameWork:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
|
||||
search:SetPoint("topleft",emotes_search_label, "bottomleft", -1, -2)
|
||||
search:SetJustifyH("left")
|
||||
|
||||
@@ -1670,7 +1670,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
reset:SetNormalTexture([[Interface\Glues\LOGIN\Glues-CheckBox-Check]] or [[Interface\Buttons\UI-GroupLoot-Pass-Down]])
|
||||
reset:SetHighlightTexture([[Interface\Glues\LOGIN\Glues-CheckBox-Check]] or [[Interface\Buttons\UI-GROUPLOOT-PASS-HIGHLIGHT]])
|
||||
reset:SetPushedTexture([[Interface\Glues\LOGIN\Glues-CheckBox-Check]] or [[Interface\Buttons\UI-GroupLoot-Pass-Up]])
|
||||
reset:GetNormalTexture():SetDesaturated (true)
|
||||
reset:GetNormalTexture():SetDesaturated(true)
|
||||
reset.tooltip = "Reset Search"
|
||||
|
||||
tinsert(BossFrame.EmoteWidgets, search)
|
||||
@@ -1689,7 +1689,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
for index = 1, 16 do
|
||||
local bar = emote_lines [index]
|
||||
if (bar:IsShown() and added < AmtLines) then
|
||||
local time = bar.lefttext:GetText()
|
||||
local timeString = bar.lefttext:GetText()
|
||||
local text = bar.righttext:GetText()
|
||||
|
||||
--"|Hunit:77182:Oregorger|hOregorger prepares to cast |cFFFF0000|Hspell:156879|h[Blackrock Barrage]|h|r."
|
||||
@@ -1710,7 +1710,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
-- remove the left space
|
||||
text = text:gsub ("^%s$", "")
|
||||
|
||||
tinsert(EncounterDetails.report_lines, time .. " " .. text)
|
||||
tinsert(EncounterDetails.report_lines, timeString .. " " .. text)
|
||||
added = added + 1
|
||||
|
||||
if (added == AmtLines) then
|
||||
@@ -1721,7 +1721,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
|
||||
EncounterDetails:SendReportLines (EncounterDetails.report_lines)
|
||||
else
|
||||
EncounterDetails:Msg ("There is nothing to report.")
|
||||
EncounterDetails:Msg("There is nothing to report.")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1730,7 +1730,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
end, nil, nil, nil, "Report Results")
|
||||
|
||||
report_emote_button:SetIcon ([[Interface\AddOns\Details\images\report_button]], 8, 14, nil, {0, 1, 0, 1}, nil, 4, 2)
|
||||
report_emote_button:SetTemplate (DetailsFrameWork:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
|
||||
report_emote_button:SetTemplate(DetailsFrameWork:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
|
||||
|
||||
report_emote_button:SetPoint("topleft", search, "bottomleft", 0, -4)
|
||||
report_emote_button:Disable()
|
||||
@@ -1809,14 +1809,14 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
GameCooltip:SetOption("FixedWidth", false)
|
||||
|
||||
for token, _ in pairs(info.token) do
|
||||
GameCooltip:AddLine ("event:", token, 1, nil, "white")
|
||||
GameCooltip:AddLine("event:", token, 1, nil, "white")
|
||||
end
|
||||
|
||||
GameCooltip:AddLine ("source:", info.source, 1, nil, "white")
|
||||
GameCooltip:AddLine ("school:", EncounterDetails:GetSpellSchoolFormatedName (info.school), 1, nil, "white")
|
||||
GameCooltip:AddLine("source:", info.source, 1, nil, "white")
|
||||
GameCooltip:AddLine("school:", EncounterDetails:GetSpellSchoolFormatedName (info.school), 1, nil, "white")
|
||||
|
||||
if (info.type) then
|
||||
GameCooltip:AddLine ("aura type:", info.type, 1, nil, "white")
|
||||
GameCooltip:AddLine("aura type:", info.type, 1, nil, "white")
|
||||
end
|
||||
GameCooltip:ShowCooltip(self, "tooltip")
|
||||
end
|
||||
@@ -1846,7 +1846,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
|
||||
--timerId
|
||||
local spellid = DetailsFrameWork:CreateTextEntry (anchor_frame, EncounterDetails.empty_function, 80, 20, nil, "$parentSpellId")
|
||||
spellid:SetTemplate (AurasButtonTemplate)
|
||||
spellid:SetTemplate(AurasButtonTemplate)
|
||||
spellid:SetHook("OnEditFocusGained", on_focus_gain)
|
||||
spellid:SetHook("OnEditFocusLost", on_focus_lost)
|
||||
spellid:SetHook("OnEnter", on_enter_spell)
|
||||
@@ -1854,14 +1854,14 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
|
||||
--ability name
|
||||
local spellname = DetailsFrameWork:CreateTextEntry (anchor_frame, EncounterDetails.empty_function, 180, 20, nil, "$parentSpellName")
|
||||
spellname:SetTemplate (AurasButtonTemplate)
|
||||
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)
|
||||
create_aura:SetTemplate(AurasButtonTemplate)
|
||||
|
||||
spellicon:SetPoint("topleft", BossFrame, "topleft", 10, -85 + (i * 21 * -1))
|
||||
spellid:SetPoint("left", spellicon, "right", 4, 0)
|
||||
@@ -1890,14 +1890,14 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
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)
|
||||
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)
|
||||
|
||||
local spellname = DetailsFrameWork:CreateTextEntry (anchor_frame, EncounterDetails.empty_function, 160, 20)
|
||||
spellname:SetTemplate (AurasButtonTemplate)
|
||||
spellname:SetTemplate(AurasButtonTemplate)
|
||||
spellname:SetHook("OnEditFocusGained", on_focus_gain)
|
||||
spellname:SetHook("OnEditFocusLost", on_focus_lost)
|
||||
spellname:SetHook("OnEnter", on_enter_spell)
|
||||
@@ -1923,7 +1923,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
|
||||
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)
|
||||
create_aura:SetTemplate(AurasButtonTemplate)
|
||||
|
||||
anchor_frame.icon = spellicon
|
||||
anchor_frame.spellid = spellid
|
||||
@@ -1939,7 +1939,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
end
|
||||
|
||||
local update_enemy_spells = function()
|
||||
local combat = EncounterDetails:GetCombat (EncounterDetails._segment)
|
||||
local combat = EncounterDetails:GetCombat(EncounterDetails._segment)
|
||||
local spell_list = {}
|
||||
|
||||
if (combat) then
|
||||
@@ -2138,7 +2138,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
local spellname = timer_table [2]:gsub (" %(.%)", "")
|
||||
tinsert(t, {label = spellname, value = {timer_table [2], spellname, timer_table [5], timer_table.id}, icon = timer_table [5], onclick = on_select_bw_bar})
|
||||
elseif (int_spell < 0) then
|
||||
local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = C_EncounterJournal.GetSectionInfo (abs (int_spell))
|
||||
local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = C_EncounterJournal.GetSectionInfo (abs(int_spell))
|
||||
tinsert(t, {label = title, value = {timer_table [2], title, timer_table [5] or abilityIcon, timer_table.id}, icon = timer_table [5] or abilityIcon, onclick = on_select_bw_bar})
|
||||
else
|
||||
local spellname, _, spellicon = _GetSpellInfo(int_spell)
|
||||
@@ -2158,7 +2158,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
|
||||
|
||||
local PhaseFrame = CreateFrame("frame", "EncounterDetailsPhaseFrame", BossFrame, "BackdropTemplate")
|
||||
PhaseFrame:SetAllPoints()
|
||||
PhaseFrame:SetFrameLevel (BossFrame:GetFrameLevel()+1)
|
||||
PhaseFrame:SetFrameLevel(BossFrame:GetFrameLevel()+1)
|
||||
PhaseFrame.DamageTable = {}
|
||||
PhaseFrame.HealingTable = {}
|
||||
PhaseFrame.LastPhaseSelected = 1
|
||||
@@ -2177,7 +2177,7 @@ end)
|
||||
function PhaseFrame:ClearAll()
|
||||
--disable all buttons
|
||||
for i = 1, #PhaseFrame.PhaseButtons do
|
||||
PhaseFrame.PhaseButtons[i]:SetTemplate (PhaseButtonTemplate)
|
||||
PhaseFrame.PhaseButtons[i]:SetTemplate(PhaseButtonTemplate)
|
||||
PhaseFrame.PhaseButtons[i]:Disable()
|
||||
end
|
||||
|
||||
@@ -2202,7 +2202,7 @@ function PhaseFrame.OnSelectPhase (phaseSelected)
|
||||
PhaseFrame:ClearAll()
|
||||
|
||||
--get the selected segment
|
||||
PhaseFrame.CurrentSegment = EncounterDetails:GetCombat (EncounterDetails._segment)
|
||||
PhaseFrame.CurrentSegment = EncounterDetails:GetCombat(EncounterDetails._segment)
|
||||
if (not PhaseFrame.CurrentSegment) then
|
||||
return
|
||||
end
|
||||
@@ -2220,9 +2220,9 @@ function PhaseFrame.OnSelectPhase (phaseSelected)
|
||||
for buttonIndex, phase in ipairs(phases) do
|
||||
local button = PhaseFrame.PhaseButtons [buttonIndex]
|
||||
if (phase == phaseSelected) then
|
||||
button:SetTemplate (PhaseButtonTemplateHighlight)
|
||||
button:SetTemplate(PhaseButtonTemplateHighlight)
|
||||
else
|
||||
button:SetTemplate (PhaseButtonTemplate)
|
||||
button:SetTemplate(PhaseButtonTemplate)
|
||||
if (PhaseFrame.CurrentSegment.PhaseData.damage [phase]) then
|
||||
button:Enable()
|
||||
else
|
||||
@@ -2269,7 +2269,7 @@ local report_damage = function(IsCurrent, IsReverse, AmtLines)
|
||||
AmtLines = AmtLines + 1
|
||||
if (#result > AmtLines) then
|
||||
for i = #result, AmtLines+1, -1 do
|
||||
tremove (result, i)
|
||||
tremove(result, i)
|
||||
end
|
||||
end
|
||||
EncounterDetails:SendReportLines (result)
|
||||
@@ -2277,13 +2277,13 @@ local report_damage = function(IsCurrent, IsReverse, AmtLines)
|
||||
|
||||
tinsert(result, "Details!: Damage for Phase " .. PhaseFrame.LastPhaseSelected .. " of " .. (PhaseFrame.CurrentSegment and PhaseFrame.CurrentSegment.is_boss and PhaseFrame.CurrentSegment.is_boss.name or "Unknown") .. ":")
|
||||
for i = 1, #PhaseFrame.DamageTable do
|
||||
tinsert(result, EncounterDetails:GetOnlyName (PhaseFrame.DamageTable[i][1]) .. ": " .. _detalhes:ToK (_math_floor(PhaseFrame.DamageTable [i][2])))
|
||||
tinsert(result, EncounterDetails:GetOnlyName(PhaseFrame.DamageTable[i][1]) .. ": " .. _detalhes:ToK (_math_floor(PhaseFrame.DamageTable [i][2])))
|
||||
end
|
||||
|
||||
EncounterDetails:SendReportWindow (reportFunc, nil, nil, true)
|
||||
end
|
||||
|
||||
local Report_DamageButton = _detalhes.gump:CreateButton (PhaseFrame, report_damage, 16, 16, "report")
|
||||
local Report_DamageButton = _detalhes.gump:CreateButton(PhaseFrame, report_damage, 16, 16, "report")
|
||||
Report_DamageButton:SetPoint("left", DamageLabel, "left", ScrollWidth-44, 0)
|
||||
Report_DamageButton.textcolor = "gray"
|
||||
Report_DamageButton.textsize = 9
|
||||
@@ -2294,7 +2294,7 @@ local report_healing = function()
|
||||
AmtLines = AmtLines + 1
|
||||
if (#result > AmtLines) then
|
||||
for i = #result, AmtLines+1, -1 do
|
||||
tremove (result, i)
|
||||
tremove(result, i)
|
||||
end
|
||||
end
|
||||
EncounterDetails:SendReportLines (result)
|
||||
@@ -2302,12 +2302,12 @@ local report_healing = function()
|
||||
|
||||
tinsert(result, "Details!: Healing for Phase " .. PhaseFrame.LastPhaseSelected .. " of " .. (PhaseFrame.CurrentSegment and PhaseFrame.CurrentSegment.is_boss and PhaseFrame.CurrentSegment.is_boss.name or "Unknown") .. ":")
|
||||
for i = 1, #PhaseFrame.HealingTable do
|
||||
tinsert(result, EncounterDetails:GetOnlyName (PhaseFrame.HealingTable[i][1]) .. ": " .. _detalhes:ToK (_math_floor(PhaseFrame.HealingTable [i][2])))
|
||||
tinsert(result, EncounterDetails:GetOnlyName(PhaseFrame.HealingTable[i][1]) .. ": " .. _detalhes:ToK (_math_floor(PhaseFrame.HealingTable [i][2])))
|
||||
end
|
||||
|
||||
EncounterDetails:SendReportWindow (reportFunc, nil, nil, true)
|
||||
end
|
||||
local Report_HealingButton = _detalhes.gump:CreateButton (PhaseFrame, report_healing, 16, 16, "report")
|
||||
local Report_HealingButton = _detalhes.gump:CreateButton(PhaseFrame, report_healing, 16, 16, "report")
|
||||
Report_HealingButton:SetPoint("left", HealLabel, "left", ScrollWidth-44, 0)
|
||||
Report_HealingButton.textcolor = "gray"
|
||||
Report_HealingButton.textsize = 9
|
||||
@@ -2320,7 +2320,7 @@ HealLabel:SetPoint("topleft", PhaseFrame, "topleft", ScrollWidth + 40, AnchorY)
|
||||
PhaseTimersLabel:SetPoint("topleft", PhaseFrame, "topleft", (ScrollWidth * 2) + (40*2), AnchorY)
|
||||
|
||||
for i = 1, 10 do
|
||||
local button = _detalhes.gump:CreateButton (PhaseFrame, PhaseFrame.OnSelectPhase, 60, 20, "", i)
|
||||
local button = _detalhes.gump:CreateButton(PhaseFrame, PhaseFrame.OnSelectPhase, 60, 20, "", i)
|
||||
button:SetPoint("left", PhaseSelectLabel, "right", 8 + ((i-1) * 61), 0)
|
||||
tinsert(PhaseFrame.PhaseButtons, button)
|
||||
end
|
||||
@@ -2354,11 +2354,11 @@ local ScrollRefresh = function(self, data, offset, total_lines)
|
||||
end
|
||||
|
||||
local line_onenter = function(self)
|
||||
self:SetBackdropColor(unpack (BGColorDefault_Hover))
|
||||
self:SetBackdropColor(unpack(BGColorDefault_Hover))
|
||||
end
|
||||
|
||||
local line_onleave = function(self)
|
||||
self:SetBackdropColor(unpack (BGColorDefault))
|
||||
self:SetBackdropColor(unpack(BGColorDefault))
|
||||
end
|
||||
|
||||
local ScrollCreateLine = function(self, index)
|
||||
@@ -2370,7 +2370,7 @@ local ScrollCreateLine = function(self, index)
|
||||
line:SetScript("OnClick", line_onclick)
|
||||
|
||||
line:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
line:SetBackdropColor(unpack (BGColorDefault))
|
||||
line:SetBackdropColor(unpack(BGColorDefault))
|
||||
|
||||
local statusBar = DetailsFrameWork:CreateBar (line, EncounterDetails.Frame.DefaultBarTexture, 1, 1, 100)
|
||||
statusBar:SetAllPoints(line)
|
||||
@@ -2431,11 +2431,11 @@ PhaseFrame.PhasesSegmentCompare = {}
|
||||
|
||||
local PhaseBarOnEnter = function(self)
|
||||
PhaseFrame:UpdateSegmentCompareBars (self.phase)
|
||||
self:SetBackdropColor(unpack (BGColorDefault_Hover))
|
||||
self:SetBackdropColor(unpack(BGColorDefault_Hover))
|
||||
end
|
||||
local PhaseBarOnLeave = function(self)
|
||||
PhaseFrame:ClearSegmentCompareBars()
|
||||
self:SetBackdropColor(unpack (BGColorDefault))
|
||||
self:SetBackdropColor(unpack(BGColorDefault))
|
||||
end
|
||||
local PhaseBarOnClick = function(self)
|
||||
--report
|
||||
@@ -2451,7 +2451,7 @@ for i = 1, 10 do
|
||||
line:SetScript("OnClick", PhaseBarOnClick)
|
||||
|
||||
line:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
line:SetBackdropColor(unpack (BGColorDefault))
|
||||
line:SetBackdropColor(unpack(BGColorDefault))
|
||||
|
||||
local icon = line:CreateTexture("$parentIcon", "overlay")
|
||||
icon:SetSize(16, 16)
|
||||
@@ -2482,7 +2482,7 @@ for i = 1, 20 do
|
||||
line:SetSize(150, ScrollLineHeight)
|
||||
|
||||
line:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
line:SetBackdropColor(unpack (BGColorDefault))
|
||||
line:SetBackdropColor(unpack(BGColorDefault))
|
||||
line:Hide()
|
||||
local name = line:CreateFontString ("$parentName", "overlay", "GameFontNormal")
|
||||
_detalhes.gump:SetFontSize (name, 9)
|
||||
@@ -2521,7 +2521,7 @@ function PhaseFrame:GetPhaseTimers (segment, ordered)
|
||||
segment = segment or PhaseFrame.CurrentSegment
|
||||
|
||||
for phaseIT = 1, #segment.PhaseData do
|
||||
local phase, startAt = unpack (segment.PhaseData [phaseIT]) --phase iterator
|
||||
local phase, startAt = unpack(segment.PhaseData [phaseIT]) --phase iterator
|
||||
local endAt = segment.PhaseData [phaseIT+1] and segment.PhaseData [phaseIT+1][2] or segment:GetCombatTime()
|
||||
local elapsed = endAt - startAt
|
||||
t [phase] = (t [phase] or 0) + elapsed
|
||||
@@ -2633,24 +2633,24 @@ end
|
||||
-- ~dropdown
|
||||
local segmentos = DetailsFrameWork:NewDropDown (frame, _, "$parentSegmentsDropdown", "segmentosDropdown", 160, 20, buildSegmentosMenu, nil)
|
||||
segmentos:SetPoint("left", segmentos_string, "right", 2, 0)
|
||||
segmentos:SetTemplate (DetailsFrameWork:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
|
||||
segmentos:SetTemplate(DetailsFrameWork:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
|
||||
|
||||
--options button
|
||||
local options = DetailsFrameWork:NewButton(frame, nil, "$parentOptionsButton", "OptionsButton", 120, 20, EncounterDetails.OpenOptionsPanel, nil, nil, nil, "Options")
|
||||
options:SetPoint("left", segmentos, "right", 10, 0)
|
||||
options:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
options:SetTemplate(DetailsFrameWork:GetTemplate("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
options:SetIcon ([[Interface\Buttons\UI-OptionsButton]], 14, 14, nil, {0, 1, 0, 1}, nil, 3)
|
||||
|
||||
--macro box
|
||||
BossFrame.MacroEditBox = DetailsFrameWork:CreateTextEntry (frame, function()end, 300, 20)
|
||||
BossFrame.MacroEditBox:SetPoint("left", options, "right", 10, 0)
|
||||
BossFrame.MacroEditBox:SetAlpha (0.5)
|
||||
BossFrame.MacroEditBox:SetAlpha(0.5)
|
||||
BossFrame.MacroEditBox:SetText("/run Details:OpenPlugin ('Encounter Breakdown')")
|
||||
BossFrame.MacroEditBox:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
BossFrame.MacroEditBox:SetTemplate(DetailsFrameWork:GetTemplate("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
BossFrame.MacroEditBox:SetSize(360, 20)
|
||||
|
||||
BossFrame.MacroEditBox:HookScript ("OnEditFocusGained", function()
|
||||
C_Timer.After (0, function() BossFrame.MacroEditBox:HighlightText() end)
|
||||
C_Timer.After(0, function() BossFrame.MacroEditBox:HighlightText() end)
|
||||
end)
|
||||
|
||||
BossFrame.MacroEditBox.BackgroundLabel = DetailsFrameWork:CreateLabel(BossFrame.MacroEditBox, "macro")
|
||||
@@ -2685,7 +2685,7 @@ end
|
||||
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)
|
||||
dano_recebido_bg:EnableMouse(true)
|
||||
dano_recebido_bg:SetResizable(false)
|
||||
dano_recebido_bg:SetPoint("topleft", frame, "topleft", 10, -78)
|
||||
|
||||
@@ -2701,9 +2701,9 @@ end
|
||||
container_damagetaken_frame:SetAllPoints(container_damagetaken_window)
|
||||
container_damagetaken_frame:SetWidth(BOX_WIDTH)
|
||||
container_damagetaken_frame:SetHeight(BOX_HEIGHT)
|
||||
container_damagetaken_frame:EnableMouse (true)
|
||||
container_damagetaken_frame:EnableMouse(true)
|
||||
container_damagetaken_frame:SetResizable(false)
|
||||
container_damagetaken_frame:SetMovable (true)
|
||||
container_damagetaken_frame:SetMovable(true)
|
||||
|
||||
container_damagetaken_window:SetWidth(BOX_WIDTH)
|
||||
container_damagetaken_window:SetHeight(BOX_HEIGHT)
|
||||
@@ -2736,7 +2736,7 @@ end
|
||||
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)
|
||||
habilidades_inimigas_bg:EnableMouse(true)
|
||||
habilidades_inimigas_bg:SetResizable(false)
|
||||
habilidades_inimigas_bg:SetPoint("topleft", frame, "topleft", 10, -276)
|
||||
|
||||
@@ -2754,9 +2754,9 @@ end
|
||||
container_habilidades_frame:SetAllPoints(container_habilidades_window)
|
||||
container_habilidades_frame:SetWidth(BOX_WIDTH)
|
||||
container_habilidades_frame:SetHeight(BOX_HEIGHT)
|
||||
container_habilidades_frame:EnableMouse (true)
|
||||
container_habilidades_frame:EnableMouse(true)
|
||||
container_habilidades_frame:SetResizable(false)
|
||||
container_habilidades_frame:SetMovable (true)
|
||||
container_habilidades_frame:SetMovable(true)
|
||||
|
||||
container_habilidades_window:SetWidth(BOX_WIDTH)
|
||||
container_habilidades_window:SetHeight(BOX_HEIGHT)
|
||||
@@ -2797,9 +2797,9 @@ end
|
||||
container_adds_frame:SetAllPoints(container_adds_window)
|
||||
container_adds_frame:SetWidth(BOX_WIDTH)
|
||||
container_adds_frame:SetHeight(BOX_HEIGHT)
|
||||
container_adds_frame:EnableMouse (true)
|
||||
container_adds_frame:EnableMouse(true)
|
||||
container_adds_frame:SetResizable(false)
|
||||
container_adds_frame:SetMovable (true)
|
||||
container_adds_frame:SetMovable(true)
|
||||
|
||||
container_adds_window:SetWidth(BOX_WIDTH)
|
||||
container_adds_window:SetHeight(BOX_HEIGHT_UPPER)
|
||||
@@ -2842,9 +2842,9 @@ end
|
||||
container_interrupt_frame:SetAllPoints(container_interrupt_window)
|
||||
container_interrupt_frame:SetWidth(BOX_WIDTH)
|
||||
container_interrupt_frame:SetHeight(BOX_HEIGHT)
|
||||
container_interrupt_frame:EnableMouse (true)
|
||||
container_interrupt_frame:EnableMouse(true)
|
||||
container_interrupt_frame:SetResizable(false)
|
||||
container_interrupt_frame:SetMovable (true)
|
||||
container_interrupt_frame:SetMovable(true)
|
||||
|
||||
container_interrupt_window:SetWidth(BOX_WIDTH)
|
||||
container_interrupt_window:SetHeight(BOX_HEIGHT_UPPER)
|
||||
@@ -2888,9 +2888,9 @@ end
|
||||
container_dispell_frame:SetAllPoints(container_dispell_window)
|
||||
container_dispell_frame:SetWidth(BOX_WIDTH)
|
||||
container_dispell_frame:SetHeight(BOX_HEIGHT)
|
||||
container_dispell_frame:EnableMouse (true)
|
||||
container_dispell_frame:EnableMouse(true)
|
||||
container_dispell_frame:SetResizable(false)
|
||||
container_dispell_frame:SetMovable (true)
|
||||
container_dispell_frame:SetMovable(true)
|
||||
|
||||
container_dispell_window:SetWidth(BOX_WIDTH)
|
||||
container_dispell_window:SetHeight(BOX_HEIGHT_UPPER)
|
||||
@@ -2938,9 +2938,9 @@ end
|
||||
container_dead_frame:SetWidth(BOX_WIDTH)
|
||||
container_dead_frame:SetHeight(BOX_HEIGHT)
|
||||
|
||||
container_dead_frame:EnableMouse (true)
|
||||
container_dead_frame:EnableMouse(true)
|
||||
container_dead_frame:SetResizable(false)
|
||||
container_dead_frame:SetMovable (true)
|
||||
container_dead_frame:SetMovable(true)
|
||||
|
||||
container_dead_window:SetWidth(BOX_WIDTH)
|
||||
container_dead_window:SetHeight(BOX_HEIGHT_UPPER)
|
||||
@@ -2989,9 +2989,9 @@ end
|
||||
return
|
||||
end
|
||||
|
||||
local combat = EncounterDetails:GetCombat ("current")
|
||||
local combat = EncounterDetails:GetCombat("current")
|
||||
--local arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 = ...
|
||||
--print ("2 =", arg2, "3 =", arg3, "4 =", arg4, "5 =", arg5, "6 =", arg6, "7 =", arg7, "8 =", arg8, "9 =", arg9)
|
||||
--print("2 =", arg2, "3 =", arg3, "4 =", arg4, "5 =", arg5, "6 =", arg6, "7 =", arg7, "8 =", arg8, "9 =", arg9)
|
||||
if (combat and EncounterDetails:IsInCombat() and EncounterDetails:GetZoneType() == "raid") then
|
||||
local arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 = ...
|
||||
tinsert(EncounterDetails.current_whisper_table, {combat:GetCombatTime(), arg3, arg4, emote_table [arg2]})
|
||||
|
||||
@@ -295,7 +295,7 @@ local CreatePluginFrames = function()
|
||||
local runeIndicator = DF:CreateImage(line, "", scrollLineHeight, scrollLineHeight)
|
||||
|
||||
--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)
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
|
||||
local SharedMedia = LibStub:GetLibrary ("LibSharedMedia-3.0")
|
||||
local LDB = LibStub ("LibDataBroker-1.1", true)
|
||||
local LDBIcon = LDB and LibStub ("LibDBIcon-1.0", true)
|
||||
local LibWindow = LibStub ("LibWindow-1.1")
|
||||
local LDB = LibStub("LibDataBroker-1.1", true)
|
||||
local LDBIcon = LDB and LibStub("LibDBIcon-1.0", true)
|
||||
local LibWindow = LibStub("LibWindow-1.1")
|
||||
local _
|
||||
|
||||
---need cleanup Loc ["STRING_MEMORY_ALERT_BUTTON"],
|
||||
@@ -151,7 +151,7 @@ local function CreatePluginFrames()
|
||||
titlebar:SetScript("OnEnter", function(self)
|
||||
GameTooltip:SetOwner(self)
|
||||
GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT")
|
||||
GameTooltip:AddLine ("|cFFFF7700Left Click|r: Open Options\n|cFFFF7700Right Click|r: Lock the Frame\n|cFFFF7700Slash Command|r: /streamer")
|
||||
GameTooltip:AddLine("|cFFFF7700Left Click|r: Open Options\n|cFFFF7700Right Click|r: Lock the Frame\n|cFFFF7700Slash Command|r: /streamer")
|
||||
GameTooltip:Show()
|
||||
end)
|
||||
titlebar:SetScript("OnLeave", function()
|
||||
@@ -204,8 +204,8 @@ local function CreatePluginFrames()
|
||||
SOF:SetPoint("center", UIParent, "center")
|
||||
SOF:SetSize(300, 500)
|
||||
SOF:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}})
|
||||
SOF:EnableMouse (true)
|
||||
SOF:SetMovable (true)
|
||||
SOF:EnableMouse(true)
|
||||
SOF:SetMovable(true)
|
||||
SOF:SetResizable(true)
|
||||
SOF:SetClampedToScreen (true)
|
||||
|
||||
@@ -223,23 +223,23 @@ local function CreatePluginFrames()
|
||||
StreamOverlay.db.main_frame_size [1] = SOF:GetWidth()
|
||||
StreamOverlay.db.main_frame_size [2] = SOF:GetHeight()
|
||||
--save main frame position
|
||||
LibWindow.RegisterConfig (SOF, StreamOverlay.db)
|
||||
LibWindow.SavePosition (SOF)
|
||||
LibWindow.RegisterConfig(SOF, StreamOverlay.db)
|
||||
LibWindow.SavePosition(SOF)
|
||||
--save the dps frame position
|
||||
LibWindow.RegisterConfig (StreamerOverlayDpsHpsFrame, StreamOverlay.db.per_second)
|
||||
LibWindow.SavePosition (StreamerOverlayDpsHpsFrame)
|
||||
LibWindow.RegisterConfig(StreamerOverlayDpsHpsFrame, StreamOverlay.db.per_second)
|
||||
LibWindow.SavePosition(StreamerOverlayDpsHpsFrame)
|
||||
end
|
||||
function StreamOverlay:RestoreWindowSizeAndLocation()
|
||||
--restore the size first
|
||||
SOF:SetSize(unpack (StreamOverlay.db.main_frame_size))
|
||||
SOF:SetSize(unpack(StreamOverlay.db.main_frame_size))
|
||||
--set the main window location
|
||||
LibWindow.RegisterConfig (SOF, StreamOverlay.db)
|
||||
LibWindow.RestorePosition (SOF)
|
||||
LibWindow.SavePosition (SOF)
|
||||
LibWindow.RegisterConfig(SOF, StreamOverlay.db)
|
||||
LibWindow.RestorePosition(SOF)
|
||||
LibWindow.SavePosition(SOF)
|
||||
--set the dps frame location
|
||||
LibWindow.RegisterConfig (StreamerOverlayDpsHpsFrame, StreamOverlay.db.per_second)
|
||||
LibWindow.RestorePosition (StreamerOverlayDpsHpsFrame)
|
||||
LibWindow.SavePosition (StreamerOverlayDpsHpsFrame)
|
||||
LibWindow.RegisterConfig(StreamerOverlayDpsHpsFrame, StreamOverlay.db.per_second)
|
||||
LibWindow.RestorePosition(StreamerOverlayDpsHpsFrame)
|
||||
LibWindow.SavePosition(StreamerOverlayDpsHpsFrame)
|
||||
--set the frame strata
|
||||
SOF:SetFrameStrata(StreamOverlay.db.main_frame_strata)
|
||||
StreamerOverlayDpsHpsFrame:SetFrameStrata(StreamOverlay.db.main_frame_strata)
|
||||
@@ -506,7 +506,7 @@ local function CreatePluginFrames()
|
||||
end
|
||||
|
||||
line.icon2:SetTexture(data [4])
|
||||
line.icon2:SetTexCoord (unpack (data [5]))
|
||||
line.icon2:SetTexCoord (unpack(data [5]))
|
||||
if (data [4] == defaultAttackIcon) then
|
||||
line.icon2:SetSize(iconSize*0.8, iconSize*0.8)
|
||||
line.icon2:SetPoint("left", line, "center", 8, 0)
|
||||
@@ -518,10 +518,10 @@ local function CreatePluginFrames()
|
||||
end
|
||||
|
||||
--background
|
||||
line:SetBackdropColor(unpack (data [8]))
|
||||
line:SetBackdropColor(unpack(data [8]))
|
||||
|
||||
if (data [9]) then
|
||||
line:SetBackdropBorderColor(unpack (data [9]))
|
||||
line:SetBackdropBorderColor(unpack(data [9]))
|
||||
else
|
||||
line:SetBackdropBorderColor(0, 0, 0, 0)
|
||||
end
|
||||
@@ -586,7 +586,7 @@ local function CreatePluginFrames()
|
||||
statusbar_texture:SetTexture(1, 1, 1, 0.15)
|
||||
statusbar:SetStatusBarColor (0, 0, 0, 0)
|
||||
statusbar:SetStatusBarTexture (statusbar_texture)
|
||||
statusbar:SetMinMaxValues (0, 100)
|
||||
statusbar:SetMinMaxValues(0, 100)
|
||||
statusbar:SetValue(0)
|
||||
local statusbar_spark = statusbar:CreateTexture(nil, "artwork")
|
||||
statusbar_spark:SetTexture([[Interface\CastingBar\UI-CastingBar-Spark]])
|
||||
@@ -730,7 +730,7 @@ local function CreatePluginFrames()
|
||||
local line_in_use = line.in_use or 1
|
||||
local content_in_use = StreamOverlay.battle_content [i] and StreamOverlay.battle_content [i].CastStart or 1
|
||||
|
||||
if (max (line_in_use, content_in_use) + 60 < now) then
|
||||
if (max(line_in_use, content_in_use) + 60 < now) then
|
||||
fader (nil, line, "in")
|
||||
else
|
||||
fader (nil, line, "out")
|
||||
@@ -743,7 +743,7 @@ local function CreatePluginFrames()
|
||||
local line_in_use = line.in_use or 1
|
||||
local content_in_use = StreamOverlay.battle_content [i] and StreamOverlay.battle_content [i].CastStart or 1
|
||||
|
||||
if (max (line_in_use, content_in_use) + 60 < now) then
|
||||
if (max(line_in_use, content_in_use) + 60 < now) then
|
||||
fader (nil, StreamOverlay.battle_lines [i], "in")
|
||||
else
|
||||
fader (nil, StreamOverlay.battle_lines [i], "out")
|
||||
@@ -757,7 +757,7 @@ local function CreatePluginFrames()
|
||||
local line_in_use = line.in_use or 1
|
||||
local content_in_use = StreamOverlay.battle_content[i] and StreamOverlay.battle_content[i].CastStart or 1
|
||||
|
||||
if (max (line_in_use, content_in_use) + 60 < now) then
|
||||
if (max(line_in_use, content_in_use) + 60 < now) then
|
||||
fader (nil, StreamOverlay.squares[i], "in")
|
||||
else
|
||||
fader (nil, StreamOverlay.squares[i], "out")
|
||||
@@ -961,7 +961,7 @@ local DefaultColor = {r=1, g=1, b=1}
|
||||
local PetCoords = {0.25, 0.49609375, 0.75, 1}
|
||||
|
||||
local parse_target_name = function(target)
|
||||
return StreamOverlay:GetOnlyName (target)
|
||||
return StreamOverlay:GetOnlyName(target)
|
||||
end
|
||||
|
||||
local parse_target_icon = function(targetObject, target)
|
||||
@@ -1042,7 +1042,7 @@ function StreamOverlay:CastStart (castGUID)
|
||||
local icon, backgroundcolor, bordercolor = StreamOverlay:GetSpellInformation (spellid)
|
||||
local spellname, _, spellicon = GetSpellInfo(spellid)
|
||||
|
||||
local targetObject = Details:GetActor ("current", 1, target) or Details:GetActor ("current", 2, target)
|
||||
local targetObject = Details:GetActor("current", 1, target) or Details:GetActor("current", 2, target)
|
||||
local icon2, icon2coords, class = parse_target_icon (targetObject, target)
|
||||
|
||||
local color2
|
||||
@@ -1080,7 +1080,7 @@ function StreamOverlay:CastFinished (castid)
|
||||
local icon, backgroundcolor, bordercolor = StreamOverlay:GetSpellInformation (spellid)
|
||||
local spellname, _, spellicon = GetSpellInfo(spellid)
|
||||
|
||||
local targetObject = Details:GetActor ("current", 1, target) or Details:GetActor ("current", 2, target)
|
||||
local targetObject = Details:GetActor("current", 1, target) or Details:GetActor("current", 2, target)
|
||||
|
||||
local icon2, icon2coords, class = parse_target_icon (targetObject, target)
|
||||
|
||||
@@ -1123,7 +1123,7 @@ eventFrame.track_spell_cast = function()
|
||||
elseif (castinfo.Interrupted) then
|
||||
--has been interrupted
|
||||
castinfo.Done = true
|
||||
line.spark:SetVertexColor (1, 0.7, 0)
|
||||
line.spark:SetVertexColor(1, 0.7, 0)
|
||||
|
||||
elseif (castinfo.IsChanneled) then
|
||||
--casting a channeled spell
|
||||
@@ -1136,7 +1136,7 @@ eventFrame.track_spell_cast = function()
|
||||
local diff = endTime - startTime
|
||||
local current = GetTime() - startTime
|
||||
local percent = current / diff * 100
|
||||
percent = math.abs (percent - 100)
|
||||
percent = math.abs(percent - 100)
|
||||
castinfo.Percent = percent
|
||||
line.statusbar:SetValue(percent)
|
||||
if (StreamOverlay.db.use_spark) then
|
||||
@@ -1197,7 +1197,7 @@ eventFrame.track_spell_cast = function()
|
||||
line.spark:Hide()
|
||||
end
|
||||
|
||||
line.spark:SetVertexColor (1, 1, 1, 1)
|
||||
line.spark:SetVertexColor(1, 1, 1, 1)
|
||||
line.spark:SetPoint("left", line.statusbar, "left", (line.statusbar:GetWidth() / 100 * percent) - 6, 0)
|
||||
end
|
||||
end
|
||||
@@ -1241,7 +1241,7 @@ eventFrame.track_spell_cast = function()
|
||||
local diff = endTime - startTime
|
||||
local current = GetTime() - startTime
|
||||
local percent = current / diff * 100
|
||||
percent = math.abs (percent - 100)
|
||||
percent = math.abs(percent - 100)
|
||||
castinfo.Percent = percent
|
||||
StreamOverlay:UpdateCooldownFrame(line, true, startTime, endTime, castinfo)
|
||||
end
|
||||
@@ -1335,7 +1335,7 @@ local lastChannelSpell = ""
|
||||
local APM = 0
|
||||
local ACTIONS = 0
|
||||
local ACTIONS_EVENT_TIME = {}
|
||||
local AMP_Tick = C_Timer.NewTicker (1, function()
|
||||
local AMP_Tick = C_Timer.NewTicker(1, function()
|
||||
APM = ACTIONS * 60
|
||||
ACTIONS = 0
|
||||
end)
|
||||
@@ -1471,7 +1471,7 @@ local format_time = function(v) return "-" .. format ("%.2f", v) end
|
||||
--when the player die, show the events before the death
|
||||
function StreamOverlay.OnDeath (_, token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, death_table, last_cooldown, death_at_combattime, max_health)
|
||||
|
||||
if (alvo_serial ~= UnitGUID ("player")) then
|
||||
if (alvo_serial ~= UnitGUID("player")) then
|
||||
return
|
||||
end
|
||||
|
||||
@@ -1479,7 +1479,7 @@ function StreamOverlay.OnDeath (_, token, time, who_serial, who_name, who_flags,
|
||||
|
||||
for i = 1, #death_table do
|
||||
local ev = death_table [i]
|
||||
if (ev and type (ev) == "table" and ev[1] and type (ev[1]) == "boolean") then
|
||||
if (ev and type(ev) == "table" and ev[1] and type(ev[1]) == "boolean") then
|
||||
--it's a damage
|
||||
local spellid = ev[2]
|
||||
local amount = ev[3]
|
||||
@@ -1489,7 +1489,7 @@ function StreamOverlay.OnDeath (_, token, time, who_serial, who_name, who_flags,
|
||||
local absorbed = ev[7]
|
||||
|
||||
--get the actor from details
|
||||
local sourceObject = Details:GetActor ("current", 1, source)
|
||||
local sourceObject = Details:GetActor("current", 1, source)
|
||||
local classIcon, l, r, t, b
|
||||
if (sourceObject) then
|
||||
classIcon, l, r, t, b = StreamOverlay:GetClassIcon (sourceObject.classe)
|
||||
@@ -1499,7 +1499,7 @@ function StreamOverlay.OnDeath (_, token, time, who_serial, who_name, who_flags,
|
||||
|
||||
--spellname
|
||||
local spellname, _, spellicon = StreamOverlay.getspellinfo (spellid)
|
||||
source = StreamOverlay:GetOnlyName (source)
|
||||
source = StreamOverlay:GetOnlyName(source)
|
||||
|
||||
local CastInfoIndex = i * -1
|
||||
|
||||
@@ -1553,14 +1553,14 @@ function StreamOverlay:SetLocked (state)
|
||||
DetailsStreamerTitlebar:Hide()
|
||||
DetailsStreamerLeftResizer:Hide()
|
||||
DetailsStreamerRightResizer:Hide()
|
||||
SOF:EnableMouse (false)
|
||||
SOF:EnableMouse(false)
|
||||
else
|
||||
--not locked
|
||||
StreamOverlay.db.main_frame_locked = false
|
||||
DetailsStreamerTitlebar:Show()
|
||||
DetailsStreamerLeftResizer:Show()
|
||||
DetailsStreamerRightResizer:Show()
|
||||
SOF:EnableMouse (true)
|
||||
SOF:EnableMouse(true)
|
||||
end
|
||||
|
||||
StreamOverlay:UpdateDpsHpsFrameConfig()
|
||||
@@ -1573,7 +1573,7 @@ local screen_frame = CreateFrame("frame", "StreamerOverlayDpsHpsFrame", UIParent
|
||||
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)
|
||||
screen_frame:SetMovable (true)
|
||||
screen_frame:SetMovable(true)
|
||||
screen_frame:Hide()
|
||||
screen_frame:SetPoint("center", UIParent, "center")
|
||||
screen_frame:SetScript("OnMouseDown", function(self)
|
||||
@@ -1602,7 +1602,7 @@ end)
|
||||
screen_frame:SetScript("OnEnter", function(self)
|
||||
GameTooltip:SetOwner(self)
|
||||
GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT")
|
||||
GameTooltip:AddLine ("|cFFFF7700Left Click|r: Open Options\n|cFFFF7700Slash Command|r: /streamer")
|
||||
GameTooltip:AddLine("|cFFFF7700Left Click|r: Open Options\n|cFFFF7700Slash Command|r: /streamer")
|
||||
GameTooltip:Show()
|
||||
end)
|
||||
screen_frame:SetScript("OnLeave", function()
|
||||
@@ -1639,11 +1639,11 @@ function StreamOverlay:UpdateDpsHpsFrameConfig (PluginDisabled)
|
||||
|
||||
if (StreamOverlay.db.main_frame_locked) then
|
||||
screen_frame:SetBackdrop(nil)
|
||||
screen_frame:EnableMouse (false)
|
||||
screen_frame:EnableMouse(false)
|
||||
else
|
||||
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)
|
||||
screen_frame:EnableMouse (true)
|
||||
screen_frame:EnableMouse(true)
|
||||
end
|
||||
|
||||
if (db.enabled) then
|
||||
@@ -1652,7 +1652,7 @@ function StreamOverlay:UpdateDpsHpsFrameConfig (PluginDisabled)
|
||||
StreamOverlay.DpsHpsTick:Cancel()
|
||||
StreamOverlay.DpsHpsTick = nil
|
||||
end
|
||||
StreamOverlay.DpsHpsTick = C_Timer.NewTicker (db.update_speed, StreamOverlay.UpdateDpsHpsFrame)
|
||||
StreamOverlay.DpsHpsTick = C_Timer.NewTicker(db.update_speed, StreamOverlay.UpdateDpsHpsFrame)
|
||||
else
|
||||
screen_frame:Hide()
|
||||
if (StreamOverlay.DpsHpsTick) then
|
||||
@@ -1690,11 +1690,11 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
|
||||
if (not StreamOverlayOptionsPanel) then
|
||||
local detailsFramework = Details:GetFramework()
|
||||
|
||||
local options_text_template = detailsFramework:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")
|
||||
local options_dropdown_template = detailsFramework:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
|
||||
local options_switch_template = detailsFramework:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")
|
||||
local options_slider_template = detailsFramework:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
|
||||
local options_button_template = detailsFramework:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
|
||||
local options_text_template = detailsFramework:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")
|
||||
local options_dropdown_template = detailsFramework:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
|
||||
local options_switch_template = detailsFramework:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE")
|
||||
local options_slider_template = detailsFramework:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE")
|
||||
local options_button_template = detailsFramework:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")
|
||||
|
||||
local optionsFrame = StreamOverlay:CreatePluginOptionsFrame("StreamOverlayOptionsPanel", "Details! Streamer: Action Tracker", 1)
|
||||
optionsFrame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
@@ -2229,7 +2229,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
|
||||
|
||||
--set locked and the backdrop color
|
||||
StreamOverlay:SetLocked (StreamOverlay.db.main_frame_locked)
|
||||
StreamOverlay:SetBackgroundColor (unpack (StreamOverlay.db.main_frame_color))
|
||||
StreamOverlay:SetBackgroundColor (unpack(StreamOverlay.db.main_frame_color))
|
||||
|
||||
--update the minimap icon
|
||||
if (LDBIcon) then
|
||||
@@ -2251,8 +2251,8 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
|
||||
return t
|
||||
end
|
||||
|
||||
local label_profile = Details.gump:CreateLabel(optionsFrame, "Profile" .. ": ", Details.gump:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
|
||||
local dropdown_profile = Details.gump:CreateDropDown (optionsFrame, select_profile_fill, nil, 160, 20, "dropdown_profile", nil, Details.gump:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
|
||||
local label_profile = Details.gump:CreateLabel(optionsFrame, "Profile" .. ": ", Details.gump:GetTemplate("font", "OPTIONS_FONT_TEMPLATE"))
|
||||
local dropdown_profile = Details.gump:CreateDropDown (optionsFrame, select_profile_fill, nil, 160, 20, "dropdown_profile", nil, Details.gump:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
|
||||
dropdown_profile:SetPoint("left", label_profile, "right", 2, 0)
|
||||
label_profile:SetPoint("topleft", optionsFrame, "topleft", 15, -65)
|
||||
|
||||
@@ -2282,7 +2282,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
|
||||
dropdown_profile:Select(Details_StreamerDB.characters [pname])
|
||||
|
||||
end
|
||||
optionsFrame.NewProfileButton = Details.gump:CreateButton (optionsFrame, add_profile, 60, 18, "New Profiile", _, _, _, _, _, _, Details.gump:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"), Details.gump:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
|
||||
optionsFrame.NewProfileButton = Details.gump:CreateButton(optionsFrame, add_profile, 60, 18, "New Profiile", _, _, _, _, _, _, Details.gump:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"), Details.gump:GetTemplate("font", "OPTIONS_FONT_TEMPLATE"))
|
||||
optionsFrame.NewProfileButton:SetPoint("left", dropdown_profile, "right", 4, 0)
|
||||
end
|
||||
|
||||
@@ -2317,7 +2317,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
|
||||
optionsFrame:SetScript("OnHide", function()
|
||||
if (StreamOverlay.FromOptionsPanel) then
|
||||
--reopen the options panel
|
||||
C_Timer.After (0.2, function()
|
||||
C_Timer.After(0.2, function()
|
||||
Details:OpenOptionsWindow(Details:GetInstance(1))
|
||||
end)
|
||||
end
|
||||
@@ -2344,7 +2344,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
|
||||
StreamOverlay.FromOptionsPanel = fromOptionsPanel
|
||||
if (fromOptionsPanel) then
|
||||
if (DetailsOptionsWindow) then
|
||||
C_Timer.After (0.2, function()
|
||||
C_Timer.After(0.2, function()
|
||||
DetailsOptionsWindow:Hide()
|
||||
end)
|
||||
end
|
||||
@@ -2356,7 +2356,7 @@ end
|
||||
function StreamOverlay:OnEvent (_, event, ...)
|
||||
|
||||
if (event == "ADDON_LOADED") then
|
||||
local AddonName = select (1, ...)
|
||||
local AddonName = select(1, ...)
|
||||
if (AddonName == "Details_Streamer") then
|
||||
|
||||
playerName = UnitName ("player")
|
||||
@@ -2419,7 +2419,7 @@ function StreamOverlay:OnEvent (_, event, ...)
|
||||
--Install
|
||||
local install, saveddata = _G._detalhes:InstallPlugin ("TOOLBAR", "Action Tracker", [[Interface\MINIMAP\MOVIERECORDINGICON]], StreamOverlay, "DETAILS_PLUGIN_STREAM_OVERLAY", MINIMAL_DETAILS_VERSION_REQUIRED, "Terciob", StreamOverlay.CurrentVersion, default_options_table)
|
||||
if (type(install) == "table" and install.error) then
|
||||
print (install.error)
|
||||
print(install.error)
|
||||
end
|
||||
|
||||
Details_StreamerDB = Details_StreamerDB or {characters = {}, profiles = {}}
|
||||
@@ -2492,11 +2492,11 @@ function StreamOverlay:OnEvent (_, event, ...)
|
||||
welcomeWindow:Hide()
|
||||
end
|
||||
|
||||
local close = Details.gump:CreateButton (welcomeWindow, close_func, 120, 20, "Okay", nil, nil, nil, nil, nil, nil, Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
local close = Details.gump:CreateButton(welcomeWindow, close_func, 120, 20, "Okay", nil, nil, nil, nil, nil, nil, Details.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
close:SetPoint("center", text3, "center", 0, -50)
|
||||
end
|
||||
|
||||
StreamOverlay.ShowWelcomeFrame = C_Timer.NewTicker (5, show_frame)
|
||||
StreamOverlay.ShowWelcomeFrame = C_Timer.NewTicker(5, show_frame)
|
||||
end
|
||||
|
||||
--wipe (StreamOverlay.db)
|
||||
@@ -2535,8 +2535,8 @@ function StreamOverlay:CreateMinimapIcon()
|
||||
|
||||
StreamOverlay.minimap_icon_created = true
|
||||
|
||||
local LDB = LibStub ("LibDataBroker-1.1", true)
|
||||
local LDBIcon = LDB and LibStub ("LibDBIcon-1.0", true)
|
||||
local LDB = LibStub("LibDataBroker-1.1", true)
|
||||
local LDBIcon = LDB and LibStub("LibDBIcon-1.0", true)
|
||||
|
||||
if LDB then
|
||||
local minimapIcon = LDB:NewDataObject ("DetailsStreamer", {
|
||||
@@ -2555,9 +2555,9 @@ function StreamOverlay:CreateMinimapIcon()
|
||||
end,
|
||||
|
||||
OnTooltipShow = function(tooltip)
|
||||
tooltip:AddLine ("Details!: Action Tracker", 1, 1, 1)
|
||||
tooltip:AddLine ("|cFFFF7700Left Click|r: open options.")
|
||||
tooltip:AddLine ("|cFFFF7700Right Click|r: hide this icon.")
|
||||
tooltip:AddLine("Details!: Action Tracker", 1, 1, 1)
|
||||
tooltip:AddLine("|cFFFF7700Left Click|r: open options.")
|
||||
tooltip:AddLine("|cFFFF7700Right Click|r: hide this icon.")
|
||||
end,
|
||||
})
|
||||
|
||||
@@ -2597,7 +2597,7 @@ local harmful_spells = StreamOverlay.HarmfulSpells
|
||||
local helpful_spells = StreamOverlay.HelpfulSpells
|
||||
|
||||
if (not harmful_spells [spellid] and not helpful_spells [spellid]) then
|
||||
if (bit.band (who_flags, 0x00000400) ~= 0 and who_name) then
|
||||
if (bit.band(who_flags, 0x00000400) ~= 0 and who_name) then
|
||||
local text = editbox:GetText()
|
||||
if (not list:find (spellid) and not text:find (spellid)) then
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local AceLocale = LibStub ("AceLocale-3.0")
|
||||
local AceLocale = LibStub("AceLocale-3.0")
|
||||
local Loc = AceLocale:GetLocale ("Details_Threat")
|
||||
|
||||
local _GetNumSubgroupMembers = GetNumSubgroupMembers --wow api
|
||||
@@ -10,12 +10,12 @@ local _IsInGroup = IsInGroup --wow api
|
||||
local _UnitGroupRolesAssigned = DetailsFramework.UnitGroupRolesAssigned --wow api
|
||||
local GetUnitName = GetUnitName
|
||||
|
||||
local _ipairs = ipairs --lua api
|
||||
local ipairs = ipairs --lua api
|
||||
local _table_sort = table.sort --lua api
|
||||
local _cstr = string.format --lua api
|
||||
local _unpack = unpack
|
||||
local _math_floor = math.floor
|
||||
local _math_abs = math.abs
|
||||
local abs = math.abs
|
||||
local RAID_CLASS_COLORS = RAID_CLASS_COLORS
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ local function CreatePluginFrames (data)
|
||||
|
||||
ThreatMeter:SizeChanged()
|
||||
|
||||
player = GetUnitName ("player", true)
|
||||
player = GetUnitName("player", true)
|
||||
|
||||
ThreatMeter.Actived = false
|
||||
|
||||
@@ -118,21 +118,21 @@ local function CreatePluginFrames (data)
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_ENDRESIZE" or event == "DETAILS_INSTANCE_SIZECHANGED") then
|
||||
|
||||
local what_window = select (1, ...)
|
||||
local what_window = select(1, ...)
|
||||
if (what_window == instance) then
|
||||
ThreatMeter:SizeChanged()
|
||||
ThreatMeter:RefreshRows()
|
||||
end
|
||||
|
||||
elseif (event == "DETAILS_OPTIONS_MODIFIED") then
|
||||
local what_window = select (1, ...)
|
||||
local what_window = select(1, ...)
|
||||
if (what_window == instance) then
|
||||
ThreatMeter:RefreshRows()
|
||||
end
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_STARTSTRETCH") then
|
||||
ThreatMeterFrame:SetFrameStrata("TOOLTIP")
|
||||
ThreatMeterFrame:SetFrameLevel (instance.baseframe:GetFrameLevel()+1)
|
||||
ThreatMeterFrame:SetFrameLevel(instance.baseframe:GetFrameLevel()+1)
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_ENDSTRETCH") then
|
||||
ThreatMeterFrame:SetFrameStrata("MEDIUM")
|
||||
@@ -153,19 +153,19 @@ local function CreatePluginFrames (data)
|
||||
ThreatMeterFrame:SetHeight(100)
|
||||
|
||||
function ThreatMeter:UpdateContainers()
|
||||
for _, row in _ipairs(ThreatMeter.Rows) do
|
||||
for _, row in ipairs(ThreatMeter.Rows) do
|
||||
row:SetContainer (instance.baseframe)
|
||||
end
|
||||
end
|
||||
|
||||
function ThreatMeter:UpdateRows()
|
||||
for _, row in _ipairs(ThreatMeter.Rows) do
|
||||
for _, row in ipairs(ThreatMeter.Rows) do
|
||||
row.width = ThreatMeter.RowWidth
|
||||
end
|
||||
end
|
||||
|
||||
function ThreatMeter:HideBars()
|
||||
for _, row in _ipairs(ThreatMeter.Rows) do
|
||||
for _, row in ipairs(ThreatMeter.Rows) do
|
||||
row:Hide()
|
||||
end
|
||||
end
|
||||
@@ -189,7 +189,7 @@ local function CreatePluginFrames (data)
|
||||
ThreatMeterFrame:SetWidth(w)
|
||||
ThreatMeterFrame:SetHeight(h)
|
||||
ThreatMeter.RowHeight = instance.row_info.height
|
||||
ThreatMeter.CanShow = math.floor ( h / (instance.row_info.height+1))
|
||||
ThreatMeter.CanShow = math.floor( h / (instance.row_info.height+1))
|
||||
|
||||
for i = #ThreatMeter.Rows+1, ThreatMeter.CanShow do
|
||||
ThreatMeter:NewRow (i)
|
||||
@@ -326,7 +326,7 @@ local function CreatePluginFrames (data)
|
||||
if (_IsInRaid()) then
|
||||
for i = 1, _GetNumGroupMembers(), 1 do
|
||||
|
||||
local thisplayer_name = GetUnitName ("raid"..i, true)
|
||||
local thisplayer_name = GetUnitName("raid"..i, true)
|
||||
local threat_table_index = ThreatMeter.player_list_hash [thisplayer_name]
|
||||
local threat_table = ThreatMeter.player_list_indexes [threat_table_index]
|
||||
|
||||
@@ -342,7 +342,7 @@ local function CreatePluginFrames (data)
|
||||
|
||||
elseif (_IsInGroup()) then
|
||||
for i = 1, _GetNumGroupMembers()-1, 1 do
|
||||
local thisplayer_name = GetUnitName ("party"..i, true)
|
||||
local thisplayer_name = GetUnitName("party"..i, true)
|
||||
local threat_table_index = ThreatMeter.player_list_hash [thisplayer_name]
|
||||
local threat_table = ThreatMeter.player_list_indexes [threat_table_index]
|
||||
|
||||
@@ -356,7 +356,7 @@ local function CreatePluginFrames (data)
|
||||
|
||||
end
|
||||
|
||||
local thisplayer_name = GetUnitName ("player", true)
|
||||
local thisplayer_name = GetUnitName("player", true)
|
||||
local threat_table_index = ThreatMeter.player_list_hash [thisplayer_name]
|
||||
local threat_table = ThreatMeter.player_list_indexes [threat_table_index]
|
||||
|
||||
@@ -365,7 +365,7 @@ local function CreatePluginFrames (data)
|
||||
else
|
||||
|
||||
--player
|
||||
local thisplayer_name = GetUnitName ("player", true)
|
||||
local thisplayer_name = GetUnitName("player", true)
|
||||
local threat_table_index = ThreatMeter.player_list_hash [thisplayer_name]
|
||||
local threat_table = ThreatMeter.player_list_indexes [threat_table_index]
|
||||
|
||||
@@ -373,7 +373,7 @@ local function CreatePluginFrames (data)
|
||||
|
||||
--pet
|
||||
if (UnitExists ("pet")) then
|
||||
local thisplayer_name = GetUnitName ("pet", true) .. " *PET*"
|
||||
local thisplayer_name = GetUnitName("pet", true) .. " *PET*"
|
||||
local threat_table_index = ThreatMeter.player_list_hash [thisplayer_name]
|
||||
local threat_table = ThreatMeter.player_list_indexes [threat_table_index]
|
||||
|
||||
@@ -390,7 +390,7 @@ local function CreatePluginFrames (data)
|
||||
--sort
|
||||
_table_sort (ThreatMeter.player_list_indexes, useAbsoluteMode and absoluteSort or relativeSort)
|
||||
local needMainTankDummyBar = true
|
||||
for index, t in _ipairs(ThreatMeter.player_list_indexes) do
|
||||
for index, t in ipairs(ThreatMeter.player_list_indexes) do
|
||||
ThreatMeter.player_list_hash [t[1]] = index
|
||||
if t[3] then
|
||||
needMainTankDummyBar = false
|
||||
@@ -426,7 +426,7 @@ local function CreatePluginFrames (data)
|
||||
--find out gouge threshold (highest offtank threat, divided by 110%; this prevents the offtank from taking the boss back)
|
||||
local gougeThreshold = nil
|
||||
if gougeSpellId then
|
||||
for _, t in _ipairs(ThreatMeter.player_list_indexes) do
|
||||
for _, t in ipairs(ThreatMeter.player_list_indexes) do
|
||||
if not t[3] then
|
||||
gougeThreshold = t[6] / 1.1
|
||||
break
|
||||
@@ -501,7 +501,7 @@ local function CreatePluginFrames (data)
|
||||
|
||||
if needMainTankDummyBar and ((not threatActor) or (not useAbsoluteMode) or (threatActor[6] < mainTankAbsoluteThreat)) then
|
||||
thisRow._icon:SetTexture([[Interface\LFGFrame\UI-LFG-Icon-PortraitRoles]])
|
||||
thisRow._icon:SetTexCoord (_unpack (RoleIconCoord ["TANK"]))
|
||||
thisRow._icon:SetTexCoord (_unpack(RoleIconCoord ["TANK"]))
|
||||
|
||||
thisRow:SetLeftText ("Current Tank")
|
||||
thisRow:SetRightText(ThreatMeter:ToK2 (mainTankAbsoluteThreat) .. " (100.0%)")
|
||||
@@ -509,10 +509,10 @@ local function CreatePluginFrames (data)
|
||||
|
||||
-- color main tank based on highest non-tank threat
|
||||
local r,g = 0,1
|
||||
for _, t in _ipairs(ThreatMeter.player_list_indexes) do
|
||||
for _, t in ipairs(ThreatMeter.player_list_indexes) do
|
||||
if not t[3] then
|
||||
local otherPct = t[useAbsoluteMode and 7 or 2]
|
||||
r,g = (otherPct*0.01), (_math_abs(otherPct-100)*0.01)
|
||||
r,g = (otherPct*0.01), (abs(otherPct-100)*0.01)
|
||||
break
|
||||
end
|
||||
end
|
||||
@@ -551,9 +551,9 @@ local function CreatePluginFrames (data)
|
||||
if (threatActor) then
|
||||
local role = threatActor[4]
|
||||
thisRow._icon:SetTexture([[Interface\LFGFrame\UI-LFG-Icon-PortraitRoles]])
|
||||
thisRow._icon:SetTexCoord (_unpack (RoleIconCoord [role]))
|
||||
thisRow._icon:SetTexCoord (_unpack(RoleIconCoord [role]))
|
||||
|
||||
thisRow:SetLeftText (ThreatMeter:GetOnlyName (threatActor [1]))
|
||||
thisRow:SetLeftText (ThreatMeter:GetOnlyName(threatActor [1]))
|
||||
|
||||
local pct = threatActor [useAbsoluteMode and 7 or 2]
|
||||
|
||||
@@ -561,7 +561,7 @@ local function CreatePluginFrames (data)
|
||||
thisRow:SetValue(pct/barValueUnit)
|
||||
|
||||
if (options.useplayercolor and threatActor [1] == player) then
|
||||
thisRow:SetColor (_unpack (options.playercolor))
|
||||
thisRow:SetColor (_unpack(options.playercolor))
|
||||
|
||||
elseif (options.useclasscolors) then
|
||||
local color = RAID_CLASS_COLORS [threatActor [5]]
|
||||
@@ -574,10 +574,10 @@ local function CreatePluginFrames (data)
|
||||
if threatActor[3] then
|
||||
-- color main tank based on highest non-tank threat
|
||||
local r,g = 0,1
|
||||
for _, t in _ipairs(ThreatMeter.player_list_indexes) do
|
||||
for _, t in ipairs(ThreatMeter.player_list_indexes) do
|
||||
if not t[3] then
|
||||
local otherPct = t[useAbsoluteMode and 7 or 2]
|
||||
r,g = (otherPct*0.01), (_math_abs(otherPct-100)*0.01)
|
||||
r,g = (otherPct*0.01), (abs(otherPct-100)*0.01)
|
||||
break
|
||||
end
|
||||
end
|
||||
@@ -608,15 +608,15 @@ local function CreatePluginFrames (data)
|
||||
if (threat_actor [2] and threat_actor [2] > 0.1) then
|
||||
local thisRow = ThreatMeter.ShownRows [#ThreatMeter.ShownRows]
|
||||
thisRow:SetLeftText (player)
|
||||
--thisRow.textleft:SetTextColor (unpack (RAID_CLASS_COLORS [threat_actor [5]]))
|
||||
--thisRow.textleft:SetTextColor (unpack(RAID_CLASS_COLORS [threat_actor [5]]))
|
||||
local role = threat_actor [4]
|
||||
thisRow._icon:SetTexture([[Interface\LFGFrame\UI-LFG-Icon-PortraitRoles]])
|
||||
thisRow._icon:SetTexCoord (_unpack (RoleIconCoord [role]))
|
||||
thisRow._icon:SetTexCoord (_unpack(RoleIconCoord [role]))
|
||||
thisRow:SetRightText (ThreatMeter:ToK2 (threat_actor [6]) .. " (" .. _cstr ("%.1f", threat_actor [2]) .. "%)")
|
||||
thisRow:SetValue(threat_actor [2])
|
||||
|
||||
if (options.useplayercolor) then
|
||||
thisRow:SetColor (_unpack (options.playercolor))
|
||||
thisRow:SetColor (_unpack(options.playercolor))
|
||||
else
|
||||
local r, g = ThreatMeter:percent_color (threat_actor [2], true)
|
||||
thisRow:SetColor (r, g, 0, .3)
|
||||
@@ -625,7 +625,7 @@ local function CreatePluginFrames (data)
|
||||
end
|
||||
end
|
||||
else
|
||||
--print ("nao tem target")
|
||||
--print("nao tem target")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -653,7 +653,7 @@ local function CreatePluginFrames (data)
|
||||
ThreatMeter:HideBars()
|
||||
if (ThreatMeter.Actived) then
|
||||
if (ThreatMeter.job_thread) then
|
||||
ThreatMeter:CancelTimer (ThreatMeter.job_thread)
|
||||
ThreatMeter:CancelTimer(ThreatMeter.job_thread)
|
||||
ThreatMeter.job_thread = nil
|
||||
end
|
||||
|
||||
@@ -663,8 +663,8 @@ local function CreatePluginFrames (data)
|
||||
--pre build player list
|
||||
if (_IsInRaid()) then
|
||||
for i = 1, _GetNumGroupMembers(), 1 do
|
||||
local thisplayer_name = GetUnitName ("raid"..i, true)
|
||||
local role = _UnitGroupRolesAssigned (thisplayer_name)
|
||||
local thisplayer_name = GetUnitName("raid"..i, true)
|
||||
local role = _UnitGroupRolesAssigned(thisplayer_name)
|
||||
local _, class = UnitClass (thisplayer_name)
|
||||
local t = {thisplayer_name, 0, false, role, class, 0, 0}
|
||||
ThreatMeter.player_list_indexes [#ThreatMeter.player_list_indexes+1] = t
|
||||
@@ -673,30 +673,30 @@ local function CreatePluginFrames (data)
|
||||
|
||||
elseif (_IsInGroup()) then
|
||||
for i = 1, _GetNumGroupMembers()-1, 1 do
|
||||
local thisplayer_name = GetUnitName ("party"..i, true)
|
||||
local role = _UnitGroupRolesAssigned (thisplayer_name)
|
||||
local thisplayer_name = GetUnitName("party"..i, true)
|
||||
local role = _UnitGroupRolesAssigned(thisplayer_name)
|
||||
local _, class = UnitClass (thisplayer_name)
|
||||
local t = {thisplayer_name, 0, false, role, class, 0, 0}
|
||||
ThreatMeter.player_list_indexes [#ThreatMeter.player_list_indexes+1] = t
|
||||
ThreatMeter.player_list_hash [thisplayer_name] = #ThreatMeter.player_list_indexes
|
||||
end
|
||||
local thisplayer_name = GetUnitName ("player", true)
|
||||
local role = _UnitGroupRolesAssigned (thisplayer_name)
|
||||
local thisplayer_name = GetUnitName("player", true)
|
||||
local role = _UnitGroupRolesAssigned(thisplayer_name)
|
||||
local _, class = UnitClass (thisplayer_name)
|
||||
local t = {thisplayer_name, 0, false, role, class, 0, 0}
|
||||
ThreatMeter.player_list_indexes [#ThreatMeter.player_list_indexes+1] = t
|
||||
ThreatMeter.player_list_hash [thisplayer_name] = #ThreatMeter.player_list_indexes
|
||||
|
||||
else
|
||||
local thisplayer_name = GetUnitName ("player", true)
|
||||
local role = _UnitGroupRolesAssigned (thisplayer_name)
|
||||
local thisplayer_name = GetUnitName("player", true)
|
||||
local role = _UnitGroupRolesAssigned(thisplayer_name)
|
||||
local _, class = UnitClass (thisplayer_name)
|
||||
local t = {thisplayer_name, 0, false, role, class, 0, 0}
|
||||
ThreatMeter.player_list_indexes [#ThreatMeter.player_list_indexes+1] = t
|
||||
ThreatMeter.player_list_hash [thisplayer_name] = #ThreatMeter.player_list_indexes
|
||||
|
||||
if (UnitExists ("pet")) then
|
||||
local thispet_name = GetUnitName ("pet", true) .. " *PET*"
|
||||
local thispet_name = GetUnitName("pet", true) .. " *PET*"
|
||||
local role = "DAMAGER"
|
||||
local t = {thispet_name, 0, false, role, class, 0, 0}
|
||||
ThreatMeter.player_list_indexes [#ThreatMeter.player_list_indexes+1] = t
|
||||
@@ -712,7 +712,7 @@ local function CreatePluginFrames (data)
|
||||
function ThreatMeter:End()
|
||||
ThreatMeter:HideBars()
|
||||
if (ThreatMeter.job_thread) then
|
||||
ThreatMeter:CancelTimer (ThreatMeter.job_thread)
|
||||
ThreatMeter:CancelTimer(ThreatMeter.job_thread)
|
||||
ThreatMeter.job_thread = nil
|
||||
end
|
||||
end
|
||||
@@ -720,7 +720,7 @@ local function CreatePluginFrames (data)
|
||||
function ThreatMeter:Cancel()
|
||||
ThreatMeter:HideBars()
|
||||
if (ThreatMeter.job_thread) then
|
||||
ThreatMeter:CancelTimer (ThreatMeter.job_thread)
|
||||
ThreatMeter:CancelTimer(ThreatMeter.job_thread)
|
||||
ThreatMeter.job_thread = nil
|
||||
end
|
||||
ThreatMeter.Actived = false
|
||||
@@ -834,15 +834,15 @@ function ThreatMeter:OnEvent (_, event, ...)
|
||||
elseif (event == "PLAYER_REGEN_DISABLED") then
|
||||
ThreatMeter.Actived = true
|
||||
ThreatMeter:Start()
|
||||
--print ("tiny theat: regen disabled")
|
||||
--print("tiny theat: regen disabled")
|
||||
|
||||
elseif (event == "PLAYER_REGEN_ENABLED") then
|
||||
ThreatMeter:End()
|
||||
ThreatMeter.Actived = false
|
||||
--print ("tiny theat: regen enabled")
|
||||
--print("tiny theat: regen enabled")
|
||||
|
||||
elseif (event == "ADDON_LOADED") then
|
||||
local AddonName = select (1, ...)
|
||||
local AddonName = select(1, ...)
|
||||
|
||||
if (AddonName == "Details_TinyThreat") then
|
||||
if (_G._detalhes) then
|
||||
@@ -859,7 +859,7 @@ function ThreatMeter:OnEvent (_, event, ...)
|
||||
--Install
|
||||
local install, saveddata = _G._detalhes:InstallPlugin ("RAID", Loc ["STRING_PLUGIN_NAME"], "Interface\\Icons\\Ability_Druid_Cower", ThreatMeter, "DETAILS_PLUGIN_TINY_THREAT", MINIMAL_DETAILS_VERSION_REQUIRED, "Terciob", "v2.01")
|
||||
if (type(install) == "table" and install.error) then
|
||||
print (install.error)
|
||||
print(install.error)
|
||||
end
|
||||
|
||||
--Register needed events
|
||||
@@ -915,17 +915,17 @@ function ThreatMeter:OnEvent (_, event, ...)
|
||||
end
|
||||
|
||||
ThreatMeter.saveddata.updatespeed = speed
|
||||
ThreatMeter:Msg (Loc ["STRING_SLASH_SPEED_CHANGED"] .. speed)
|
||||
ThreatMeter:Msg(Loc ["STRING_SLASH_SPEED_CHANGED"] .. speed)
|
||||
else
|
||||
ThreatMeter:Msg (Loc ["STRING_SLASH_SPEED_CURRENT"] .. ThreatMeter.saveddata.updatespeed)
|
||||
ThreatMeter:Msg(Loc ["STRING_SLASH_SPEED_CURRENT"] .. ThreatMeter.saveddata.updatespeed)
|
||||
end
|
||||
end
|
||||
|
||||
elseif (command == Loc ["STRING_SLASH_AMOUNT"]) then
|
||||
|
||||
else
|
||||
ThreatMeter:Msg (Loc ["STRING_COMMAND_LIST"])
|
||||
print ("|cffffaeae/tinythreat " .. Loc ["STRING_SLASH_SPEED"] .. "|r: " .. Loc ["STRING_SLASH_SPEED_DESC"])
|
||||
ThreatMeter:Msg(Loc ["STRING_COMMAND_LIST"])
|
||||
print("|cffffaeae/tinythreat " .. Loc ["STRING_SLASH_SPEED"] .. "|r: " .. Loc ["STRING_SLASH_SPEED_DESC"])
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -4,7 +4,7 @@ if (DetailsFramework.IsTBCWow() or DetailsFramework.IsWotLKWow()) then
|
||||
return
|
||||
end
|
||||
|
||||
local AceLocale = LibStub ("AceLocale-3.0")
|
||||
local AceLocale = LibStub("AceLocale-3.0")
|
||||
local Loc = AceLocale:GetLocale ("Details")
|
||||
local SharedMedia = LibStub:GetLibrary ("LibSharedMedia-3.0")
|
||||
local DF = _G.DetailsFramework
|
||||
@@ -38,10 +38,10 @@ local CONST_MAX_TANKS = 2
|
||||
local _cstr = string.format --lua library local
|
||||
local _table_insert = table.insert --lua library local
|
||||
local _table_remove = table.remove --lua library local
|
||||
local _ipairs = ipairs --lua library local
|
||||
local ipairs = ipairs --lua library local
|
||||
local _pairs = pairs --lua library local
|
||||
local _math_floor = math.floor --lua library local
|
||||
local _math_abs = math.abs --lua library local
|
||||
local abs = math.abs --lua library local
|
||||
local _math_min = math.min --lua library local
|
||||
local _table_sort = table.sort
|
||||
|
||||
@@ -102,8 +102,8 @@ local function CreatePluginFrames (data)
|
||||
str:SetPoint(15, -15)
|
||||
str:SetWidth(375)
|
||||
|
||||
local close_button = _detalhes.gump:CreateButton (welcome, function() welcome:Hide() end, 120, 20, "Close")
|
||||
close_button:SetTemplate(_detalhes.gump:GetTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
|
||||
local close_button = _detalhes.gump:CreateButton(welcome, function() welcome:Hide() end, 120, 20, "Close")
|
||||
close_button:SetTemplate(_detalhes.gump:GetTemplate("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
|
||||
close_button:SetPoint("center", welcome, "center")
|
||||
close_button:SetPoint("bottom", welcome, "bottom", 0, 10)
|
||||
|
||||
@@ -118,10 +118,10 @@ local function CreatePluginFrames (data)
|
||||
Vanguard:ResetBars()
|
||||
|
||||
Vanguard:IdentifyTanks()
|
||||
Vanguard.CurrentCombat = _detalhes:GetCombat ("current")
|
||||
Vanguard.CurrentCombat = _detalhes:GetCombat("current")
|
||||
|
||||
VanguardFrame:SetFrameStrata(Vanguard.CurrentInstance.baseframe:GetFrameStrata())
|
||||
VanguardFrame:SetFrameLevel (Vanguard.CurrentInstance.baseframe:GetFrameLevel()+5)
|
||||
VanguardFrame:SetFrameLevel(Vanguard.CurrentInstance.baseframe:GetFrameLevel()+5)
|
||||
|
||||
if (Vanguard:IsInCombat()) then
|
||||
Vanguard:CombatStart()
|
||||
@@ -133,14 +133,14 @@ local function CreatePluginFrames (data)
|
||||
elseif (event == "COMBAT_PLAYER_ENTER") then --a new combat has been started
|
||||
|
||||
Vanguard.CurrentInstance = Vanguard:GetInstance(Vanguard.instance_id)
|
||||
Vanguard.CurrentCombat = select (1, ...)
|
||||
Vanguard.CurrentCombat = select(1, ...)
|
||||
Vanguard.Running = true
|
||||
|
||||
Vanguard:CombatStart()
|
||||
|
||||
elseif (event == "COMBAT_PLAYER_LEAVE") then --current combat has finished
|
||||
|
||||
Vanguard.CurrentCombat = select (1, ...)
|
||||
Vanguard.CurrentCombat = select(1, ...)
|
||||
|
||||
Vanguard:CombatEnd()
|
||||
Vanguard:ResetBars()
|
||||
@@ -196,7 +196,7 @@ local function CreatePluginFrames (data)
|
||||
|
||||
if (IsInRaid()) then
|
||||
for i = 1, GetNumGroupMembers(), 1 do
|
||||
local role = _UnitGroupRolesAssigned ("raid" .. i)
|
||||
local role = _UnitGroupRolesAssigned("raid" .. i)
|
||||
if (role == "TANK") then
|
||||
local name, realm = UnitName ("raid"..i)
|
||||
if (realm) then
|
||||
@@ -216,7 +216,7 @@ local function CreatePluginFrames (data)
|
||||
elseif (IsInGroup()) then
|
||||
|
||||
for i = 1, GetNumGroupMembers()-1, 1 do
|
||||
local role = _UnitGroupRolesAssigned ("party"..i)
|
||||
local role = _UnitGroupRolesAssigned("party"..i)
|
||||
if (role == "TANK") then
|
||||
local name, realm = UnitName ("party"..i)
|
||||
if (realm) then
|
||||
@@ -233,7 +233,7 @@ local function CreatePluginFrames (data)
|
||||
end
|
||||
end
|
||||
|
||||
local role = _UnitGroupRolesAssigned ("player")
|
||||
local role = _UnitGroupRolesAssigned("player")
|
||||
if (role == "TANK") then
|
||||
local name, realm = UnitName ("player")
|
||||
if (realm) then
|
||||
@@ -313,7 +313,7 @@ local function CreatePluginFrames (data)
|
||||
|
||||
local SetTank = function(self, index)
|
||||
local name = Vanguard.TankList [index]
|
||||
self.tankname:SetText(Vanguard:GetOnlyName (name))
|
||||
self.tankname:SetText(Vanguard:GetOnlyName(name))
|
||||
self.tankname_string = name
|
||||
|
||||
local bar = self.heal_inc
|
||||
@@ -325,7 +325,7 @@ local function CreatePluginFrames (data)
|
||||
|
||||
if (spec) then
|
||||
self.specicon:SetTexture(Vanguard.CurrentInstance.row_info.spec_file)
|
||||
self.specicon:SetTexCoord (_unpack (Vanguard.class_specs_coords [spec]))
|
||||
self.specicon:SetTexCoord (_unpack(Vanguard.class_specs_coords [spec]))
|
||||
else
|
||||
self.specicon:SetTexture(Vanguard.CurrentInstance.row_info.icon_file)
|
||||
self.specicon:SetTexCoord (left, right, top, bottom)
|
||||
@@ -339,13 +339,13 @@ local function CreatePluginFrames (data)
|
||||
|
||||
bar.lefticon = Vanguard.CurrentInstance.row_info.icon_file
|
||||
bar.iconleft:SetTexCoord (left, right, top, bottom)
|
||||
bar:SetLeftText (Vanguard:GetOnlyName (name))
|
||||
bar:SetLeftText (Vanguard:GetOnlyName(name))
|
||||
bar:SetLeftText (name)
|
||||
|
||||
local width = Vanguard.db.tank_block_size
|
||||
self:SetWidth(width)
|
||||
self:SetBackdropColor(unpack (Vanguard.db.tank_block_color))
|
||||
self.unitFrame.healthBar.background:SetColorTexture(unpack (Vanguard.db.tank_block_color))
|
||||
self:SetBackdropColor(unpack(Vanguard.db.tank_block_color))
|
||||
self.unitFrame.healthBar.background:SetColorTexture(unpack(Vanguard.db.tank_block_color))
|
||||
self.unitFrame.healthBar.Settings.BackgroundColor = Vanguard.db.tank_block_color
|
||||
|
||||
--texture
|
||||
@@ -397,7 +397,7 @@ local function CreatePluginFrames (data)
|
||||
end
|
||||
|
||||
f:SetBackdrop({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
|
||||
f:SetBackdropColor(unpack (Vanguard.db.tank_block_color))
|
||||
f:SetBackdropColor(unpack(Vanguard.db.tank_block_color))
|
||||
f:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
--debuff icons
|
||||
@@ -466,7 +466,7 @@ local function CreatePluginFrames (data)
|
||||
|
||||
for i = 1, CONST_DEBUFF_AMOUNT do
|
||||
local support_frame = CreateFrame("frame", "VanguardSupportFrame_"..index.."_"..i, f.unitFrame, "BackdropTemplate")
|
||||
support_frame:SetFrameLevel (f.unitFrame:GetFrameLevel()+10)
|
||||
support_frame:SetFrameLevel(f.unitFrame:GetFrameLevel()+10)
|
||||
support_frame:SetSize(24, 24)
|
||||
support_frame:SetScript("OnMouseUp", on_click)
|
||||
|
||||
@@ -481,7 +481,7 @@ local function CreatePluginFrames (data)
|
||||
support_frame:SetPoint("left", f, "left", 5 + xOffSet, -8)
|
||||
|
||||
local dblock = CreateFrame("cooldown", "VanguardTankDebuffCooldown" .. index.. "_" .. i, support_frame, "CooldownFrameTemplate, BackdropTemplate")
|
||||
dblock:SetAlpha (0.7)
|
||||
dblock:SetAlpha(0.7)
|
||||
dblock:SetPoint("topleft", texture, "topleft")
|
||||
dblock:SetPoint("bottomright", texture, "bottomright")
|
||||
|
||||
@@ -680,7 +680,7 @@ local function CreatePluginFrames (data)
|
||||
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 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)
|
||||
@@ -705,7 +705,7 @@ local function CreatePluginFrames (data)
|
||||
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 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)
|
||||
@@ -768,16 +768,16 @@ local function CreatePluginFrames (data)
|
||||
if (taken > 0 and heals > 0) then
|
||||
if (taken > heals) then
|
||||
local p = heals / taken * 100
|
||||
p = _math_abs (p - 100)
|
||||
p = abs(p - 100)
|
||||
|
||||
p = p / 2
|
||||
p = p + 50
|
||||
p = _math_abs (p - 100)
|
||||
p = abs(p - 100)
|
||||
--tframe.heal_inc:SetSplit (p)
|
||||
currentValue = p
|
||||
else
|
||||
local p = taken / heals * 100
|
||||
p = _math_abs (p - 100)
|
||||
p = abs(p - 100)
|
||||
p = p / 2
|
||||
p = p + 50
|
||||
|
||||
@@ -822,7 +822,7 @@ local function CreatePluginFrames (data)
|
||||
end
|
||||
|
||||
if (Vanguard.track_incoming) then
|
||||
Vanguard:CancelTimer (Vanguard.track_incoming)
|
||||
Vanguard:CancelTimer(Vanguard.track_incoming)
|
||||
end
|
||||
|
||||
Vanguard.track_incoming = Vanguard:ScheduleRepeatingTimer ("TrackIncoming", 0.1)
|
||||
@@ -839,7 +839,7 @@ local function CreatePluginFrames (data)
|
||||
end
|
||||
|
||||
if (Vanguard.track_incoming) then
|
||||
Vanguard:CancelTimer (Vanguard.track_incoming)
|
||||
Vanguard:CancelTimer(Vanguard.track_incoming)
|
||||
end
|
||||
|
||||
onUpdateFrame:SetScript("OnUpdate", nil)
|
||||
@@ -849,11 +849,11 @@ local function CreatePluginFrames (data)
|
||||
|
||||
local formatTime = function(time)
|
||||
if (time >= 3600) then
|
||||
return floor (time / 3600) .. "h"
|
||||
return floor(time / 3600) .. "h"
|
||||
elseif (time >= 60) then
|
||||
return floor (time / 60) .. "m"
|
||||
return floor(time / 60) .. "m"
|
||||
else
|
||||
return floor (time)
|
||||
return floor(time)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -949,11 +949,11 @@ local build_options_panel = function()
|
||||
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 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 = {
|
||||
{
|
||||
@@ -1129,7 +1129,7 @@ function Vanguard:OnEvent (_, event, arg1, token, time, who_serial, who_name, wh
|
||||
|
||||
local install, saveddata = _G._detalhes:InstallPlugin ("TANK", "Vanguard", "Interface\\Icons\\INV_Shield_04", Vanguard, "DETAILS_PLUGIN_VANGUARD", MINIMAL_DETAILS_VERSION_REQUIRED, "Terciob", "v3.0", default_saved_table)
|
||||
if (type(install) == "table" and install.error) then
|
||||
print (install.error)
|
||||
print(install.error)
|
||||
end
|
||||
|
||||
--Vanguard.db.first_run = false --debug
|
||||
|
||||
Reference in New Issue
Block a user