Small bug fixes and improvements
This commit is contained in:
@@ -9,7 +9,7 @@ local _rawset = rawset --lua locals
|
||||
local _rawget = rawget --lua locals
|
||||
local _setmetatable = setmetatable --lua locals
|
||||
local _unpack = unpack --lua locals
|
||||
local _type = type --lua locals
|
||||
local type = type --lua locals
|
||||
local _math_floor = math.floor --lua locals
|
||||
|
||||
local SharedMedia = LibStub:GetLibrary ("LibSharedMedia-3.0")
|
||||
@@ -58,7 +58,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
|
||||
end
|
||||
|
||||
BarMetaFunctions.__add = function(v1, v2)
|
||||
if (_type(v1) == "table") then
|
||||
if (type(v1) == "table") then
|
||||
local v = v1.statusbar:GetValue()
|
||||
v = v + v2
|
||||
v1.statusbar:SetValue(v)
|
||||
@@ -70,7 +70,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
|
||||
end
|
||||
|
||||
BarMetaFunctions.__sub = function(v1, v2)
|
||||
if (_type(v1) == "table") then
|
||||
if (type(v1) == "table") then
|
||||
local v = v1.statusbar:GetValue()
|
||||
v = v - v2
|
||||
v1.statusbar:SetValue(v)
|
||||
@@ -473,7 +473,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
|
||||
return self.statusbar:GetFrameStrata()
|
||||
end
|
||||
function BarMetaFunctions:SetFrameStrata(strata)
|
||||
if (_type(strata) == "table") then
|
||||
if (type(strata) == "table") then
|
||||
self.statusbar:SetFrameStrata(strata:GetFrameStrata())
|
||||
else
|
||||
self.statusbar:SetFrameStrata(strata)
|
||||
|
||||
+28
-34
@@ -10,7 +10,7 @@ local _rawset = rawset --lua local
|
||||
local _rawget = rawget --lua local
|
||||
local _setmetatable = setmetatable --lua local
|
||||
local _unpack = unpack --lua local
|
||||
local _type = type --lua local
|
||||
local type = type --lua local
|
||||
local _math_floor = math.floor --lua local
|
||||
local loadstring = loadstring --lua local
|
||||
|
||||
@@ -415,10 +415,10 @@ DF.LayoutFrame = {
|
||||
-- backdrop
|
||||
function PanelMetaFunctions:SetBackdrop(background, edge, tilesize, edgesize, tile, left, right, top, bottom)
|
||||
|
||||
if (_type(background) == "boolean" and not background) then
|
||||
if (type(background) == "boolean" and not background) then
|
||||
return self.frame:SetBackdrop(nil)
|
||||
|
||||
elseif (_type(background) == "table") then
|
||||
elseif (type(background) == "table") then
|
||||
self.frame:SetBackdrop(background)
|
||||
|
||||
else
|
||||
@@ -485,7 +485,7 @@ DF.LayoutFrame = {
|
||||
return self.widget:GetFrameStrata()
|
||||
end
|
||||
function PanelMetaFunctions:SetFrameStrata(strata)
|
||||
if (_type(strata) == "table") then
|
||||
if (type(strata) == "table") then
|
||||
self.widget:SetFrameStrata(strata:GetFrameStrata())
|
||||
else
|
||||
self.widget:SetFrameStrata(strata)
|
||||
@@ -679,7 +679,7 @@ function DF:NewPanel (parent, container, name, member, w, h, backdrop, backdropc
|
||||
|
||||
if (backdrop) then
|
||||
PanelObject:SetBackdrop(backdrop)
|
||||
elseif (_type(backdrop) == "boolean") then
|
||||
elseif (type(backdrop) == "boolean") then
|
||||
PanelObject.frame:SetBackdrop(nil)
|
||||
end
|
||||
|
||||
@@ -776,9 +776,9 @@ local align_rows = function(self)
|
||||
|
||||
row:Show()
|
||||
|
||||
local type = row.type
|
||||
local rowType = row.type
|
||||
|
||||
if (type == "text") then
|
||||
if (rowType == "text") then
|
||||
for i = 1, #self.scrollframe.lines do
|
||||
local line = self.scrollframe.lines [i]
|
||||
local text = tremove(line.text_available)
|
||||
@@ -793,7 +793,7 @@ local align_rows = function(self)
|
||||
DF:SetFontSize (text, row.textsize or 10)
|
||||
text:SetJustifyH(row.textalign or "left")
|
||||
end
|
||||
elseif (type == "entry") then
|
||||
elseif (rowType == "entry") then
|
||||
for i = 1, #self.scrollframe.lines do
|
||||
local line = self.scrollframe.lines [i]
|
||||
local entry = tremove(line.entry_available)
|
||||
@@ -821,7 +821,7 @@ local align_rows = function(self)
|
||||
end
|
||||
end
|
||||
|
||||
elseif (type == "checkbox") then
|
||||
elseif (rowType == "checkbox") then
|
||||
for i = 1, #self.scrollframe.lines do
|
||||
local line = self.scrollframe.lines [i]
|
||||
local checkbox = tremove(line.checkbox_available)
|
||||
@@ -844,7 +844,7 @@ local align_rows = function(self)
|
||||
checkbox.onleave_func = nil
|
||||
end
|
||||
|
||||
elseif (type == "button") then
|
||||
elseif (rowType == "button") then
|
||||
for i = 1, #self.scrollframe.lines do
|
||||
local line = self.scrollframe.lines [i]
|
||||
local button = tremove(line.button_available)
|
||||
@@ -890,7 +890,7 @@ local align_rows = function(self)
|
||||
end
|
||||
|
||||
end
|
||||
elseif (type == "icon") then
|
||||
elseif (rowType == "icon") then
|
||||
for i = 1, #self.scrollframe.lines do
|
||||
local line = self.scrollframe.lines [i]
|
||||
local icon = tremove(line.icon_available)
|
||||
@@ -903,7 +903,7 @@ local align_rows = function(self)
|
||||
icon.func = row.func
|
||||
end
|
||||
|
||||
elseif (type == "texture") then
|
||||
elseif (rowType == "texture") then
|
||||
for i = 1, #self.scrollframe.lines do
|
||||
local line = self.scrollframe.lines [i]
|
||||
local texture = tremove(line.texture_available)
|
||||
@@ -2889,9 +2889,8 @@ local chart_panel_reset = function(self)
|
||||
end
|
||||
|
||||
local chart_panel_enable_line = function(f, thisbox)
|
||||
|
||||
local index = thisbox.index
|
||||
local type = thisbox.type
|
||||
local boxType = thisbox.type
|
||||
|
||||
if (thisbox.enabled) then
|
||||
--disable
|
||||
@@ -2903,8 +2902,7 @@ local chart_panel_enable_line = function(f, thisbox)
|
||||
thisbox.enabled = true
|
||||
end
|
||||
|
||||
if (type == "graphic") then
|
||||
|
||||
if (boxType == "graphic") then
|
||||
f.Graphic:ResetData()
|
||||
f.Graphic.max_value = 0
|
||||
|
||||
@@ -2912,7 +2910,7 @@ local chart_panel_enable_line = function(f, thisbox)
|
||||
local max_time = 0
|
||||
|
||||
for index, box in ipairs(f.BoxLabels) do
|
||||
if (box.type == type and box.showing and box.enabled) then
|
||||
if (box.type == boxType and box.showing and box.enabled) then
|
||||
local data = f.GData[index]
|
||||
|
||||
f.Graphic:AddDataSeries(data[1], data[2], nil, data[3])
|
||||
@@ -2929,18 +2927,14 @@ local chart_panel_enable_line = function(f, thisbox)
|
||||
f:SetScale(max)
|
||||
f:SetTime (max_time)
|
||||
|
||||
elseif (type == "overlay") then
|
||||
|
||||
elseif (boxType == "overlay") then
|
||||
chart_panel_overlay_reset (f)
|
||||
|
||||
for index, box in ipairs(f.BoxLabels) do
|
||||
if (box.type == type and box.showing and box.enabled) then
|
||||
|
||||
if (box.type == boxType and box.showing and box.enabled) then
|
||||
f:AddOverlay(box.index)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3542,17 +3536,17 @@ function DF:CreateChartPanel (parent, w, h, name)
|
||||
f.TimeLabelsHeight = 16
|
||||
|
||||
for i = 1, 17 do
|
||||
local time = f:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
time:SetText("00:00")
|
||||
time:SetPoint("bottomleft", f, "bottomleft", 78 + ((i-1)*36), f.TimeLabelsHeight)
|
||||
f.TimeLabels [i] = time
|
||||
local timeString = f:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
timeString:SetText("00:00")
|
||||
timeString:SetPoint("bottomleft", f, "bottomleft", 78 + ((i-1)*36), f.TimeLabelsHeight)
|
||||
f.TimeLabels [i] = timeString
|
||||
|
||||
local line = f:CreateTexture(nil, "border")
|
||||
line:SetSize(1, h-45)
|
||||
line:SetColorTexture (1, 1, 1, .1)
|
||||
line:SetPoint("bottomleft", time, "topright", 0, -10)
|
||||
line:SetPoint("bottomleft", timeString, "topright", 0, -10)
|
||||
line:Hide()
|
||||
time.line = line
|
||||
timeString.line = line
|
||||
end
|
||||
|
||||
local bottom_texture = DF:NewImage (f, nil, 702, 25, "background", nil, nil, "$parentBottomTexture")
|
||||
@@ -9842,17 +9836,17 @@ DF.TimeLineBlockFunctions = {
|
||||
for i = 1, #timelineData do
|
||||
local blockInfo = timelineData [i]
|
||||
|
||||
local time = blockInfo [1]
|
||||
local timeInSeconds = blockInfo [1]
|
||||
local length = blockInfo [2]
|
||||
local isAura = blockInfo [3]
|
||||
local auraDuration = blockInfo [4]
|
||||
|
||||
local payload = blockInfo.payload
|
||||
|
||||
local xOffset = pixelPerSecond * time
|
||||
local xOffset = pixelPerSecond * timeInSeconds
|
||||
local width = pixelPerSecond * length
|
||||
|
||||
if (time < -0.2) then
|
||||
if (timeInSeconds < -0.2) then
|
||||
xOffset = xOffset / 2.5
|
||||
end
|
||||
|
||||
@@ -9863,7 +9857,7 @@ DF.TimeLineBlockFunctions = {
|
||||
PixelUtil.SetPoint(block, "left", self, "left", xOffset + headerWidth, 0)
|
||||
|
||||
block.info.spellId = spellId
|
||||
block.info.time = time
|
||||
block.info.time = timeInSeconds
|
||||
block.info.duration = auraDuration
|
||||
block.info.payload = payload
|
||||
|
||||
@@ -9873,7 +9867,7 @@ DF.TimeLineBlockFunctions = {
|
||||
block.icon:SetAlpha(.834)
|
||||
block.icon:SetSize(self:GetHeight(), self:GetHeight())
|
||||
|
||||
if (time < -0.2) then
|
||||
if (timeInSeconds < -0.2) then
|
||||
block.icon:SetDesaturated(true)
|
||||
else
|
||||
block.icon:SetDesaturated(false)
|
||||
|
||||
@@ -9,7 +9,7 @@ local _rawset = rawset --lua local
|
||||
local _rawget = rawget --lua local
|
||||
local _setmetatable = setmetatable --lua local
|
||||
local _unpack = unpack --lua local
|
||||
local _type = type --lua local
|
||||
local type = type --lua local
|
||||
local _math_floor = math.floor --lua local
|
||||
|
||||
local cleanfunction = function() end
|
||||
@@ -57,7 +57,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
|
||||
end
|
||||
|
||||
SplitBarMetaFunctions.__add = function(v1, v2)
|
||||
if (_type(v1) == "table") then
|
||||
if (type(v1) == "table") then
|
||||
local v = v1.statusbar:GetValue()
|
||||
v = v + v2
|
||||
v1.spark:SetPoint("left", v1.statusbar, "left", value * (v1.statusbar:GetWidth()/100) - 18, 0)
|
||||
@@ -71,7 +71,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
|
||||
end
|
||||
|
||||
SplitBarMetaFunctions.__sub = function(v1, v2)
|
||||
if (_type(v1) == "table") then
|
||||
if (type(v1) == "table") then
|
||||
local v = v1.statusbar:GetValue()
|
||||
v = v - v2
|
||||
v1.spark:SetPoint("left", v1.statusbar, "left", value * (v1.statusbar:GetWidth()/100) - 18, 0)
|
||||
@@ -459,7 +459,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
|
||||
|
||||
-- frame stratas
|
||||
function SplitBarMetaFunctions:SetFrameStrata(strata)
|
||||
if (_type(strata) == "table") then
|
||||
if (type(strata) == "table") then
|
||||
self.statusbar:SetFrameStrata(strata:GetFrameStrata())
|
||||
else
|
||||
self.statusbar:SetFrameStrata(strata)
|
||||
|
||||
@@ -219,10 +219,10 @@ end
|
||||
return
|
||||
end
|
||||
|
||||
local _type, serial, arg3, name, realm, version = select (2, NickTag:Deserialize (data))
|
||||
local type, serial, arg3, name, realm, version = select(2, NickTag:Deserialize (data))
|
||||
|
||||
--0x1: received a full persona
|
||||
if (_type == CONST_COMM_FULLPERSONA) then
|
||||
if (type == CONST_COMM_FULLPERSONA) then
|
||||
local receivedPersona = arg3
|
||||
version = name
|
||||
|
||||
|
||||
@@ -859,20 +859,20 @@ do
|
||||
--frames
|
||||
|
||||
local _CreateFrame = CreateFrame --api locals
|
||||
local _UIParent = UIParent --api locals
|
||||
local UIParent = UIParent --api locals
|
||||
|
||||
--Info Window
|
||||
_detalhes.playerDetailWindow = _CreateFrame ("Frame", "DetailsPlayerDetailsWindow", _UIParent, "BackdropTemplate")
|
||||
_detalhes.playerDetailWindow = _CreateFrame ("Frame", "DetailsPlayerDetailsWindow", UIParent, "BackdropTemplate")
|
||||
_detalhes.PlayerDetailsWindow = _detalhes.playerDetailWindow
|
||||
|
||||
--Event Frame
|
||||
_detalhes.listener = _CreateFrame ("Frame", nil, _UIParent)
|
||||
_detalhes.listener = _CreateFrame ("Frame", nil, UIParent)
|
||||
_detalhes.listener:RegisterEvent ("ADDON_LOADED")
|
||||
_detalhes.listener:SetFrameStrata("LOW")
|
||||
_detalhes.listener:SetFrameLevel(9)
|
||||
_detalhes.listener.FrameTime = 0
|
||||
|
||||
_detalhes.overlay_frame = _CreateFrame ("Frame", nil, _UIParent)
|
||||
_detalhes.overlay_frame = _CreateFrame ("Frame", nil, UIParent)
|
||||
_detalhes.overlay_frame:SetFrameStrata("TOOLTIP")
|
||||
|
||||
--Pet Owner Finder
|
||||
|
||||
+23
-28
@@ -1,4 +1,3 @@
|
||||
-- combat class object
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
@@ -8,17 +7,15 @@
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--local pointers
|
||||
|
||||
local _setmetatable = setmetatable -- lua local
|
||||
local _ipairs = ipairs -- lua local
|
||||
local ipairs = ipairs -- lua local
|
||||
local _pairs = pairs -- lua local
|
||||
local _bit_band = bit.band -- lua local
|
||||
local _date = date -- lua local
|
||||
local _table_remove = table.remove -- lua local
|
||||
local _rawget = rawget
|
||||
local tremove = table.remove -- lua local
|
||||
local rawget = rawget
|
||||
local _math_max = math.max
|
||||
local _math_floor = math.floor
|
||||
local _GetTime = GetTime
|
||||
local floor = math.floor
|
||||
local GetTime = GetTime
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--constants
|
||||
@@ -34,7 +31,7 @@
|
||||
local CONTROL_PLAYER = 0x00000100
|
||||
|
||||
--local _tempo = time()
|
||||
local _tempo = _GetTime()
|
||||
local _tempo = GetTime()
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--api functions
|
||||
@@ -77,11 +74,11 @@
|
||||
end
|
||||
|
||||
function combate:InstanceType()
|
||||
return _rawget (self, "instance_type")
|
||||
return rawget (self, "instance_type")
|
||||
end
|
||||
|
||||
function combate:IsTrash()
|
||||
return _rawget (self, "is_trash")
|
||||
return rawget (self, "is_trash")
|
||||
end
|
||||
|
||||
function combate:GetDifficulty()
|
||||
@@ -164,7 +161,7 @@
|
||||
elseif (self.is_mythic_dungeon_trash) then
|
||||
return self.is_mythic_dungeon_trash.ZoneName .. " (" .. Loc ["STRING_SEGMENTS_LIST_TRASH"] .. ")"
|
||||
|
||||
elseif (_rawget (self, "is_trash")) then
|
||||
elseif (rawget (self, "is_trash")) then
|
||||
return Loc ["STRING_SEGMENT_TRASH"]
|
||||
|
||||
else
|
||||
@@ -281,8 +278,8 @@
|
||||
|
||||
--return the combat time in seconds
|
||||
function combate:GetFormatedCombatTime()
|
||||
local time = self:GetCombatTime()
|
||||
local m, s = _math_floor(time/60), _math_floor(time%60)
|
||||
local combatTime = self:GetCombatTime()
|
||||
local m, s = floor(combatTime/60), floor(combatTime%60)
|
||||
return m, s
|
||||
end
|
||||
|
||||
@@ -290,7 +287,7 @@
|
||||
if (self.end_time) then
|
||||
return _math_max (self.end_time - self.start_time, 0.1)
|
||||
elseif (self.start_time and _detalhes.in_combat and self ~= _detalhes.tabela_overall) then
|
||||
return _math_max (_GetTime() - self.start_time, 0.1)
|
||||
return _math_max (GetTime() - self.start_time, 0.1)
|
||||
else
|
||||
return 0.1
|
||||
end
|
||||
@@ -349,8 +346,6 @@
|
||||
return t
|
||||
end
|
||||
|
||||
local tremove = _G.tremove
|
||||
|
||||
--delete an actor from the combat ~delete ~erase ~remove
|
||||
function combate:DeleteActor(attribute, actorName, removeDamageTaken, cannotRemap)
|
||||
local container = self[attribute]
|
||||
@@ -452,7 +447,7 @@
|
||||
esta_tabela [4] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS, esta_tabela, combatId) --Misc
|
||||
esta_tabela [5] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_DAMAGE_CLASS, esta_tabela, combatId) --place holder for customs
|
||||
|
||||
_setmetatable (esta_tabela, combate)
|
||||
setmetatable(esta_tabela, combate)
|
||||
|
||||
_detalhes.combat_counter = _detalhes.combat_counter + 1
|
||||
esta_tabela.combat_counter = _detalhes.combat_counter
|
||||
@@ -517,7 +512,7 @@
|
||||
-- a tabela sem o tempo de inicio � a tabela descartavel do inicio do addon
|
||||
if (iniciada) then
|
||||
--esta_tabela.start_time = _tempo
|
||||
esta_tabela.start_time = _GetTime()
|
||||
esta_tabela.start_time = GetTime()
|
||||
esta_tabela.end_time = nil
|
||||
else
|
||||
esta_tabela.start_time = 0
|
||||
@@ -606,7 +601,7 @@
|
||||
--trava o tempo dos jogadores ap�s o t�rmino do combate.
|
||||
function combate:TravarTempos()
|
||||
if (self [1]) then
|
||||
for _, jogador in _ipairs(self [1]._ActorTable) do --damage
|
||||
for _, jogador in ipairs(self [1]._ActorTable) do --damage
|
||||
if (jogador:Iniciar()) then -- retorna se ele esta com o dps ativo
|
||||
jogador:TerminarTempo()
|
||||
jogador:Iniciar (false) --trava o dps do jogador
|
||||
@@ -621,7 +616,7 @@
|
||||
end
|
||||
end
|
||||
if (self [2]) then
|
||||
for _, jogador in _ipairs(self [2]._ActorTable) do --healing
|
||||
for _, jogador in ipairs(self [2]._ActorTable) do --healing
|
||||
if (jogador:Iniciar()) then -- retorna se ele esta com o dps ativo
|
||||
jogador:TerminarTempo()
|
||||
jogador:Iniciar (false) --trava o dps do jogador
|
||||
@@ -647,11 +642,11 @@
|
||||
|
||||
function combate:seta_tempo_decorrido()
|
||||
--self.end_time = _tempo
|
||||
self.end_time = _GetTime()
|
||||
self.end_time = GetTime()
|
||||
end
|
||||
|
||||
function _detalhes.refresh:r_combate (tabela_combate, shadow)
|
||||
_setmetatable (tabela_combate, _detalhes.combate)
|
||||
setmetatable(tabela_combate, _detalhes.combate)
|
||||
tabela_combate.__index = _detalhes.combate
|
||||
tabela_combate.shadow = shadow
|
||||
end
|
||||
@@ -671,7 +666,7 @@
|
||||
end
|
||||
|
||||
--sub dano
|
||||
for index, actor_T2 in _ipairs(combate2[1]._ActorTable) do
|
||||
for index, actor_T2 in ipairs(combate2[1]._ActorTable) do
|
||||
local actor_T1 = combate1[1]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
|
||||
actor_T1 = actor_T1 - actor_T2
|
||||
actor_T2:subtract_total (combate1)
|
||||
@@ -679,7 +674,7 @@
|
||||
combate1 [1].need_refresh = true
|
||||
|
||||
--sub heal
|
||||
for index, actor_T2 in _ipairs(combate2[2]._ActorTable) do
|
||||
for index, actor_T2 in ipairs(combate2[2]._ActorTable) do
|
||||
local actor_T1 = combate1[2]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
|
||||
actor_T1 = actor_T1 - actor_T2
|
||||
actor_T2:subtract_total (combate1)
|
||||
@@ -687,7 +682,7 @@
|
||||
combate1 [2].need_refresh = true
|
||||
|
||||
--sub energy
|
||||
for index, actor_T2 in _ipairs(combate2[3]._ActorTable) do
|
||||
for index, actor_T2 in ipairs(combate2[3]._ActorTable) do
|
||||
local actor_T1 = combate1[3]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
|
||||
actor_T1 = actor_T1 - actor_T2
|
||||
actor_T2:subtract_total (combate1)
|
||||
@@ -695,7 +690,7 @@
|
||||
combate1 [3].need_refresh = true
|
||||
|
||||
--sub misc
|
||||
for index, actor_T2 in _ipairs(combate2[4]._ActorTable) do
|
||||
for index, actor_T2 in ipairs(combate2[4]._ActorTable) do
|
||||
local actor_T1 = combate1[4]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
|
||||
actor_T1 = actor_T1 - actor_T2
|
||||
actor_T2:subtract_total (combate1)
|
||||
@@ -709,7 +704,7 @@
|
||||
local amt_mortes = #combate2.last_events_tables --quantas mortes teve nessa luta
|
||||
if (amt_mortes > 0) then
|
||||
for i = #combate1.last_events_tables, #combate1.last_events_tables-amt_mortes, -1 do
|
||||
_table_remove (combate1.last_events_tables, #combate1.last_events_tables)
|
||||
tremove(combate1.last_events_tables, #combate1.last_events_tables)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+10
-10
@@ -15,14 +15,14 @@
|
||||
local _table_insert = table.insert --lua local
|
||||
local _table_size = table.getn --lua local
|
||||
local _setmetatable = setmetatable --lua local
|
||||
local _ipairs = ipairs --lua local
|
||||
local ipairs = ipairs --lua local
|
||||
local _pairs = pairs --lua local
|
||||
local _rawget= rawget --lua local
|
||||
local _math_min = math.min --lua local
|
||||
local _math_max = math.max --lua local
|
||||
local _bit_band = bit.band --lua local
|
||||
local _unpack = unpack --lua local
|
||||
local _type = type --lua local
|
||||
local type = type --lua local
|
||||
local _pcall = pcall -- lua local
|
||||
|
||||
local _GetSpellInfo = _detalhes.getspellinfo -- api local
|
||||
@@ -216,7 +216,7 @@
|
||||
local total_script = _detalhes.custom_function_cache [instance.customName .. "Total"]
|
||||
local okey
|
||||
|
||||
for index, actor in _ipairs(instance_container._ActorTable) do
|
||||
for index, actor in ipairs(instance_container._ActorTable) do
|
||||
|
||||
local percent, ptotal
|
||||
|
||||
@@ -292,7 +292,7 @@
|
||||
|
||||
if (source == "[all]") then
|
||||
|
||||
for _, actor in _ipairs(combat_container) do
|
||||
for _, actor in ipairs(combat_container) do
|
||||
local actortotal = func (_, actor, source, target, spellid, combat, instance_container)
|
||||
if (actortotal > 0) then
|
||||
total = total + actortotal
|
||||
@@ -316,7 +316,7 @@
|
||||
end
|
||||
end
|
||||
|
||||
for _, actor in _ipairs(combat_container) do
|
||||
for _, actor in ipairs(combat_container) do
|
||||
if (actor.grupo) then
|
||||
if (not func) then
|
||||
Details:Msg("error on class_custom 'func' is invalid, backtrace:", debugstack())
|
||||
@@ -753,7 +753,7 @@
|
||||
end
|
||||
|
||||
function atributo_custom:ResetCustomActorContainer()
|
||||
for _, actor in _ipairs(self._ActorTable) do
|
||||
for _, actor in ipairs(self._ActorTable) do
|
||||
actor.value = actor.value - _math_floor(actor.value)
|
||||
--actor.value = _detalhes:GetOrderNumber(actor.nome)
|
||||
end
|
||||
@@ -1084,7 +1084,7 @@
|
||||
|
||||
table.remove (_detalhes.custom, index)
|
||||
|
||||
for _, instance in _ipairs(_detalhes.tabela_instancias) do
|
||||
for _, instance in ipairs(_detalhes.tabela_instancias) do
|
||||
if (instance.atributo == 5 and instance.sub_atributo == index) then
|
||||
instance:ResetAttribute()
|
||||
elseif (instance.atributo == 5 and instance.sub_atributo > index) then
|
||||
@@ -1121,7 +1121,7 @@
|
||||
--check if there is a instance showing this custom
|
||||
local showing = false
|
||||
|
||||
for index, instance in _ipairs(_detalhes.tabela_instancias) do
|
||||
for index, instance in ipairs(_detalhes.tabela_instancias) do
|
||||
if (instance.atributo == 5 and instance.sub_atributo == i) then
|
||||
showing = true
|
||||
end
|
||||
@@ -1135,14 +1135,14 @@
|
||||
end
|
||||
|
||||
--restore metatable and indexes
|
||||
for index, custom_object in _ipairs(_detalhes.custom) do
|
||||
for index, custom_object in ipairs(_detalhes.custom) do
|
||||
_setmetatable(custom_object, atributo_custom)
|
||||
custom_object.__index = atributo_custom
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes.clear:c_atributo_custom()
|
||||
for _, custom_object in _ipairs(_detalhes.custom) do
|
||||
for _, custom_object in ipairs(_detalhes.custom) do
|
||||
custom_object.__index = nil
|
||||
end
|
||||
end
|
||||
|
||||
+44
-44
@@ -16,15 +16,15 @@
|
||||
local _table_size = table.getn --lua local
|
||||
local _setmetatable = setmetatable --lua local
|
||||
local _getmetatable = getmetatable --lua local
|
||||
local _ipairs = ipairs --lua local
|
||||
local ipairs = ipairs --lua local
|
||||
local _pairs = pairs --lua local
|
||||
local _rawget= rawget --lua local
|
||||
local _math_min = math.min --lua local
|
||||
local _math_max = math.max --lua local
|
||||
local _math_abs = math.abs --lua local
|
||||
local abs = math.abs --lua local
|
||||
local bitBand = bit.band --lua local
|
||||
local unpack = unpack --lua local
|
||||
local _type = type --lua local
|
||||
local type = type --lua local
|
||||
local GameTooltip = GameTooltip --api local
|
||||
local _IsInRaid = IsInRaid --api local
|
||||
local _IsInGroup = IsInGroup --api local
|
||||
@@ -278,7 +278,7 @@ function Details:ContainerSortEnemies (container, amount, keyName2) --[[exported
|
||||
|
||||
local total = 0
|
||||
|
||||
for index, player in _ipairs(container) do
|
||||
for index, player in ipairs(container) do
|
||||
local npcid1 = Details:GetNpcIdFromGuid(player.serial)
|
||||
--p rint (player.nome, npcid1, ignored_enemy_npcs [npcid1])
|
||||
if (bitBand(player.flag_original, 0x00000060) ~= 0 and not ignoredEnemyNpcsTable [npcid1]) then --� um inimigo
|
||||
@@ -366,7 +366,7 @@ function Details:GetBarColor(actor) --[[exported]]
|
||||
end
|
||||
|
||||
function Details:GetSpellLink(spellid) --[[exported]]
|
||||
if (_type(spellid) ~= "number") then
|
||||
if (type(spellid) ~= "number") then
|
||||
return spellid
|
||||
end
|
||||
|
||||
@@ -455,7 +455,7 @@ end
|
||||
local total = 0
|
||||
|
||||
if (Details.time_type == 2 or not Details:CaptureGet ("damage")) then
|
||||
for _, actor in _ipairs(container) do
|
||||
for _, actor in ipairs(container) do
|
||||
if (actor.grupo) then
|
||||
actor.last_dps = actor.total / combat_time
|
||||
else
|
||||
@@ -464,7 +464,7 @@ end
|
||||
total = total + actor.last_dps
|
||||
end
|
||||
else
|
||||
for _, actor in _ipairs(container) do
|
||||
for _, actor in ipairs(container) do
|
||||
actor.last_dps = actor.total / actor:Tempo()
|
||||
total = total + actor.last_dps
|
||||
end
|
||||
@@ -876,7 +876,7 @@ end
|
||||
local custom_name = spellname .. " - " .. Loc ["STRING_CUSTOM_DTBS"] .. ""
|
||||
|
||||
--check if already exists
|
||||
for index, CustomObject in _ipairs(Details.custom) do
|
||||
for index, CustomObject in ipairs(Details.custom) do
|
||||
if (CustomObject:GetName() == custom_name) then
|
||||
--fix for not saving funcs on logout
|
||||
if (not CustomObject.OnSwitchShow) then
|
||||
@@ -1313,7 +1313,7 @@ end
|
||||
local custom_name = spellname .. " - " .. Loc ["STRING_ATTRIBUTE_DAMAGE_DEBUFFS_REPORT"] .. ""
|
||||
|
||||
--check if already exists
|
||||
for index, CustomObject in _ipairs(Details.custom) do
|
||||
for index, CustomObject in ipairs(Details.custom) do
|
||||
if (CustomObject:GetName() == custom_name) then
|
||||
--fix for not saving funcs on logout
|
||||
if (not CustomObject.OnSwitchShow) then
|
||||
@@ -1480,7 +1480,7 @@ end
|
||||
|
||||
local lineHeight = Details.tooltip.line_height
|
||||
|
||||
for index, t in _ipairs(tooltip_void_zone_temp) do
|
||||
for index, t in ipairs(tooltip_void_zone_temp) do
|
||||
|
||||
if (t[3] == 0) then
|
||||
break
|
||||
@@ -1657,7 +1657,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
|
||||
|
||||
--pega qual a sub key que ser� usada --sub keys
|
||||
if (exportar) then
|
||||
if (_type(exportar) == "boolean") then
|
||||
if (type(exportar) == "boolean") then
|
||||
if (subAttribute == 1) then --DAMAGE DONE
|
||||
keyName = "total"
|
||||
|
||||
@@ -1947,7 +1947,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
|
||||
local misc_container = combatObject [4]
|
||||
local voidzone_damage_total = 0
|
||||
|
||||
for _, actor in _ipairs(misc_container._ActorTable) do
|
||||
for _, actor in ipairs(misc_container._ActorTable) do
|
||||
if (actor.boss_debuff) then
|
||||
index = index + 1
|
||||
|
||||
@@ -2141,7 +2141,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
|
||||
end
|
||||
--
|
||||
if (not isUsingCache) then
|
||||
for index, player in _ipairs(actorTableContent) do
|
||||
for index, player in ipairs(actorTableContent) do
|
||||
if (player.grupo) then --� um player e esta em grupo
|
||||
if (player[keyName] < 1) then --dano menor que 1, interromper o loop
|
||||
amount = index - 1
|
||||
@@ -2212,7 +2212,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
|
||||
if (following) then
|
||||
if (isUsingCache) then
|
||||
local pname = Details.playername
|
||||
for i, actor in _ipairs(actorTableContent) do
|
||||
for i, actor in ipairs(actorTableContent) do
|
||||
if (actor.nome == pname) then
|
||||
myPos = i
|
||||
break
|
||||
@@ -2687,7 +2687,7 @@ function atributo_damage:RefreshLine(instance, lineContainer, whichRowLine, rank
|
||||
if (diff_from_topdps) then
|
||||
local threshold = diff_from_topdps / instance.player_top_dps_threshold * 100
|
||||
if (threshold < 100) then
|
||||
threshold = _math_abs (threshold - 100)
|
||||
threshold = abs(threshold - 100)
|
||||
else
|
||||
threshold = 5
|
||||
end
|
||||
@@ -3194,7 +3194,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
|
||||
end
|
||||
|
||||
--add actor pets
|
||||
for petIndex, petName in _ipairs(self:Pets()) do
|
||||
for petIndex, petName in ipairs(self:Pets()) do
|
||||
local petActor = instancia.showing[class_type]:PegarCombatente (nil, petName)
|
||||
if (petActor) then
|
||||
for _spellid, _skill in _pairs(petActor:GetActorSpells()) do
|
||||
@@ -3345,7 +3345,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
|
||||
--small blank space
|
||||
Details:AddTooltipSpellHeaderText ("", headerColor, 1, false, 0.1, 0.9, 0.1, 0.9, true)
|
||||
|
||||
for index, nome in _ipairs(meus_pets) do
|
||||
for index, nome in ipairs(meus_pets) do
|
||||
if (not quantidade [nome]) then
|
||||
quantidade [nome] = 1
|
||||
|
||||
@@ -3399,7 +3399,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
|
||||
end
|
||||
|
||||
local topPet = totais [1] and totais [1][2] or 0
|
||||
for index, _table in _ipairs(totais) do
|
||||
for index, _table in ipairs(totais) do
|
||||
|
||||
if (_table [2] > 0 and (index <= Details.tooltip.tooltip_max_pets or ismaximized)) then
|
||||
|
||||
@@ -3504,7 +3504,7 @@ function atributo_damage:ReportEnemyDamageTaken (actor, instance, ShiftKeyDown,
|
||||
local custom_name = inimigo .. " -" .. Loc ["STRING_CUSTOM_ENEMY_DT"]
|
||||
|
||||
--procura se j� tem um custom:
|
||||
for index, CustomObject in _ipairs(Details.custom) do
|
||||
for index, CustomObject in ipairs(Details.custom) do
|
||||
if (CustomObject:GetName() == custom_name) then
|
||||
--fix for not saving funcs on logout
|
||||
if (not CustomObject.OnSwitchShow) then
|
||||
@@ -3574,7 +3574,7 @@ function atributo_damage:ToolTip_Enemies (instancia, numero, barra, keydown)
|
||||
--enemy damage taken
|
||||
local i = 1
|
||||
local damage_taken = 0
|
||||
for _, actor in _ipairs(combat[1]._ActorTable) do
|
||||
for _, actor in ipairs(combat[1]._ActorTable) do
|
||||
if (actor.grupo and actor.targets [self.nome]) then
|
||||
local t = tooltip_temp_table [i]
|
||||
if (not t) then
|
||||
@@ -3682,7 +3682,7 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown)
|
||||
local meus_agressores = {}
|
||||
|
||||
if (instancia.sub_atributo == 6) then
|
||||
for _, actor in _ipairs(showing._ActorTable) do
|
||||
for _, actor in ipairs(showing._ActorTable) do
|
||||
if (actor.grupo and actor.targets [self.nome]) then
|
||||
meus_agressores [#meus_agressores+1] = {actor.nome, actor.targets [self.nome], actor.classe, actor}
|
||||
end
|
||||
@@ -3790,7 +3790,7 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown)
|
||||
end
|
||||
end
|
||||
|
||||
for _, spell in _ipairs(all_spells) do
|
||||
for _, spell in ipairs(all_spells) do
|
||||
local spellname, _, spellicon = _GetSpellInfo(spell [1])
|
||||
GameCooltip:AddLine(spellname .. " (|cFFFFFF00" .. spell [3] .. "|r)", FormatTooltipNumber (_, spell [2]).." (" .. format ("%.1f", (spell [2] / damage_taken) * 100).."%)")
|
||||
GameCooltip:AddIcon (spellicon, 1, 1, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
|
||||
@@ -4018,7 +4018,7 @@ function atributo_damage:MontaInfoFriendlyFire()
|
||||
|
||||
local FirstPlaceDamage = DamagedPlayers [1] and DamagedPlayers [1][2] or 0
|
||||
|
||||
for index, tabela in _ipairs(DamagedPlayers) do
|
||||
for index, tabela in ipairs(DamagedPlayers) do
|
||||
local barra = barras [index]
|
||||
|
||||
if (not barra) then
|
||||
@@ -4100,7 +4100,7 @@ function atributo_damage:MontaInfoFriendlyFire()
|
||||
|
||||
FirstPlaceDamage = SkillTable [1] and SkillTable [1][2] or 0
|
||||
|
||||
for index, tabela in _ipairs(SkillTable) do
|
||||
for index, tabela in ipairs(SkillTable) do
|
||||
local barra = barras2 [index]
|
||||
|
||||
if (not barra) then
|
||||
@@ -4162,7 +4162,7 @@ function atributo_damage:MontaInfoDamageTaken()
|
||||
local max_ = meus_agressores [1] and meus_agressores [1][2] or 0
|
||||
|
||||
local barra
|
||||
for index, tabela in _ipairs(meus_agressores) do
|
||||
for index, tabela in ipairs(meus_agressores) do
|
||||
barra = barras [index]
|
||||
if (not barra) then
|
||||
barra = gump:CriaNovaBarraInfo1 (instancia, index)
|
||||
@@ -4343,7 +4343,7 @@ function atributo_damage:MontaInfoDamageDone()
|
||||
--local class_color = RAID_CLASS_COLORS [self.classe] and RAID_CLASS_COLORS [self.classe].colorStr
|
||||
local class_color = "FFCCBBBB"
|
||||
--local class_color = "FFDDDD44"
|
||||
for _, PetName in _ipairs(ActorPets) do
|
||||
for _, PetName in ipairs(ActorPets) do
|
||||
local PetActor = instancia.showing (class_type, PetName)
|
||||
if (PetActor) then
|
||||
local PetSkillsContainer = PetActor.spells._ActorTable
|
||||
@@ -4376,7 +4376,7 @@ function atributo_damage:MontaInfoDamageDone()
|
||||
end
|
||||
|
||||
--spell bars
|
||||
for index, tabela in _ipairs(ActorSkillsSortTable) do
|
||||
for index, tabela in ipairs(ActorSkillsSortTable) do
|
||||
|
||||
--index = index + 1 --with the aura bar
|
||||
index = index
|
||||
@@ -4435,7 +4435,7 @@ function atributo_damage:MontaInfoDamageDone()
|
||||
local max_ = meus_agressores[1] and meus_agressores[1][2] or 0 --dano que a primeiro magia vez
|
||||
|
||||
local barra
|
||||
for index, tabela in _ipairs(meus_agressores) do
|
||||
for index, tabela in ipairs(meus_agressores) do
|
||||
barra = barras [index]
|
||||
|
||||
if (not barra) then --se a barra n�o existir, criar ela ent�o
|
||||
@@ -4510,7 +4510,7 @@ function atributo_damage:MontaInfoDamageDone()
|
||||
local max_inimigos = meus_inimigos[1] and meus_inimigos[1][2] or 0
|
||||
|
||||
local barra
|
||||
for index, tabela in _ipairs(meus_inimigos) do
|
||||
for index, tabela in ipairs(meus_inimigos) do
|
||||
|
||||
barra = info.barras2 [index]
|
||||
|
||||
@@ -4570,7 +4570,7 @@ end
|
||||
------ Detalhe Info Friendly Fire
|
||||
function atributo_damage:MontaDetalhesFriendlyFire (nome, barra)
|
||||
|
||||
for _, barra in _ipairs(info.barras3) do
|
||||
for _, barra in ipairs(info.barras3) do
|
||||
barra:Hide()
|
||||
end
|
||||
|
||||
@@ -4600,7 +4600,7 @@ function atributo_damage:MontaDetalhesFriendlyFire (nome, barra)
|
||||
local max_ = minhas_magias[1] and minhas_magias[1][2] or 0 --dano que a primeiro magia vez
|
||||
|
||||
local barra
|
||||
for index, tabela in _ipairs(minhas_magias) do
|
||||
for index, tabela in ipairs(minhas_magias) do
|
||||
barra = barras [index]
|
||||
|
||||
if (not barra) then --se a barra n�o existir, criar ela ent�o
|
||||
@@ -4632,7 +4632,7 @@ end
|
||||
-- detalhes info enemies
|
||||
function atributo_damage:MontaDetalhesEnemy (spellid, barra)
|
||||
|
||||
for _, barra in _ipairs(info.barras3) do
|
||||
for _, barra in ipairs(info.barras3) do
|
||||
barra:Hide()
|
||||
end
|
||||
|
||||
@@ -4675,7 +4675,7 @@ function atributo_damage:MontaDetalhesEnemy (spellid, barra)
|
||||
local max_ = target_pool [1] and target_pool [1][2] or 0
|
||||
|
||||
local barra
|
||||
for index, tabela in _ipairs(target_pool) do
|
||||
for index, tabela in ipairs(target_pool) do
|
||||
barra = barras [index]
|
||||
|
||||
if (not barra) then --se a barra n�o existir, criar ela ent�o
|
||||
@@ -4725,7 +4725,7 @@ end
|
||||
------ Detalhe Info Damage Taken
|
||||
function atributo_damage:MontaDetalhesDamageTaken (nome, barra)
|
||||
|
||||
for _, barra in _ipairs(info.barras3) do
|
||||
for _, barra in ipairs(info.barras3) do
|
||||
barra:Hide()
|
||||
end
|
||||
|
||||
@@ -4765,7 +4765,7 @@ function atributo_damage:MontaDetalhesDamageTaken (nome, barra)
|
||||
local max_ = minhas_magias[1] and minhas_magias[1][2] or 0 --dano que a primeiro magia vez
|
||||
|
||||
local barra
|
||||
for index, tabela in _ipairs(minhas_magias) do
|
||||
for index, tabela in ipairs(minhas_magias) do
|
||||
barra = barras [index]
|
||||
|
||||
if (not barra) then --se a barra n�o existir, criar ela ent�o
|
||||
@@ -5044,7 +5044,7 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
|
||||
|
||||
_table_sort(data, Details.Sort1)
|
||||
|
||||
for index, tabela in _ipairs(data) do
|
||||
for index, tabela in ipairs(data) do
|
||||
gump:SetaDetalheInfoTexto (index+1, tabela[2], tabela[3], tabela[4], tabela[5], tabela[6], tabela[7], tabela[8])
|
||||
end
|
||||
|
||||
@@ -5160,7 +5160,7 @@ function atributo_damage:MontaTooltipDamageTaken (thisLine, index)
|
||||
GameTooltip:AddLine(Loc ["STRING_DAMAGE_TAKEN_FROM2"]..":")
|
||||
GameTooltip:AddLine(" ")
|
||||
|
||||
for index, tabela in _ipairs(habilidades) do
|
||||
for index, tabela in ipairs(habilidades) do
|
||||
local nome, _, icone = _GetSpellInfo(tabela[1])
|
||||
if (index < 8) then
|
||||
GameTooltip:AddDoubleLine (index..". |T"..icone..":0|t "..nome, Details:comma_value (tabela[2]).." ("..format("%.1f", tabela[2]/total*100).."%)", 1, 1, 1, 1, 1, 1)
|
||||
@@ -5221,7 +5221,7 @@ function atributo_damage:MontaTooltipAlvos (thisLine, index, instancia)
|
||||
end
|
||||
|
||||
--add pets
|
||||
for _, PetName in _ipairs(self.pets) do
|
||||
for _, PetName in ipairs(self.pets) do
|
||||
local PetActor = instancia.showing (class_type, PetName)
|
||||
if (PetActor) then
|
||||
local PetSkillsContainer = PetActor.spells._ActorTable
|
||||
@@ -5274,7 +5274,7 @@ function atributo_damage:MontaTooltipAlvos (thisLine, index, instancia)
|
||||
local topSpellDamage = habilidades[1] and habilidades[1][2]
|
||||
|
||||
if (topSpellDamage) then
|
||||
for index, tabela in _ipairs(habilidades) do
|
||||
for index, tabela in ipairs(habilidades) do
|
||||
if (tabela [2] < 1) then
|
||||
break
|
||||
end
|
||||
@@ -5480,7 +5480,7 @@ end
|
||||
shadow.start_time = shadow.start_time - tempo
|
||||
|
||||
--pets (add unique pet names)
|
||||
for _, petName in _ipairs(actor.pets) do
|
||||
for _, petName in ipairs(actor.pets) do
|
||||
local hasPet = false
|
||||
for i = 1, #shadow.pets do
|
||||
if (shadow.pets[i] == petName) then
|
||||
@@ -5543,7 +5543,7 @@ end
|
||||
|
||||
--soma todos os demais valores
|
||||
for key, value in _pairs(habilidade) do
|
||||
if (_type(value) == "number") then
|
||||
if (type(value) == "number") then
|
||||
if (key ~= "id" and key ~= "spellschool") then
|
||||
if (not habilidade_shadow [key]) then
|
||||
habilidade_shadow [key] = 0
|
||||
@@ -5695,7 +5695,7 @@ atributo_damage.__add = function(tabela1, tabela2)
|
||||
end
|
||||
|
||||
--pets (add unique pet names)
|
||||
for _, petName in _ipairs(tabela2.pets) do
|
||||
for _, petName in ipairs(tabela2.pets) do
|
||||
local hasPet = false
|
||||
for i = 1, #tabela1.pets do
|
||||
if (tabela1.pets[i] == petName) then
|
||||
@@ -5736,7 +5736,7 @@ atributo_damage.__add = function(tabela1, tabela2)
|
||||
|
||||
--soma os valores da habilidade
|
||||
for key, value in _pairs(habilidade) do
|
||||
if (_type(value) == "number") then
|
||||
if (type(value) == "number") then
|
||||
if (key ~= "id" and key ~= "spellschool") then
|
||||
if (not habilidade_tabela1 [key]) then
|
||||
habilidade_tabela1 [key] = 0
|
||||
@@ -5830,7 +5830,7 @@ atributo_damage.__sub = function(tabela1, tabela2)
|
||||
|
||||
--subtrai os valores da habilidade
|
||||
for key, value in _pairs(habilidade) do
|
||||
if (_type(value) == "number") then
|
||||
if (type(value) == "number") then
|
||||
if (key ~= "id" and key ~= "spellschool") then
|
||||
if (not habilidade_tabela1 [key]) then
|
||||
habilidade_tabela1 [key] = 0
|
||||
|
||||
+28
-29
@@ -4,9 +4,9 @@ local _cstr = string.format
|
||||
local _math_floor = math.floor
|
||||
local _setmetatable = setmetatable
|
||||
local _pairs = pairs
|
||||
local _ipairs = ipairs
|
||||
local ipairs = ipairs
|
||||
local _unpack = unpack
|
||||
local _type = type
|
||||
local type = type
|
||||
local _table_sort = table.sort
|
||||
local _cstr = string.format
|
||||
local _table_insert = table.insert
|
||||
@@ -181,7 +181,7 @@ function atributo_heal:ContainerRefreshHps (container, combat_time)
|
||||
local total = 0
|
||||
|
||||
if (_detalhes.time_type == 2 or not _detalhes:CaptureGet ("heal")) then
|
||||
for _, actor in _ipairs(container) do
|
||||
for _, actor in ipairs(container) do
|
||||
if (actor.grupo) then
|
||||
actor.last_hps = actor.total / combat_time
|
||||
else
|
||||
@@ -190,7 +190,7 @@ function atributo_heal:ContainerRefreshHps (container, combat_time)
|
||||
total = total + actor.last_hps
|
||||
end
|
||||
else
|
||||
for _, actor in _ipairs(container) do
|
||||
for _, actor in ipairs(container) do
|
||||
actor.last_hps = actor.total / actor:Tempo()
|
||||
total = total + actor.last_hps
|
||||
end
|
||||
@@ -239,7 +239,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
--pega qual a sub key que ser� usada
|
||||
if (exportar) then
|
||||
|
||||
if (_type(exportar) == "boolean") then
|
||||
if (type(exportar) == "boolean") then
|
||||
if (sub_atributo == 1) then --healing DONE
|
||||
keyName = "total"
|
||||
elseif (sub_atributo == 2) then --HPS
|
||||
@@ -344,7 +344,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
end
|
||||
--
|
||||
if (not using_cache) then
|
||||
for index, player in _ipairs(conteudo) do
|
||||
for index, player in ipairs(conteudo) do
|
||||
if (player.grupo) then --� um player e esta em grupo
|
||||
if (player[keyName] < 1) then --dano menor que 1, interromper o loop
|
||||
amount = index - 1
|
||||
@@ -400,7 +400,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
if (following) then
|
||||
if (using_cache) then
|
||||
local pname = _detalhes.playername
|
||||
for i, actor in _ipairs(conteudo) do
|
||||
for i, actor in ipairs(conteudo) do
|
||||
if (actor.nome == pname) then
|
||||
myPos = i
|
||||
break
|
||||
@@ -567,7 +567,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
|
||||
if (instancia.atributo == 5) then --custom
|
||||
--zerar o .custom dos Actors
|
||||
for index, player in _ipairs(conteudo) do
|
||||
for index, player in ipairs(conteudo) do
|
||||
if (player.custom > 0) then
|
||||
player.custom = 0
|
||||
else
|
||||
@@ -964,10 +964,9 @@ function atributo_heal:RefreshBarra (thisLine, instancia, from_resize)
|
||||
end
|
||||
|
||||
function _detalhes:CloseShields(combat)
|
||||
|
||||
local escudos = _detalhes.escudos
|
||||
local container = combat[2]
|
||||
local time = time()
|
||||
local timeNow = time()
|
||||
local parser = _detalhes.parser
|
||||
local GetSpellInfo = GetSpellInfo --n�o colocar no cache de spells
|
||||
|
||||
@@ -984,7 +983,7 @@ function _detalhes:CloseShields (combat)
|
||||
if (amount > 0) then
|
||||
local obj = container:PegarCombatente (_, owner)
|
||||
if (obj) then
|
||||
parser:heal ("SPELL_AURA_REMOVED", time, obj.serial, owner, obj.flag_original, tgt.serial, alvo_name, tgt.flag_original, nil, spellid, spellname, nil, 0, _math_ceil (amount), 0, 0, nil, true)
|
||||
parser:heal ("SPELL_AURA_REMOVED", timeNow, obj.serial, owner, obj.flag_original, tgt.serial, alvo_name, tgt.flag_original, nil, spellid, spellname, nil, 0, _math_ceil (amount), 0, 0, nil, true)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1355,7 +1354,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
|
||||
end
|
||||
|
||||
--add actor pets
|
||||
for petIndex, petName in _ipairs(self:Pets()) do
|
||||
for petIndex, petName in ipairs(self:Pets()) do
|
||||
local petActor = instancia.showing[class_type]:PegarCombatente (nil, petName)
|
||||
if (petActor) then
|
||||
for _spellid, _skill in _pairs(petActor:GetActorSpells()) do
|
||||
@@ -1539,7 +1538,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
|
||||
local quantidade = {} --armazena a quantidade de pets iguais
|
||||
local totais = {} --armazena o dano total de cada objeto
|
||||
|
||||
for index, nome in _ipairs(meus_pets) do
|
||||
for index, nome in ipairs(meus_pets) do
|
||||
if (not quantidade [nome]) then
|
||||
quantidade [nome] = 1
|
||||
|
||||
@@ -1575,7 +1574,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
|
||||
ismaximized = true
|
||||
end
|
||||
|
||||
for index, _table in _ipairs(totais) do
|
||||
for index, _table in ipairs(totais) do
|
||||
|
||||
if (_table [2] >= 1 and (index < 3 or ismaximized)) then
|
||||
|
||||
@@ -1708,7 +1707,7 @@ function atributo_heal:MontaInfoHealTaken()
|
||||
local max_ = meus_curandeiros [1] and meus_curandeiros [1][2] or 0
|
||||
|
||||
local barra
|
||||
for index, tabela in _ipairs(meus_curandeiros) do
|
||||
for index, tabela in ipairs(meus_curandeiros) do
|
||||
barra = barras [index]
|
||||
if (not barra) then
|
||||
barra = gump:CriaNovaBarraInfo1 (instancia, index)
|
||||
@@ -1746,7 +1745,7 @@ function atributo_heal:MontaInfoOverHealing()
|
||||
--add pets
|
||||
local ActorPets = self.pets
|
||||
local class_color = "FFDDDDDD"
|
||||
for _, PetName in _ipairs(ActorPets) do
|
||||
for _, PetName in ipairs(ActorPets) do
|
||||
local PetActor = instancia.showing (class_type, PetName)
|
||||
if (PetActor) then
|
||||
local PetSkillsContainer = PetActor.spells._ActorTable
|
||||
@@ -1764,7 +1763,7 @@ function atributo_heal:MontaInfoOverHealing()
|
||||
|
||||
local max_ = minhas_curas[1] and minhas_curas[1][2] or 0
|
||||
|
||||
for index, tabela in _ipairs(minhas_curas) do
|
||||
for index, tabela in ipairs(minhas_curas) do
|
||||
|
||||
local barra = barras [index]
|
||||
|
||||
@@ -1834,7 +1833,7 @@ function atributo_heal:MontaInfoOverHealing()
|
||||
|
||||
local max_inimigos = jogadores_overhealed[1] and jogadores_overhealed[1][2] or 0
|
||||
|
||||
for index, tabela in _ipairs(jogadores_overhealed) do
|
||||
for index, tabela in ipairs(jogadores_overhealed) do
|
||||
|
||||
local barra = info.barras2 [index]
|
||||
|
||||
@@ -1906,7 +1905,7 @@ function atributo_heal:MontaInfoHealingDone()
|
||||
local ActorPets = self.pets
|
||||
--local class_color = RAID_CLASS_COLORS [self.classe] and RAID_CLASS_COLORS [self.classe].colorStr
|
||||
local class_color = "FFDDDDDD"
|
||||
for _, PetName in _ipairs(ActorPets) do
|
||||
for _, PetName in ipairs(ActorPets) do
|
||||
local PetActor = instancia.showing (class_type, PetName)
|
||||
if (PetActor) then
|
||||
local PetSkillsContainer = PetActor.spells._ActorTable
|
||||
@@ -1932,7 +1931,7 @@ function atributo_heal:MontaInfoHealingDone()
|
||||
local max_ = minhas_curas[1] and minhas_curas[1][2] or 0
|
||||
local foundSpellDetail = false
|
||||
|
||||
for index, tabela in _ipairs(minhas_curas) do
|
||||
for index, tabela in ipairs(minhas_curas) do
|
||||
|
||||
local barra = barras [index]
|
||||
|
||||
@@ -1979,7 +1978,7 @@ function atributo_heal:MontaInfoHealingDone()
|
||||
gump:JI_AtualizaContainerAlvos(#healedTargets)
|
||||
local topHealingDone = healedTargets[1] and healedTargets[1][2]
|
||||
|
||||
for index, tabela in _ipairs(healedTargets) do
|
||||
for index, tabela in ipairs(healedTargets) do
|
||||
|
||||
local barra = info.barras2 [index]
|
||||
|
||||
@@ -2057,7 +2056,7 @@ function atributo_heal:MontaTooltipAlvos (thisLine, index, instancia)
|
||||
|
||||
--add pets
|
||||
local ActorPets = self.pets
|
||||
for _, PetName in _ipairs(ActorPets) do
|
||||
for _, PetName in ipairs(ActorPets) do
|
||||
local PetActor = instancia.showing (class_type, PetName)
|
||||
if (PetActor) then
|
||||
local PetSkillsContainer = PetActor.spells._ActorTable
|
||||
@@ -2105,7 +2104,7 @@ function atributo_heal:MontaTooltipAlvos (thisLine, index, instancia)
|
||||
local topSpellHeal = habilidades[1] and habilidades[1][2]
|
||||
|
||||
if (topSpellHeal) then
|
||||
for index, tabela in _ipairs(habilidades) do
|
||||
for index, tabela in ipairs(habilidades) do
|
||||
if (tabela [2] < 1) then
|
||||
break
|
||||
end
|
||||
@@ -2140,7 +2139,7 @@ end
|
||||
|
||||
function atributo_heal:MontaDetalhesHealingTaken (nome, barra)
|
||||
|
||||
for _, barra in _ipairs(info.barras3) do
|
||||
for _, barra in ipairs(info.barras3) do
|
||||
barra:Hide()
|
||||
end
|
||||
|
||||
@@ -2171,7 +2170,7 @@ function atributo_heal:MontaDetalhesHealingTaken (nome, barra)
|
||||
local max_ = minhas_magias[1] and minhas_magias[1][2] or 0 --dano que a primeiro magia vez
|
||||
|
||||
local barra
|
||||
for index, tabela in _ipairs(minhas_magias) do
|
||||
for index, tabela in ipairs(minhas_magias) do
|
||||
barra = barras [index]
|
||||
|
||||
if (not barra) then --se a barra n�o existir, criar ela ent�o
|
||||
@@ -2588,7 +2587,7 @@ end
|
||||
shadow.start_time = shadow.start_time - tempo
|
||||
|
||||
--pets (add unique pet names)
|
||||
for _, petName in _ipairs(actor.pets) do
|
||||
for _, petName in ipairs(actor.pets) do
|
||||
DetailsFramework.table.addunique (shadow.pets, petName)
|
||||
end
|
||||
|
||||
@@ -2671,7 +2670,7 @@ end
|
||||
|
||||
--soma todos os demais valores
|
||||
for key, value in _pairs(habilidade) do
|
||||
if (_type(value) == "number") then
|
||||
if (type(value) == "number") then
|
||||
if (key ~= "id") then
|
||||
if (not habilidade_shadow [key]) then
|
||||
habilidade_shadow [key] = 0
|
||||
@@ -2781,7 +2780,7 @@ atributo_heal.__add = function(tabela1, tabela2)
|
||||
|
||||
--soma os valores da habilidade
|
||||
for key, value in _pairs(habilidade) do
|
||||
if (_type(value) == "number") then
|
||||
if (type(value) == "number") then
|
||||
if (key ~= "id") then
|
||||
if (not habilidade_tabela1 [key]) then
|
||||
habilidade_tabela1 [key] = 0
|
||||
@@ -2891,7 +2890,7 @@ atributo_heal.__sub = function(tabela1, tabela2)
|
||||
|
||||
--soma os valores da habilidade
|
||||
for key, value in _pairs(habilidade) do
|
||||
if (_type(value) == "number") then
|
||||
if (type(value) == "number") then
|
||||
if (key ~= "id") then
|
||||
if (not habilidade_tabela1 [key]) then
|
||||
habilidade_tabela1 [key] = 0
|
||||
|
||||
+50
-63
@@ -2,11 +2,11 @@ local AceLocale = LibStub ("AceLocale-3.0")
|
||||
local Loc = AceLocale:GetLocale ( "Details" )
|
||||
local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
|
||||
|
||||
local _type= type --lua local
|
||||
local _ipairs = ipairs --lua local
|
||||
local type= type --lua local
|
||||
local ipairs = ipairs --lua local
|
||||
local _pairs = pairs --lua local
|
||||
local _math_floor = math.floor --lua local
|
||||
local _math_abs = math.abs --lua local
|
||||
local abs = math.abs --lua local
|
||||
local _table_remove = table.remove --lua local
|
||||
local _getmetatable = getmetatable --lua local
|
||||
local _setmetatable = setmetatable --lua local
|
||||
@@ -92,7 +92,7 @@ function _detalhes:InstanceCall (funcao, ...)
|
||||
if (type(funcao) == "string") then
|
||||
funcao = _detalhes [funcao]
|
||||
end
|
||||
for index, instance in _ipairs(_detalhes.tabela_instancias) do
|
||||
for index, instance in ipairs(_detalhes.tabela_instancias) do
|
||||
if (instance:IsAtiva()) then --only enabled
|
||||
funcao (instance, ...)
|
||||
end
|
||||
@@ -101,7 +101,7 @@ end
|
||||
|
||||
--chama a fun��o para ser executada em todas as inst�ncias (internal)
|
||||
function _detalhes:InstanciaCallFunction(funcao, ...)
|
||||
for index, instancia in _ipairs(_detalhes.tabela_instancias) do
|
||||
for index, instancia in ipairs(_detalhes.tabela_instancias) do
|
||||
if (instancia:IsAtiva()) then --s� reabre se ela estiver ativa
|
||||
funcao (_, instancia, ...)
|
||||
end
|
||||
@@ -110,7 +110,7 @@ end
|
||||
|
||||
--chama a fun��o para ser executada em todas as inst�ncias (internal)
|
||||
function _detalhes:InstanciaCallFunctionOffline (funcao, ...)
|
||||
for index, instancia in _ipairs(_detalhes.tabela_instancias) do
|
||||
for index, instancia in ipairs(_detalhes.tabela_instancias) do
|
||||
funcao (_, instancia, ...)
|
||||
end
|
||||
end
|
||||
@@ -142,7 +142,7 @@ end
|
||||
|
||||
function _detalhes:GetLowerInstanceNumber()
|
||||
local lower = 999
|
||||
for index, instancia in _ipairs(_detalhes.tabela_instancias) do
|
||||
for index, instancia in ipairs(_detalhes.tabela_instancias) do
|
||||
if (instancia.ativa and instancia.baseframe) then
|
||||
if (instancia.meu_id < lower) then
|
||||
lower = instancia.meu_id
|
||||
@@ -257,7 +257,7 @@ function _detalhes:ResetAttribute()
|
||||
end
|
||||
|
||||
function _detalhes:ListInstances()
|
||||
return _ipairs(_detalhes.tabela_instancias)
|
||||
return ipairs(_detalhes.tabela_instancias)
|
||||
end
|
||||
|
||||
function _detalhes:GetPosition()
|
||||
@@ -273,7 +273,7 @@ function _detalhes:GetMaxInstancesAmount()
|
||||
end
|
||||
|
||||
function _detalhes:SetMaxInstancesAmount (amount)
|
||||
if (_type(amount) == "number") then
|
||||
if (type(amount) == "number") then
|
||||
_detalhes.instances_amount = amount
|
||||
end
|
||||
end
|
||||
@@ -389,13 +389,13 @@ end
|
||||
self.posicao = Details.CopyTable(config.pos)
|
||||
end
|
||||
|
||||
if (_type(config.attribute) ~= "number") then
|
||||
if (type(config.attribute) ~= "number") then
|
||||
config.attribute = 1
|
||||
end
|
||||
if (_type(config.sub_attribute) ~= "number") then
|
||||
if (type(config.sub_attribute) ~= "number") then
|
||||
config.sub_attribute = 1
|
||||
end
|
||||
if (_type(config.segment) ~= "number") then
|
||||
if (type(config.segment) ~= "number") then
|
||||
config.segment = 1
|
||||
end
|
||||
|
||||
@@ -414,7 +414,7 @@ end
|
||||
end
|
||||
|
||||
function _detalhes:ShutDownAllInstances()
|
||||
for index, instance in _ipairs(_detalhes.tabela_instancias) do
|
||||
for index, instance in ipairs(_detalhes.tabela_instancias) do
|
||||
if (instance:IsEnabled() and instance.baseframe and not instance.ignore_mass_showhide) then
|
||||
instance:ShutDown(true)
|
||||
end
|
||||
@@ -485,8 +485,8 @@ end
|
||||
if (not _detalhes.initializing) then
|
||||
_detalhes:SendEvent("DETAILS_INSTANCE_CLOSE", nil, self)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
function _detalhes:InstanciaFadeBarras (instancia, segmento)
|
||||
@@ -724,25 +724,28 @@ end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
--apaga de vez um inst�ncia
|
||||
function _detalhes:ApagarInstancia (ID)
|
||||
return _table_remove(_detalhes.tabela_instancias, ID)
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
--retorna quantas inst�ncia h� no momento
|
||||
function _detalhes:GetNumInstancesAmount()
|
||||
return #_detalhes.tabela_instancias
|
||||
end
|
||||
|
||||
function _detalhes:QuantasInstancias()
|
||||
return #_detalhes.tabela_instancias
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
function _detalhes:DeleteInstance (id)
|
||||
|
||||
local instance = _detalhes:GetInstance(id)
|
||||
|
||||
if (not instance) then
|
||||
@@ -795,7 +798,7 @@ end
|
||||
|
||||
function _detalhes:CriarInstancia(_, id)
|
||||
|
||||
if (id and _type(id) == "boolean") then
|
||||
if (id and type(id) == "boolean") then
|
||||
|
||||
if (#_detalhes.tabela_instancias >= _detalhes.instances_amount) then
|
||||
_detalhes:Msg(Loc ["STRING_INSTANCE_LIMIT"])
|
||||
@@ -861,7 +864,7 @@ end
|
||||
end
|
||||
|
||||
--antes de criar uma nova, ver se n�o h� alguma para reativar
|
||||
for index, instancia in _ipairs(_detalhes.tabela_instancias) do
|
||||
for index, instancia in ipairs(_detalhes.tabela_instancias) do
|
||||
if (not instancia:IsAtiva()) then
|
||||
instancia:AtivarInstancia()
|
||||
return instancia
|
||||
@@ -927,17 +930,16 @@ function _detalhes:EstaAgrupada(esta_instancia, lado) --lado //// 1 = encostou n
|
||||
end
|
||||
|
||||
function _detalhes:BaseFrameSnap()
|
||||
|
||||
local group = self:GetInstanceGroup()
|
||||
|
||||
for meu_id, instancia in _ipairs(group) do
|
||||
for meu_id, instancia in ipairs(group) do
|
||||
if (instancia:IsAtiva()) then
|
||||
instancia.baseframe:ClearAllPoints()
|
||||
end
|
||||
end
|
||||
|
||||
local scale = self.window_scale
|
||||
for _, instance in _ipairs(group) do
|
||||
for _, instance in ipairs(group) do
|
||||
instance:SetWindowScale (scale)
|
||||
end
|
||||
|
||||
@@ -1032,7 +1034,7 @@ function _detalhes:BaseFrameSnap()
|
||||
end
|
||||
--]]
|
||||
|
||||
for meu_id, instancia in _ipairs(_detalhes.tabela_instancias) do
|
||||
for meu_id, instancia in ipairs(_detalhes.tabela_instancias) do
|
||||
if (meu_id > self.meu_id) then
|
||||
for lado, snap_to in _pairs(instancia.snap) do
|
||||
if (snap_to > instancia.meu_id and snap_to ~= self.meu_id) then
|
||||
@@ -1190,7 +1192,7 @@ function _detalhes:Desagrupar (instancia, lado, lado2)
|
||||
instancia = self
|
||||
end
|
||||
|
||||
if (_type(instancia) == "number") then --significa que passou o n�mero da inst�ncia
|
||||
if (type(instancia) == "number") then --significa que passou o n�mero da inst�ncia
|
||||
instancia = _detalhes.tabela_instancias [instancia]
|
||||
end
|
||||
|
||||
@@ -1203,7 +1205,7 @@ function _detalhes:Desagrupar (instancia, lado, lado2)
|
||||
if (lado < 0) then --clicou no bot�o para desagrupar tudo
|
||||
local ID = instancia.meu_id
|
||||
|
||||
for id, esta_instancia in _ipairs(_detalhes.tabela_instancias) do
|
||||
for id, esta_instancia in ipairs(_detalhes.tabela_instancias) do
|
||||
for index, iid in _pairs(esta_instancia.snap) do -- index = 1 left , 3 right, 2 bottom, 4 top
|
||||
if (iid and (iid == ID or id == ID)) then -- iid = instancia.meu_id
|
||||
|
||||
@@ -1272,7 +1274,7 @@ function _detalhes:Desagrupar (instancia, lado, lado2)
|
||||
end
|
||||
|
||||
function _detalhes:SnapTextures (remove)
|
||||
for id, esta_instancia in _ipairs(_detalhes.tabela_instancias) do
|
||||
for id, esta_instancia in ipairs(_detalhes.tabela_instancias) do
|
||||
if (esta_instancia:IsAtiva()) then
|
||||
if (esta_instancia.baseframe.rodape.esquerdo.have_snap) then
|
||||
if (remove) then
|
||||
@@ -2055,7 +2057,7 @@ function Details:PostponeSwitchToCurrent(instance)
|
||||
end
|
||||
|
||||
function Details:CheckSwitchToCurrent()
|
||||
for _, instance in _ipairs(Details.tabela_instancias) do
|
||||
for _, instance in ipairs(Details.tabela_instancias) do
|
||||
if (instance.ativa and instance.auto_current and instance.baseframe and instance.segmento > 0) then
|
||||
if (instance.is_interacting and instance.last_interaction < Details._tempo) then
|
||||
instance.last_interaction = Details._tempo
|
||||
@@ -2131,7 +2133,6 @@ function _detalhes:AtualizaSegmentos (instancia)
|
||||
end
|
||||
|
||||
function _detalhes:AtualizaSegmentos_AfterCombat (instancia, historico)
|
||||
|
||||
if (instancia.freezed) then
|
||||
return --se esta congelada n�o tem o que fazer
|
||||
end
|
||||
@@ -2161,11 +2162,9 @@ function _detalhes:AtualizaSegmentos_AfterCombat (instancia, historico)
|
||||
instancia:RefreshMainWindow(true)
|
||||
_detalhes:AtualizarJanela (instancia)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
local function ValidateAttribute (atributo, sub_atributo)
|
||||
|
||||
if (atributo == 1) then
|
||||
if (sub_atributo < 0 or sub_atributo > _detalhes.atributos[1]) then
|
||||
return false
|
||||
@@ -2199,7 +2198,6 @@ function _detalhes:SetDisplay(segment, attribute, subAttribute, isInstanceStarup
|
||||
end
|
||||
|
||||
function _detalhes:TrocaTabela(instancia, segmento, atributo, sub_atributo, iniciando_instancia, InstanceMode)
|
||||
|
||||
if (self and self.meu_id and not instancia) then --self � uma inst�ncia
|
||||
InstanceMode = iniciando_instancia
|
||||
iniciando_instancia = sub_atributo
|
||||
@@ -2213,7 +2211,7 @@ function _detalhes:TrocaTabela(instancia, segmento, atributo, sub_atributo, inic
|
||||
iniciando_instancia = nil
|
||||
end
|
||||
|
||||
if (_type(instancia) == "number") then
|
||||
if (type(instancia) == "number") then
|
||||
sub_atributo = atributo
|
||||
atributo = segmento
|
||||
segmento = instancia
|
||||
@@ -2227,7 +2225,7 @@ function _detalhes:TrocaTabela(instancia, segmento, atributo, sub_atributo, inic
|
||||
local update_coolTip = false
|
||||
local sub_attribute_click = false
|
||||
|
||||
if (_type(segmento) == "boolean" and segmento) then --clicou em um sub atributo
|
||||
if (type(segmento) == "boolean" and segmento) then --clicou em um sub atributo
|
||||
sub_attribute_click = true
|
||||
segmento = instancia.segmento
|
||||
|
||||
@@ -2269,13 +2267,15 @@ function _detalhes:TrocaTabela(instancia, segmento, atributo, sub_atributo, inic
|
||||
|
||||
if (not segmento) then
|
||||
segmento = instancia.segmento
|
||||
elseif (_type(segmento) ~= "number") then
|
||||
|
||||
elseif (type(segmento) ~= "number") then
|
||||
segmento = instancia.segmento
|
||||
end
|
||||
|
||||
if (not atributo) then
|
||||
atributo = instancia.atributo
|
||||
elseif (_type(atributo) ~= "number") then
|
||||
|
||||
elseif (type(atributo) ~= "number") then
|
||||
atributo = instancia.atributo
|
||||
end
|
||||
|
||||
@@ -2285,7 +2285,8 @@ function _detalhes:TrocaTabela(instancia, segmento, atributo, sub_atributo, inic
|
||||
else
|
||||
sub_atributo = instancia.sub_atributo_last [atributo]
|
||||
end
|
||||
elseif (_type(sub_atributo) ~= "number") then
|
||||
|
||||
elseif (type(sub_atributo) ~= "number") then
|
||||
sub_atributo = instancia.sub_atributo
|
||||
end
|
||||
|
||||
@@ -2302,7 +2303,6 @@ function _detalhes:TrocaTabela(instancia, segmento, atributo, sub_atributo, inic
|
||||
|
||||
--Muda o segmento caso necess�rio
|
||||
if (segmento ~= current_segmento or _detalhes.initializing or iniciando_instancia) then
|
||||
|
||||
--na troca de segmento, conferir se a instancia esta frozen
|
||||
if (instancia.freezed) then
|
||||
if (not iniciando_instancia) then
|
||||
@@ -2316,6 +2316,7 @@ function _detalhes:TrocaTabela(instancia, segmento, atributo, sub_atributo, inic
|
||||
|
||||
if (segmento == -1) then --overall
|
||||
instancia.showing = _detalhes.tabela_overall
|
||||
|
||||
elseif (segmento == 0) then --combate atual
|
||||
instancia.showing = _detalhes.tabela_vigente
|
||||
--print("==> Changing the Segment now! - classe_instancia.lua 2115")
|
||||
@@ -2339,6 +2340,7 @@ function _detalhes:TrocaTabela(instancia, segmento, atributo, sub_atributo, inic
|
||||
if (instance:GetSegment() >= 0 and instancia:GetSegment() ~= -1) then
|
||||
if (instance.modo == 2 or instance.modo == 3) then
|
||||
--na troca de segmento, conferir se a instancia esta frozen
|
||||
|
||||
if (instance.freezed) then
|
||||
if (not iniciando_instancia) then
|
||||
instance:UnFreeze()
|
||||
@@ -2351,8 +2353,10 @@ function _detalhes:TrocaTabela(instancia, segmento, atributo, sub_atributo, inic
|
||||
|
||||
if (segmento == -1) then --overall
|
||||
instance.showing = _detalhes.tabela_overall
|
||||
|
||||
elseif (segmento == 0) then --combate atual
|
||||
instance.showing = _detalhes.tabela_vigente; --print("==> Changing the Segment now! - classe_instancia.lua 2148")
|
||||
|
||||
else --alguma tabela do hist�rico
|
||||
instance.showing = _detalhes.tabela_historico.tabelas [segmento]
|
||||
end
|
||||
@@ -2378,7 +2382,6 @@ function _detalhes:TrocaTabela(instancia, segmento, atributo, sub_atributo, inic
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--Muda o atributo caso necess�rio
|
||||
@@ -2390,7 +2393,6 @@ function _detalhes:TrocaTabela(instancia, segmento, atributo, sub_atributo, inic
|
||||
end
|
||||
|
||||
if (atributo ~= current_atributo or _detalhes.initializing or iniciando_instancia or (instancia.modo == modo_alone or instancia.modo == modo_raid)) then
|
||||
|
||||
if (instancia.modo == modo_alone and not (_detalhes.initializing or iniciando_instancia)) then
|
||||
if (_detalhes.SoloTables.Mode == #_detalhes.SoloTables.Plugins) then
|
||||
_detalhes.popup:Select(1, 1)
|
||||
@@ -2418,7 +2420,6 @@ function _detalhes:TrocaTabela(instancia, segmento, atributo, sub_atributo, inic
|
||||
end
|
||||
|
||||
if (_detalhes.cloud_process) then
|
||||
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg("(debug) instancia #"..instancia.meu_id.." found cloud process.")
|
||||
end
|
||||
@@ -2456,7 +2457,6 @@ function _detalhes:TrocaTabela(instancia, segmento, atributo, sub_atributo, inic
|
||||
|
||||
_detalhes:InstanceCall(_detalhes.CheckPsUpdate)
|
||||
_detalhes:SendEvent("DETAILS_INSTANCE_CHANGEATTRIBUTE", nil, instancia, atributo, sub_atributo)
|
||||
|
||||
end
|
||||
|
||||
if (sub_atributo ~= current_sub_atributo or _detalhes.initializing or iniciando_instancia or atributo_changed) then
|
||||
@@ -2513,7 +2513,6 @@ function _detalhes:GetRaidPluginName()
|
||||
end
|
||||
|
||||
function _detalhes:GetInstanceAttributeText()
|
||||
|
||||
if (self.modo == modo_grupo or self.modo == modo_all) then
|
||||
local attribute = self.atributo
|
||||
local sub_attribute = self.sub_atributo
|
||||
@@ -2542,11 +2541,9 @@ function _detalhes:GetInstanceAttributeText()
|
||||
return "Unknown Plugin"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function _detalhes:MontaRaidOption (instancia)
|
||||
|
||||
local available_plugins = _detalhes.RaidTables:GetAvailablePlugins()
|
||||
|
||||
if (#available_plugins == 0) then
|
||||
@@ -2554,7 +2551,7 @@ function _detalhes:MontaRaidOption (instancia)
|
||||
end
|
||||
|
||||
local amount = 0
|
||||
for index, ptable in _ipairs(available_plugins) do
|
||||
for index, ptable in ipairs(available_plugins) do
|
||||
if (ptable [3].__enabled) then
|
||||
GameCooltip:AddMenu (1, _detalhes.RaidTables.switch, ptable [4], instancia, nil, ptable [1], ptable [2], true) --PluginName, PluginIcon, PluginObject, PluginAbsoluteName
|
||||
amount = amount + 1
|
||||
@@ -2572,7 +2569,7 @@ function _detalhes:MontaRaidOption (instancia)
|
||||
end
|
||||
|
||||
function _detalhes:MontaSoloOption (instancia)
|
||||
for index, ptable in _ipairs(_detalhes.SoloTables.Menu) do
|
||||
for index, ptable in ipairs(_detalhes.SoloTables.Menu) do
|
||||
if (ptable [3].__enabled) then
|
||||
GameCooltip:AddMenu (1, _detalhes.SoloTables.switch, index, nil, nil, ptable [1], ptable [2], true)
|
||||
end
|
||||
@@ -2598,7 +2595,6 @@ local menu_icones = {
|
||||
}
|
||||
|
||||
function _detalhes:MontaAtributosOption (instancia, func)
|
||||
|
||||
func = func or instancia.TrocaTabela
|
||||
|
||||
local checked1 = instancia.atributo
|
||||
@@ -2607,7 +2603,7 @@ function _detalhes:MontaAtributosOption (instancia, func)
|
||||
local options
|
||||
if (atributo_ativo == 5) then --custom
|
||||
options = {Loc ["STRING_CUSTOM_NEW"]}
|
||||
for index, custom in _ipairs(_detalhes.custom) do
|
||||
for index, custom in ipairs(_detalhes.custom) do
|
||||
options [#options+1] = custom.name
|
||||
end
|
||||
else
|
||||
@@ -2673,7 +2669,7 @@ function _detalhes:MontaAtributosOption (instancia, func)
|
||||
|
||||
CoolTip:AddLine("$div", nil, 2, nil, -8, -13)
|
||||
|
||||
for index, custom in _ipairs(_detalhes.custom) do
|
||||
for index, custom in ipairs(_detalhes.custom) do
|
||||
if (custom.temp) then
|
||||
CoolTip:AddLine(custom.name .. Loc ["STRING_CUSTOM_TEMPORARILY"], nil, 2)
|
||||
else
|
||||
@@ -2738,7 +2734,6 @@ local getFineTunedIconCoords = function(attribute, subAttribute)
|
||||
end
|
||||
|
||||
function _detalhes:ChangeIcon(icon)
|
||||
|
||||
local skin = _detalhes.skins [self.skin]
|
||||
if (not skin) then
|
||||
skin = _detalhes.skins [_detalhes.default_skin_to_use]
|
||||
@@ -2826,8 +2821,7 @@ function _detalhes:SetMode (qual)
|
||||
end
|
||||
|
||||
function _detalhes:AlteraModo (instancia, qual, from_mode_menu)
|
||||
|
||||
if (_type(instancia) == "number") then
|
||||
if (type(instancia) == "number") then
|
||||
qual = instancia
|
||||
instancia = self
|
||||
end
|
||||
@@ -2960,11 +2954,9 @@ function _detalhes:AlteraModo (instancia, qual, from_mode_menu)
|
||||
instancia.baseframe.cabecalho.modo_selecao:GetNormalTexture():SetDesaturated(true)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
local function GetDpsHps (_thisActor, key)
|
||||
|
||||
local keyname
|
||||
if (key == "dps") then
|
||||
keyname = "last_dps"
|
||||
@@ -3008,7 +3000,6 @@ local default_format_value3 = function(i, v1, v2)
|
||||
end
|
||||
|
||||
function _detalhes:FormatReportLines (report_table, data, f1, f2, f3)
|
||||
|
||||
f1 = f1 or default_format_value1
|
||||
f2 = f2 or default_format_value2
|
||||
f3 = f3 or default_format_value3
|
||||
@@ -3097,7 +3088,6 @@ end
|
||||
|
||||
--Reportar o que esta na janela da inst�ncia
|
||||
function _detalhes:monta_relatorio (este_relatorio, custom)
|
||||
|
||||
if (custom) then
|
||||
--shrink
|
||||
local report_lines = {}
|
||||
@@ -3160,7 +3150,6 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
|
||||
local name_member = "nome"
|
||||
|
||||
if (not is_current) then
|
||||
|
||||
local total, keyName, keyNameSec, first
|
||||
local container_amount = 0
|
||||
local atributo = self.atributo
|
||||
@@ -3198,14 +3187,17 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
elseif (atributo == 2) then --heal
|
||||
total, keyName, first, container_amount = _detalhes.atributo_heal:RefreshWindow (self, self.showing, true, true)
|
||||
|
||||
if (self.sub_atributo == 1) then
|
||||
keyNameSec = "hps"
|
||||
end
|
||||
|
||||
elseif (atributo == 3) then --energy
|
||||
total, keyName, first, container_amount = _detalhes.atributo_energy:RefreshWindow (self, self.showing, true, true)
|
||||
|
||||
elseif (atributo == 4) then --misc
|
||||
if (self.sub_atributo == 5) then --mortes
|
||||
|
||||
@@ -3220,6 +3212,7 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
|
||||
else
|
||||
total, keyName, first, container_amount = _detalhes.atributo_misc:RefreshWindow (self, self.showing, true, true)
|
||||
end
|
||||
|
||||
elseif (atributo == 5) then --custom
|
||||
|
||||
if (_detalhes.custom [self.sub_atributo]) then
|
||||
@@ -3241,9 +3234,7 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
|
||||
|
||||
for i = 1, container_amount do
|
||||
local actor = container [i]
|
||||
|
||||
if (actor) then
|
||||
|
||||
-- get the total
|
||||
local amount, is_string
|
||||
if (type(actor [keyName]) == "number") then
|
||||
@@ -3296,9 +3287,7 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
|
||||
end
|
||||
_detalhes:FormatReportLines (report_lines, raw_data_to_report, report_name_function, report_amount_function, report_build_line)
|
||||
end
|
||||
|
||||
else
|
||||
|
||||
local raw_data_to_report = {}
|
||||
|
||||
for i = 1, amt do
|
||||
@@ -3319,11 +3308,9 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
|
||||
end
|
||||
|
||||
return self:envia_relatorio (report_lines)
|
||||
|
||||
end
|
||||
|
||||
function _detalhes:envia_relatorio (linhas, custom)
|
||||
|
||||
local segmento = self.segmento
|
||||
local luta = nil
|
||||
local combatObject
|
||||
@@ -3492,8 +3479,8 @@ function _detalhes:envia_relatorio (linhas, custom)
|
||||
--adicionar o tempo de luta
|
||||
local segmentTime = ""
|
||||
if (combatObject) then
|
||||
local time = combatObject:GetCombatTime()
|
||||
segmentTime = _detalhes.gump:IntegerToTimer (time or 0)
|
||||
local combatTime = combatObject:GetCombatTime()
|
||||
segmentTime = _detalhes.gump:IntegerToTimer (combatTime or 0)
|
||||
end
|
||||
|
||||
--effective ou active time
|
||||
|
||||
+19
-19
@@ -5,14 +5,14 @@ local _math_floor = math.floor
|
||||
local _table_sort = table.sort
|
||||
local _table_insert = table.insert
|
||||
local _setmetatable = setmetatable
|
||||
local _ipairs = ipairs
|
||||
local ipairs = ipairs
|
||||
local _pairs = pairs
|
||||
local _rawget= rawget
|
||||
local _math_min = math.min
|
||||
local _math_max = math.max
|
||||
local _bit_band = bit.band
|
||||
local _unpack = unpack
|
||||
local _type = type
|
||||
local type = type
|
||||
--api locals
|
||||
local _GetSpellInfo = _detalhes.getspellinfo
|
||||
local GameTooltip = GameTooltip
|
||||
@@ -298,7 +298,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
amount = _detalhes:ContainerSortResources (conteudo, amount, "resource")
|
||||
instancia.top = conteudo[1].resource
|
||||
|
||||
for index, player in _ipairs(conteudo) do
|
||||
for index, player in ipairs(conteudo) do
|
||||
if (player.resource >= 1) then
|
||||
total = total + player.resource
|
||||
else
|
||||
@@ -309,7 +309,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
elseif (modo == modo_GROUP) then
|
||||
_table_sort (conteudo, _detalhes.SortKeyGroupResources)
|
||||
|
||||
for index, player in _ipairs(conteudo) do
|
||||
for index, player in ipairs(conteudo) do
|
||||
if (player.grupo) then --� um player e esta em grupo
|
||||
if (player.resource < 1) then --dano menor que 1, interromper o loop
|
||||
amount = index - 1
|
||||
@@ -371,7 +371,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
end
|
||||
|
||||
if (exportar) then
|
||||
if (_type(exportar) == "boolean") then
|
||||
if (type(exportar) == "boolean") then
|
||||
--keyName = "received"
|
||||
else
|
||||
keyName = exportar.key
|
||||
@@ -416,7 +416,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
|
||||
_table_sort (conteudo, sort_alternateenergy_group)
|
||||
|
||||
for index, player in _ipairs(conteudo) do
|
||||
for index, player in ipairs(conteudo) do
|
||||
if (player.grupo) then
|
||||
if (player.alternatepower < 1) then
|
||||
amount = index - 1
|
||||
@@ -435,7 +435,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
|
||||
_table_sort (conteudo, sort_energy_group)
|
||||
|
||||
for index, player in _ipairs(conteudo) do
|
||||
for index, player in ipairs(conteudo) do
|
||||
if (player.grupo) then
|
||||
if (player.received < 1) then
|
||||
amount = index - 1
|
||||
@@ -488,7 +488,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
if (following) then
|
||||
if (using_cache) then
|
||||
local pname = _detalhes.playername
|
||||
for i, actor in _ipairs(conteudo) do
|
||||
for i, actor in ipairs(conteudo) do
|
||||
if (actor.nome == pname) then
|
||||
myPos = i
|
||||
break
|
||||
@@ -864,7 +864,7 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
|
||||
--spells:
|
||||
local i = 1
|
||||
|
||||
for index, actor in _ipairs(container._ActorTable) do
|
||||
for index, actor in ipairs(container._ActorTable) do
|
||||
if (actor.powertype == powertype) then
|
||||
|
||||
for spellid, spell in _pairs(actor.spells._ActorTable) do
|
||||
@@ -934,7 +934,7 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
|
||||
reset_tooltips_table()
|
||||
i = 1
|
||||
|
||||
for index, actor in _ipairs(container._ActorTable) do
|
||||
for index, actor in ipairs(container._ActorTable) do
|
||||
if (actor.powertype == powertype) then
|
||||
|
||||
local on_self = actor.targets [name]
|
||||
@@ -1066,7 +1066,7 @@ function atributo_energy:MontaInfoRegenRecebido()
|
||||
--spells:
|
||||
local i = 1
|
||||
|
||||
for index, actor in _ipairs(container._ActorTable) do
|
||||
for index, actor in ipairs(container._ActorTable) do
|
||||
if (actor.powertype == powertype) then
|
||||
|
||||
for spellid, spell in _pairs(actor.spells._ActorTable) do
|
||||
@@ -1106,7 +1106,7 @@ function atributo_energy:MontaInfoRegenRecebido()
|
||||
gump:JI_AtualizaContainerBarras (amt)
|
||||
local max_ = energy_tooltips_table [1][2]
|
||||
|
||||
for index, tabela in _ipairs(energy_tooltips_table) do
|
||||
for index, tabela in ipairs(energy_tooltips_table) do
|
||||
|
||||
if (tabela [2] < 1) then
|
||||
break
|
||||
@@ -1142,7 +1142,7 @@ function atributo_energy:MontaInfoRegenRecebido()
|
||||
reset_tooltips_table()
|
||||
i = 1
|
||||
|
||||
for index, actor in _ipairs(container._ActorTable) do
|
||||
for index, actor in ipairs(container._ActorTable) do
|
||||
if (actor.powertype == powertype) then
|
||||
|
||||
local on_self = actor.targets [my_name]
|
||||
@@ -1168,7 +1168,7 @@ function atributo_energy:MontaInfoRegenRecebido()
|
||||
local max_fontes = energy_tooltips_table[1][2]
|
||||
|
||||
local barra
|
||||
for index, tabela in _ipairs(energy_tooltips_table) do
|
||||
for index, tabela in ipairs(energy_tooltips_table) do
|
||||
|
||||
if (tabela [2] < 1) then
|
||||
break
|
||||
@@ -1213,7 +1213,7 @@ end
|
||||
|
||||
function atributo_energy:MontaDetalhesRegenRecebido (nome, barra)
|
||||
|
||||
for _, barra in _ipairs(info.barras3) do
|
||||
for _, barra in ipairs(info.barras3) do
|
||||
barra:Hide()
|
||||
end
|
||||
|
||||
@@ -1235,7 +1235,7 @@ function atributo_energy:MontaDetalhesRegenRecebido (nome, barra)
|
||||
--spells:
|
||||
local i = 1
|
||||
|
||||
for index, actor in _ipairs(container._ActorTable) do
|
||||
for index, actor in ipairs(container._ActorTable) do
|
||||
if (actor.powertype == powertype) then
|
||||
local spell = actor.spells._ActorTable [spellid]
|
||||
if (spell) then
|
||||
@@ -1264,7 +1264,7 @@ function atributo_energy:MontaDetalhesRegenRecebido (nome, barra)
|
||||
local max_ = energy_tooltips_table [1][2]
|
||||
|
||||
local barra
|
||||
for index, tabela in _ipairs(from) do
|
||||
for index, tabela in ipairs(from) do
|
||||
|
||||
if (tabela [2] < 1) then
|
||||
break
|
||||
@@ -1338,7 +1338,7 @@ function atributo_energy:MontaTooltipAlvos (esta_barra, index)
|
||||
|
||||
--print(i, #energy_tooltips_table)
|
||||
|
||||
for index, spell in _ipairs(energy_tooltips_table) do
|
||||
for index, spell in ipairs(energy_tooltips_table) do
|
||||
if (spell [2] < 1) then
|
||||
break
|
||||
end
|
||||
@@ -1467,7 +1467,7 @@ end
|
||||
end
|
||||
|
||||
--pets (add unique pet names)
|
||||
for _, petName in _ipairs(actor.pets) do
|
||||
for _, petName in ipairs(actor.pets) do
|
||||
DetailsFramework.table.addunique (shadow.pets, petName)
|
||||
end
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--local pointers
|
||||
local _ipairs = ipairs--lua local
|
||||
local ipairs = ipairs--lua local
|
||||
local _pairs = pairs--lua local
|
||||
local _UnitAura = UnitAura--api local
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
if (ThisDebuff) then
|
||||
local ThisDebuffOnTarget = ThisDebuff [serial]
|
||||
if (ThisDebuffOnTarget) then
|
||||
for index, buff_name in _ipairs(ThisDebuffOnTarget.buffs) do
|
||||
for index, buff_name in ipairs(ThisDebuffOnTarget.buffs) do
|
||||
local buff_info = SpellBuffDetails [buff_name] or {["counter"] = 0, ["total"] = 0, ["critico"] = 0, ["critico_dano"] = 0}
|
||||
buff_info.counter = buff_info.counter+1
|
||||
buff_info.total = buff_info.total+amount
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
--local pointers
|
||||
|
||||
local _setmetatable = setmetatable --lua local
|
||||
local _ipairs = ipairs --lua local
|
||||
local ipairs = ipairs --lua local
|
||||
local _UnitAura = UnitAura --api local
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
--local pointers
|
||||
|
||||
local _setmetatable = setmetatable --lua local
|
||||
local _ipairs = ipairs --lua local
|
||||
local ipairs = ipairs --lua local
|
||||
local _UnitAura = UnitAura --api local
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
+17
-17
@@ -8,10 +8,10 @@ local pairs = pairs
|
||||
local _rawget= rawget
|
||||
local min = math.min
|
||||
local _math_max = math.max
|
||||
local _math_abs = math.abs
|
||||
local abs = math.abs
|
||||
local _bit_band = bit.band
|
||||
local unpack = unpack
|
||||
local _type = type
|
||||
local type = type
|
||||
--api locals
|
||||
local _GetSpellInfo = _detalhes.getspellinfo
|
||||
local GameTooltip = GameTooltip
|
||||
@@ -228,10 +228,10 @@ function Details:ShowDeathTooltip(combatObject, deathTable)
|
||||
local evType = event[1]
|
||||
local spellName, _, spellIcon = _GetSpellInfo(event[2])
|
||||
local amount = event[3]
|
||||
local time = event[4]
|
||||
local eventTime = event[4]
|
||||
local source = event[6]
|
||||
|
||||
if (time + 12 > timeOfDeath) then
|
||||
if (eventTime + 12 > timeOfDeath) then
|
||||
if (type(evType) == "boolean") then
|
||||
--is damage or heal?
|
||||
if (evType) then --bool true
|
||||
@@ -252,10 +252,10 @@ function Details:ShowDeathTooltip(combatObject, deathTable)
|
||||
--end
|
||||
|
||||
overkill = " (" .. Details:ToK(overkill) .. " |cFFFF8800overkill|r)"
|
||||
gameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s |cFFFFFF00" .. spellName .. "|r (|cFFC6B0D9" .. source .. "|r)", "-" .. Details:ToK(amount) .. critOrCrush .. overkill .. " (" .. healthPercent .. "%)", 1, "white", "white")
|
||||
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s |cFFFFFF00" .. spellName .. "|r (|cFFC6B0D9" .. source .. "|r)", "-" .. Details:ToK(amount) .. critOrCrush .. overkill .. " (" .. healthPercent .. "%)", 1, "white", "white")
|
||||
else
|
||||
overkill = ""
|
||||
gameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "-" .. Details:ToK(amount) .. critOrCrush .. overkill .. " (" .. healthPercent .. "%)", 1, "white", "white")
|
||||
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "-" .. Details:ToK(amount) .. critOrCrush .. overkill .. " (" .. healthPercent .. "%)", 1, "white", "white")
|
||||
end
|
||||
|
||||
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
|
||||
@@ -272,12 +272,12 @@ function Details:ShowDeathTooltip(combatObject, deathTable)
|
||||
if (amount > Details.deathlog_healingdone_min) then
|
||||
if (combatObject.is_arena) then
|
||||
if (amount > Details.deathlog_healingdone_min_arena) then
|
||||
gameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. Details:ToK(amount) .. " (" .. healthPercent .. "%)", 1, "white", "white")
|
||||
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. Details:ToK(amount) .. " (" .. healthPercent .. "%)", 1, "white", "white")
|
||||
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
|
||||
gameCooltip:AddStatusBar(healthPercent, 1, barTypeColors.heal, true)
|
||||
end
|
||||
else
|
||||
gameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. Details:ToK(amount) .. " (" .. healthPercent .. "%)", 1, "white", "white")
|
||||
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. Details:ToK(amount) .. " (" .. healthPercent .. "%)", 1, "white", "white")
|
||||
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
|
||||
gameCooltip:AddStatusBar(healthPercent, 1, barTypeColors.heal, true)
|
||||
end
|
||||
@@ -287,7 +287,7 @@ function Details:ShowDeathTooltip(combatObject, deathTable)
|
||||
elseif (type(evType) == "number") then
|
||||
if (evType == 1) then
|
||||
--cooldown
|
||||
gameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s " .. spellName .. " (" .. source .. ")", "cooldown (" .. healthPercent .. "%)", 1, "white", "white")
|
||||
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (" .. source .. ")", "cooldown (" .. healthPercent .. "%)", 1, "white", "white")
|
||||
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
|
||||
gameCooltip:AddStatusBar(100, 1, barTypeColors.cooldown, true)
|
||||
|
||||
@@ -301,7 +301,7 @@ function Details:ShowDeathTooltip(combatObject, deathTable)
|
||||
|
||||
elseif (evType == 4) then
|
||||
--debuff
|
||||
gameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s [x" .. amount .. "] " .. spellName .. " (" .. source .. ")", "debuff (" .. healthPercent .. "%)", 1, "white", "white")
|
||||
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s [x" .. amount .. "] " .. spellName .. " (" .. source .. ")", "debuff (" .. healthPercent .. "%)", 1, "white", "white")
|
||||
gameCooltip:AddIcon(spellIcon)
|
||||
gameCooltip:AddStatusBar(100, 1, barTypeColors.debuff, true)
|
||||
|
||||
@@ -524,7 +524,7 @@ function atributo_misc:ReportSingleCooldownLine (misc_actor, instancia)
|
||||
end
|
||||
|
||||
local buff_format_name = function(spellid)
|
||||
if (_type(spellid) == "string") then
|
||||
if (type(spellid) == "string") then
|
||||
return spellid
|
||||
end
|
||||
return _detalhes:GetSpellLink(spellid)
|
||||
@@ -664,7 +664,7 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
local modo = instancia.modo
|
||||
|
||||
if (exportar) then
|
||||
if (_type(exportar) == "boolean") then
|
||||
if (type(exportar) == "boolean") then
|
||||
if (sub_atributo == 1) then --CC BREAKS
|
||||
keyName = "cc_break"
|
||||
elseif (sub_atributo == 2) then --RESS
|
||||
@@ -2445,7 +2445,7 @@ end
|
||||
|
||||
local somar_keys = function(habilidade, habilidade_tabela1)
|
||||
for key, value in pairs(habilidade) do
|
||||
if (_type(value) == "number") then
|
||||
if (type(value) == "number") then
|
||||
if (key ~= "id" and key ~= "spellschool") then
|
||||
habilidade_tabela1 [key] = (habilidade_tabela1 [key] or 0) + value
|
||||
end
|
||||
@@ -2573,7 +2573,7 @@ function atributo_misc:r_connect_shadow (actor, no_refresh, combat_object)
|
||||
shadow.debuff_uptime = shadow.debuff_uptime + actor.debuff_uptime
|
||||
|
||||
for target_name, amount in pairs(actor.debuff_uptime_targets) do
|
||||
if (_type(amount) == "table") then --boss debuff
|
||||
if (type(amount) == "table") then --boss debuff
|
||||
local t = shadow.debuff_uptime_targets [target_name]
|
||||
if (not t) then
|
||||
shadow.debuff_uptime_targets [target_name] = atributo_misc:CreateBuffTargetObject()
|
||||
@@ -2961,7 +2961,7 @@ atributo_misc.__add = function(tabela1, tabela2)
|
||||
tabela1.debuff_uptime = tabela1.debuff_uptime + tabela2.debuff_uptime
|
||||
|
||||
for target_name, amount in pairs(tabela2.debuff_uptime_targets) do
|
||||
if (_type(amount) == "table") then --boss debuff
|
||||
if (type(amount) == "table") then --boss debuff
|
||||
local t = tabela1.debuff_uptime_targets [target_name]
|
||||
if (not t) then
|
||||
tabela1.debuff_uptime_targets [target_name] = atributo_misc:CreateBuffTargetObject()
|
||||
@@ -3112,7 +3112,7 @@ end
|
||||
|
||||
local subtrair_keys = function(habilidade, habilidade_tabela1)
|
||||
for key, value in pairs(habilidade) do
|
||||
if (_type(value) == "number") then
|
||||
if (type(value) == "number") then
|
||||
if (key ~= "id" and key ~= "spellschool") then
|
||||
habilidade_tabela1 [key] = (habilidade_tabela1 [key] or 0) - value
|
||||
end
|
||||
@@ -3197,7 +3197,7 @@ atributo_misc.__sub = function(tabela1, tabela2)
|
||||
tabela1.debuff_uptime = tabela1.debuff_uptime - tabela2.debuff_uptime
|
||||
|
||||
for target_name, amount in pairs(tabela2.debuff_uptime_targets) do
|
||||
if (_type(amount) == "table") then --boss debuff
|
||||
if (type(amount) == "table") then --boss debuff
|
||||
local t = tabela1.debuff_uptime_targets [target_name]
|
||||
if (not t) then
|
||||
tabela1.debuff_uptime_targets [target_name] = atributo_misc:CreateBuffTargetObject()
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
local _getmetatable = getmetatable --lua local
|
||||
local _bit_band = bit.band --lua local
|
||||
local _table_sort = table.sort --lua local
|
||||
local _ipairs = ipairs --lua local
|
||||
local ipairs = ipairs --lua local
|
||||
local _pairs = pairs --lua local
|
||||
|
||||
local AddUnique = DetailsFramework.table.addunique --framework
|
||||
@@ -120,7 +120,7 @@
|
||||
function container_combatentes:GetTotal (key)
|
||||
local total = 0
|
||||
key = key or "total"
|
||||
for _, actor in _ipairs(self._ActorTable) do
|
||||
for _, actor in ipairs(self._ActorTable) do
|
||||
total = total + (actor [key] or 0)
|
||||
end
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
local total = 0
|
||||
key = key or "total"
|
||||
local roster = combat.raid_roster
|
||||
for _, actor in _ipairs(self._ActorTable) do
|
||||
for _, actor in ipairs(self._ActorTable) do
|
||||
if (roster [actor.nome]) then
|
||||
total = total + (actor [key] or 0)
|
||||
end
|
||||
@@ -141,7 +141,7 @@
|
||||
end
|
||||
|
||||
function container_combatentes:ListActors()
|
||||
return _ipairs(self._ActorTable)
|
||||
return ipairs(self._ActorTable)
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -845,7 +845,7 @@
|
||||
|
||||
--chama a fun��o para ser executada em todos os atores
|
||||
function container_combatentes:ActorCallFunction (funcao, ...)
|
||||
for index, actor in _ipairs(self._ActorTable) do
|
||||
for index, actor in ipairs(self._ActorTable) do
|
||||
funcao (nil, actor, ...)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -14,7 +14,7 @@ local _GetNumGroupMembers = _G.GetNumGroupMembers
|
||||
local _setmetatable = setmetatable
|
||||
local _bit_band = bit.band --lua local
|
||||
local _pairs = pairs
|
||||
local _ipairs = ipairs
|
||||
local ipairs = ipairs
|
||||
local _table_wipe = table.wipe
|
||||
|
||||
--details locals
|
||||
|
||||
+146
-153
@@ -1,135 +1,130 @@
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale( "Details" )
|
||||
|
||||
--lua api
|
||||
local _table_remove = table.remove
|
||||
local _table_insert = table.insert
|
||||
local _setmetatable = setmetatable
|
||||
local _table_wipe = table.wipe
|
||||
local tremove = table.remove
|
||||
local tinsert = table.insert
|
||||
local wipe = table.wipe
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local gump = _detalhes.gump
|
||||
|
||||
local combate = _detalhes.combate
|
||||
local historico = _detalhes.historico
|
||||
local barra_total = _detalhes.barra_total
|
||||
local container_pets = _detalhes.container_pets
|
||||
local timeMachine = _detalhes.timeMachine
|
||||
local Details = _G._detalhes
|
||||
local combatClass = Details.combate
|
||||
local segmentClass = Details.historico
|
||||
local timeMachine = Details.timeMachine
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--API
|
||||
|
||||
--reset only the overall data
|
||||
function _detalhes:ResetSegmentOverallData()
|
||||
return historico:resetar_overall()
|
||||
function Details:ResetSegmentOverallData()
|
||||
return segmentClass:resetar_overall()
|
||||
end
|
||||
|
||||
--reset segments and overall data
|
||||
function _detalhes:ResetSegmentData()
|
||||
return historico:resetar()
|
||||
function Details:ResetSegmentData()
|
||||
return segmentClass:resetar()
|
||||
end
|
||||
|
||||
--returns the current active segment
|
||||
function _detalhes:GetCurrentCombat()
|
||||
return _detalhes.tabela_vigente
|
||||
function Details:GetCurrentCombat()
|
||||
return Details.tabela_vigente
|
||||
end
|
||||
|
||||
--returns a private table containing all stored segments
|
||||
function _detalhes:GetCombatSegments()
|
||||
return _detalhes.tabela_historico.tabelas
|
||||
function Details:GetCombatSegments()
|
||||
return Details.tabela_historico.tabelas
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--internal
|
||||
|
||||
function historico:NovoHistorico()
|
||||
function segmentClass:NovoHistorico()
|
||||
local esta_tabela = {tabelas = {}}
|
||||
_setmetatable (esta_tabela, historico)
|
||||
setmetatable(esta_tabela, segmentClass)
|
||||
return esta_tabela
|
||||
end
|
||||
|
||||
function historico:adicionar_overall (tabela)
|
||||
|
||||
function segmentClass:adicionar_overall (tabela)
|
||||
local zoneName, zoneType = GetInstanceInfo()
|
||||
if (zoneType ~= "none" and tabela:GetCombatTime() <= _detalhes.minimum_overall_combat_time) then
|
||||
if (zoneType ~= "none" and tabela:GetCombatTime() <= Details.minimum_overall_combat_time) then
|
||||
return
|
||||
end
|
||||
|
||||
if (_detalhes.overall_clear_newboss) then
|
||||
if (Details.overall_clear_newboss) then
|
||||
--only for raids
|
||||
if (tabela.instance_type == "raid" and tabela.is_boss) then
|
||||
if (_detalhes.last_encounter ~= _detalhes.last_encounter2) then
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("(debug) new boss detected 'overall_clear_newboss' is true, cleaning overall data.")
|
||||
if (Details.last_encounter ~= Details.last_encounter2) then
|
||||
if (Details.debug) then
|
||||
Details:Msg("(debug) new boss detected 'overall_clear_newboss' is true, cleaning overall data.")
|
||||
end
|
||||
for index, combat in ipairs(_detalhes.tabela_historico.tabelas) do
|
||||
for index, combat in ipairs(Details.tabela_historico.tabelas) do
|
||||
combat.overall_added = false
|
||||
end
|
||||
historico:resetar_overall()
|
||||
segmentClass:resetar_overall()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (tabela.overall_added) then
|
||||
_detalhes:Msg ("error > attempt to add a segment already added > func historico:adicionar_overall()")
|
||||
Details:Msg("error > attempt to add a segment already added > func historico:adicionar_overall()")
|
||||
return
|
||||
end
|
||||
|
||||
local mythicInfo = tabela.is_mythic_dungeon
|
||||
if (mythicInfo) then
|
||||
--do not add overall mythic+ dungeon segments
|
||||
if (mythicInfo.TrashOverallSegment) then
|
||||
_detalhes:Msg ("error > attempt to add a TrashOverallSegment > func historico:adicionar_overall()")
|
||||
Details:Msg("error > attempt to add a TrashOverallSegment > func historico:adicionar_overall()")
|
||||
return
|
||||
elseif (mythicInfo.OverallSegment) then
|
||||
_detalhes:Msg ("error > attempt to add a OverallSegment > func historico:adicionar_overall()")
|
||||
Details:Msg("error > attempt to add a OverallSegment > func historico:adicionar_overall()")
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
--store the segments added to the overall data
|
||||
_detalhes.tabela_overall.segments_added = _detalhes.tabela_overall.segments_added or {}
|
||||
Details.tabela_overall.segments_added = Details.tabela_overall.segments_added or {}
|
||||
local this_clock = tabela.data_inicio
|
||||
|
||||
local combatName = tabela:GetCombatName(true)
|
||||
local combatTime = tabela:GetCombatTime()
|
||||
local combatType = tabela:GetCombatType()
|
||||
|
||||
tinsert(_detalhes.tabela_overall.segments_added, 1, {name = combatName, elapsed = combatTime, clock = this_clock, type = combatType})
|
||||
tinsert(Details.tabela_overall.segments_added, 1, {name = combatName, elapsed = combatTime, clock = this_clock, type = combatType})
|
||||
|
||||
if (#_detalhes.tabela_overall.segments_added > 40) then
|
||||
tremove (_detalhes.tabela_overall.segments_added, 41)
|
||||
if (#Details.tabela_overall.segments_added > 40) then
|
||||
tremove(Details.tabela_overall.segments_added, 41)
|
||||
end
|
||||
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("(debug) adding the segment to overall data: " .. (tabela:GetCombatName (true) or "no name") .. " with time of: " .. (tabela:GetCombatTime() or "no time"))
|
||||
if (Details.debug) then
|
||||
Details:Msg("(debug) adding the segment to overall data: " .. (tabela:GetCombatName(true) or "no name") .. " with time of: " .. (tabela:GetCombatTime() or "no time"))
|
||||
end
|
||||
|
||||
_detalhes.tabela_overall = _detalhes.tabela_overall + tabela
|
||||
Details.tabela_overall = Details.tabela_overall + tabela
|
||||
tabela.overall_added = true
|
||||
|
||||
if (not _detalhes.tabela_overall.overall_enemy_name) then
|
||||
_detalhes.tabela_overall.overall_enemy_name = tabela.is_boss and tabela.is_boss.name or tabela.enemy
|
||||
if (not Details.tabela_overall.overall_enemy_name) then
|
||||
Details.tabela_overall.overall_enemy_name = tabela.is_boss and tabela.is_boss.name or tabela.enemy
|
||||
else
|
||||
if (_detalhes.tabela_overall.overall_enemy_name ~= (tabela.is_boss and tabela.is_boss.name or tabela.enemy)) then
|
||||
_detalhes.tabela_overall.overall_enemy_name = "-- x -- x --"
|
||||
if (Details.tabela_overall.overall_enemy_name ~= (tabela.is_boss and tabela.is_boss.name or tabela.enemy)) then
|
||||
Details.tabela_overall.overall_enemy_name = "-- x -- x --"
|
||||
end
|
||||
end
|
||||
|
||||
if (_detalhes.tabela_overall.start_time == 0) then
|
||||
_detalhes.tabela_overall:SetStartTime (tabela.start_time)
|
||||
_detalhes.tabela_overall:SetEndTime (tabela.end_time)
|
||||
if (Details.tabela_overall.start_time == 0) then
|
||||
Details.tabela_overall:SetStartTime (tabela.start_time)
|
||||
Details.tabela_overall:SetEndTime (tabela.end_time)
|
||||
else
|
||||
_detalhes.tabela_overall:SetStartTime (tabela.start_time - _detalhes.tabela_overall:GetCombatTime())
|
||||
_detalhes.tabela_overall:SetEndTime (tabela.end_time)
|
||||
Details.tabela_overall:SetStartTime (tabela.start_time - Details.tabela_overall:GetCombatTime())
|
||||
Details.tabela_overall:SetEndTime (tabela.end_time)
|
||||
end
|
||||
|
||||
if (_detalhes.tabela_overall.data_inicio == 0) then
|
||||
_detalhes.tabela_overall.data_inicio = _detalhes.tabela_vigente.data_inicio or 0
|
||||
if (Details.tabela_overall.data_inicio == 0) then
|
||||
Details.tabela_overall.data_inicio = Details.tabela_vigente.data_inicio or 0
|
||||
end
|
||||
|
||||
_detalhes.tabela_overall:seta_data (_detalhes._detalhes_props.DATA_TYPE_END)
|
||||
_detalhes:ClockPluginTickOnSegment()
|
||||
Details.tabela_overall:seta_data (Details._detalhes_props.DATA_TYPE_END)
|
||||
Details:ClockPluginTickOnSegment()
|
||||
|
||||
for id, instance in _detalhes:ListInstances() do
|
||||
for id, instance in Details:ListInstances() do
|
||||
if (instance:IsEnabled()) then
|
||||
if (instance:GetSegment() == -1) then
|
||||
instance:ForceRefresh()
|
||||
@@ -138,24 +133,23 @@ function historico:adicionar_overall (tabela)
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:ScheduleAddCombatToOverall (combat) --deprecated (15/03/2019)
|
||||
local canAdd = _detalhes:CanAddCombatToOverall (combat)
|
||||
function Details:ScheduleAddCombatToOverall (combat) --deprecated (15/03/2019)
|
||||
local canAdd = Details:CanAddCombatToOverall (combat)
|
||||
if (canAdd) then
|
||||
_detalhes.schedule_add_to_overall = _detalhes.schedule_add_to_overall or {}
|
||||
tinsert(_detalhes.schedule_add_to_overall, combat)
|
||||
Details.schedule_add_to_overall = Details.schedule_add_to_overall or {}
|
||||
tinsert(Details.schedule_add_to_overall, combat)
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:CanAddCombatToOverall (tabela)
|
||||
|
||||
function Details:CanAddCombatToOverall (tabela)
|
||||
--already added
|
||||
if (tabela.overall_added) then
|
||||
return false
|
||||
end
|
||||
|
||||
--already scheduled to add
|
||||
if (_detalhes.schedule_add_to_overall) then --deprecated
|
||||
for _, combat in ipairs(_detalhes.schedule_add_to_overall) do
|
||||
if (Details.schedule_add_to_overall) then --deprecated
|
||||
for _, combat in ipairs(Details.schedule_add_to_overall) do
|
||||
if (combat == tabela) then
|
||||
return false
|
||||
end
|
||||
@@ -168,13 +162,14 @@ function _detalhes:CanAddCombatToOverall (tabela)
|
||||
--do not add overall mythic+ dungeon segments
|
||||
if (mythicInfo.TrashOverallSegment) then
|
||||
return false
|
||||
|
||||
elseif (mythicInfo.OverallSegment) then
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
--raid boss - flag 0x1
|
||||
if (bit.band (_detalhes.overall_flag, 0x1) ~= 0) then
|
||||
if (bit.band(Details.overall_flag, 0x1) ~= 0) then
|
||||
if (tabela.is_boss and tabela.instance_type == "raid" and not tabela.is_pvp) then
|
||||
if (tabela:GetCombatTime() >= 30) then
|
||||
return true
|
||||
@@ -183,28 +178,28 @@ function _detalhes:CanAddCombatToOverall (tabela)
|
||||
end
|
||||
|
||||
--raid trash - flag 0x2
|
||||
if (bit.band (_detalhes.overall_flag, 0x2) ~= 0) then
|
||||
if (bit.band(Details.overall_flag, 0x2) ~= 0) then
|
||||
if (tabela.is_trash and tabela.instance_type == "raid") then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--dungeon boss - flag 0x4
|
||||
if (bit.band (_detalhes.overall_flag, 0x4) ~= 0) then
|
||||
if (bit.band(Details.overall_flag, 0x4) ~= 0) then
|
||||
if (tabela.is_boss and tabela.instance_type == "party" and not tabela.is_pvp) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--dungeon trash - flag 0x8
|
||||
if (bit.band (_detalhes.overall_flag, 0x8) ~= 0) then
|
||||
if (bit.band(Details.overall_flag, 0x8) ~= 0) then
|
||||
if ((tabela.is_trash or tabela.is_mythic_dungeon_trash) and tabela.instance_type == "party") then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--any combat
|
||||
if (bit.band (_detalhes.overall_flag, 0x10) ~= 0) then
|
||||
if (bit.band(Details.overall_flag, 0x10) ~= 0) then
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -217,27 +212,27 @@ function _detalhes:CanAddCombatToOverall (tabela)
|
||||
end
|
||||
|
||||
--sai do combate, chamou adicionar a tabela ao hist�rico
|
||||
function historico:adicionar (tabela)
|
||||
function segmentClass:adicionar (tabela)
|
||||
|
||||
local tamanho = #self.tabelas
|
||||
|
||||
--verifica se precisa dar UnFreeze()
|
||||
if (tamanho < _detalhes.segments_amount) then --vai preencher um novo index vazio
|
||||
if (tamanho < Details.segments_amount) then --vai preencher um novo index vazio
|
||||
local ultima_tabela = self.tabelas[tamanho]
|
||||
if (not ultima_tabela) then --n�o ha tabelas no historico, esta ser� a #1
|
||||
--pega a tabela do combate atual
|
||||
ultima_tabela = tabela
|
||||
end
|
||||
_detalhes:InstanciaCallFunction (_detalhes.CheckFreeze, tamanho+1, ultima_tabela)
|
||||
Details:InstanciaCallFunction(Details.CheckFreeze, tamanho+1, ultima_tabela)
|
||||
end
|
||||
|
||||
--add to history table
|
||||
_table_insert (self.tabelas, 1, tabela)
|
||||
tinsert(self.tabelas, 1, tabela)
|
||||
|
||||
--count boss tries
|
||||
local boss = tabela.is_boss and tabela.is_boss.name
|
||||
if (boss) then
|
||||
local try_number = _detalhes.encounter_counter [boss]
|
||||
local try_number = Details.encounter_counter [boss]
|
||||
|
||||
if (not try_number) then
|
||||
local previous_combat
|
||||
@@ -253,15 +248,15 @@ function historico:adicionar (tabela)
|
||||
try_number = 1
|
||||
end
|
||||
else
|
||||
try_number = _detalhes.encounter_counter [boss] + 1
|
||||
try_number = Details.encounter_counter [boss] + 1
|
||||
end
|
||||
|
||||
_detalhes.encounter_counter [boss] = try_number
|
||||
Details.encounter_counter [boss] = try_number
|
||||
tabela.is_boss.try_number = try_number
|
||||
end
|
||||
|
||||
--see if can add the encounter to overall data
|
||||
local canAddToOverall = _detalhes:CanAddCombatToOverall (tabela)
|
||||
local canAddToOverall = Details:CanAddCombatToOverall (tabela)
|
||||
|
||||
if (canAddToOverall) then
|
||||
--if (InCombatLockdown()) then
|
||||
@@ -270,10 +265,10 @@ function historico:adicionar (tabela)
|
||||
-- _detalhes:Msg("(debug) overall data flag match > in combat scheduling overall addition.")
|
||||
-- end
|
||||
--else
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("(debug) overall data flag match addind the combat to overall data.")
|
||||
if (Details.debug) then
|
||||
Details:Msg("(debug) overall data flag match addind the combat to overall data.")
|
||||
end
|
||||
historico:adicionar_overall (tabela)
|
||||
segmentClass:adicionar_overall (tabela)
|
||||
--end
|
||||
end
|
||||
|
||||
@@ -301,7 +296,7 @@ function historico:adicionar (tabela)
|
||||
end
|
||||
end
|
||||
|
||||
if (_detalhes.trash_auto_remove) then
|
||||
if (Details.trash_auto_remove) then
|
||||
local _terceiro_combate = self.tabelas[3]
|
||||
|
||||
if (_terceiro_combate and not _terceiro_combate.is_mythic_dungeon_segment) then
|
||||
@@ -319,8 +314,8 @@ function historico:adicionar (tabela)
|
||||
end
|
||||
end
|
||||
--remover
|
||||
_table_remove (self.tabelas, 3)
|
||||
_detalhes:SendEvent("DETAILS_DATA_SEGMENTREMOVED", nil, nil)
|
||||
tremove(self.tabelas, 3)
|
||||
Details:SendEvent("DETAILS_DATA_SEGMENTREMOVED", nil, nil)
|
||||
end
|
||||
|
||||
end
|
||||
@@ -330,7 +325,7 @@ function historico:adicionar (tabela)
|
||||
end
|
||||
|
||||
--verifica se precisa apagar a �ltima tabela do hist�rico
|
||||
if (#self.tabelas > _detalhes.segments_amount) then
|
||||
if (#self.tabelas > Details.segments_amount) then
|
||||
|
||||
local combat_removed, combat_index
|
||||
|
||||
@@ -340,7 +335,7 @@ function historico:adicionar (tabela)
|
||||
local last_segment = self.tabelas [#self.tabelas]
|
||||
local last_bossid = last_segment.is_boss and last_segment.is_boss.id
|
||||
|
||||
if (_detalhes.zone_type == "raid" and bossid and last_bossid and bossid == last_bossid) then
|
||||
if (Details.zone_type == "raid" and bossid and last_bossid and bossid == last_bossid) then
|
||||
|
||||
local shorter_combat
|
||||
local shorter_id
|
||||
@@ -379,17 +374,17 @@ function historico:adicionar (tabela)
|
||||
end
|
||||
|
||||
--remover
|
||||
_table_remove (self.tabelas, combat_index)
|
||||
_detalhes:SendEvent("DETAILS_DATA_SEGMENTREMOVED")
|
||||
tremove(self.tabelas, combat_index)
|
||||
Details:SendEvent("DETAILS_DATA_SEGMENTREMOVED")
|
||||
end
|
||||
|
||||
--chama a fun��o que ir� atualizar as inst�ncias com segmentos no hist�rico
|
||||
_detalhes:InstanciaCallFunction (_detalhes.AtualizaSegmentos_AfterCombat, self)
|
||||
Details:InstanciaCallFunction(Details.AtualizaSegmentos_AfterCombat, self)
|
||||
--_detalhes:InstanciaCallFunction(_detalhes.AtualizarJanela)
|
||||
end
|
||||
|
||||
--verifica se tem alguma instancia congelada mostrando o segmento rec�m liberado
|
||||
function _detalhes:CheckFreeze (instancia, index_liberado, tabela)
|
||||
function Details:CheckFreeze (instancia, index_liberado, tabela)
|
||||
if (instancia.freezed) then --esta congelada
|
||||
if (instancia.segmento == index_liberado) then
|
||||
instancia.showing = tabela
|
||||
@@ -398,127 +393,126 @@ function _detalhes:CheckFreeze (instancia, index_liberado, tabela)
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:SetOverallResetOptions (reset_new_boss, reset_new_challenge, reset_on_logoff, reset_new_pvp)
|
||||
function Details:SetOverallResetOptions (reset_new_boss, reset_new_challenge, reset_on_logoff, reset_new_pvp)
|
||||
if (reset_new_boss == nil) then
|
||||
reset_new_boss = _detalhes.overall_clear_newboss
|
||||
reset_new_boss = Details.overall_clear_newboss
|
||||
end
|
||||
if (reset_new_challenge == nil) then
|
||||
reset_new_challenge = _detalhes.overall_clear_newchallenge
|
||||
reset_new_challenge = Details.overall_clear_newchallenge
|
||||
end
|
||||
if (reset_on_logoff == nil) then
|
||||
reset_on_logoff = _detalhes.overall_clear_logout
|
||||
reset_on_logoff = Details.overall_clear_logout
|
||||
end
|
||||
if (reset_new_pvp == nil) then
|
||||
reset_new_pvp = _detalhes.overall_clear_pvp
|
||||
reset_new_pvp = Details.overall_clear_pvp
|
||||
end
|
||||
|
||||
_detalhes.overall_clear_newboss = reset_new_boss
|
||||
_detalhes.overall_clear_newchallenge = reset_new_challenge
|
||||
_detalhes.overall_clear_logout = reset_on_logoff
|
||||
_detalhes.overall_clear_pvp = reset_new_pvp
|
||||
Details.overall_clear_newboss = reset_new_boss
|
||||
Details.overall_clear_newchallenge = reset_new_challenge
|
||||
Details.overall_clear_logout = reset_on_logoff
|
||||
Details.overall_clear_pvp = reset_new_pvp
|
||||
end
|
||||
|
||||
function historico:resetar_overall()
|
||||
function segmentClass:resetar_overall()
|
||||
--if (InCombatLockdown()) then
|
||||
-- _detalhes:Msg(Loc ["STRING_ERASE_IN_COMBAT"])
|
||||
-- _detalhes.schedule_remove_overall = true
|
||||
--else
|
||||
--fecha a janela de informa��es do jogador
|
||||
_detalhes:FechaJanelaInfo()
|
||||
Details:FechaJanelaInfo()
|
||||
|
||||
_detalhes.tabela_overall = combate:NovaTabela()
|
||||
Details.tabela_overall = combatClass:NovaTabela()
|
||||
|
||||
for index, instancia in ipairs(_detalhes.tabela_instancias) do
|
||||
for index, instancia in ipairs(Details.tabela_instancias) do
|
||||
if (instancia.ativa and instancia.segmento == -1) then
|
||||
instancia:InstanceReset()
|
||||
instancia:ReajustaGump()
|
||||
end
|
||||
end
|
||||
|
||||
if (_detalhes.schedule_add_to_overall) then --deprecated
|
||||
wipe (_detalhes.schedule_add_to_overall)
|
||||
if (Details.schedule_add_to_overall) then --deprecated
|
||||
wipe (Details.schedule_add_to_overall)
|
||||
end
|
||||
--end
|
||||
|
||||
--stop bar testing if any
|
||||
_detalhes:StopTestBarUpdate()
|
||||
Details:StopTestBarUpdate()
|
||||
|
||||
_detalhes:ClockPluginTickOnSegment()
|
||||
Details:ClockPluginTickOnSegment()
|
||||
end
|
||||
|
||||
function historico:resetar()
|
||||
|
||||
if (_detalhes.bosswindow) then
|
||||
_detalhes.bosswindow:Reset()
|
||||
function segmentClass:resetar()
|
||||
if (Details.bosswindow) then
|
||||
Details.bosswindow:Reset()
|
||||
end
|
||||
|
||||
--stop bar testing if any
|
||||
_detalhes:StopTestBarUpdate()
|
||||
Details:StopTestBarUpdate()
|
||||
|
||||
if (_detalhes.tabela_vigente.verifica_combate) then --finaliza a checagem se esta ou n�o no combate
|
||||
_detalhes:CancelTimer (_detalhes.tabela_vigente.verifica_combate)
|
||||
if (Details.tabela_vigente.verifica_combate) then --finaliza a checagem se esta ou n�o no combate
|
||||
Details:CancelTimer(Details.tabela_vigente.verifica_combate)
|
||||
end
|
||||
|
||||
_detalhes.last_closed_combat = nil
|
||||
Details.last_closed_combat = nil
|
||||
|
||||
--remove mythic dungeon schedules if any
|
||||
_detalhes.schedule_mythicdungeon_trash_merge = nil
|
||||
_detalhes.schedule_mythicdungeon_endtrash_merge = nil
|
||||
_detalhes.schedule_mythicdungeon_overallrun_merge = nil
|
||||
Details.schedule_mythicdungeon_trash_merge = nil
|
||||
Details.schedule_mythicdungeon_endtrash_merge = nil
|
||||
Details.schedule_mythicdungeon_overallrun_merge = nil
|
||||
|
||||
--clear other schedules
|
||||
_detalhes.schedule_flag_boss_components = nil
|
||||
_detalhes.schedule_store_boss_encounter = nil
|
||||
Details.schedule_flag_boss_components = nil
|
||||
Details.schedule_store_boss_encounter = nil
|
||||
--_detalhes.schedule_remove_overall = nil
|
||||
|
||||
--fecha a janela de informa��es do jogador
|
||||
_detalhes:FechaJanelaInfo()
|
||||
Details:FechaJanelaInfo()
|
||||
|
||||
--empty temporary tables
|
||||
_detalhes.atributo_damage:ClearTempTables()
|
||||
Details.atributo_damage:ClearTempTables()
|
||||
|
||||
for _, combate in ipairs(_detalhes.tabela_historico.tabelas) do
|
||||
_table_wipe (combate)
|
||||
for _, combate in ipairs(Details.tabela_historico.tabelas) do
|
||||
wipe(combate)
|
||||
end
|
||||
_table_wipe (_detalhes.tabela_vigente)
|
||||
_table_wipe (_detalhes.tabela_overall)
|
||||
_table_wipe (_detalhes.spellcache)
|
||||
wipe(Details.tabela_vigente)
|
||||
wipe(Details.tabela_overall)
|
||||
wipe(Details.spellcache)
|
||||
|
||||
if (_detalhes.schedule_add_to_overall) then --deprecated
|
||||
wipe (_detalhes.schedule_add_to_overall)
|
||||
if (Details.schedule_add_to_overall) then --deprecated
|
||||
wipe (Details.schedule_add_to_overall)
|
||||
end
|
||||
|
||||
_detalhes:LimparPets()
|
||||
_detalhes:ResetSpecCache (true) --for�ar
|
||||
Details:LimparPets()
|
||||
Details:ResetSpecCache (true) --for�ar
|
||||
|
||||
-- novo container de historico
|
||||
_detalhes.tabela_historico = historico:NovoHistorico() --joga fora a tabela antiga e cria uma nova
|
||||
Details.tabela_historico = segmentClass:NovoHistorico() --joga fora a tabela antiga e cria uma nova
|
||||
--novo container para armazenar pets
|
||||
_detalhes.tabela_pets = _detalhes.container_pets:NovoContainer()
|
||||
_detalhes:UpdateContainerCombatentes()
|
||||
_detalhes.container_pets:BuscarPets()
|
||||
Details.tabela_pets = Details.container_pets:NovoContainer()
|
||||
Details:UpdateContainerCombatentes()
|
||||
Details.container_pets:BuscarPets()
|
||||
-- nova tabela do overall e current
|
||||
_detalhes.tabela_overall = combate:NovaTabela() --joga fora a tabela antiga e cria uma nova
|
||||
Details.tabela_overall = combatClass:NovaTabela() --joga fora a tabela antiga e cria uma nova
|
||||
-- cria nova tabela do combate atual
|
||||
_detalhes.tabela_vigente = combate:NovaTabela (nil, _detalhes.tabela_overall)
|
||||
Details.tabela_vigente = combatClass:NovaTabela (nil, Details.tabela_overall)
|
||||
|
||||
--marca o addon como fora de combate
|
||||
_detalhes.in_combat = false
|
||||
Details.in_combat = false
|
||||
--zera o contador de combates
|
||||
_detalhes:NumeroCombate (0)
|
||||
Details:NumeroCombate (0)
|
||||
|
||||
--limpa o cache de magias
|
||||
_detalhes:ClearSpellCache()
|
||||
Details:ClearSpellCache()
|
||||
|
||||
--limpa a tabela de escudos
|
||||
_table_wipe (_detalhes.escudos)
|
||||
wipe(Details.escudos)
|
||||
|
||||
--reinicia a time machine
|
||||
timeMachine:Reiniciar()
|
||||
|
||||
_table_wipe (_detalhes.cache_damage_group)
|
||||
_table_wipe (_detalhes.cache_healing_group)
|
||||
_detalhes:UpdateParserGears()
|
||||
wipe(Details.cache_damage_group)
|
||||
wipe(Details.cache_healing_group)
|
||||
Details:UpdateParserGears()
|
||||
|
||||
if (not InCombatLockdown() and not UnitAffectingCombat ("player")) then
|
||||
--workarround for the "script run too long" issue while outside the combat lockdown
|
||||
@@ -527,25 +521,24 @@ function historico:resetar()
|
||||
end
|
||||
local successful, errortext = pcall (cleargarbage)
|
||||
if (not successful) then
|
||||
_detalhes:Msg ("couldn't call collectgarbage()")
|
||||
Details:Msg("couldn't call collectgarbage()")
|
||||
end
|
||||
else
|
||||
_detalhes.schedule_hard_garbage_collect = true
|
||||
Details.schedule_hard_garbage_collect = true
|
||||
end
|
||||
|
||||
_detalhes:InstanciaCallFunction(_detalhes.AtualizaSegmentos) -- atualiza o instancia.showing para as novas tabelas criadas
|
||||
_detalhes:InstanciaCallFunction(_detalhes.AtualizaSoloMode_AfertReset) -- verifica se precisa zerar as tabela da janela solo mode
|
||||
_detalhes:InstanciaCallFunction(_detalhes.ResetaGump) --_detalhes:ResetaGump ("de todas as instancias")
|
||||
_detalhes:InstanciaCallFunction(Details.FadeHandler.Fader, "IN", nil, "barras")
|
||||
Details:InstanciaCallFunction(Details.AtualizaSegmentos) -- atualiza o instancia.showing para as novas tabelas criadas
|
||||
Details:InstanciaCallFunction(Details.AtualizaSoloMode_AfertReset) -- verifica se precisa zerar as tabela da janela solo mode
|
||||
Details:InstanciaCallFunction(Details.ResetaGump) --_detalhes:ResetaGump ("de todas as instancias")
|
||||
Details:InstanciaCallFunction(Details.FadeHandler.Fader, "IN", nil, "barras")
|
||||
|
||||
_detalhes:RefreshMainWindow(-1) --atualiza todas as instancias
|
||||
|
||||
_detalhes:SendEvent("DETAILS_DATA_RESET", nil, nil)
|
||||
Details:RefreshMainWindow(-1) --atualiza todas as instancias
|
||||
|
||||
Details:SendEvent("DETAILS_DATA_RESET", nil, nil)
|
||||
end
|
||||
|
||||
function _detalhes.refresh:r_historico (este_historico)
|
||||
_setmetatable (este_historico, historico)
|
||||
function Details.refresh:r_historico (este_historico)
|
||||
setmetatable(este_historico, segmentClass)
|
||||
--este_historico.__index = historico
|
||||
end
|
||||
|
||||
|
||||
@@ -22,14 +22,14 @@ local _table_sort = table.sort --lua local
|
||||
local _table_insert = table.insert --lua local
|
||||
local _table_size = table.getn --lua local
|
||||
local _setmetatable = setmetatable --lua local
|
||||
local _ipairs = ipairs --lua local
|
||||
local ipairs = ipairs --lua local
|
||||
local _pairs = pairs --lua local
|
||||
local _rawget= rawget --lua local
|
||||
local _math_min = math.min --lua local
|
||||
local _math_max = math.max --lua local
|
||||
local _bit_band = bit.band --lua local
|
||||
local _unpack = unpack --lua local
|
||||
local _type = type --lua local
|
||||
local type = type --lua local
|
||||
|
||||
local _GetSpellInfo = _detalhes.getspellinfo -- api local
|
||||
local _IsInRaid = IsInRaid -- api local
|
||||
|
||||
@@ -15,14 +15,14 @@
|
||||
local _table_insert = table.insert --lua local
|
||||
local _table_size = table.getn --lua local
|
||||
local _setmetatable = setmetatable --lua local
|
||||
local _ipairs = ipairs --lua local
|
||||
local ipairs = ipairs --lua local
|
||||
local _pairs = pairs --lua local
|
||||
local _rawget= rawget --lua local
|
||||
local _math_min = math.min --lua local
|
||||
local _math_max = math.max --lua local
|
||||
local _bit_band = bit.band --lua local
|
||||
local _unpack = unpack --lua local
|
||||
local _type = type --lua local
|
||||
local type = type --lua local
|
||||
|
||||
local _GetSpellInfo = _detalhes.getspellinfo -- api local
|
||||
local _IsInRaid = IsInRaid -- api local
|
||||
|
||||
+35
-40
@@ -8,23 +8,20 @@
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--local pointers
|
||||
|
||||
local _math_floor = math.floor --lua local
|
||||
local _math_max = math.max --lua local
|
||||
local ipairs = ipairs --lua local
|
||||
local pairs = pairs --lua local
|
||||
local _table_wipe = table.wipe --lua local
|
||||
local _bit_band = bit.band --lua local
|
||||
local wipe = table.wipe --lua local
|
||||
local bitBand = bit.band --lua local
|
||||
|
||||
local _GetInstanceInfo = GetInstanceInfo --wow api local
|
||||
local _UnitExists = UnitExists --wow api local
|
||||
local _UnitGUID = UnitGUID --wow api local
|
||||
local _UnitName = UnitName --wow api local
|
||||
local _GetTime = GetTime
|
||||
local GetInstanceInfo = GetInstanceInfo --wow api local
|
||||
local UnitExists = UnitExists --wow api local
|
||||
local UnitGUID = UnitGUID --wow api local
|
||||
local GetTime = GetTime
|
||||
|
||||
local _IsAltKeyDown = IsAltKeyDown
|
||||
local _IsShiftKeyDown = IsShiftKeyDown
|
||||
local _IsControlKeyDown = IsControlKeyDown
|
||||
local IsAltKeyDown = IsAltKeyDown
|
||||
local IsShiftKeyDown = IsShiftKeyDown
|
||||
local IsControlKeyDown = IsControlKeyDown
|
||||
|
||||
local atributo_damage = Details.atributo_damage --details local
|
||||
local atributo_heal = Details.atributo_heal --details local
|
||||
@@ -37,7 +34,6 @@
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--constants
|
||||
|
||||
local modo_GROUP = Details.modos.group
|
||||
local modo_ALL = Details.modos.all
|
||||
local class_type_dano = Details.atributos.dano
|
||||
@@ -48,8 +44,7 @@
|
||||
|
||||
--try to find the opponent of last fight, can be called during a fight as well
|
||||
function Details:FindEnemy()
|
||||
|
||||
local ZoneName, InstanceType, DifficultyID, _, _, _, _, ZoneMapID = _GetInstanceInfo()
|
||||
local ZoneName, InstanceType, DifficultyID, _, _, _, _, ZoneMapID = GetInstanceInfo()
|
||||
local in_instance = IsInInstance() --garrison returns party as instance type.
|
||||
|
||||
if ((InstanceType == "party" or InstanceType == "raid") and in_instance) then
|
||||
@@ -64,7 +59,7 @@
|
||||
|
||||
for _, actor in ipairs(Details.tabela_vigente[class_type_dano]._ActorTable) do
|
||||
|
||||
if (not actor.grupo and not actor.owner and not actor.nome:find ("[*]") and _bit_band (actor.flag_original, 0x00000060) ~= 0) then --0x20+0x40 neutral + enemy reaction
|
||||
if (not actor.grupo and not actor.owner and not actor.nome:find ("[*]") and bitBand (actor.flag_original, 0x00000060) ~= 0) then --0x20+0x40 neutral + enemy reaction
|
||||
for name, _ in pairs(actor.targets) do
|
||||
if (name == Details.playername) then
|
||||
return actor.nome
|
||||
@@ -166,7 +161,7 @@
|
||||
--catch boss function if any
|
||||
local bossFunction, bossFunctionType = Details:GetBossFunction (ZoneMapID, BossIndex)
|
||||
if (bossFunction) then
|
||||
if (_bit_band (bossFunctionType, 0x1) ~= 0) then --realtime
|
||||
if (bitBand (bossFunctionType, 0x1) ~= 0) then --realtime
|
||||
Details.bossFunction = bossFunction
|
||||
Details.tabela_vigente.bossFunction = Details:ScheduleTimer("bossFunction", 1)
|
||||
end
|
||||
@@ -223,14 +218,14 @@
|
||||
end
|
||||
|
||||
for index = 1, 5, 1 do
|
||||
if (_UnitExists ("boss"..index)) then
|
||||
local guid = _UnitGUID ("boss"..index)
|
||||
if (UnitExists ("boss"..index)) then
|
||||
local guid = UnitGUID("boss"..index)
|
||||
if (guid) then
|
||||
local serial = Details:GetNpcIdFromGuid (guid)
|
||||
|
||||
if (serial) then
|
||||
|
||||
local ZoneName, _, DifficultyID, _, _, _, _, ZoneMapID = _GetInstanceInfo()
|
||||
local ZoneName, _, DifficultyID, _, _, _, _, ZoneMapID = GetInstanceInfo()
|
||||
|
||||
local BossIds = Details:GetBossIds (ZoneMapID)
|
||||
if (BossIds) then
|
||||
@@ -258,7 +253,7 @@
|
||||
return boss_found (encounter_table.index, encounter_table.name, encounter_table.zone, encounter_table.mapid, encounter_table.diff, encounter_table.id)
|
||||
end
|
||||
|
||||
local ZoneName, InstanceType, DifficultyID, _, _, _, _, ZoneMapID = _GetInstanceInfo()
|
||||
local ZoneName, InstanceType, DifficultyID, _, _, _, _, ZoneMapID = GetInstanceInfo()
|
||||
local BossIds = Details:GetBossIds (ZoneMapID)
|
||||
|
||||
if (BossIds) then
|
||||
@@ -354,14 +349,14 @@
|
||||
|
||||
Details:ClearCCPetsBlackList()
|
||||
|
||||
_table_wipe (Details.encounter_end_table)
|
||||
wipe(Details.encounter_end_table)
|
||||
|
||||
_table_wipe (Details.pets_ignored)
|
||||
_table_wipe (Details.pets_no_owner)
|
||||
wipe(Details.pets_ignored)
|
||||
wipe(Details.pets_no_owner)
|
||||
Details.container_pets:BuscarPets()
|
||||
|
||||
_table_wipe (Details.cache_damage_group)
|
||||
_table_wipe (Details.cache_healing_group)
|
||||
wipe(Details.cache_damage_group)
|
||||
wipe(Details.cache_healing_group)
|
||||
Details:UpdateParserGears()
|
||||
|
||||
--get all buff already applied before the combat start
|
||||
@@ -492,7 +487,7 @@
|
||||
|
||||
--still didn't find the boss
|
||||
if (not Details.tabela_vigente.is_boss) then
|
||||
local ZoneName, _, DifficultyID, _, _, _, _, ZoneMapID = _GetInstanceInfo()
|
||||
local ZoneName, _, DifficultyID, _, _, _, _, ZoneMapID = GetInstanceInfo()
|
||||
local findboss = Details:GetRaidBossFindFunction (ZoneMapID)
|
||||
if (findboss) then
|
||||
local BossIndex = findboss()
|
||||
@@ -530,7 +525,7 @@
|
||||
Details.tabela_vigente.player_last_events = {}
|
||||
|
||||
--flag instance type
|
||||
local _, InstanceType = _GetInstanceInfo()
|
||||
local _, InstanceType = GetInstanceInfo()
|
||||
Details.tabela_vigente.instance_type = InstanceType
|
||||
|
||||
if (not Details.tabela_vigente.is_boss and from_encounter_end and type(from_encounter_end) == "table") then
|
||||
@@ -707,7 +702,7 @@
|
||||
--encounter boss function
|
||||
local bossFunction, bossFunctionType = Details:GetBossFunction (Details.tabela_vigente.is_boss.mapid or 0, Details.tabela_vigente.is_boss.index or 0)
|
||||
if (bossFunction) then
|
||||
if (_bit_band (bossFunctionType, 0x2) ~= 0) then --end of combat
|
||||
if (bitBand (bossFunctionType, 0x2) ~= 0) then --end of combat
|
||||
if (not Details.logoff_saving_data) then
|
||||
local successful, errortext = pcall (bossFunction, Details.tabela_vigente)
|
||||
if (not successful) then
|
||||
@@ -832,9 +827,9 @@
|
||||
|
||||
if (Details.tabela_vigente:GetStartTime() == 0) then
|
||||
--Details.tabela_vigente.start_time = Details._tempo
|
||||
Details.tabela_vigente:SetStartTime (_GetTime())
|
||||
Details.tabela_vigente:SetStartTime (GetTime())
|
||||
--Details.tabela_vigente.end_time = Details._tempo
|
||||
Details.tabela_vigente:SetEndTime (_GetTime())
|
||||
Details.tabela_vigente:SetEndTime (GetTime())
|
||||
end
|
||||
|
||||
Details.tabela_vigente.resincked = true
|
||||
@@ -872,11 +867,11 @@
|
||||
Details.leaving_combat = false
|
||||
|
||||
Details:OnCombatPhaseChanged()
|
||||
_table_wipe (Details.tabela_vigente.PhaseData.damage_section)
|
||||
_table_wipe (Details.tabela_vigente.PhaseData.heal_section)
|
||||
wipe(Details.tabela_vigente.PhaseData.damage_section)
|
||||
wipe(Details.tabela_vigente.PhaseData.heal_section)
|
||||
|
||||
_table_wipe (Details.cache_damage_group)
|
||||
_table_wipe (Details.cache_healing_group)
|
||||
wipe(Details.cache_damage_group)
|
||||
wipe(Details.cache_healing_group)
|
||||
|
||||
Details:UpdateParserGears()
|
||||
|
||||
@@ -893,7 +888,7 @@
|
||||
|
||||
--do not wipe the encounter table if is in the argus encounter ~REMOVE on 8.0
|
||||
if (Details.encounter_table and Details.encounter_table.id ~= 2092) then
|
||||
_table_wipe (Details.encounter_table)
|
||||
wipe(Details.encounter_table)
|
||||
else
|
||||
if (Details.debug) then
|
||||
Details:Msg("(debug) in argus encounter, cannot wipe the encounter table.")
|
||||
@@ -1324,7 +1319,7 @@
|
||||
--store pets sent through 'needpetowner'
|
||||
Details.sent_pets = Details.sent_pets or {n = time()}
|
||||
if (Details.sent_pets.n+20 < time()) then
|
||||
_table_wipe (Details.sent_pets)
|
||||
wipe(Details.sent_pets)
|
||||
Details.sent_pets.n = time()
|
||||
end
|
||||
|
||||
@@ -1721,11 +1716,11 @@
|
||||
end
|
||||
|
||||
function Details.gump:UpdateTooltip (whichRowLine, esta_barra, instancia)
|
||||
if (_IsShiftKeyDown()) then
|
||||
if (IsShiftKeyDown()) then
|
||||
return instancia:MontaTooltip(esta_barra, whichRowLine, "shift")
|
||||
elseif (_IsControlKeyDown()) then
|
||||
elseif (IsControlKeyDown()) then
|
||||
return instancia:MontaTooltip(esta_barra, whichRowLine, "ctrl")
|
||||
elseif (_IsAltKeyDown()) then
|
||||
elseif (IsAltKeyDown()) then
|
||||
return instancia:MontaTooltip(esta_barra, whichRowLine, "alt")
|
||||
else
|
||||
return instancia:MontaTooltip(esta_barra, whichRowLine)
|
||||
|
||||
+6
-6
@@ -532,9 +532,9 @@ _detalhes.PerformanceIcons = {
|
||||
|
||||
function _detalhes:CheckForPerformanceProfile()
|
||||
|
||||
local type = _detalhes:GetPerformanceRaidType()
|
||||
local performanceType = _detalhes:GetPerformanceRaidType()
|
||||
|
||||
local profile = _detalhes.performance_profiles [type]
|
||||
local profile = _detalhes.performance_profiles [performanceType]
|
||||
|
||||
if (profile and profile.enabled) then
|
||||
_detalhes:SetWindowUpdateSpeed(profile.update_speed, true)
|
||||
@@ -545,12 +545,12 @@ function _detalhes:CheckForPerformanceProfile()
|
||||
_detalhes:CaptureSet(profile.miscdata, "miscdata")
|
||||
_detalhes:CaptureSet(profile.aura, "aura")
|
||||
|
||||
if (not _detalhes.performance_profile_lastenabled or _detalhes.performance_profile_lastenabled ~= type) then
|
||||
_detalhes:InstanceAlert (Loc ["STRING_OPTIONS_PERFORMANCE_PROFILE_LOAD"] .. type, {_detalhes.PerformanceIcons [type].icon, 14, 14, false, 0, 1, 0, 1, unpack (_detalhes.PerformanceIcons [type].color)} , 5, {_detalhes.empty_function})
|
||||
if (not _detalhes.performance_profile_lastenabled or _detalhes.performance_profile_lastenabled ~= performanceType) then
|
||||
_detalhes:InstanceAlert (Loc ["STRING_OPTIONS_PERFORMANCE_PROFILE_LOAD"] .. performanceType, {_detalhes.PerformanceIcons [performanceType].icon, 14, 14, false, 0, 1, 0, 1, unpack(_detalhes.PerformanceIcons [performanceType].color)} , 5, {_detalhes.empty_function})
|
||||
end
|
||||
|
||||
_detalhes.performance_profile_enabled = type
|
||||
_detalhes.performance_profile_lastenabled = type
|
||||
_detalhes.performance_profile_enabled = performanceType
|
||||
_detalhes.performance_profile_lastenabled = performanceType
|
||||
else
|
||||
_detalhes:SetWindowUpdateSpeed(_detalhes.update_speed)
|
||||
_detalhes:SetUseAnimations(_detalhes.use_row_animations)
|
||||
|
||||
+31
-31
@@ -7,7 +7,7 @@
|
||||
--local pointers
|
||||
local _
|
||||
local _pairs = pairs --lua local
|
||||
local _ipairs = ipairs --lua local
|
||||
local ipairs = ipairs --lua local
|
||||
local _rawget = rawget --lua local
|
||||
local _setmetatable = setmetatable --lua local
|
||||
local _table_remove = table.remove --lua local
|
||||
@@ -71,8 +71,8 @@
|
||||
|
||||
local todos_atributos = {combate [class_type_dano]._ActorTable, combate [class_type_cura]._ActorTable, combate [class_type_e_energy]._ActorTable, combate [class_type_misc]._ActorTable}
|
||||
|
||||
for class_type, atributo in _ipairs(todos_atributos) do
|
||||
for _, esta_classe in _ipairs(atributo) do
|
||||
for class_type, atributo in ipairs(todos_atributos) do
|
||||
for _, esta_classe in ipairs(atributo) do
|
||||
|
||||
local nome = esta_classe.nome
|
||||
|
||||
@@ -101,8 +101,8 @@
|
||||
end
|
||||
end
|
||||
|
||||
for class_type, atributo in _ipairs(todos_atributos) do
|
||||
for _, esta_classe in _ipairs(atributo) do
|
||||
for class_type, atributo in ipairs(todos_atributos) do
|
||||
for _, esta_classe in ipairs(atributo) do
|
||||
if (esta_classe.ownerName) then --nome do owner
|
||||
esta_classe.owner = combate (class_type, esta_classe.ownerName)
|
||||
end
|
||||
@@ -130,7 +130,7 @@
|
||||
local tabelas_do_historico = _detalhes.tabela_historico.tabelas --atalho
|
||||
|
||||
--recupera meta function
|
||||
for _, combat_table in _ipairs(tabelas_do_historico) do
|
||||
for _, combat_table in ipairs(tabelas_do_historico) do
|
||||
combat_table.__call = _detalhes.call_combate
|
||||
end
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
|
||||
--inicia a recupera��o das tabelas e montagem do overall
|
||||
if (#tabelas_do_historico > 0) then
|
||||
for index, combate in _ipairs(tabelas_do_historico) do
|
||||
for index, combate in ipairs(tabelas_do_historico) do
|
||||
|
||||
combate.hasSaved = true
|
||||
|
||||
@@ -199,8 +199,8 @@
|
||||
--tabela com os 4 tabelas de jogadores
|
||||
local todos_atributos = {combate [class_type_dano]._ActorTable, combate [class_type_cura]._ActorTable, combate [class_type_e_energy]._ActorTable, combate [class_type_misc]._ActorTable}
|
||||
|
||||
for class_type, atributo in _ipairs(todos_atributos) do
|
||||
for _, esta_classe in _ipairs(atributo) do
|
||||
for class_type, atributo in ipairs(todos_atributos) do
|
||||
for _, esta_classe in ipairs(atributo) do
|
||||
|
||||
local nome = esta_classe.nome
|
||||
|
||||
@@ -247,8 +247,8 @@
|
||||
end
|
||||
|
||||
--reconstr�i a tabela dos pets
|
||||
for class_type, atributo in _ipairs(todos_atributos) do
|
||||
for _, esta_classe in _ipairs(atributo) do
|
||||
for class_type, atributo in ipairs(todos_atributos) do
|
||||
for _, esta_classe in ipairs(atributo) do
|
||||
if (esta_classe.ownerName) then --nome do owner
|
||||
esta_classe.owner = combate (class_type, esta_classe.ownerName)
|
||||
end
|
||||
@@ -277,7 +277,7 @@
|
||||
function _detalhes:DoInstanceCleanup()
|
||||
|
||||
--normal instances
|
||||
for _, esta_instancia in _ipairs(_detalhes.tabela_instancias) do
|
||||
for _, esta_instancia in ipairs(_detalhes.tabela_instancias) do
|
||||
|
||||
if (esta_instancia.StatusBar.left) then
|
||||
esta_instancia.StatusBarSaved = {
|
||||
@@ -330,7 +330,7 @@
|
||||
end
|
||||
|
||||
--unused instances
|
||||
for _, esta_instancia in _ipairs(_detalhes.unused_instances) do
|
||||
for _, esta_instancia in ipairs(_detalhes.unused_instances) do
|
||||
|
||||
if (esta_instancia.StatusBar.left) then
|
||||
esta_instancia.StatusBarSaved = {
|
||||
@@ -389,9 +389,9 @@
|
||||
overall_added = true
|
||||
end
|
||||
|
||||
for index, combat in _ipairs(combats) do
|
||||
for index, container in _ipairs(combat) do
|
||||
for index, esta_classe in _ipairs(container._ActorTable) do
|
||||
for index, combat in ipairs(combats) do
|
||||
for index, container in ipairs(combat) do
|
||||
for index, esta_classe in ipairs(container._ActorTable) do
|
||||
esta_classe.owner = nil
|
||||
end
|
||||
end
|
||||
@@ -410,9 +410,9 @@
|
||||
overall_added = true
|
||||
end
|
||||
|
||||
for index, combat in _ipairs(combats) do
|
||||
for class_type, container in _ipairs(combat) do
|
||||
for index, esta_classe in _ipairs(container._ActorTable) do
|
||||
for index, combat in ipairs(combats) do
|
||||
for class_type, container in ipairs(combat) do
|
||||
for index, esta_classe in ipairs(container._ActorTable) do
|
||||
|
||||
esta_classe.displayName = nil
|
||||
esta_classe.minha_barra = nil
|
||||
@@ -444,9 +444,9 @@
|
||||
overall_added = true
|
||||
end
|
||||
|
||||
for index, combat in _ipairs(combats) do
|
||||
for index, combat in ipairs(combats) do
|
||||
_detalhes.clear:c_combate (combat)
|
||||
for index, container in _ipairs(combat) do
|
||||
for index, container in ipairs(combat) do
|
||||
_detalhes.clear:c_container_combatentes (container)
|
||||
end
|
||||
end
|
||||
@@ -464,8 +464,8 @@
|
||||
overall_added = true
|
||||
end
|
||||
|
||||
for index, combat in _ipairs(combats) do
|
||||
for index, container in _ipairs(combat) do
|
||||
for index, combat in ipairs(combats) do
|
||||
for index, container in ipairs(combat) do
|
||||
_detalhes.clear:c_container_combatentes_index (container)
|
||||
end
|
||||
end
|
||||
@@ -519,7 +519,7 @@
|
||||
_combate.previous_combat = nil
|
||||
local todos_atributos = {_combate [class_type_dano] or {}, _combate [class_type_cura] or {}, _combate [class_type_e_energy] or {}, _combate [class_type_misc] or {}}
|
||||
|
||||
for class_type, _tabela in _ipairs(todos_atributos) do
|
||||
for class_type, _tabela in ipairs(todos_atributos) do
|
||||
local conteudo = _tabela._ActorTable
|
||||
|
||||
--Limpa tabelas que n�o estejam em grupo
|
||||
@@ -567,11 +567,11 @@
|
||||
end
|
||||
end
|
||||
|
||||
for _, _tabela in _ipairs(historico_tabelas) do
|
||||
for _, _tabela in ipairs(historico_tabelas) do
|
||||
tabelas_de_combate [#tabelas_de_combate+1] = _tabela
|
||||
end
|
||||
|
||||
for tabela_index, _combate in _ipairs(tabelas_de_combate) do
|
||||
for tabela_index, _combate in ipairs(tabelas_de_combate) do
|
||||
|
||||
--limpa a tabela do grafico
|
||||
if (_detalhes.clear_graphic) then
|
||||
@@ -596,7 +596,7 @@
|
||||
end
|
||||
|
||||
if (not _combate.is_mythic_dungeon_segment) then
|
||||
for class_type, _tabela in _ipairs(todos_atributos) do
|
||||
for class_type, _tabela in ipairs(todos_atributos) do
|
||||
|
||||
local conteudo = _tabela._ActorTable
|
||||
|
||||
@@ -801,9 +801,9 @@
|
||||
_detalhes:ClearParserCache()
|
||||
|
||||
--limpa barras que n�o est�o sendo usadas nas inst�ncias.
|
||||
for index, instancia in _ipairs(_detalhes.tabela_instancias) do
|
||||
for index, instancia in ipairs(_detalhes.tabela_instancias) do
|
||||
if (instancia.barras and instancia.barras [1]) then
|
||||
for i, barra in _ipairs(instancia.barras) do
|
||||
for i, barra in ipairs(instancia.barras) do
|
||||
if (not barra:IsShown()) then
|
||||
barra.minha_tabela = nil
|
||||
end
|
||||
@@ -934,7 +934,7 @@
|
||||
|
||||
--monta a lista de combates
|
||||
local tabelas_de_combate = {}
|
||||
for _, _tabela in _ipairs(_detalhes.tabela_historico.tabelas) do
|
||||
for _, _tabela in ipairs(_detalhes.tabela_historico.tabelas) do
|
||||
if (_tabela ~= _detalhes.tabela_vigente) then
|
||||
tabelas_de_combate [#tabelas_de_combate+1] = _tabela
|
||||
end
|
||||
@@ -942,7 +942,7 @@
|
||||
tabelas_de_combate [#tabelas_de_combate+1] = _detalhes.tabela_vigente
|
||||
|
||||
--faz a coleta em todos os combates para este atributo
|
||||
for _, _combate in _ipairs(tabelas_de_combate) do
|
||||
for _, _combate in ipairs(tabelas_de_combate) do
|
||||
limpados = limpados + FazColeta (_combate, tipo, lastevent)
|
||||
end
|
||||
|
||||
|
||||
+45
-45
@@ -28,9 +28,9 @@
|
||||
local _select = select --lua local
|
||||
local _bit_band = bit.band --lua local
|
||||
local _math_floor = math.floor --lua local
|
||||
local _ipairs = ipairs --lua local
|
||||
local ipairs = ipairs --lua local
|
||||
local _pairs = pairs --lua local
|
||||
local _type = type --lua local
|
||||
local type = type --lua local
|
||||
local _math_ceil = math.ceil --lua local
|
||||
local _table_wipe = table.wipe --lua local
|
||||
local _strsplit = strsplit
|
||||
@@ -2098,7 +2098,7 @@
|
||||
return
|
||||
else
|
||||
--retail
|
||||
if (_type(shieldname) == "boolean") then
|
||||
if (type(shieldname) == "boolean") then
|
||||
owner_serial, owner_name, owner_flags, owner_flags2, shieldid, shieldname, shieldtype, amount = spellid, spellname, spellschool, owner_serial, owner_name, owner_flags, owner_flags2, shieldid
|
||||
end
|
||||
end
|
||||
@@ -3777,7 +3777,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
|
||||
if (_hook_cooldowns) then
|
||||
--send event to registred functions
|
||||
for _, func in _ipairs(_hook_cooldowns_container) do
|
||||
for _, func in ipairs(_hook_cooldowns_container) do
|
||||
func (nil, token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname)
|
||||
end
|
||||
end
|
||||
@@ -3884,14 +3884,14 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
|
||||
--pet interrupt
|
||||
if (_hook_interrupt) then
|
||||
for _, func in _ipairs(_hook_interrupt_container) do
|
||||
for _, func in ipairs(_hook_interrupt_container) do
|
||||
func (nil, token, time, meu_dono.serial, meu_dono.nome, meu_dono.flag_original, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)
|
||||
end
|
||||
end
|
||||
else
|
||||
--player interrupt
|
||||
if (_hook_interrupt) then
|
||||
for _, func in _ipairs(_hook_interrupt_container) do
|
||||
for _, func in ipairs(_hook_interrupt_container) do
|
||||
func (nil, token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)
|
||||
end
|
||||
end
|
||||
@@ -4169,7 +4169,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
|
||||
local deadLog = _current_combat.last_events_tables [i] [1]
|
||||
local jaTem = false
|
||||
for _, evento in _ipairs(deadLog) do
|
||||
for _, evento in ipairs(deadLog) do
|
||||
if (evento [1] and not evento[3]) then
|
||||
jaTem = true
|
||||
end
|
||||
@@ -4190,7 +4190,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
end
|
||||
|
||||
if (_hook_battleress) then
|
||||
for _, func in _ipairs(_hook_battleress_container) do
|
||||
for _, func in ipairs(_hook_battleress_container) do
|
||||
func (nil, token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname)
|
||||
end
|
||||
end
|
||||
@@ -4477,7 +4477,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
--send event to registred functions
|
||||
local deathTime = _GetTime() - _current_combat:GetStartTime()
|
||||
|
||||
for _, func in _ipairs(_hook_deaths_container) do
|
||||
for _, func in ipairs(_hook_deaths_container) do
|
||||
local copiedDeathTable = Details.CopyTable(t)
|
||||
local successful, errortext = pcall(func, nil, token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, copiedDeathTable, thisPlayer.last_cooldown, deathTime, maxHealth)
|
||||
if (not successful) then
|
||||
@@ -4559,7 +4559,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
_detalhes.capture_schedules = {}
|
||||
|
||||
function _detalhes:CaptureIsAllEnabled()
|
||||
for _, _thisType in _ipairs(_detalhes.capture_types) do
|
||||
for _, _thisType in ipairs(_detalhes.capture_types) do
|
||||
if (not _detalhes.capture_real [_thisType]) then
|
||||
return false
|
||||
end
|
||||
@@ -4575,7 +4575,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
end
|
||||
|
||||
function _detalhes:CaptureRefresh()
|
||||
for _, _thisType in _ipairs(_detalhes.capture_types) do
|
||||
for _, _thisType in ipairs(_detalhes.capture_types) do
|
||||
if (_detalhes.capture_current [_thisType]) then
|
||||
_detalhes:CaptureEnable (_thisType)
|
||||
else
|
||||
@@ -5435,11 +5435,11 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
|
||||
function _detalhes.parser_functions:CHALLENGE_MODE_START(...)
|
||||
--send mythic dungeon start event
|
||||
print("parser event", "CHALLENGE_MODE_START", ...)
|
||||
local zoneName, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceMapID, instanceGroupSize = GetInstanceInfo()
|
||||
if (difficultyID == 8) then
|
||||
_detalhes:SendEvent("COMBAT_MYTHICDUNGEON_START")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function _detalhes.parser_functions:CHALLENGE_MODE_COMPLETED(...)
|
||||
@@ -5448,11 +5448,9 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
if (difficultyID == 8) then
|
||||
_detalhes:SendEvent("COMBAT_MYTHICDUNGEON_END")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function _detalhes.parser_functions:PLAYER_REGEN_ENABLED(...)
|
||||
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg("(debug) |cFFFFFF00PLAYER_REGEN_ENABLED|r event triggered.")
|
||||
|
||||
@@ -5470,7 +5468,6 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
_detalhes.tabela_vigente.CombatEndedAt = GetTime()
|
||||
_detalhes.tabela_vigente.TotalElapsedCombatTime = _detalhes.tabela_vigente.CombatEndedAt - (_detalhes.tabela_vigente.CombatStartedAt or 0)
|
||||
|
||||
--
|
||||
C_Timer.After(10, check_for_encounter_end)
|
||||
|
||||
--playing alone, just finish the combat right now
|
||||
@@ -5512,7 +5509,6 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function _detalhes.parser_functions:PLAYER_TALENT_UPDATE()
|
||||
@@ -5527,7 +5523,6 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
end
|
||||
|
||||
function _detalhes.parser_functions:PLAYER_SPECIALIZATION_CHANGED()
|
||||
|
||||
--some parts of details! does call this function, check first for past expansions
|
||||
if (DetailsFramework.IsTimewalkWoW()) then
|
||||
return
|
||||
@@ -5556,7 +5551,6 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
|
||||
--this is mostly triggered when the player enters in a dual against another player
|
||||
function _detalhes.parser_functions:UNIT_FACTION(unit)
|
||||
|
||||
if (true) then
|
||||
--disable until figure out how to make this work properlly
|
||||
--at the moment this event is firing at bgs, arenas, etc making horde icons to show at random
|
||||
@@ -5583,19 +5577,22 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
--set to show when the player is solo play
|
||||
enemyPlayer1.grupo = true
|
||||
enemyPlayer1.enemy = true
|
||||
|
||||
if (IsInGroup()) then
|
||||
--broadcast the enemy to group members so they can "watch" the damage
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
if (enemyPlayer2) then
|
||||
enemyPlayer2.grupo = true
|
||||
enemyPlayer2.enemy = true
|
||||
end
|
||||
|
||||
if (enemyPlayer3) then
|
||||
enemyPlayer3.grupo = true
|
||||
enemyPlayer3.enemy = true
|
||||
end
|
||||
|
||||
if (enemyPlayer4) then
|
||||
enemyPlayer4.grupo = true
|
||||
enemyPlayer4.enemy = true
|
||||
@@ -5622,9 +5619,11 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
function _detalhes:InGroup()
|
||||
return _detalhes.in_group
|
||||
end
|
||||
|
||||
function _detalhes.parser_functions:GROUP_ROSTER_UPDATE(...)
|
||||
if (not _detalhes.in_group) then
|
||||
_detalhes.in_group = IsInGroup() or IsInRaid()
|
||||
|
||||
if (_detalhes.in_group) then
|
||||
--entrou num grupo
|
||||
_detalhes:IniciarColetaDeLixo (true)
|
||||
@@ -5658,6 +5657,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
_detalhes:DispatchAutoRunCode("on_groupchange")
|
||||
|
||||
wipe (_detalhes.trusted_characters)
|
||||
|
||||
else
|
||||
--ainda esta no grupo
|
||||
_detalhes:SchedulePetUpdate(2)
|
||||
@@ -5666,11 +5666,11 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
if (_detalhes.SendCharDataOnGroupChange and not _detalhes.SendCharDataOnGroupChange:IsCancelled()) then
|
||||
return
|
||||
end
|
||||
|
||||
_detalhes.SendCharDataOnGroupChange = C_Timer.NewTimer(11, function()
|
||||
_detalhes:SendCharacterData()
|
||||
_detalhes.SendCharDataOnGroupChange = nil
|
||||
end)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -5678,7 +5678,6 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
end
|
||||
|
||||
function _detalhes.parser_functions:START_TIMER(...) --~timer
|
||||
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg("(debug) found a timer.")
|
||||
end
|
||||
@@ -5760,6 +5759,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
|
||||
--load all the saved combats
|
||||
_detalhes:LoadCombatTables()
|
||||
|
||||
--load the profiles
|
||||
_detalhes:LoadConfig()
|
||||
|
||||
@@ -5790,7 +5790,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
|
||||
function _detalhes.parser_functions:PET_BATTLE_OPENING_START(...)
|
||||
_detalhes.pet_battle = true
|
||||
for index, instance in _ipairs(_detalhes.tabela_instancias) do
|
||||
for index, instance in ipairs(_detalhes.tabela_instancias) do
|
||||
if (instance.ativa) then
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg("(debug) hidding windows for Pet Battle.")
|
||||
@@ -5802,7 +5802,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
|
||||
function _detalhes.parser_functions:PET_BATTLE_CLOSE(...)
|
||||
_detalhes.pet_battle = false
|
||||
for index, instance in _ipairs(_detalhes.tabela_instancias) do
|
||||
for index, instance in ipairs(_detalhes.tabela_instancias) do
|
||||
if (instance.ativa) then
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg("(debug) Pet Battle finished, calling AdjustAlphaByContext().")
|
||||
@@ -5818,8 +5818,8 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
|
||||
local parser_functions = _detalhes.parser_functions
|
||||
|
||||
function _detalhes:OnEvent (evento, ...)
|
||||
local func = parser_functions [evento]
|
||||
function _detalhes:OnEvent(event, ...)
|
||||
local func = parser_functions[event]
|
||||
if (func) then
|
||||
return func(nil, ...)
|
||||
end
|
||||
@@ -5924,16 +5924,14 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
xpcall (saveNicktabCache, saver_error)
|
||||
end)
|
||||
|
||||
--end
|
||||
|
||||
-- ~parserstart ~startparser ~cleu
|
||||
|
||||
function _detalhes.OnParserEvent()
|
||||
local time, token, hidding, who_serial, who_name, who_flags, who_flags2, target_serial, target_name, target_flags, target_flags2, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12 = _CombatLogGetCurrentEventInfo()
|
||||
|
||||
local funcao = token_list [token]
|
||||
if (funcao) then
|
||||
return funcao (nil, token, time, who_serial, who_name, who_flags, target_serial, target_name, target_flags, target_flags2, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)
|
||||
local func = token_list[token]
|
||||
if (func) then
|
||||
return func(nil, token, time, who_serial, who_name, who_flags, target_serial, target_name, target_flags, target_flags2, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)
|
||||
else
|
||||
return
|
||||
end
|
||||
@@ -5944,12 +5942,12 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
function _detalhes:UpdateParser()
|
||||
_tempo = _detalhes._tempo
|
||||
end
|
||||
|
||||
function _detalhes:UpdatePetsOnParser()
|
||||
container_pets = _detalhes.tabela_pets.pets
|
||||
end
|
||||
|
||||
function _detalhes:PrintParserCacheIndexes()
|
||||
|
||||
local amount = 0
|
||||
for n, nn in pairs(damage_cache) do
|
||||
amount = amount + 1
|
||||
@@ -5997,7 +5995,6 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
end
|
||||
|
||||
function _detalhes:ClearParserCache()
|
||||
|
||||
_table_wipe(damage_cache)
|
||||
_table_wipe(damage_cache_pets)
|
||||
_table_wipe(damage_cache_petsOwners)
|
||||
@@ -6043,6 +6040,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
misc_cache_pets[actor_name] = nil
|
||||
misc_cache_petsOwners[actor_name] = nil
|
||||
end
|
||||
|
||||
if (actor_serial) then
|
||||
damage_cache[actor_serial] = nil
|
||||
damage_cache_pets[actor_serial] = nil
|
||||
@@ -6056,7 +6054,6 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
end
|
||||
|
||||
function _detalhes:UptadeRaidMembersCache()
|
||||
|
||||
_table_wipe(raid_members_cache)
|
||||
_table_wipe(tanks_members_cache)
|
||||
_table_wipe(auto_regen_cache)
|
||||
@@ -6164,7 +6161,6 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
|
||||
--serach key: ~cache
|
||||
function _detalhes:UpdateParserGears()
|
||||
|
||||
--refresh combat tables
|
||||
_current_combat = _detalhes.tabela_vigente
|
||||
_current_combat_cleu_events = _current_combat and _current_combat.cleu_events
|
||||
@@ -6179,7 +6175,6 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
|
||||
--refresh actors containers
|
||||
_current_damage_container = _current_combat[1]
|
||||
|
||||
_current_heal_container = _current_combat[2]
|
||||
_current_energy_container = _current_combat[3]
|
||||
_current_misc_container = _current_combat[4]
|
||||
@@ -6192,10 +6187,12 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
_in_combat = _detalhes.in_combat
|
||||
|
||||
_table_wipe(ignored_npcids)
|
||||
|
||||
--fill it with the default npcs ignored
|
||||
for npcId in pairs(_detalhes.default_ignored_npcs) do
|
||||
ignored_npcids[npcId] = true
|
||||
end
|
||||
|
||||
--fill it with the npcs the user ignored
|
||||
for npcId in pairs(_detalhes.npcid_ignored) do
|
||||
ignored_npcids[npcId] = true
|
||||
@@ -6269,7 +6266,8 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
function _detalhes:GetCombat(_combat)
|
||||
if (not _combat) then
|
||||
return _current_combat
|
||||
elseif (_type(_combat) == "number") then
|
||||
|
||||
elseif (type(_combat) == "number") then
|
||||
if (_combat == -1) then --overall
|
||||
return _detalhes.tabela_overall
|
||||
elseif (_combat == 0) then --current
|
||||
@@ -6277,7 +6275,8 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
else
|
||||
return _detalhes.tabela_historico.tabelas [_combat]
|
||||
end
|
||||
elseif (_type(_combat) == "string") then
|
||||
|
||||
elseif (type(_combat) == "string") then
|
||||
if (_combat == "overall") then
|
||||
return _detalhes.tabela_overall
|
||||
elseif (_combat == "current") then
|
||||
@@ -6299,7 +6298,6 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
|
||||
--get an actor
|
||||
function _detalhes:GetActor(_combat, _attribute, _actorname)
|
||||
|
||||
if (not _combat) then
|
||||
_combat = "current" --current combat
|
||||
end
|
||||
@@ -6317,7 +6315,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
if (actor) then
|
||||
return actor
|
||||
else
|
||||
return nil --_detalhes:NewError ("Current combat doesn't have an actor called ".. _actorname)
|
||||
return nil
|
||||
end
|
||||
|
||||
elseif (_combat == -1 or _combat == "overall") then
|
||||
@@ -6325,7 +6323,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
if (actor) then
|
||||
return actor
|
||||
else
|
||||
return nil --_detalhes:NewError ("Combat overall doesn't have an actor called ".. _actorname)
|
||||
return nil
|
||||
end
|
||||
|
||||
elseif (type(_combat) == "number") then
|
||||
@@ -6335,13 +6333,13 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
if (actor) then
|
||||
return actor
|
||||
else
|
||||
return nil --_detalhes:NewError ("Combat ".. _combat .." doesn't have an actor called ".. _actorname)
|
||||
return nil
|
||||
end
|
||||
else
|
||||
return nil --_detalhes:NewError ("Combat ".._combat.." not found.")
|
||||
return nil
|
||||
end
|
||||
else
|
||||
return nil --_detalhes:NewError ("Couldn't find a combat object for passed parameters")
|
||||
return nil
|
||||
end
|
||||
end
|
||||
|
||||
@@ -6363,6 +6361,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
if (_detalhes.pvp_parser_frame.ticker) then
|
||||
Details.Schedules.Cancel(_detalhes.pvp_parser_frame.ticker)
|
||||
end
|
||||
|
||||
_detalhes.pvp_parser_frame.ticker = Details.Schedules.NewTicker(10, Details.BgScoreUpdate)
|
||||
Details.Schedules.SetName(_detalhes.pvp_parser_frame.ticker, "Battleground Updater")
|
||||
end
|
||||
@@ -6403,6 +6402,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
else
|
||||
flag = 0x548
|
||||
end
|
||||
|
||||
actor = _current_damage_container:PegarCombatente (guid, name, flag, true)
|
||||
actor.total = _detalhes:GetOrderNumber()
|
||||
actor.classe = classToken or "UNKNOW"
|
||||
@@ -6424,7 +6424,6 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
actor.classe = classToken or "UNKNOW"
|
||||
|
||||
elseif (name ~= "Unknown" and type(name) == "string" and string.len(name) > 1) then
|
||||
--elseif (name ~= "Unknown") then
|
||||
local guid = _UnitGUID(name)
|
||||
if (guid) then
|
||||
local flag
|
||||
@@ -6433,6 +6432,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
else
|
||||
flag = 0x548
|
||||
end
|
||||
|
||||
actor = _current_heal_container:PegarCombatente (guid, name, flag, true)
|
||||
actor.total = _detalhes:GetOrderNumber()
|
||||
actor.classe = classToken or "UNKNOW"
|
||||
|
||||
+3
-4
@@ -460,10 +460,7 @@
|
||||
|
||||
--menu background
|
||||
local menuBackground = CreateFrame("frame", "$parentMenuFrame", f, "BackdropTemplate")
|
||||
_detalhes:FormatBackground (menuBackground)
|
||||
local menuBackgroundTexture = menuBackground:CreateTexture("$parentBackgroundTexture", "background", nil, -2)
|
||||
menuBackgroundTexture:SetAllPoints()
|
||||
menuBackgroundTexture:SetColorTexture(0.2, 0.2, 0.2, .5)
|
||||
DetailsFramework:ApplyStandardBackdrop(menuBackground)
|
||||
|
||||
--statusbar
|
||||
local statusBar = CreateFrame("frame", nil, menuBackground,"BackdropTemplate")
|
||||
@@ -471,8 +468,10 @@
|
||||
statusBar:SetPoint("topright", f, "bottomright", 0, 1)
|
||||
statusBar:SetHeight(20)
|
||||
statusBar:SetAlpha(1)
|
||||
|
||||
DetailsFramework:BuildStatusbarAuthorInfo(statusBar)
|
||||
DetailsFramework:ApplyStandardBackdrop(statusBar)
|
||||
|
||||
local extraDarkTexture = statusBar:CreateTexture(nil, "background")
|
||||
extraDarkTexture:SetAllPoints()
|
||||
extraDarkTexture:SetColorTexture(.2, .2, .2, .8)
|
||||
|
||||
+17
-17
@@ -16,7 +16,7 @@
|
||||
--local pointers
|
||||
|
||||
local _math_floor = math.floor --api local
|
||||
local _ipairs = ipairs --api local
|
||||
local ipairs = ipairs --api local
|
||||
|
||||
local UnitGroupRolesAssigned = DetailsFramework.UnitGroupRolesAssigned
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
|
||||
--disable all plugin childs attached to an specified instance and reactive the childs taking the instance statusbar anchors
|
||||
function _detalhes.StatusBar:ReloadAnchors (instance)
|
||||
for _, child in _ipairs(instance.StatusBar) do
|
||||
for _, child in ipairs(instance.StatusBar) do
|
||||
child.frame:ClearAllPoints()
|
||||
child.frame:Hide()
|
||||
child.anchor = nil
|
||||
@@ -242,7 +242,7 @@
|
||||
local chosenChild = nil
|
||||
|
||||
--procura pra ver se ja tem uma criada
|
||||
for _, child_created in _ipairs(instance.StatusBar) do
|
||||
for _, child_created in ipairs(instance.StatusBar) do
|
||||
if (child_created.mainPlugin == pluginMestre) then
|
||||
chosenChild = child_created
|
||||
break
|
||||
@@ -349,7 +349,7 @@
|
||||
|
||||
local current
|
||||
|
||||
for index, _name_and_icon in _ipairs(_detalhes.StatusBar.Menu) do
|
||||
for index, _name_and_icon in ipairs(_detalhes.StatusBar.Menu) do
|
||||
GameCooltip:AddMenu (1, ChoosePlugin, {index, frame.child, frame.child.anchor}, nil, nil, _name_and_icon [1], _name_and_icon [2], true)
|
||||
|
||||
local pluginMestre = _detalhes.StatusBar.Plugins [index]
|
||||
@@ -615,7 +615,7 @@ do
|
||||
|
||||
-- handle event "COMBAT_PLAYER_ENTER"
|
||||
function PDps:PlayerEnterCombat()
|
||||
for index, child in _ipairs(PDps.childs) do
|
||||
for index, child in ipairs(PDps.childs) do
|
||||
if (child.enabled and child.instance:GetSegment() == 0) then
|
||||
child.tick = _detalhes:ScheduleRepeatingTimer ("PluginDpsUpdate", 1, child)
|
||||
end
|
||||
@@ -624,7 +624,7 @@ do
|
||||
|
||||
-- handle event "COMBAT_PLAYER_LEAVE"
|
||||
function PDps:PlayerLeaveCombat()
|
||||
for index, child in _ipairs(PDps.childs) do
|
||||
for index, child in ipairs(PDps.childs) do
|
||||
if (child.tick) then
|
||||
_detalhes:CancelTimer(child.tick)
|
||||
child.tick = nil
|
||||
@@ -634,7 +634,7 @@ do
|
||||
|
||||
-- handle event "DETAILS_INSTANCE_CHANGESEGMENT"
|
||||
function PDps:ChangeSegment (instance, segment)
|
||||
for index, child in _ipairs(PDps.childs) do
|
||||
for index, child in ipairs(PDps.childs) do
|
||||
if (child.enabled and child.instance == instance) then
|
||||
_detalhes:PluginDpsUpdate (child)
|
||||
end
|
||||
@@ -643,7 +643,7 @@ do
|
||||
|
||||
--handle event "DETAILS_DATA_RESET"
|
||||
function PDps:DataReset()
|
||||
for index, child in _ipairs(PDps.childs) do
|
||||
for index, child in ipairs(PDps.childs) do
|
||||
if (child.enabled) then
|
||||
child.text:SetText("0")
|
||||
end
|
||||
@@ -741,7 +741,7 @@ do
|
||||
|
||||
function PSegment:Change()
|
||||
|
||||
for index, child in _ipairs(PSegment.childs) do
|
||||
for index, child in ipairs(PSegment.childs) do
|
||||
|
||||
if (child.enabled and child.instance:IsEnabled()) then
|
||||
|
||||
@@ -881,7 +881,7 @@ do
|
||||
instance, attribute, subAttribute = self.instance, self.instance.atributo, self.instance.sub_atributo
|
||||
end
|
||||
|
||||
for index, child in _ipairs(PAttribute.childs) do
|
||||
for index, child in ipairs(PAttribute.childs) do
|
||||
if (child.instance == instance and child.enabled and child.instance:IsEnabled()) then
|
||||
local sName = child.instance:GetInstanceAttributeText()
|
||||
child.text:SetText(sName)
|
||||
@@ -939,7 +939,7 @@ do
|
||||
--1 sec tick
|
||||
function _detalhes:ClockPluginTick (force)
|
||||
|
||||
for index, child in _ipairs(Clock.childs) do
|
||||
for index, child in ipairs(Clock.childs) do
|
||||
local instance = child.instance
|
||||
if (child.enabled and instance:IsEnabled()) then
|
||||
if (instance.showing and ( (instance.segmento ~= -1) or (instance.segmento == -1 and not _detalhes.in_combat) or force) ) then
|
||||
@@ -983,7 +983,7 @@ do
|
||||
|
||||
--on reset
|
||||
function Clock:DataReset()
|
||||
for index, child in _ipairs(Clock.childs) do
|
||||
for index, child in ipairs(Clock.childs) do
|
||||
if (child.enabled and child.instance:IsEnabled()) then
|
||||
child.text:SetText("0m 0s")
|
||||
end
|
||||
@@ -1080,7 +1080,7 @@ do
|
||||
|
||||
local _UnitDetailedThreatSituation = UnitDetailedThreatSituation --wow api
|
||||
local _cstr = string.format --lua api
|
||||
local _math_abs = math.abs --lua api
|
||||
local abs = math.abs --lua api
|
||||
|
||||
--Create the plugin Object
|
||||
local Threat = _detalhes:NewPluginObject ("Details_TargetThreat", DETAILSPLUGIN_ALWAYSENABLED, "STATUSBAR")
|
||||
@@ -1106,7 +1106,7 @@ do
|
||||
end
|
||||
|
||||
function _detalhes:ThreatPluginTick()
|
||||
for index, child in _ipairs(Threat.childs) do
|
||||
for index, child in ipairs(Threat.childs) do
|
||||
local instance = child.instance
|
||||
if (child.enabled and instance:IsEnabled()) then
|
||||
-- atualiza a threat
|
||||
@@ -1115,9 +1115,9 @@ do
|
||||
if (threatpct) then
|
||||
child.text:SetText(_math_floor(threatpct).."%")
|
||||
if (Threat.isTank) then
|
||||
child.text:SetTextColor (_math_abs (threatpct-100)*0.01, threatpct*0.01, 0, 1)
|
||||
child.text:SetTextColor (abs(threatpct-100)*0.01, threatpct*0.01, 0, 1)
|
||||
else
|
||||
child.text:SetTextColor (threatpct*0.01, _math_abs (threatpct-100)*0.01, 0, 1)
|
||||
child.text:SetTextColor (threatpct*0.01, abs(threatpct-100)*0.01, 0, 1)
|
||||
end
|
||||
else
|
||||
child.text:SetText("0%")
|
||||
@@ -1329,7 +1329,7 @@ do
|
||||
end
|
||||
|
||||
function PGold:GoldPluginTick()
|
||||
for index, child in _ipairs(PGold.childs) do
|
||||
for index, child in ipairs(PGold.childs) do
|
||||
local instance = child.instance
|
||||
if (child.enabled and instance:IsEnabled()) then
|
||||
child:UpdateGold()
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
--local pointers
|
||||
|
||||
local _table_insert = table.insert --lua local
|
||||
local _ipairs = ipairs --lua local
|
||||
local ipairs = ipairs --lua local
|
||||
local _pairs = pairs --lua local
|
||||
local _math_floor = math.floor --lua local
|
||||
local _time = time --lua local
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
local calc_for_pvp = function(self)
|
||||
for tipo, tabela in _pairs(self.tabelas) do
|
||||
for nome, jogador in _ipairs(tabela) do
|
||||
for nome, jogador in ipairs(tabela) do
|
||||
if (jogador) then
|
||||
if (jogador.last_event+3 > _tempo) then --okey o jogador esta dando dps
|
||||
if (jogador.on_hold) then --o dps estava pausado, retornar a ativa
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
local calc_for_pve = function(self)
|
||||
for tipo, tabela in _pairs(self.tabelas) do
|
||||
for nome, jogador in _ipairs(tabela) do
|
||||
for nome, jogador in ipairs(tabela) do
|
||||
if (jogador) then
|
||||
if (jogador.last_event+10 > _tempo) then --okey o jogador esta dando dps
|
||||
if (jogador.on_hold) then --o dps estava pausado, retornar a ativa
|
||||
@@ -82,7 +82,7 @@
|
||||
self.tabelas = {{}, {}} --1 dano 2 cura
|
||||
|
||||
local danos = _detalhes.tabela_vigente[1]._ActorTable
|
||||
for _, jogador in _ipairs(danos) do
|
||||
for _, jogador in ipairs(danos) do
|
||||
if (jogador.dps_started) then
|
||||
jogador:RegistrarNaTimeMachine()
|
||||
end
|
||||
@@ -130,10 +130,10 @@
|
||||
end
|
||||
|
||||
function _detalhes:ManutencaoTimeMachine()
|
||||
for tipo, tabela in _ipairs(timeMachine.tabelas) do
|
||||
for tipo, tabela in ipairs(timeMachine.tabelas) do
|
||||
local t = {}
|
||||
local removed = 0
|
||||
for index, jogador in _ipairs(tabela) do
|
||||
for index, jogador in ipairs(tabela) do
|
||||
if (jogador) then
|
||||
t [#t+1] = jogador
|
||||
jogador.timeMachine = #t
|
||||
|
||||
+9
-8
@@ -3,11 +3,12 @@
|
||||
local _detalhes = _G._detalhes
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--local pointers
|
||||
|
||||
local upper = string.upper --lua local
|
||||
local _ipairs = ipairs --lua local
|
||||
local ipairs = ipairs --lua local
|
||||
local _pairs = pairs --lua local
|
||||
local _math_floor = math.floor --lua local
|
||||
local _math_max = math.max --lua local
|
||||
@@ -176,7 +177,7 @@
|
||||
|
||||
--hide all instanceBars on all instances
|
||||
if (frame == "all") then
|
||||
for _, instancia in _ipairs(_detalhes.tabela_instancias) do
|
||||
for _, instancia in ipairs(_detalhes.tabela_instancias) do
|
||||
if (hideType == "barras") then
|
||||
for i = 1, instancia.rows_created do
|
||||
local instanceBar = instancia.barras[i]
|
||||
@@ -338,8 +339,8 @@
|
||||
--get the fractional number representing the alphabetical letter
|
||||
function _detalhes:GetOrderNumber(who_name)
|
||||
--local name = upper (who_name .. "zz")
|
||||
--local byte1 = _math_abs (_string_byte (name, 2)-91)/1000000
|
||||
--return byte1 + _math_abs (_string_byte (name, 1)-91)/10000
|
||||
--local byte1 = abs(_string_byte (name, 2)-91)/1000000
|
||||
--return byte1 + abs(_string_byte (name, 1)-91)/10000
|
||||
return _math_random (1000, 9000) / 1000000
|
||||
end
|
||||
|
||||
@@ -776,7 +777,7 @@
|
||||
|
||||
--return if the numeric table have an object
|
||||
function _detalhes:tableIN (tabela, objeto)
|
||||
for index, valor in _ipairs(tabela) do
|
||||
for index, valor in ipairs(tabela) do
|
||||
if (valor == objeto) then
|
||||
return index
|
||||
end
|
||||
@@ -937,7 +938,7 @@
|
||||
function _detalhes:unpacks (...)
|
||||
local values = {}
|
||||
for i = 1, select('#', ...) do
|
||||
for _, value in _ipairs(select (i, ...)) do
|
||||
for _, value in ipairs(select(i, ...)) do
|
||||
values[ #values + 1] = value
|
||||
end
|
||||
end
|
||||
@@ -1192,7 +1193,7 @@ end
|
||||
if (self.HaveGradientEffect) then
|
||||
|
||||
local done = false
|
||||
for index, ThisGradient in _ipairs(self.gradientes) do
|
||||
for index, ThisGradient in ipairs(self.gradientes) do
|
||||
|
||||
if (not ThisGradient.done) then
|
||||
|
||||
@@ -1478,7 +1479,7 @@ end
|
||||
|
||||
--esse ALL aqui pode dar merda com as inst�ncias n�o ativadas
|
||||
if (frame == "all") then --todas as inst�ncias
|
||||
for _, instancia in _ipairs(_detalhes.tabela_instancias) do
|
||||
for _, instancia in ipairs(_detalhes.tabela_instancias) do
|
||||
if (parametros == "barras") then --hida todas as barras da inst�ncia
|
||||
for i = 1, instancia.rows_created, 1 do
|
||||
Details.FadeHandler.Fader(instancia.barras[i], tipo, velocidade+(i/10))
|
||||
|
||||
+187
-215
@@ -1,30 +1,24 @@
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local Details = _G._detalhes
|
||||
local Loc = _G.LibStub("AceLocale-3.0"):GetLocale("Details")
|
||||
local libwindow = LibStub("LibWindow-1.1")
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--local pointers
|
||||
|
||||
local _math_floor = math.floor --lua local
|
||||
local _type = type --lua local
|
||||
local _math_abs = math.abs --lua local
|
||||
local _math_min = math.min
|
||||
local _math_max = math.max
|
||||
local _ipairs = ipairs --lua local
|
||||
|
||||
local _UIParent = UIParent --wow api local
|
||||
|
||||
local gump = _detalhes.gump --details local
|
||||
local _
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--constants
|
||||
--local pointers
|
||||
local floor = math.floor --lua local
|
||||
local type = type --lua local
|
||||
local abs = math.abs --lua local
|
||||
local _math_min = math.min
|
||||
local _math_max = math.max
|
||||
local ipairs = ipairs --lua local
|
||||
local gump = Details.gump --details local
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--constants
|
||||
local end_window_spacement = 0
|
||||
|
||||
--settings
|
||||
|
||||
local animation_speed = 33
|
||||
local animation_speed_hightravel_trigger = 5
|
||||
local animation_speed_hightravel_maxspeed = 3
|
||||
@@ -38,7 +32,7 @@
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--core
|
||||
|
||||
function _detalhes:AnimarSplit (barra, goal)
|
||||
function Details:AnimarSplit(barra, goal)
|
||||
barra.inicio = barra.split.barra:GetValue()
|
||||
barra.fim = goal
|
||||
barra.proximo_update = 0
|
||||
@@ -46,7 +40,7 @@
|
||||
barra:SetScript("OnUpdate", self.FazerAnimacaoSplit)
|
||||
end
|
||||
|
||||
function _detalhes:FazerAnimacaoSplit (elapsed)
|
||||
function Details:FazerAnimacaoSplit(elapsed)
|
||||
local velocidade = 0.8
|
||||
|
||||
if (self.fim > self.inicio) then
|
||||
@@ -73,13 +67,9 @@
|
||||
self.proximo_update = 0
|
||||
end
|
||||
|
||||
|
||||
|
||||
function _detalhes:PerformAnimations (amt_barras)
|
||||
|
||||
function Details:PerformAnimations(amtLines)
|
||||
if (self.bars_sort_direction == 2) then
|
||||
|
||||
for i = _math_min(self.rows_fit_in_window, amt_barras) - 1, 1, -1 do
|
||||
for i = _math_min(self.rows_fit_in_window, amtLines) - 1, 1, -1 do
|
||||
local row = self.barras [i]
|
||||
local row_proxima = self.barras [i-1]
|
||||
|
||||
@@ -108,7 +98,7 @@
|
||||
end
|
||||
else
|
||||
if (row.animacao_fim ~= row.animacao_fim2) then
|
||||
_detalhes:AnimarBarra (row, row.animacao_fim)
|
||||
Details:AnimarBarra (row, row.animacao_fim)
|
||||
row.animacao_fim2 = row.animacao_fim
|
||||
end
|
||||
end
|
||||
@@ -143,7 +133,7 @@
|
||||
end
|
||||
else
|
||||
if (row.animacao_fim ~= row.animacao_fim2) then
|
||||
_detalhes:AnimarBarra (row, row.animacao_fim)
|
||||
Details:AnimarBarra (row, row.animacao_fim)
|
||||
row.animacao_fim2 = row.animacao_fim
|
||||
end
|
||||
end
|
||||
@@ -202,7 +192,7 @@
|
||||
animation_func_left = animation_left_simple
|
||||
animation_func_right = animation_right_simple
|
||||
|
||||
function _detalhes:AnimarBarra (esta_barra, fim)
|
||||
function Details:AnimarBarra (esta_barra, fim)
|
||||
esta_barra.inicio = esta_barra.statusbar.value
|
||||
esta_barra.fim = fim
|
||||
esta_barra.tem_animacao = true
|
||||
@@ -214,8 +204,8 @@
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:RefreshAnimationFunctions()
|
||||
if (_detalhes.streamer_config.use_animation_accel) then
|
||||
function Details:RefreshAnimationFunctions()
|
||||
if (Details.streamer_config.use_animation_accel) then
|
||||
animation_func_left = animation_left_with_accel
|
||||
animation_func_right = animation_right_with_accel
|
||||
|
||||
@@ -224,14 +214,14 @@
|
||||
animation_func_right = animation_right_simple
|
||||
end
|
||||
|
||||
animation_speed = _detalhes.animation_speed
|
||||
animation_speed_hightravel_trigger = _detalhes.animation_speed_triggertravel
|
||||
animation_speed_hightravel_maxspeed = _detalhes.animation_speed_maxtravel
|
||||
animation_speed_lowtravel_minspeed = _detalhes.animation_speed_mintravel
|
||||
animation_speed = Details.animation_speed
|
||||
animation_speed_hightravel_trigger = Details.animation_speed_triggertravel
|
||||
animation_speed_hightravel_maxspeed = Details.animation_speed_maxtravel
|
||||
animation_speed_lowtravel_minspeed = Details.animation_speed_mintravel
|
||||
end
|
||||
|
||||
--deprecated
|
||||
function _detalhes:FazerAnimacao_Esquerda (deltaTime)
|
||||
function Details:FazerAnimacao_Esquerda (deltaTime)
|
||||
self.inicio = self.inicio - (animation_speed * deltaTime)
|
||||
self:SetValue(self.inicio)
|
||||
if (self.inicio-1 <= self.fim) then
|
||||
@@ -239,7 +229,8 @@
|
||||
self:SetScript("OnUpdate", nil)
|
||||
end
|
||||
end
|
||||
function _detalhes:FazerAnimacao_Direita (deltaTime)
|
||||
|
||||
function Details:FazerAnimacao_Direita (deltaTime)
|
||||
self.inicio = self.inicio + (animation_speed * deltaTime)
|
||||
self:SetValue(self.inicio)
|
||||
if (self.inicio+0.1 >= self.fim) then
|
||||
@@ -248,7 +239,7 @@
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:AtualizaPontos()
|
||||
function Details:AtualizaPontos()
|
||||
local _x, _y = self:GetPositionOnScreen()
|
||||
if (not _x) then
|
||||
return
|
||||
@@ -287,7 +278,7 @@
|
||||
--LibWindow-1.1 by Mikk http://www.wowace.com/profiles/mikk/
|
||||
--this is the restore function from Libs\LibWindow-1.1\LibWindow-1.1.lua.
|
||||
--we can't schedule a new save after restoring, we save it inside the instance without frame references and always attach to UIparent.
|
||||
function _detalhes:RestoreLibWindow()
|
||||
function Details:RestoreLibWindow()
|
||||
local frame = self.baseframe
|
||||
if (frame) then
|
||||
if (self.libwindow.x) then
|
||||
@@ -333,12 +324,12 @@
|
||||
--this is the save function from Libs\LibWindow-1.1\LibWindow-1.1.lua.
|
||||
--we need to make it save inside the instance object without frame references and also we must always use UIParent due to embed settings for ElvUI and LUI.
|
||||
|
||||
function _detalhes:SaveLibWindow()
|
||||
function Details:SaveLibWindow()
|
||||
local frame = self.baseframe
|
||||
if (frame) then
|
||||
local left = frame:GetLeft()
|
||||
if (not left) then
|
||||
return _detalhes:ScheduleTimer ("SaveLibWindow", 0.05, self)
|
||||
return Details:ScheduleTimer("SaveLibWindow", 0.05, self)
|
||||
end
|
||||
--Details: we are always using UIParent here or the addon break when using Embeds.
|
||||
local parent = UIParent --local parent = frame:GetParent() or nilParent
|
||||
@@ -387,18 +378,17 @@
|
||||
--end for libwindow-1.1
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
|
||||
function _detalhes:SaveMainWindowSize()
|
||||
|
||||
function Details:SaveMainWindowSize()
|
||||
local baseframe_width = self.baseframe:GetWidth()
|
||||
if (not baseframe_width) then
|
||||
return _detalhes:ScheduleTimer ("SaveMainWindowSize", 1, self)
|
||||
return Details:ScheduleTimer("SaveMainWindowSize", 1, self)
|
||||
end
|
||||
local baseframe_height = self.baseframe:GetHeight()
|
||||
|
||||
--calc position
|
||||
local _x, _y = self:GetPositionOnScreen()
|
||||
if (not _x) then
|
||||
return _detalhes:ScheduleTimer ("SaveMainWindowSize", 1, self)
|
||||
return Details:ScheduleTimer("SaveMainWindowSize", 1, self)
|
||||
end
|
||||
|
||||
--save the position
|
||||
@@ -442,8 +432,7 @@
|
||||
return {altura = self.baseframe:GetHeight(), largura = self.baseframe:GetWidth(), x = _x, y = _y}
|
||||
end
|
||||
|
||||
function _detalhes:SaveMainWindowPosition (instance)
|
||||
|
||||
function Details:SaveMainWindowPosition (instance)
|
||||
if (instance) then
|
||||
self = instance
|
||||
end
|
||||
@@ -452,14 +441,14 @@
|
||||
--get sizes
|
||||
local baseframe_width = self.baseframe:GetWidth()
|
||||
if (not baseframe_width) then
|
||||
return _detalhes:ScheduleTimer ("SaveMainWindowPosition", 1, self)
|
||||
return Details:ScheduleTimer("SaveMainWindowPosition", 1, self)
|
||||
end
|
||||
local baseframe_height = self.baseframe:GetHeight()
|
||||
|
||||
--calc position
|
||||
local _x, _y = self:GetPositionOnScreen()
|
||||
if (not _x) then
|
||||
return _detalhes:ScheduleTimer ("SaveMainWindowPosition", 1, self)
|
||||
return Details:ScheduleTimer("SaveMainWindowPosition", 1, self)
|
||||
end
|
||||
|
||||
if (self.mostrando ~= "solo") then
|
||||
@@ -505,9 +494,8 @@
|
||||
return {altura = self.baseframe:GetHeight(), largura = self.baseframe:GetWidth(), x = _x, y = _y}
|
||||
end
|
||||
|
||||
function _detalhes:RestoreMainWindowPosition (pre_defined)
|
||||
|
||||
if (not pre_defined and self.libwindow.x and self.mostrando == "normal" and not _detalhes.instances_no_libwindow) then
|
||||
function Details:RestoreMainWindowPosition (pre_defined)
|
||||
if (not pre_defined and self.libwindow.x and self.mostrando == "normal" and not Details.instances_no_libwindow) then
|
||||
local s = self.window_scale
|
||||
self.baseframe:SetScale(s)
|
||||
self.rowframe:SetScale(s)
|
||||
@@ -525,7 +513,7 @@
|
||||
self.rowframe:SetScale(s)
|
||||
|
||||
local _scale = self.baseframe:GetEffectiveScale()
|
||||
local _UIscale = _UIParent:GetScale()
|
||||
local _UIscale = UIParent:GetScale()
|
||||
|
||||
local novo_x = self.posicao[self.mostrando].x*_UIscale/_scale
|
||||
local novo_y = self.posicao[self.mostrando].y*_UIscale/_scale
|
||||
@@ -537,24 +525,22 @@
|
||||
self.posicao[self.mostrando].h = pre_defined.altura
|
||||
|
||||
elseif (pre_defined and not pre_defined.x) then
|
||||
_detalhes:Msg ("invalid pre_defined table for resize, please rezise the window manually.")
|
||||
Details:Msg("invalid pre_defined table for resize, please rezise the window manually.")
|
||||
end
|
||||
|
||||
self.baseframe:SetWidth(self.posicao[self.mostrando].w)
|
||||
self.baseframe:SetHeight(self.posicao[self.mostrando].h)
|
||||
|
||||
self.baseframe:ClearAllPoints()
|
||||
self.baseframe:SetPoint("CENTER", _UIParent, "CENTER", novo_x, novo_y)
|
||||
|
||||
self.baseframe:SetPoint("CENTER", UIParent, "CENTER", novo_x, novo_y)
|
||||
end
|
||||
|
||||
function _detalhes:RestoreMainWindowPositionNoResize (pre_defined, x, y)
|
||||
|
||||
function Details:RestoreMainWindowPositionNoResize (pre_defined, x, y)
|
||||
x = x or 0
|
||||
y = y or 0
|
||||
|
||||
local _scale = self.baseframe:GetEffectiveScale()
|
||||
local _UIscale = _UIParent:GetScale()
|
||||
local _UIscale = UIParent:GetScale()
|
||||
|
||||
local novo_x = self.posicao[self.mostrando].x*_UIscale/_scale
|
||||
local novo_y = self.posicao[self.mostrando].y*_UIscale/_scale
|
||||
@@ -567,11 +553,11 @@
|
||||
end
|
||||
|
||||
self.baseframe:ClearAllPoints()
|
||||
self.baseframe:SetPoint("CENTER", _UIParent, "CENTER", novo_x + x, novo_y + y)
|
||||
self.baseframe:SetPoint("CENTER", UIParent, "CENTER", novo_x + x, novo_y + y)
|
||||
self.baseframe.BoxBarrasAltura = self.baseframe:GetHeight() - end_window_spacement --espa�o para o final da janela
|
||||
end
|
||||
|
||||
function _detalhes:CreatePositionTable()
|
||||
function Details:CreatePositionTable()
|
||||
local t = {pos_table = true}
|
||||
|
||||
if (self.libwindow) then
|
||||
@@ -592,7 +578,7 @@
|
||||
return t
|
||||
end
|
||||
|
||||
function _detalhes:RestorePositionFromPositionTable (t)
|
||||
function Details:RestorePositionFromPositionTable (t)
|
||||
if (not t.pos_table) then
|
||||
return
|
||||
end
|
||||
@@ -613,8 +599,8 @@
|
||||
return self:RestoreMainWindowPosition()
|
||||
end
|
||||
|
||||
function _detalhes:ResetaGump (instancia, tipo, segmento)
|
||||
if (not instancia or _type(instancia) == "boolean") then
|
||||
function Details:ResetaGump (instancia, tipo, segmento)
|
||||
if (not instancia or type(instancia) == "boolean") then
|
||||
segmento = tipo
|
||||
tipo = instancia
|
||||
instancia = self
|
||||
@@ -645,24 +631,22 @@
|
||||
end
|
||||
instancia.need_rolagem = false
|
||||
instancia.bar_mod = nil
|
||||
|
||||
end
|
||||
|
||||
function _detalhes:ReajustaGump()
|
||||
|
||||
function Details:ReajustaGump()
|
||||
if (self.mostrando == "normal") then --somente alterar o tamanho das barras se tiver mostrando o gump normal
|
||||
|
||||
if (not self.baseframe.isStretching and self.stretchToo and #self.stretchToo > 0) then
|
||||
if (self.eh_horizontal or self.eh_tudo or (self.verticalSnap and not self.eh_vertical)) then
|
||||
for _, instancia in _ipairs(self.stretchToo) do
|
||||
for _, instancia in ipairs(self.stretchToo) do
|
||||
instancia.baseframe:SetWidth(self.baseframe:GetWidth())
|
||||
local mod = (self.baseframe:GetWidth() - instancia.baseframe._place.largura) / 2
|
||||
instancia:RestoreMainWindowPositionNoResize (instancia.baseframe._place, mod, nil)
|
||||
instancia:BaseFrameSnap()
|
||||
end
|
||||
end
|
||||
|
||||
if ((self.eh_vertical or self.eh_tudo or not self.eh_horizontal) and (not self.verticalSnap or self.eh_vertical)) then
|
||||
for _, instancia in _ipairs(self.stretchToo) do
|
||||
for _, instancia in ipairs(self.stretchToo) do
|
||||
if (instancia.baseframe) then --esta criada
|
||||
instancia.baseframe:SetHeight(self.baseframe:GetHeight())
|
||||
local mod
|
||||
@@ -676,15 +660,17 @@
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
elseif (self.baseframe.isStretching and self.stretchToo and #self.stretchToo > 0) then
|
||||
if (self.baseframe.stretch_direction == "top") then
|
||||
for _, instancia in _ipairs(self.stretchToo) do
|
||||
for _, instancia in ipairs(self.stretchToo) do
|
||||
instancia.baseframe:SetHeight(self.baseframe:GetHeight())
|
||||
local mod = (self.baseframe:GetHeight() - (instancia.baseframe._place.altura or instancia.baseframe:GetHeight())) / 2
|
||||
instancia:RestoreMainWindowPositionNoResize (instancia.baseframe._place, nil, mod)
|
||||
end
|
||||
|
||||
elseif (self.baseframe.stretch_direction == "bottom") then
|
||||
for _, instancia in _ipairs(self.stretchToo) do
|
||||
for _, instancia in ipairs(self.stretchToo) do
|
||||
instancia.baseframe:SetHeight(self.baseframe:GetHeight())
|
||||
local mod = (self.baseframe:GetHeight() - instancia.baseframe._place.altura) / 2
|
||||
mod = mod * -1
|
||||
@@ -699,7 +685,7 @@
|
||||
|
||||
--reajusta o freeze
|
||||
if (self.freezed) then
|
||||
_detalhes:Freeze (self)
|
||||
Details:Freeze (self)
|
||||
end
|
||||
|
||||
-- -4 difere a precis�o de quando a barra ser� adicionada ou apagada da barra
|
||||
@@ -707,14 +693,14 @@
|
||||
|
||||
local T = self.rows_fit_in_window
|
||||
if (not T) then --primeira vez que o gump esta sendo reajustado
|
||||
T = _math_floor(self.baseframe.BoxBarrasAltura / self.row_height)
|
||||
T = floor(self.baseframe.BoxBarrasAltura / self.row_height)
|
||||
end
|
||||
|
||||
--reajustar o local do rel�gio
|
||||
local meio = self.baseframe:GetWidth() / 2
|
||||
local novo_local = meio - 25
|
||||
|
||||
self.rows_fit_in_window = _math_floor( self.baseframe.BoxBarrasAltura / self.row_height)
|
||||
self.rows_fit_in_window = floor( self.baseframe.BoxBarrasAltura / self.row_height)
|
||||
|
||||
--verifica se precisa criar mais barras
|
||||
if (self.rows_fit_in_window > #self.barras) then--verifica se precisa criar mais barras
|
||||
@@ -758,6 +744,7 @@
|
||||
local fim_iterator = self.barraS[2] --posi��o atual
|
||||
fim_iterator = fim_iterator+barras_diff --nova posi��o
|
||||
local excedeu_iterator = fim_iterator - X --total que ta sendo mostrado - fim do iterator
|
||||
|
||||
if (excedeu_iterator > 0) then --extrapolou
|
||||
fim_iterator = X --seta o fim do iterator pra ser na ultima barra
|
||||
self.barraS[2] = fim_iterator --fim do iterator setado
|
||||
@@ -794,7 +781,7 @@
|
||||
local fim_iterator = self.barraS[2] --posi��o atual
|
||||
if (not (fim_iterator == X and fim_iterator < C)) then --calcula primeiro as barras que foram perdidas s�o barras que n�o estavam sendo usadas
|
||||
--perdi X barras, diminui X posi��es no iterator
|
||||
local perdeu = _math_abs (barras_diff)
|
||||
local perdeu = abs(barras_diff)
|
||||
|
||||
if (fim_iterator == X) then --se o iterator tiver na ultima posi��o
|
||||
perdeu = perdeu - (C - X)
|
||||
@@ -827,6 +814,7 @@
|
||||
self:EsconderScrollBar()
|
||||
end
|
||||
self.need_rolagem = false
|
||||
|
||||
else --ligar ou atualizar a rolagem
|
||||
if (not self.rolagem and not self.baseframe.isStretching) then
|
||||
self:MostrarScrollBar()
|
||||
@@ -841,7 +829,6 @@
|
||||
local tabela = esta_barra.minha_tabela
|
||||
|
||||
if (tabela) then --a barra esta mostrando alguma coisa
|
||||
|
||||
if (tabela._custom) then
|
||||
tabela (esta_barra, self)
|
||||
elseif (tabela._refresh_window) then
|
||||
@@ -849,7 +836,6 @@
|
||||
else
|
||||
tabela:RefreshBarra (esta_barra, self, true)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
whichRowLine = whichRowLine+1
|
||||
@@ -857,7 +843,6 @@
|
||||
|
||||
--for�a o pr�ximo refresh
|
||||
self.showing[self.atributo].need_refresh = true
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -868,7 +853,7 @@
|
||||
local preset3_backdrop = {bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]], edgeFile = [[Interface\AddOns\Details\images\border_3]], tile=true,
|
||||
edgeSize = 16, tileSize = 64, insets = {left = 3, right = 3, top = 4, bottom = 4}}
|
||||
|
||||
_detalhes.cooltip_preset3_backdrop = preset3_backdrop
|
||||
Details.cooltip_preset3_backdrop = preset3_backdrop
|
||||
|
||||
local white_table = {1, 1, 1, 1}
|
||||
local black_table = {0, 0, 0, 1}
|
||||
@@ -876,10 +861,10 @@
|
||||
|
||||
local preset2_backdrop = {bgFile = [[Interface\AddOns\Details\images\background]], edgeFile = [[Interface\Buttons\WHITE8X8]], tile=true,
|
||||
edgeSize = 1, tileSize = 64, insets = {left = 0, right = 0, top = 0, bottom = 0}}
|
||||
_detalhes.cooltip_preset2_backdrop = preset2_backdrop
|
||||
Details.cooltip_preset2_backdrop = preset2_backdrop
|
||||
|
||||
--"Details BarBorder 3"
|
||||
function _detalhes:CooltipPreset(preset)
|
||||
function Details:CooltipPreset(preset)
|
||||
local GameCooltip = GameCooltip
|
||||
|
||||
GameCooltip:Reset()
|
||||
@@ -931,39 +916,37 @@
|
||||
GameCooltip:SetColor (1, 0.5, 0.5, 0.5, 0.5)
|
||||
|
||||
GameCooltip:SetBackdrop(1, preset3_backdrop, nil, white_table)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
--yes no panel
|
||||
|
||||
do
|
||||
_detalhes.yesNo = _detalhes.gump:NewPanel (UIParent, _, "DetailsYesNoWindow", _, 500, 80)
|
||||
_detalhes.yesNo:SetPoint("center", UIParent, "center")
|
||||
_detalhes.gump:NewLabel(_detalhes.yesNo, _, "$parentAsk", "ask", "")
|
||||
_detalhes.yesNo ["ask"]:SetPoint("center", _detalhes.yesNo, "center", 0, 25)
|
||||
_detalhes.yesNo ["ask"]:SetWidth(480)
|
||||
_detalhes.yesNo ["ask"]:SetJustifyH("center")
|
||||
_detalhes.yesNo ["ask"]:SetHeight(22)
|
||||
_detalhes.gump:NewButton(_detalhes.yesNo, _, "$parentNo", "no", 100, 30, function() _detalhes.yesNo:Hide() end, nil, nil, nil, Loc ["STRING_NO"])
|
||||
_detalhes.gump:NewButton(_detalhes.yesNo, _, "$parentYes", "yes", 100, 30, nil, nil, nil, nil, Loc ["STRING_YES"])
|
||||
_detalhes.yesNo ["no"]:SetPoint(10, -45)
|
||||
_detalhes.yesNo ["yes"]:SetPoint(390, -45)
|
||||
_detalhes.yesNo ["no"]:InstallCustomTexture()
|
||||
_detalhes.yesNo ["yes"]:InstallCustomTexture()
|
||||
_detalhes.yesNo ["yes"]:SetHook("OnMouseUp", function() _detalhes.yesNo:Hide() end)
|
||||
function _detalhes:Ask (msg, func, ...)
|
||||
_detalhes.yesNo ["ask"].text = msg
|
||||
Details.yesNo = Details.gump:NewPanel(UIParent, _, "DetailsYesNoWindow", _, 500, 80)
|
||||
Details.yesNo:SetPoint("center", UIParent, "center")
|
||||
Details.gump:NewLabel(Details.yesNo, _, "$parentAsk", "ask", "")
|
||||
Details.yesNo ["ask"]:SetPoint("center", Details.yesNo, "center", 0, 25)
|
||||
Details.yesNo ["ask"]:SetWidth(480)
|
||||
Details.yesNo ["ask"]:SetJustifyH("center")
|
||||
Details.yesNo ["ask"]:SetHeight(22)
|
||||
Details.gump:NewButton(Details.yesNo, _, "$parentNo", "no", 100, 30, function() Details.yesNo:Hide() end, nil, nil, nil, Loc ["STRING_NO"])
|
||||
Details.gump:NewButton(Details.yesNo, _, "$parentYes", "yes", 100, 30, nil, nil, nil, nil, Loc ["STRING_YES"])
|
||||
Details.yesNo ["no"]:SetPoint(10, -45)
|
||||
Details.yesNo ["yes"]:SetPoint(390, -45)
|
||||
Details.yesNo ["no"]:InstallCustomTexture()
|
||||
Details.yesNo ["yes"]:InstallCustomTexture()
|
||||
Details.yesNo ["yes"]:SetHook("OnMouseUp", function() Details.yesNo:Hide() end)
|
||||
function Details:Ask (msg, func, ...)
|
||||
Details.yesNo ["ask"].text = msg
|
||||
local p1, p2 = ...
|
||||
_detalhes.yesNo ["yes"]:SetClickFunction(func, p1, p2)
|
||||
_detalhes.yesNo:Show()
|
||||
Details.yesNo ["yes"]:SetClickFunction(func, p1, p2)
|
||||
Details.yesNo:Show()
|
||||
end
|
||||
_detalhes.yesNo:Hide()
|
||||
Details.yesNo:Hide()
|
||||
end
|
||||
|
||||
--cria o frame de wait for plugin
|
||||
function _detalhes:CreateWaitForPlugin()
|
||||
|
||||
function Details:CreateWaitForPlugin()
|
||||
local WaitForPluginFrame = CreateFrame("frame", "DetailsWaitForPluginFrame" .. self.meu_id, UIParent,"BackdropTemplate")
|
||||
local WaitTexture = WaitForPluginFrame:CreateTexture(nil, "overlay")
|
||||
WaitTexture:SetTexture("Interface\\CHARACTERFRAME\\Disconnect-Icon")
|
||||
@@ -997,7 +980,6 @@
|
||||
self.wait_for_plugin_created = true
|
||||
|
||||
function self:WaitForPlugin()
|
||||
|
||||
self:ChangeIcon ([[Interface\GossipFrame\ActiveQuestIcon]])
|
||||
|
||||
--if (WaitForPluginFrame:IsShown() and WaitForPluginFrame:GetParent() == self.baseframe) then
|
||||
@@ -1040,11 +1022,11 @@
|
||||
label:Hide()
|
||||
bgpanel:Hide()
|
||||
|
||||
if (self.meu_id == _detalhes.solo) then
|
||||
_detalhes.SoloTables:switch (nil, _detalhes.SoloTables.Mode)
|
||||
if (self.meu_id == Details.solo) then
|
||||
Details.SoloTables:switch(nil, Details.SoloTables.Mode)
|
||||
|
||||
elseif (self.modo == _detalhes._detalhes_props["MODO_RAID"]) then
|
||||
_detalhes.RaidTables:EnableRaidMode (self)
|
||||
elseif (self.modo == Details._detalhes_props["MODO_RAID"]) then
|
||||
Details.RaidTables:EnableRaidMode (self)
|
||||
|
||||
end
|
||||
end
|
||||
@@ -1077,12 +1059,11 @@
|
||||
|
||||
WaitForPluginFrame:Hide()
|
||||
|
||||
function _detalhes:WaitForSoloPlugin (instancia)
|
||||
|
||||
function Details:WaitForSoloPlugin(instancia)
|
||||
instancia:ChangeIcon ([[Interface\GossipFrame\ActiveQuestIcon]])
|
||||
|
||||
if (WaitForPluginFrame:IsShown() and WaitForPluginFrame:GetParent() == instancia.baseframe) then
|
||||
return _detalhes:ScheduleTimer ("ExecDelayedPlugin", 5, instancia)
|
||||
return Details:ScheduleTimer("ExecDelayedPlugin", 5, instancia)
|
||||
end
|
||||
|
||||
WaitForPluginFrame:SetParent(instancia.baseframe)
|
||||
@@ -1095,36 +1076,34 @@
|
||||
bgpanel:Show()
|
||||
RotateAnimGroup:Play()
|
||||
|
||||
return _detalhes:ScheduleTimer ("ExecDelayedPlugin", 5, instancia)
|
||||
return Details:ScheduleTimer("ExecDelayedPlugin", 5, instancia)
|
||||
end
|
||||
|
||||
function _detalhes:CancelWaitForPlugin()
|
||||
function Details:CancelWaitForPlugin()
|
||||
RotateAnimGroup:Stop()
|
||||
WaitForPluginFrame:Hide()
|
||||
label:Hide()
|
||||
bgpanel:Hide()
|
||||
end
|
||||
|
||||
function _detalhes:ExecDelayedPlugin (instancia)
|
||||
function Details:ExecDelayedPlugin(instancia)
|
||||
RotateAnimGroup:Stop()
|
||||
WaitForPluginFrame:Hide()
|
||||
label:Hide()
|
||||
bgpanel:Hide()
|
||||
|
||||
if (instancia.meu_id == _detalhes.solo) then
|
||||
_detalhes.SoloTables:switch (nil, _detalhes.SoloTables.Mode)
|
||||
if (instancia.meu_id == Details.solo) then
|
||||
Details.SoloTables:switch(nil, Details.SoloTables.Mode)
|
||||
|
||||
elseif (instancia.meu_id == _detalhes.raid) then
|
||||
_detalhes.RaidTables:switch (nil, _detalhes.RaidTables.Mode)
|
||||
elseif (instancia.meu_id == Details.raid) then
|
||||
Details.RaidTables:switch(nil, Details.RaidTables.Mode)
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--feedback window
|
||||
function _detalhes:OpenFeedbackWindow()
|
||||
|
||||
function Details:OpenFeedbackWindow()
|
||||
if (not _G.DetailsFeedbackPanel) then
|
||||
|
||||
gump:CreateSimplePanel(UIParent, 340, 300, Loc ["STRING_FEEDBACK_SEND_FEEDBACK"], "DetailsFeedbackPanel")
|
||||
@@ -1174,13 +1153,13 @@
|
||||
|
||||
local on_click = function(_, _, website)
|
||||
if (website == 1) then
|
||||
_detalhes:CopyPaste ([[http://www.wowinterface.com/downloads/addcomment.php?action=addcomment&fileid=23056]])
|
||||
Details:CopyPaste ([[http://www.wowinterface.com/downloads/addcomment.php?action=addcomment&fileid=23056]])
|
||||
|
||||
elseif (website == 2) then
|
||||
_detalhes:CopyPaste ([[http://www.curse.com/addons/wow/details]])
|
||||
Details:CopyPaste ([[http://www.curse.com/addons/wow/details]])
|
||||
|
||||
elseif (website == 3) then
|
||||
_detalhes:CopyPaste ([[http://www.mmo-champion.com/threads/1480721-New-damage-meter-%28Details!%29-need-help-with-tests-and-feedbacks]])
|
||||
Details:CopyPaste ([[http://www.mmo-champion.com/threads/1480721-New-damage-meter-%28Details!%29-need-help-with-tests-and-feedbacks]])
|
||||
|
||||
end
|
||||
end
|
||||
@@ -1209,10 +1188,8 @@
|
||||
end
|
||||
|
||||
_G.DetailsFeedbackPanel:Show()
|
||||
|
||||
end
|
||||
|
||||
|
||||
--interface menu
|
||||
local f = CreateFrame("frame", "DetailsInterfaceOptionsPanel", UIParent,"BackdropTemplate")
|
||||
f.name = "Details"
|
||||
@@ -1230,36 +1207,37 @@
|
||||
f.options_button:SetHeight(170)
|
||||
f.options_button:SetWidth(170)
|
||||
f.options_button:SetScript("OnClick", function(self)
|
||||
local lower_instance = _detalhes:GetLowerInstanceNumber()
|
||||
local lower_instance = Details:GetLowerInstanceNumber()
|
||||
if (not lower_instance) then
|
||||
--no window opened?
|
||||
local instance1 = _detalhes.tabela_instancias [1]
|
||||
local instance1 = Details.tabela_instancias [1]
|
||||
if (instance1) then
|
||||
instance1:Enable()
|
||||
return _detalhes:OpenOptionsWindow (instance1)
|
||||
return Details:OpenOptionsWindow (instance1)
|
||||
else
|
||||
instance1 = _detalhes:CriarInstancia (_, true)
|
||||
instance1 = Details:CriarInstancia(_, true)
|
||||
if (instance1) then
|
||||
return _detalhes:OpenOptionsWindow (instance1)
|
||||
return Details:OpenOptionsWindow (instance1)
|
||||
else
|
||||
_detalhes:Msg ("couldn't open options panel: no window available.")
|
||||
Details:Msg("couldn't open options panel: no window available.")
|
||||
end
|
||||
end
|
||||
end
|
||||
_detalhes:OpenOptionsWindow (_detalhes:GetInstance(lower_instance))
|
||||
Details:OpenOptionsWindow (Details:GetInstance(lower_instance))
|
||||
end)
|
||||
|
||||
--create new window
|
||||
f.new_window_button = CreateFrame("button", nil, f)
|
||||
f.new_window_button:SetText(Loc ["STRING_MINIMAPMENU_NEWWINDOW"])
|
||||
f.new_window_button:SetPoint("topleft", f, "topleft", 10, -125)
|
||||
f.new_window_button:SetWidth(170)
|
||||
f.new_window_button:SetScript("OnClick", function(self)
|
||||
_detalhes:CriarInstancia (_, true)
|
||||
Details:CriarInstancia(_, true)
|
||||
end)
|
||||
|
||||
|
||||
--update details version window
|
||||
function _detalhes:OpenUpdateWindow()
|
||||
function Details:OpenUpdateWindow()
|
||||
|
||||
if (not _G.DetailsUpdateDialog) then
|
||||
local updatewindow_frame = CreateFrame("frame", "DetailsUpdateDialog", UIParent, "ButtonFrameTemplate")
|
||||
@@ -1283,7 +1261,7 @@
|
||||
updatewindow_frame.gnoma:SetSize(105*1.05, 107*1.05)
|
||||
updatewindow_frame.gnoma:SetTexCoord (0.2021484375, 0, 0.7919921875, 1)
|
||||
|
||||
local editbox = _detalhes.gump:NewTextEntry (updatewindow_frame, nil, "$parentTextEntry", "text", 387, 14)
|
||||
local editbox = Details.gump:NewTextEntry(updatewindow_frame, nil, "$parentTextEntry", "text", 387, 14)
|
||||
editbox:SetPoint(20, -136)
|
||||
editbox:SetAutoFocus (false)
|
||||
editbox:SetHook("OnEditFocusGained", function()
|
||||
@@ -1313,25 +1291,23 @@
|
||||
editbox:ClearFocus()
|
||||
end)
|
||||
|
||||
function _detalhes:UpdateDialogSetFocus()
|
||||
function Details:UpdateDialogSetFocus()
|
||||
DetailsUpdateDialog:Show()
|
||||
DetailsUpdateDialogTextEntry.MyObject:SetFocus()
|
||||
DetailsUpdateDialogTextEntry.MyObject:HighlightText()
|
||||
end
|
||||
_detalhes:ScheduleTimer ("UpdateDialogSetFocus", 1)
|
||||
Details:ScheduleTimer("UpdateDialogSetFocus", 1)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
--minimap icon and hotcorner
|
||||
function _detalhes:RegisterMinimap()
|
||||
|
||||
function Details:RegisterMinimap()
|
||||
local LDB = LibStub("LibDataBroker-1.1", true)
|
||||
local LDBIcon = LDB and LibStub("LibDBIcon-1.0", true)
|
||||
|
||||
if LDB then
|
||||
|
||||
local databroker = LDB:NewDataObject ("Details", {
|
||||
type = "data source",
|
||||
icon = [[Interface\AddOns\Details\images\minimap]],
|
||||
@@ -1340,14 +1316,13 @@
|
||||
HotCornerIgnore = true,
|
||||
|
||||
OnClick = function(self, button)
|
||||
|
||||
if (button == "LeftButton") then
|
||||
if (IsControlKeyDown()) then
|
||||
_detalhes:ToggleWindows()
|
||||
Details:ToggleWindows()
|
||||
return
|
||||
end
|
||||
--1 = open options panel
|
||||
if (_detalhes.minimap.onclick_what_todo == 1) then
|
||||
if (Details.minimap.onclick_what_todo == 1) then
|
||||
|
||||
if (_G.DetailsOptionsWindow) then
|
||||
if (_G.DetailsOptionsWindow:IsShown()) then
|
||||
@@ -1356,27 +1331,27 @@
|
||||
end
|
||||
end
|
||||
|
||||
local lower_instance = _detalhes:GetLowerInstanceNumber()
|
||||
local lower_instance = Details:GetLowerInstanceNumber()
|
||||
if (not lower_instance) then
|
||||
local instance = _detalhes:GetInstance(1)
|
||||
_detalhes.CriarInstancia (_, _, 1)
|
||||
_detalhes:OpenOptionsWindow (instance)
|
||||
local instance = Details:GetInstance(1)
|
||||
Details.CriarInstancia (_, _, 1)
|
||||
Details:OpenOptionsWindow (instance)
|
||||
else
|
||||
_detalhes:OpenOptionsWindow (_detalhes:GetInstance(lower_instance))
|
||||
Details:OpenOptionsWindow (Details:GetInstance(lower_instance))
|
||||
end
|
||||
|
||||
--2 = reset data
|
||||
elseif (_detalhes.minimap.onclick_what_todo == 2) then
|
||||
_detalhes.tabela_historico:resetar()
|
||||
elseif (Details.minimap.onclick_what_todo == 2) then
|
||||
Details.tabela_historico:resetar()
|
||||
|
||||
--3 = show hide windows
|
||||
elseif (_detalhes.minimap.onclick_what_todo == 3) then
|
||||
local opened = _detalhes:GetOpenedWindowsAmount()
|
||||
elseif (Details.minimap.onclick_what_todo == 3) then
|
||||
local opened = Details:GetOpenedWindowsAmount()
|
||||
|
||||
if (opened == 0) then
|
||||
_detalhes:ReabrirTodasInstancias()
|
||||
Details:ReabrirTodasInstancias()
|
||||
else
|
||||
_detalhes:ShutDownAllInstances()
|
||||
Details:ShutDownAllInstances()
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1399,40 +1374,40 @@
|
||||
--GameCooltip:SetBannerText (1, "Mini Map Menu", {"left", "right", 2, -5}, "white", 10)
|
||||
|
||||
--reset
|
||||
GameCooltip:AddMenu (1, _detalhes.tabela_historico.resetar, true, nil, nil, Loc ["STRING_ERASE_DATA"], nil, true)
|
||||
GameCooltip:AddMenu (1, Details.tabela_historico.resetar, true, nil, nil, Loc ["STRING_ERASE_DATA"], nil, true)
|
||||
GameCooltip:AddIcon ([[Interface\COMMON\VOICECHAT-MUTED]], 1, 1, 14, 14)
|
||||
|
||||
GameCooltip:AddLine("$div")
|
||||
|
||||
--nova instancia
|
||||
GameCooltip:AddMenu (1, _detalhes.CriarInstancia, true, nil, nil, Loc ["STRING_MINIMAPMENU_NEWWINDOW"], nil, true)
|
||||
GameCooltip:AddMenu (1, Details.CriarInstancia, true, nil, nil, Loc ["STRING_MINIMAPMENU_NEWWINDOW"], nil, true)
|
||||
--GameCooltip:AddIcon ([[Interface\Buttons\UI-AttributeButton-Encourage-Up]], 1, 1, 10, 10, 4/16, 12/16, 4/16, 12/16)
|
||||
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\icons]], 1, 1, 12, 11, 462/512, 473/512, 1/512, 11/512)
|
||||
|
||||
--reopen all windows
|
||||
GameCooltip:AddMenu (1, _detalhes.ReabrirTodasInstancias, true, nil, nil, Loc ["STRING_MINIMAPMENU_REOPENALL"], nil, true)
|
||||
GameCooltip:AddMenu (1, Details.ReabrirTodasInstancias, true, nil, nil, Loc ["STRING_MINIMAPMENU_REOPENALL"], nil, true)
|
||||
GameCooltip:AddIcon ([[Interface\Buttons\UI-MicroStream-Green]], 1, 1, 14, 14, 0.1875, 0.8125, 0.84375, 0.15625)
|
||||
--close all windows
|
||||
GameCooltip:AddMenu (1, _detalhes.ShutDownAllInstances, true, nil, nil, Loc ["STRING_MINIMAPMENU_CLOSEALL"], nil, true)
|
||||
GameCooltip:AddMenu (1, Details.ShutDownAllInstances, true, nil, nil, Loc ["STRING_MINIMAPMENU_CLOSEALL"], nil, true)
|
||||
GameCooltip:AddIcon ([[Interface\Buttons\UI-MicroStream-Red]], 1, 1, 14, 14, 0.1875, 0.8125, 0.15625, 0.84375)
|
||||
|
||||
GameCooltip:AddLine("$div")
|
||||
|
||||
--lock
|
||||
GameCooltip:AddMenu (1, _detalhes.TravasInstancias, true, nil, nil, Loc ["STRING_MINIMAPMENU_LOCK"], nil, true)
|
||||
GameCooltip:AddMenu (1, Details.TravasInstancias, true, nil, nil, Loc ["STRING_MINIMAPMENU_LOCK"], nil, true)
|
||||
GameCooltip:AddIcon ([[Interface\PetBattles\PetBattle-LockIcon]], 1, 1, 14, 14, 0.0703125, 0.9453125, 0.0546875, 0.9453125)
|
||||
|
||||
GameCooltip:AddMenu (1, _detalhes.DestravarInstancias, true, nil, nil, Loc ["STRING_MINIMAPMENU_UNLOCK"], nil, true)
|
||||
GameCooltip:AddMenu (1, Details.DestravarInstancias, true, nil, nil, Loc ["STRING_MINIMAPMENU_UNLOCK"], nil, true)
|
||||
GameCooltip:AddIcon ([[Interface\PetBattles\PetBattle-LockIcon]], 1, 1, 14, 14, 0.0703125, 0.9453125, 0.0546875, 0.9453125, "gray")
|
||||
|
||||
GameCooltip:AddLine("$div")
|
||||
|
||||
--disable minimap icon
|
||||
local disable_minimap = function()
|
||||
_detalhes.minimap.hide = not value
|
||||
Details.minimap.hide = not value
|
||||
|
||||
LDBIcon:Refresh ("Details", _detalhes.minimap)
|
||||
if (_detalhes.minimap.hide) then
|
||||
LDBIcon:Refresh ("Details", Details.minimap)
|
||||
if (Details.minimap.hide) then
|
||||
LDBIcon:Hide ("Details")
|
||||
else
|
||||
LDBIcon:Show ("Details")
|
||||
@@ -1443,7 +1418,7 @@
|
||||
|
||||
--
|
||||
|
||||
GameCooltip:SetBackdrop(1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
|
||||
GameCooltip:SetBackdrop(1, Details.tooltip_backdrop, nil, Details.tooltip_border_color)
|
||||
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0.64453125, 0}, {.8, .8, .8, 0.2}, true)
|
||||
|
||||
GameCooltip:SetOwner(self, "topright", "bottomleft")
|
||||
@@ -1454,11 +1429,11 @@
|
||||
end,
|
||||
OnTooltipShow = function(tooltip)
|
||||
tooltip:AddLine("Details!", 1, 1, 1)
|
||||
if (_detalhes.minimap.onclick_what_todo == 1) then
|
||||
if (Details.minimap.onclick_what_todo == 1) then
|
||||
tooltip:AddLine(Loc ["STRING_MINIMAP_TOOLTIP1"])
|
||||
elseif (_detalhes.minimap.onclick_what_todo == 2) then
|
||||
elseif (Details.minimap.onclick_what_todo == 2) then
|
||||
tooltip:AddLine(Loc ["STRING_MINIMAP_TOOLTIP11"])
|
||||
elseif (_detalhes.minimap.onclick_what_todo == 3) then
|
||||
elseif (Details.minimap.onclick_what_todo == 3) then
|
||||
tooltip:AddLine(Loc ["STRING_MINIMAP_TOOLTIP12"])
|
||||
end
|
||||
tooltip:AddLine(Loc ["STRING_MINIMAP_TOOLTIP2"])
|
||||
@@ -1470,50 +1445,49 @@
|
||||
LDBIcon:Register ("Details", databroker, self.minimap)
|
||||
end
|
||||
|
||||
_detalhes.databroker = databroker
|
||||
|
||||
Details.databroker = databroker
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:DoRegisterHotCorner()
|
||||
function Details:DoRegisterHotCorner()
|
||||
--register lib-hotcorners
|
||||
local on_click_on_hotcorner_button = function(frame, button)
|
||||
if (_detalhes.hotcorner_topleft.onclick_what_todo == 1) then
|
||||
local lower_instance = _detalhes:GetLowerInstanceNumber()
|
||||
if (Details.hotcorner_topleft.onclick_what_todo == 1) then
|
||||
local lower_instance = Details:GetLowerInstanceNumber()
|
||||
if (not lower_instance) then
|
||||
local instance = _detalhes:GetInstance(1)
|
||||
_detalhes.CriarInstancia (_, _, 1)
|
||||
_detalhes:OpenOptionsWindow (instance)
|
||||
local instance = Details:GetInstance(1)
|
||||
Details.CriarInstancia (_, _, 1)
|
||||
Details:OpenOptionsWindow (instance)
|
||||
else
|
||||
_detalhes:OpenOptionsWindow (_detalhes:GetInstance(lower_instance))
|
||||
Details:OpenOptionsWindow (Details:GetInstance(lower_instance))
|
||||
end
|
||||
|
||||
elseif (_detalhes.hotcorner_topleft.onclick_what_todo == 2) then
|
||||
_detalhes.tabela_historico:resetar()
|
||||
elseif (Details.hotcorner_topleft.onclick_what_todo == 2) then
|
||||
Details.tabela_historico:resetar()
|
||||
end
|
||||
end
|
||||
|
||||
local quickclick_func1 = function(frame, button)
|
||||
_detalhes.tabela_historico:resetar()
|
||||
Details.tabela_historico:resetar()
|
||||
end
|
||||
|
||||
local quickclick_func2 = function(frame, button)
|
||||
local lower_instance = _detalhes:GetLowerInstanceNumber()
|
||||
local lower_instance = Details:GetLowerInstanceNumber()
|
||||
if (not lower_instance) then
|
||||
local instance = _detalhes:GetInstance(1)
|
||||
_detalhes.CriarInstancia (_, _, 1)
|
||||
_detalhes:OpenOptionsWindow (instance)
|
||||
local instance = Details:GetInstance(1)
|
||||
Details.CriarInstancia (_, _, 1)
|
||||
Details:OpenOptionsWindow (instance)
|
||||
else
|
||||
_detalhes:OpenOptionsWindow (_detalhes:GetInstance(lower_instance))
|
||||
Details:OpenOptionsWindow (Details:GetInstance(lower_instance))
|
||||
end
|
||||
end
|
||||
|
||||
local tooltip_hotcorner = function()
|
||||
GameTooltip:AddLine("Details!", 1, 1, 1, 1)
|
||||
if (_detalhes.hotcorner_topleft.onclick_what_todo == 1) then
|
||||
if (Details.hotcorner_topleft.onclick_what_todo == 1) then
|
||||
GameTooltip:AddLine("|cFF00FF00Left Click:|r open options panel.", 1, 1, 1, 1)
|
||||
|
||||
elseif (_detalhes.hotcorner_topleft.onclick_what_todo == 2) then
|
||||
elseif (Details.hotcorner_topleft.onclick_what_todo == 2) then
|
||||
GameTooltip:AddLine("|cFF00FF00Left Click:|r clear all segments.", 1, 1, 1, 1)
|
||||
|
||||
end
|
||||
@@ -1526,7 +1500,7 @@
|
||||
--corner
|
||||
"TOPLEFT",
|
||||
--config table
|
||||
_detalhes.hotcorner_topleft,
|
||||
Details.hotcorner_topleft,
|
||||
--frame _G name
|
||||
"DetailsLeftCornerButton",
|
||||
--icon
|
||||
@@ -1555,7 +1529,7 @@
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- ~API
|
||||
|
||||
function _detalhes:InitializeAPIWindow()
|
||||
function Details:InitializeAPIWindow()
|
||||
local DetailsAPI2Frame = gump:CreateSimplePanel(UIParent, 700, 480, "Details! API", "DetailsAPI2Frame")
|
||||
DetailsAPI2Frame.Frame = DetailsAPI2Frame
|
||||
DetailsAPI2Frame.__name = "API"
|
||||
@@ -1566,11 +1540,11 @@ function _detalhes:InitializeAPIWindow()
|
||||
DetailsPluginContainerWindow.EmbedPlugin(DetailsAPI2Frame, DetailsAPI2Frame, true)
|
||||
|
||||
function DetailsAPI2Frame.RefreshWindow()
|
||||
_detalhes.OpenAPI()
|
||||
Details.OpenAPI()
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes.OpenAPI()
|
||||
function Details.OpenAPI()
|
||||
--create the window if not loaded yet
|
||||
Details:CreateAPI2Frame()
|
||||
|
||||
@@ -1579,37 +1553,35 @@ function _detalhes.OpenAPI()
|
||||
DetailsPluginContainerWindow.OpenPlugin(DetailsAPI2Frame)
|
||||
end
|
||||
|
||||
|
||||
|
||||
function Details:LoadFramesForBroadcastTools()
|
||||
--event tracker
|
||||
--if enabled and not loaded, load it
|
||||
if (_detalhes.event_tracker.enabled and not _detalhes.Broadcaster_EventTrackerLoaded) then
|
||||
if (Details.event_tracker.enabled and not Details.Broadcaster_EventTrackerLoaded) then
|
||||
Details:CreateEventTrackerFrame(UIParent, "DetailsEventTracker")
|
||||
end
|
||||
|
||||
--if enabled and loaded, refresh and show
|
||||
if (_detalhes.event_tracker.enabled and _detalhes.Broadcaster_EventTrackerLoaded) then
|
||||
_detalhes:UpdateEventTrackerFrame()
|
||||
if (Details.event_tracker.enabled and Details.Broadcaster_EventTrackerLoaded) then
|
||||
Details:UpdateEventTrackerFrame()
|
||||
_G.DetailsEventTracker:Show()
|
||||
end
|
||||
|
||||
--if not enabled but loaded, hide it
|
||||
if (not _detalhes.event_tracker.enabled and _detalhes.Broadcaster_EventTrackerLoaded) then
|
||||
if (not Details.event_tracker.enabled and Details.Broadcaster_EventTrackerLoaded) then
|
||||
_G.DetailsEventTracker:Hide()
|
||||
end
|
||||
|
||||
--current dps
|
||||
local bIsEnabled = _detalhes.realtime_dps_meter.enabled and (_detalhes.realtime_dps_meter.arena_enabled or _detalhes.realtime_dps_meter.mythic_dungeon_enabled)
|
||||
local bIsEnabled = Details.realtime_dps_meter.enabled and (Details.realtime_dps_meter.arena_enabled or Details.realtime_dps_meter.mythic_dungeon_enabled)
|
||||
|
||||
--if enabled and not loaded, load it
|
||||
if (bIsEnabled and not _detalhes.Broadcaster_CurrentDpsLoaded) then
|
||||
if (bIsEnabled and not Details.Broadcaster_CurrentDpsLoaded) then
|
||||
Details:CreateCurrentDpsFrame(UIParent, "DetailsCurrentDpsMeter")
|
||||
end
|
||||
|
||||
--if enabled, check if can show
|
||||
if (bIsEnabled and _detalhes.Broadcaster_CurrentDpsLoaded) then
|
||||
if (_detalhes.realtime_dps_meter.mythic_dungeon_enabled) then
|
||||
if (bIsEnabled and Details.Broadcaster_CurrentDpsLoaded) then
|
||||
if (Details.realtime_dps_meter.mythic_dungeon_enabled) then
|
||||
local zoneName, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceMapID, instanceGroupSize = GetInstanceInfo()
|
||||
if (difficultyID == 8) then
|
||||
--player is inside a mythic dungeon
|
||||
@@ -1617,7 +1589,7 @@ function Details:LoadFramesForBroadcastTools()
|
||||
end
|
||||
end
|
||||
|
||||
if (_detalhes.realtime_dps_meter.arena_enabled) then
|
||||
if (Details.realtime_dps_meter.arena_enabled) then
|
||||
local zoneName, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceMapID, instanceGroupSize = GetInstanceInfo()
|
||||
if (instanceType == "arena") then
|
||||
--player is inside an arena
|
||||
@@ -1627,27 +1599,27 @@ function Details:LoadFramesForBroadcastTools()
|
||||
end
|
||||
|
||||
--if not enabled but loaded, hide it
|
||||
if (not bIsEnabled and _detalhes.Broadcaster_CurrentDpsLoaded) then
|
||||
if (not bIsEnabled and Details.Broadcaster_CurrentDpsLoaded) then
|
||||
_G.DetailsCurrentDpsMeter:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function _detalhes:FormatBackground (f)
|
||||
f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor(.5, .5, .5, .5)
|
||||
f:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
function Details:FormatBackground(frame) --deprecated I guess
|
||||
frame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
frame:SetBackdropColor(.5, .5, .5, .5)
|
||||
frame:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
if (not f.__background) then
|
||||
f.__background = f:CreateTexture(nil, "background")
|
||||
if (not frame.__background) then
|
||||
frame.__background = frame:CreateTexture(nil, "background")
|
||||
end
|
||||
|
||||
f.__background:SetTexture([[Interface\AddOns\Details\images\background]], true)
|
||||
f.__background:SetAlpha (0.7)
|
||||
f.__background:SetVertexColor (0.27, 0.27, 0.27)
|
||||
f.__background:SetVertTile (true)
|
||||
f.__background:SetHorizTile (true)
|
||||
f.__background:SetAllPoints()
|
||||
frame.__background:SetTexture([[Interface\AddOns\Details\images\background]], true)
|
||||
frame.__background:SetAlpha(0.7)
|
||||
frame.__background:SetVertexColor(0.27, 0.27, 0.27)
|
||||
frame.__background:SetVertTile(true)
|
||||
frame.__background:SetHorizTile(true)
|
||||
frame.__background:SetAllPoints()
|
||||
end
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
local _cstr = string.format --lua local
|
||||
local _math_ceil = math.ceil --lua local
|
||||
local _math_floor = math.floor --lua local
|
||||
local _ipairs = ipairs --lua local
|
||||
local ipairs = ipairs --lua local
|
||||
local _pairs = pairs --lua local
|
||||
local _string_lower = string.lower --lua local
|
||||
local _table_sort = table.sort --lua local
|
||||
@@ -28,7 +28,7 @@
|
||||
local _GetTime = GetTime --api local
|
||||
local _GetCursorPosition = GetCursorPosition --api local
|
||||
local _GameTooltip = GameTooltip --api local
|
||||
local _UIParent = UIParent --api local
|
||||
local UIParent = UIParent --api local
|
||||
local _GetScreenWidth = GetScreenWidth --api local
|
||||
local _GetScreenHeight = GetScreenHeight --api local
|
||||
local _IsAltKeyDown = IsAltKeyDown --api local
|
||||
@@ -325,7 +325,7 @@
|
||||
function DetailsCustomPanel:RemoveDisplay (custom_object, index)
|
||||
table.remove (_detalhes.custom, index)
|
||||
|
||||
for _, instance in _ipairs(_detalhes.tabela_instancias) do
|
||||
for _, instance in ipairs(_detalhes.tabela_instancias) do
|
||||
if (instance.atributo == 5 and instance.sub_atributo == index) then
|
||||
instance:ResetAttribute()
|
||||
elseif (instance.atributo == 5 and instance.sub_atributo > index) then
|
||||
@@ -771,7 +771,7 @@
|
||||
local build_menu = function(self, button, func, param2)
|
||||
GameCooltip:Reset()
|
||||
|
||||
for index, custom_object in _ipairs(_detalhes.custom) do
|
||||
for index, custom_object in ipairs(_detalhes.custom) do
|
||||
GameCooltip:AddLine(custom_object:GetName())
|
||||
GameCooltip:AddIcon (custom_object:GetIcon())
|
||||
GameCooltip:AddMenu (1, func, custom_object, index, true)
|
||||
|
||||
+8
-10
@@ -18,7 +18,7 @@ local unpack = unpack
|
||||
local CreateFrame = CreateFrame
|
||||
local _GetTime = GetTime
|
||||
local _GetCursorPosition = GetCursorPosition
|
||||
local _UIParent = UIParent
|
||||
local UIParent = UIParent
|
||||
local _IsAltKeyDown = IsAltKeyDown
|
||||
local _IsShiftKeyDown = IsShiftKeyDown
|
||||
local _IsControlKeyDown = IsControlKeyDown
|
||||
@@ -2996,7 +2996,7 @@ local hide_click_func = function()
|
||||
--empty
|
||||
end
|
||||
|
||||
function Details:InstanceAlert (msg, icon, time, clickfunc, doflash, forceAlert)
|
||||
function Details:InstanceAlert (msg, icon, timeInSeconds, clickfunc, doflash, forceAlert)
|
||||
|
||||
if (not forceAlert and Details.streamer_config.no_alerts) then
|
||||
--return
|
||||
@@ -3059,9 +3059,9 @@ function Details:InstanceAlert (msg, icon, time, clickfunc, doflash, forceAlert)
|
||||
self.alert.button.func_param = {unpack(clickfunc, 2)}
|
||||
end
|
||||
|
||||
time = time or 15
|
||||
self.alert_time = time
|
||||
Details:ScheduleTimer ("InstanceAlertTime", time, self)
|
||||
timeInSeconds = timeInSeconds or 15
|
||||
self.alert_time = timeInSeconds
|
||||
Details:ScheduleTimer("InstanceAlertTime", timeInSeconds, self)
|
||||
|
||||
self.alert:SetPoint("bottom", self.baseframe, "bottom", 0, -12)
|
||||
self.alert:SetPoint("left", self.baseframe, "left", 3, 0)
|
||||
@@ -3077,7 +3077,6 @@ function Details:InstanceAlert (msg, icon, time, clickfunc, doflash, forceAlert)
|
||||
end
|
||||
|
||||
self.alert:Play()
|
||||
|
||||
end
|
||||
|
||||
local alert_on_click = function(self, button)
|
||||
@@ -3091,7 +3090,6 @@ local alert_on_click = function(self, button)
|
||||
end
|
||||
|
||||
local function CreateAlertFrame(baseframe, instancia)
|
||||
|
||||
local frame_upper = CreateFrame("scrollframe", "DetailsAlertFrameScroll" .. instancia.meu_id, baseframe)
|
||||
frame_upper:SetPoint("bottom", baseframe, "bottom")
|
||||
frame_upper:SetPoint("left", baseframe, "left", 3, 0)
|
||||
@@ -3409,7 +3407,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
-- main frames -----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
--baseframe is the lowest frame in the window architecture
|
||||
local baseframe = CreateFrame("scrollframe", "DetailsBaseFrame" .. ID, _UIParent, "BackdropTemplate")
|
||||
local baseframe = CreateFrame("scrollframe", "DetailsBaseFrame" .. ID, UIParent, "BackdropTemplate")
|
||||
baseframe:SetMovable(true)
|
||||
baseframe:SetResizable(true)
|
||||
baseframe:SetUserPlaced(false)
|
||||
@@ -3463,7 +3461,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
instancia.windowBackgroundDisplay = backgrounddisplay
|
||||
|
||||
--row frame is the parent of rows, it have setallpoints on baseframe
|
||||
local rowframe = CreateFrame("frame", "DetailsRowFrame"..ID, _UIParent) --row frame
|
||||
local rowframe = CreateFrame("frame", "DetailsRowFrame"..ID, UIParent) --row frame
|
||||
rowframe:SetAllPoints(baseframe)
|
||||
rowframe:SetFrameStrata(baseframe_strata)
|
||||
rowframe:SetFrameLevel(3)
|
||||
@@ -3597,7 +3595,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
baseframe:SetClampedToScreen (true)
|
||||
baseframe:SetSize(Details.new_window_size.width, Details.new_window_size.height)
|
||||
|
||||
baseframe:SetPoint("center", _UIParent)
|
||||
baseframe:SetPoint("center", UIParent)
|
||||
baseframe:EnableMouseWheel(false)
|
||||
baseframe:EnableMouse(true)
|
||||
|
||||
|
||||
@@ -50,7 +50,6 @@ function Details.options.InitializeOptionsWindow(instance)
|
||||
f.__icon = [[Interface\Scenarios\ScenarioIcon-Interact]]
|
||||
_G.DetailsPluginContainerWindow.EmbedPlugin(f, f, true)
|
||||
f.sectionFramesContainer = {}
|
||||
Details:FormatBackground(f)
|
||||
|
||||
DF:ApplyStandardBackdrop(f)
|
||||
local titleBar = DF:CreateTitleBar(f, "Options Panel")
|
||||
|
||||
@@ -9,9 +9,9 @@ local _
|
||||
--lua locals
|
||||
--local _string_len = string.len
|
||||
local _math_floor = math.floor
|
||||
local _ipairs = ipairs
|
||||
local ipairs = ipairs
|
||||
local _pairs = pairs
|
||||
local _type = type
|
||||
local type = type
|
||||
--api locals
|
||||
local _CreateFrame = CreateFrame
|
||||
local _GetTime = GetTime
|
||||
@@ -117,7 +117,7 @@ function _detalhes:AbreJanelaInfo (jogador, from_att_change, refresh, ShiftKeyDo
|
||||
_detalhes:FechaJanelaInfo()
|
||||
return
|
||||
|
||||
elseif (_type(_detalhes.row_singleclick_overwrite [self.atributo][self.sub_atributo]) == "function") then
|
||||
elseif (type(_detalhes.row_singleclick_overwrite [self.atributo][self.sub_atributo]) == "function") then
|
||||
if (from_att_change) then
|
||||
_detalhes:FechaJanelaInfo()
|
||||
return
|
||||
@@ -527,7 +527,7 @@ function gump:HidaAllDetalheInfo()
|
||||
for i = 1, spellInfoSettings.amount do
|
||||
gump:HidaDetalheInfo (i)
|
||||
end
|
||||
for _, barra in _ipairs(info.barras3) do
|
||||
for _, barra in ipairs(info.barras3) do
|
||||
barra:Hide()
|
||||
end
|
||||
_detalhes.playerDetailWindow.spell_icone:SetTexture("")
|
||||
@@ -747,7 +747,7 @@ function gump:SetaDetalheInfoTexto (index, p, arg1, arg2, arg3, arg4, arg5, arg6
|
||||
local info = _detalhes.playerDetailWindow.grupos_detalhes [index]
|
||||
|
||||
if (p) then
|
||||
if (_type(p) == "table") then
|
||||
if (type(p) == "table") then
|
||||
info.bg:SetValue(p.p)
|
||||
info.bg:SetStatusBarColor (p.c[1], p.c[2], p.c[3], p.c[4] or 1)
|
||||
else
|
||||
@@ -1946,7 +1946,7 @@ function gump:CriaJanelaInfo()
|
||||
end,
|
||||
nil, --[4] fill function
|
||||
function() --[5] onclick
|
||||
for _, tab in _ipairs(Details:GetBreakdownTabsInUse()) do
|
||||
for _, tab in ipairs(Details:GetBreakdownTabsInUse()) do
|
||||
tab.frame:Hide()
|
||||
end
|
||||
end,
|
||||
@@ -3082,7 +3082,7 @@ function gump:CriaJanelaInfo()
|
||||
local player_2_target_total
|
||||
local player_2_target_index
|
||||
|
||||
for index, t in _ipairs(player_2_target_pool) do
|
||||
for index, t in ipairs(player_2_target_pool) do
|
||||
if (t[1] == target_name) then
|
||||
player_2_target_total = t[2]
|
||||
player_2_target_index = index
|
||||
@@ -3154,7 +3154,7 @@ function gump:CriaJanelaInfo()
|
||||
local player_3_target_total
|
||||
local player_3_target_index
|
||||
|
||||
for index, t in _ipairs(player_3_target_pool) do
|
||||
for index, t in ipairs(player_3_target_pool) do
|
||||
if (t[1] == target_name) then
|
||||
player_3_target_total = t[2]
|
||||
player_3_target_index = index
|
||||
@@ -3258,7 +3258,7 @@ function gump:CriaJanelaInfo()
|
||||
end
|
||||
|
||||
--main player pets
|
||||
for petIndex, petName in _ipairs(player:Pets()) do
|
||||
for petIndex, petName in ipairs(player:Pets()) do
|
||||
local petActor = info.instancia.showing [player.tipo]:PegarCombatente (nil, petName)
|
||||
if (petActor) then
|
||||
for _spellid, _skill in _pairs(petActor:GetActorSpells()) do
|
||||
@@ -3293,7 +3293,7 @@ function gump:CriaJanelaInfo()
|
||||
player_2_spells_sorted [#player_2_spells_sorted+1] = {spelltable, spelltable.total}
|
||||
end
|
||||
--player 2 pets
|
||||
for petIndex, petName in _ipairs(other_players [1]:Pets()) do
|
||||
for petIndex, petName in ipairs(other_players [1]:Pets()) do
|
||||
local petActor = info.instancia.showing [player.tipo]:PegarCombatente (nil, petName)
|
||||
if (petActor) then
|
||||
for _spellid, _skill in _pairs(petActor:GetActorSpells()) do
|
||||
@@ -3307,7 +3307,7 @@ function gump:CriaJanelaInfo()
|
||||
--se n�o existir uma magia no jogador e o jogador tiver um pet, ele n�o vai encontrar um valor em [1] e dar
|
||||
-- ~pet
|
||||
player_2_spell_info = {}
|
||||
for index, spelltable in _ipairs(player_2_spells_sorted) do
|
||||
for index, spelltable in ipairs(player_2_spells_sorted) do
|
||||
player_2_spell_info [spelltable[1].id] = index
|
||||
end
|
||||
|
||||
@@ -3335,7 +3335,7 @@ function gump:CriaJanelaInfo()
|
||||
player_3_spells_sorted [#player_3_spells_sorted+1] = {spelltable, spelltable.total}
|
||||
end
|
||||
--player 3 pets
|
||||
for petIndex, petName in _ipairs(other_players [2]:Pets()) do
|
||||
for petIndex, petName in ipairs(other_players [2]:Pets()) do
|
||||
local petActor = info.instancia.showing [player.tipo]:PegarCombatente (nil, petName)
|
||||
if (petActor) then
|
||||
for _spellid, _skill in _pairs(petActor:GetActorSpells()) do
|
||||
@@ -3346,7 +3346,7 @@ function gump:CriaJanelaInfo()
|
||||
|
||||
table.sort (player_3_spells_sorted, _detalhes.Sort2)
|
||||
player_3_top = player_3_spells_sorted [1] [2]
|
||||
for index, spelltable in _ipairs(player_3_spells_sorted) do
|
||||
for index, spelltable in ipairs(player_3_spells_sorted) do
|
||||
player_3_spell_info [spelltable[1].id] = index
|
||||
end
|
||||
end
|
||||
@@ -3395,7 +3395,7 @@ function gump:CriaJanelaInfo()
|
||||
local spell = player_2 and player_2.spells._ActorTable [spellid]
|
||||
|
||||
if (not spell and petName and player_2) then
|
||||
for _petIndex, _petName in _ipairs(player_2:Pets()) do
|
||||
for _petIndex, _petName in ipairs(player_2:Pets()) do
|
||||
if (_petName:gsub (" <.*", "") == petName:gsub (" <.*", "")) then
|
||||
local petActor = info.instancia.showing [player.tipo]:PegarCombatente (nil, _petName)
|
||||
spell = petActor and petActor.spells._ActorTable [spellid]
|
||||
@@ -3474,7 +3474,7 @@ function gump:CriaJanelaInfo()
|
||||
local spell = player_3 and player_3.spells._ActorTable [spellid]
|
||||
|
||||
if (not spell and petName and player_3) then
|
||||
for _petIndex, _petName in _ipairs(player_3:Pets()) do
|
||||
for _petIndex, _petName in ipairs(player_3:Pets()) do
|
||||
if (_petName:gsub (" <.*", "") == petName:gsub (" <.*", "")) then
|
||||
local petActor = info.instancia.showing [player.tipo]:PegarCombatente (nil, _petName)
|
||||
spell = petActor and petActor.spells._ActorTable [spellid]
|
||||
@@ -3576,7 +3576,7 @@ function gump:CriaJanelaInfo()
|
||||
|
||||
end
|
||||
|
||||
for index, spelltable in _ipairs(spells_sorted) do
|
||||
for index, spelltable in ipairs(spells_sorted) do
|
||||
|
||||
end
|
||||
|
||||
@@ -3724,7 +3724,7 @@ function gump:CriaJanelaInfo()
|
||||
local frame2_gotresults = false
|
||||
local frame3_gotresults = false
|
||||
|
||||
for index, spell in _ipairs(player_1_skills) do
|
||||
for index, spell in ipairs(player_1_skills) do
|
||||
local bar = frame1.tooltip.bars [index]
|
||||
if (not bar) then
|
||||
bar = frame1.tooltip:CreateBar()
|
||||
@@ -3743,7 +3743,7 @@ function gump:CriaJanelaInfo()
|
||||
|
||||
local player_2_skill
|
||||
local found_skill = false
|
||||
for this_index, this_spell in _ipairs(player_2_skills) do
|
||||
for this_index, this_spell in ipairs(player_2_skills) do
|
||||
if (spell [1] == this_spell[1]) then
|
||||
local bar = frame2.tooltip.bars [index]
|
||||
if (not bar) then
|
||||
@@ -3798,7 +3798,7 @@ function gump:CriaJanelaInfo()
|
||||
if (player_3) then
|
||||
local player_3_skill
|
||||
local found_skill = false
|
||||
for this_index, this_spell in _ipairs(player_3_skills) do
|
||||
for this_index, this_spell in ipairs(player_3_skills) do
|
||||
if (spell [1] == this_spell[1]) then
|
||||
local bar = frame3.tooltip.bars [index]
|
||||
if (not bar) then
|
||||
@@ -4575,7 +4575,7 @@ function gump:CriaJanelaInfo()
|
||||
_detalhes.gump:CreateBorder (tooltip)
|
||||
|
||||
function tooltip:Reset()
|
||||
for index, bar in _ipairs(tooltip.bars) do
|
||||
for index, bar in ipairs(tooltip.bars) do
|
||||
bar [1]:SetTexture("")
|
||||
bar [2].lefttext:SetText("")
|
||||
bar [2].righttext:SetText("")
|
||||
@@ -4890,7 +4890,7 @@ function gump:CriaJanelaInfo()
|
||||
return false
|
||||
end
|
||||
|
||||
for index, actor in _ipairs(info.instancia.showing [info.atributo]._ActorTable) do
|
||||
for index, actor in ipairs(info.instancia.showing [info.atributo]._ActorTable) do
|
||||
if (actor.classe == class and actor ~= playerObject) then
|
||||
|
||||
local same_spells = 0
|
||||
@@ -5023,7 +5023,7 @@ function gump:CriaJanelaInfo()
|
||||
|
||||
este_gump:SetScript("OnHide", function(self)
|
||||
_detalhes:FechaJanelaInfo()
|
||||
for _, tab in _ipairs(_detalhes.player_details_tabs) do
|
||||
for _, tab in ipairs(_detalhes.player_details_tabs) do
|
||||
tab:Hide()
|
||||
tab.frame:Hide()
|
||||
end
|
||||
@@ -5121,7 +5121,7 @@ function _detalhes:CreatePlayerDetailsTab (tabname, localized_name, condition, f
|
||||
newTabButton.OnShowFunc = function(self)
|
||||
self = self.MyObject or self
|
||||
|
||||
for _, tab in _ipairs(Details:GetBreakdownTabsInUse()) do
|
||||
for _, tab in ipairs(Details:GetBreakdownTabsInUse()) do
|
||||
tab.frame:Hide()
|
||||
tab:SetTemplate("DETAILS_TAB_BUTTON_TEMPLATE")
|
||||
end
|
||||
@@ -5137,7 +5137,7 @@ function _detalhes:CreatePlayerDetailsTab (tabname, localized_name, condition, f
|
||||
newTabButton.OnShowFunc = function(self)
|
||||
self = self.MyObject or self
|
||||
|
||||
for _, tab in _ipairs(Details:GetBreakdownTabsInUse()) do
|
||||
for _, tab in ipairs(Details:GetBreakdownTabsInUse()) do
|
||||
tab.frame:Hide()
|
||||
tab:SetTemplate("DETAILS_TAB_BUTTON_TEMPLATE")
|
||||
end
|
||||
@@ -5204,7 +5204,7 @@ function _detalhes.playerDetailWindow:monta_relatorio (botao)
|
||||
|
||||
end
|
||||
|
||||
for index, barra in _ipairs(info.barras1) do
|
||||
for index, barra in ipairs(info.barras1) do
|
||||
if (barra:IsShown()) then
|
||||
local spellid = barra.show
|
||||
if (atributo == 1 and sub_atributo == 4) then --friendly fire
|
||||
@@ -5234,7 +5234,7 @@ function _detalhes.playerDetailWindow:monta_relatorio (botao)
|
||||
|
||||
report_lines = {"Details! " .. Loc ["STRING_ACTORFRAME_REPORTTARGETS"] .. " " .. _detalhes.sub_atributos [1].lista [1] .. " " .. Loc ["STRING_ACTORFRAME_REPORTOF"] .. " " .. player.nome}
|
||||
|
||||
for index, barra in _ipairs(info.barras2) do
|
||||
for index, barra in ipairs(info.barras2) do
|
||||
if (barra:IsShown()) then
|
||||
report_lines [#report_lines+1] = barra.lineText1:GetText().." -> ".. barra.lineText4:GetText()
|
||||
end
|
||||
@@ -5307,7 +5307,7 @@ function _detalhes.playerDetailWindow:monta_relatorio (botao)
|
||||
elseif ( (atributo == 1 and sub_atributo == 3) or atributo == 3) then
|
||||
if (player.detalhes) then
|
||||
report_lines = {"Details! " .. Loc ["STRING_ACTORFRAME_REPORTTO"] .. " " .. _detalhes.sub_atributos [1].lista [1] .. " " .. Loc ["STRING_ACTORFRAME_REPORTOF"] .. " " .. player.detalhes.. " " .. Loc ["STRING_ACTORFRAME_REPORTAT"] .. " " .. player.nome}
|
||||
for index, barra in _ipairs(info.barras3) do
|
||||
for index, barra in ipairs(info.barras3) do
|
||||
if (barra:IsShown()) then
|
||||
report_lines [#report_lines+1] = barra.lineText1:GetText().." ....... ".. barra.lineText4:GetText()
|
||||
end
|
||||
@@ -5325,7 +5325,7 @@ function _detalhes.playerDetailWindow:monta_relatorio (botao)
|
||||
botao = botao - 10
|
||||
|
||||
local nome
|
||||
if (_type(spellid) == "string") then
|
||||
if (type(spellid) == "string") then
|
||||
--is a pet
|
||||
else
|
||||
nome = _GetSpellInfo(player.detalhes)
|
||||
|
||||
+4
-4
@@ -3,7 +3,7 @@ do
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
_detalhes.EncounterInformation = {}
|
||||
local _ipairs = ipairs --lua local
|
||||
local ipairs = ipairs --lua local
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--details api functions
|
||||
@@ -167,15 +167,15 @@ do
|
||||
local encounter = _detalhes:GetBossDetails (mapid, bossindex)
|
||||
local habilidades_poll = {}
|
||||
if (encounter.continuo) then
|
||||
for index, spellid in _ipairs(encounter.continuo) do
|
||||
for index, spellid in ipairs(encounter.continuo) do
|
||||
habilidades_poll [spellid] = true
|
||||
end
|
||||
end
|
||||
local fases = encounter.phases
|
||||
if (fases) then
|
||||
for fase_id, fase in _ipairs(fases) do
|
||||
for fase_id, fase in ipairs(fases) 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
|
||||
|
||||
@@ -47,9 +47,9 @@ function Details:BossModsLink()
|
||||
Details:OnCombatPhaseChanged()
|
||||
encounterTable.phase = phase
|
||||
local currentCombat = Details:GetCurrentCombat()
|
||||
local time = currentCombat:GetCombatTime()
|
||||
if (time > 5) then
|
||||
tinsert(currentCombat.PhaseData, {phase, time})
|
||||
local combatTime = currentCombat:GetCombatTime()
|
||||
if (combatTime > 5) then
|
||||
tinsert(currentCombat.PhaseData, {phase, combatTime})
|
||||
end
|
||||
Details:SendEvent("COMBAT_ENCOUNTER_PHASE_CHANGED", nil, phase)
|
||||
end
|
||||
@@ -76,10 +76,10 @@ function Details:BossModsLink()
|
||||
|
||||
Details.encounter_table.phase = phase
|
||||
|
||||
local cur_combat = Details:GetCurrentCombat()
|
||||
local time = cur_combat:GetCombatTime()
|
||||
if (time > 5) then
|
||||
tinsert(cur_combat.PhaseData, {phase, time})
|
||||
local currentCombat = Details:GetCurrentCombat()
|
||||
local combatTime = currentCombat:GetCombatTime()
|
||||
if (combatTime > 5) then
|
||||
tinsert(currentCombat.PhaseData, {phase, combatTime})
|
||||
end
|
||||
|
||||
Details:SendEvent("COMBAT_ENCOUNTER_PHASE_CHANGED", nil, phase)
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@
|
||||
--local pointers
|
||||
|
||||
local _pairs = pairs --lua local
|
||||
local _ipairs = ipairs --lua local
|
||||
local ipairs = ipairs --lua local
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--details api functions
|
||||
@@ -126,7 +126,7 @@
|
||||
function _detalhes.Buffs:BuildTables()
|
||||
_detalhes.Buffs.built = true
|
||||
if (_detalhes.savedbuffs) then
|
||||
for _, BuffId in _ipairs(_detalhes.savedbuffs) do
|
||||
for _, BuffId in ipairs(_detalhes.savedbuffs) do
|
||||
_detalhes.Buffs:NewBuff (nil, BuffId)
|
||||
end
|
||||
end
|
||||
|
||||
+111
-126
@@ -29,7 +29,6 @@ function mythicDungeonCharts:Debug (...)
|
||||
end
|
||||
|
||||
local addPlayerDamage = function(unitName, unitRealm)
|
||||
|
||||
--get the combatlog name
|
||||
local CLName
|
||||
if (unitRealm and unitRealm ~= "") then
|
||||
@@ -69,7 +68,6 @@ local addPlayerDamage = function(unitName, unitRealm)
|
||||
--get the current combat
|
||||
local currentCombat = Details:GetCombat(DETAILS_SEGMENTID_CURRENT)
|
||||
if (currentCombat) then
|
||||
|
||||
local isOverallSegment = false
|
||||
|
||||
local mythicDungeonInfo = currentCombat.is_mythic_dungeon
|
||||
@@ -135,9 +133,8 @@ local addPlayerDamage = function(unitName, unitRealm)
|
||||
end
|
||||
|
||||
local tickerCallback = function(tickerObject)
|
||||
|
||||
--check if is inside the dungeon
|
||||
local inInstance = IsInInstance();
|
||||
local inInstance = IsInInstance()
|
||||
if (not inInstance) then
|
||||
mythicDungeonCharts:OnEndMythicDungeon()
|
||||
return
|
||||
@@ -162,7 +159,6 @@ local tickerCallback = function(tickerObject)
|
||||
end
|
||||
|
||||
function mythicDungeonCharts:OnBossDefeated()
|
||||
|
||||
local currentCombat = Details:GetCurrentCombat()
|
||||
local segmentType = currentCombat:GetCombatType()
|
||||
local bossInfo = currentCombat:GetBossInfo()
|
||||
@@ -196,7 +192,6 @@ function mythicDungeonCharts:OnBossDefeated()
|
||||
end
|
||||
|
||||
function mythicDungeonCharts:OnStartMythicDungeon()
|
||||
|
||||
if (not Details.mythic_plus.show_damage_graphic) then
|
||||
mythicDungeonCharts:Debug("Dungeon started, no capturing mythic dungeon chart data, disabled on profile")
|
||||
if (verbosemode) then
|
||||
@@ -277,7 +272,6 @@ mythicDungeonCharts:RegisterEvent ("COMBAT_BOSS_DEFEATED", "OnBossDefeated")
|
||||
|
||||
--show a small panel telling the chart is ready to show
|
||||
function mythicDungeonCharts.ShowReadyPanel()
|
||||
|
||||
--check if is enabled
|
||||
if (not _detalhes.mythic_plus.show_damage_graphic) then
|
||||
return
|
||||
@@ -286,46 +280,44 @@ function mythicDungeonCharts.ShowReadyPanel()
|
||||
--create the panel
|
||||
if (not mythicDungeonCharts.ReadyFrame) then
|
||||
mythicDungeonCharts.ReadyFrame = CreateFrame("frame", "DetailsMythicDungeonReadyFrame", UIParent, "BackdropTemplate")
|
||||
local f = mythicDungeonCharts.ReadyFrame
|
||||
local readyFrame = mythicDungeonCharts.ReadyFrame
|
||||
|
||||
f:SetSize(255, 80)
|
||||
f:SetPoint("center", UIParent, "center", 300, 0)
|
||||
f:SetFrameStrata("LOW")
|
||||
f:EnableMouse (true)
|
||||
f:SetMovable (true)
|
||||
f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor(0, 0, 0, 0.9)
|
||||
f:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
DetailsFramework:ApplyStandardBackdrop (f)
|
||||
DetailsFramework:CreateTitleBar (f, "Details! Damage Graphic for M+")
|
||||
readyFrame:SetSize(255, 80)
|
||||
readyFrame:SetPoint("center", UIParent, "center", 300, 0)
|
||||
readyFrame:SetFrameStrata("LOW")
|
||||
readyFrame:EnableMouse(true)
|
||||
readyFrame:SetMovable(true)
|
||||
DetailsFramework:ApplyStandardBackdrop(readyFrame)
|
||||
DetailsFramework:CreateTitleBar (readyFrame, "Details! Damage Graphic for M+")
|
||||
|
||||
f:Hide()
|
||||
readyFrame:Hide()
|
||||
|
||||
--register to libwindow
|
||||
local LibWindow = LibStub("LibWindow-1.1")
|
||||
LibWindow.RegisterConfig (f, Details.mythic_plus.mythicrun_chart_frame_ready)
|
||||
LibWindow.RestorePosition (f)
|
||||
LibWindow.MakeDraggable (f)
|
||||
LibWindow.SavePosition (f)
|
||||
LibWindow.RegisterConfig(readyFrame, Details.mythic_plus.mythicrun_chart_frame_ready)
|
||||
LibWindow.RestorePosition(readyFrame)
|
||||
LibWindow.MakeDraggable(readyFrame)
|
||||
LibWindow.SavePosition(readyFrame)
|
||||
|
||||
--show button
|
||||
f.ShowButton = DetailsFramework:CreateButton (f, function() mythicDungeonCharts.ShowChart(); f:Hide() end, 80, 20, Loc ["STRING_SLASH_SHOW"])
|
||||
f.ShowButton:SetTemplate (DetailsFramework:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
f.ShowButton:SetPoint("topright", f, "topright", -5, -30)
|
||||
readyFrame.ShowButton = DetailsFramework:CreateButton(readyFrame, function() mythicDungeonCharts.ShowChart(); readyFrame:Hide() end, 80, 20, Loc ["STRING_SLASH_SHOW"])
|
||||
readyFrame.ShowButton:SetTemplate(DetailsFramework:GetTemplate("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
readyFrame.ShowButton:SetPoint("topright", readyFrame, "topright", -5, -30)
|
||||
|
||||
--discart button
|
||||
f.DiscartButton = DetailsFramework:CreateButton (f, function() f:Hide() end, 80, 20, Loc ["STRING_DISCARD"])
|
||||
f.DiscartButton:SetTemplate (DetailsFramework:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
f.DiscartButton:SetPoint("right", f.ShowButton, "left", -5, 0)
|
||||
readyFrame.DiscartButton = DetailsFramework:CreateButton(readyFrame, function() readyFrame:Hide() end, 80, 20, Loc ["STRING_DISCARD"])
|
||||
readyFrame.DiscartButton:SetTemplate(DetailsFramework:GetTemplate("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
readyFrame.DiscartButton:SetPoint("right", readyFrame.ShowButton, "left", -5, 0)
|
||||
|
||||
--disable feature check box (dont show this again)
|
||||
local on_switch_enable = function(self, _, value)
|
||||
_detalhes.mythic_plus.show_damage_graphic = not value
|
||||
end
|
||||
local notAgainSwitch, notAgainLabel = DetailsFramework:CreateSwitch (f, on_switch_enable, not _detalhes.mythic_plus.show_damage_graphic, _, _, _, _, _, _, _, _, _, Loc ["STRING_MINITUTORIAL_BOOKMARK4"], DetailsFramework:GetTemplate ("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"), "GameFontHighlightLeft")
|
||||
|
||||
local notAgainSwitch, notAgainLabel = DetailsFramework:CreateSwitch(readyFrame, on_switch_enable, not _detalhes.mythic_plus.show_damage_graphic, _, _, _, _, _, _, _, _, _, Loc ["STRING_MINITUTORIAL_BOOKMARK4"], DetailsFramework:GetTemplate("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"), "GameFontHighlightLeft")
|
||||
notAgainSwitch:ClearAllPoints()
|
||||
notAgainLabel:SetPoint("left", notAgainSwitch, "right", 2, 0)
|
||||
notAgainSwitch:SetPoint("bottomleft", f, "bottomleft", 5, 5)
|
||||
notAgainSwitch:SetPoint("bottomleft", readyFrame, "bottomleft", 5, 5)
|
||||
notAgainSwitch:SetAsCheckBox()
|
||||
end
|
||||
|
||||
@@ -333,20 +325,16 @@ function mythicDungeonCharts.ShowReadyPanel()
|
||||
end
|
||||
|
||||
function mythicDungeonCharts.ShowChart()
|
||||
|
||||
if (not mythicDungeonCharts.Frame) then
|
||||
|
||||
mythicDungeonCharts.Frame = CreateFrame("frame", "DetailsMythicDungeonChartFrame", UIParent, "BackdropTemplate")
|
||||
local f = mythicDungeonCharts.Frame
|
||||
local dungeonChartFrame = mythicDungeonCharts.Frame
|
||||
|
||||
f:SetSize(1200, 620)
|
||||
f:SetPoint("center", UIParent, "center", 0, 0)
|
||||
f:SetFrameStrata("LOW")
|
||||
f:EnableMouse (true)
|
||||
f:SetMovable (true)
|
||||
f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor(0, 0, 0, 0.9)
|
||||
f:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
dungeonChartFrame:SetSize(1200, 620)
|
||||
dungeonChartFrame:SetPoint("center", UIParent, "center", 0, 0)
|
||||
dungeonChartFrame:SetFrameStrata("LOW")
|
||||
dungeonChartFrame:EnableMouse(true)
|
||||
dungeonChartFrame:SetMovable(true)
|
||||
DetailsFramework:ApplyStandardBackdrop(dungeonChartFrame)
|
||||
|
||||
--minimized frame
|
||||
mythicDungeonCharts.FrameMinimized = CreateFrame("frame", "DetailsMythicDungeonChartFrameminimized", UIParent, "BackdropTemplate")
|
||||
@@ -357,17 +345,15 @@ function mythicDungeonCharts.ShowChart()
|
||||
fMinimized:SetFrameStrata("LOW")
|
||||
fMinimized:EnableMouse(true)
|
||||
fMinimized:SetMovable(true)
|
||||
fMinimized:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
fMinimized:SetBackdropColor(0, 0, 0, 0.9)
|
||||
fMinimized:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
fMinimized:Hide()
|
||||
DetailsFramework:ApplyStandardBackdrop(fMinimized)
|
||||
|
||||
f.IsMinimized = false
|
||||
dungeonChartFrame.IsMinimized = false
|
||||
|
||||
--titlebar
|
||||
local titlebar = CreateFrame("frame", nil, f, "BackdropTemplate")
|
||||
titlebar:SetPoint("topleft", f, "topleft", 2, -3)
|
||||
titlebar:SetPoint("topright", f, "topright", -2, -3)
|
||||
local titlebar = CreateFrame("frame", nil, dungeonChartFrame, "BackdropTemplate")
|
||||
titlebar:SetPoint("topleft", dungeonChartFrame, "topleft", 2, -3)
|
||||
titlebar:SetPoint("topright", dungeonChartFrame, "topright", -2, -3)
|
||||
titlebar:SetHeight(20)
|
||||
titlebar:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
titlebar:SetBackdropColor(.5, .5, .5, 1)
|
||||
@@ -377,7 +363,7 @@ function mythicDungeonCharts.ShowChart()
|
||||
local titleLabel = _detalhes.gump:NewLabel(titlebar, titlebar, nil, "titulo", "Plugins", "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255})
|
||||
titleLabel:SetPoint("center", titlebar , "center")
|
||||
titleLabel:SetPoint("top", titlebar , "top", 0, -5)
|
||||
f.TitleText = titleLabel
|
||||
dungeonChartFrame.TitleText = titleLabel
|
||||
|
||||
--titlebar when minimized
|
||||
local titlebarMinimized = CreateFrame("frame", nil, fMinimized, "BackdropTemplate")
|
||||
@@ -392,87 +378,84 @@ function mythicDungeonCharts.ShowChart()
|
||||
local titleLabelMinimized = _detalhes.gump:NewLabel(titlebarMinimized, titlebarMinimized, nil, "titulo", "Dungeon Run Chart", "GameFontHighlightLeft", 10, {227/255, 186/255, 4/255})
|
||||
titleLabelMinimized:SetPoint("left", titlebarMinimized , "left", 4, 0)
|
||||
--titleLabelMinimized:SetPoint("top", titlebarMinimized , "top", 0, -5)
|
||||
f.TitleTextMinimized = titleLabelMinimized
|
||||
|
||||
_detalhes:FormatBackground (f)
|
||||
_detalhes:FormatBackground (fMinimized)
|
||||
dungeonChartFrame.TitleTextMinimized = titleLabelMinimized
|
||||
|
||||
tinsert(UISpecialFrames, "DetailsMythicDungeonChartFrame")
|
||||
|
||||
--register to libwindow
|
||||
local LibWindow = LibStub("LibWindow-1.1")
|
||||
LibWindow.RegisterConfig (f, Details.mythic_plus.mythicrun_chart_frame)
|
||||
LibWindow.RestorePosition (f)
|
||||
LibWindow.MakeDraggable (f)
|
||||
LibWindow.SavePosition (f)
|
||||
LibWindow.RegisterConfig(dungeonChartFrame, Details.mythic_plus.mythicrun_chart_frame)
|
||||
LibWindow.RestorePosition(dungeonChartFrame)
|
||||
LibWindow.MakeDraggable(dungeonChartFrame)
|
||||
LibWindow.SavePosition(dungeonChartFrame)
|
||||
|
||||
LibWindow.RegisterConfig(fMinimized, Details.mythic_plus.mythicrun_chart_frame_minimized)
|
||||
LibWindow.RestorePosition(fMinimized)
|
||||
LibWindow.MakeDraggable(fMinimized)
|
||||
LibWindow.SavePosition(fMinimized)
|
||||
|
||||
f.ChartFrame = Details:GetFramework():CreateChartPanel (f, 1200, 600, "DetailsMythicDungeonChartGraphicFrame")
|
||||
f.ChartFrame:SetPoint("topleft", f, "topleft", 5, -20)
|
||||
dungeonChartFrame.ChartFrame = Details:GetFramework():CreateChartPanel(dungeonChartFrame, 1200, 600, "DetailsMythicDungeonChartGraphicFrame")
|
||||
dungeonChartFrame.ChartFrame:SetPoint("topleft", dungeonChartFrame, "topleft", 5, -20)
|
||||
|
||||
f.ChartFrame.FrameInUse = {}
|
||||
f.ChartFrame.FrameFree = {}
|
||||
f.ChartFrame.TextureID = 1
|
||||
dungeonChartFrame.ChartFrame.FrameInUse = {}
|
||||
dungeonChartFrame.ChartFrame.FrameFree = {}
|
||||
dungeonChartFrame.ChartFrame.TextureID = 1
|
||||
|
||||
f.ChartFrame.ShowHeader = true
|
||||
f.ChartFrame.HeaderOnlyIndicator = true
|
||||
f.ChartFrame.HeaderShowOverlays = false
|
||||
dungeonChartFrame.ChartFrame.ShowHeader = true
|
||||
dungeonChartFrame.ChartFrame.HeaderOnlyIndicator = true
|
||||
dungeonChartFrame.ChartFrame.HeaderShowOverlays = false
|
||||
|
||||
f.ChartFrame.Graphic.DrawLine = mythicDungeonCharts.CustomDrawLine
|
||||
dungeonChartFrame.ChartFrame.Graphic.DrawLine = mythicDungeonCharts.CustomDrawLine
|
||||
|
||||
f.ChartFrame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f.ChartFrame:SetBackdropColor(0, 0, 0, 0.0)
|
||||
f.ChartFrame:SetBackdropBorderColor(0, 0, 0, 0)
|
||||
dungeonChartFrame.ChartFrame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
dungeonChartFrame.ChartFrame:SetBackdropColor(0, 0, 0, 0.0)
|
||||
dungeonChartFrame.ChartFrame:SetBackdropBorderColor(0, 0, 0, 0)
|
||||
|
||||
f.ChartFrame:EnableMouse (false)
|
||||
dungeonChartFrame.ChartFrame:EnableMouse(false)
|
||||
|
||||
f.ChartFrame.CloseButton:Hide()
|
||||
dungeonChartFrame.ChartFrame.CloseButton:Hide()
|
||||
|
||||
f.BossWidgetsFrame = CreateFrame("frame", "$parentBossFrames", f, "BackdropTemplate")
|
||||
f.BossWidgetsFrame:SetFrameLevel (f:GetFrameLevel()+10)
|
||||
f.BossWidgetsFrame.Widgets = {}
|
||||
dungeonChartFrame.BossWidgetsFrame = CreateFrame("frame", "$parentBossFrames", dungeonChartFrame, "BackdropTemplate")
|
||||
dungeonChartFrame.BossWidgetsFrame:SetFrameLevel(dungeonChartFrame:GetFrameLevel()+10)
|
||||
dungeonChartFrame.BossWidgetsFrame.Widgets = {}
|
||||
|
||||
f.BossWidgetsFrame.GraphPin = f.BossWidgetsFrame:CreateTexture(nil, "overlay")
|
||||
f.BossWidgetsFrame.GraphPin:SetTexture([[Interface\BUTTONS\UI-RadioButton]])
|
||||
f.BossWidgetsFrame.GraphPin:SetTexCoord (17/64, 32/64, 0, 1)
|
||||
f.BossWidgetsFrame.GraphPin:SetSize(16, 16)
|
||||
dungeonChartFrame.BossWidgetsFrame.GraphPin = dungeonChartFrame.BossWidgetsFrame:CreateTexture(nil, "overlay")
|
||||
dungeonChartFrame.BossWidgetsFrame.GraphPin:SetTexture([[Interface\BUTTONS\UI-RadioButton]])
|
||||
dungeonChartFrame.BossWidgetsFrame.GraphPin:SetTexCoord (17/64, 32/64, 0, 1)
|
||||
dungeonChartFrame.BossWidgetsFrame.GraphPin:SetSize(16, 16)
|
||||
|
||||
f.BossWidgetsFrame.GraphPinGlow = f.BossWidgetsFrame:CreateTexture(nil, "artwork")
|
||||
f.BossWidgetsFrame.GraphPinGlow:SetTexture([[Interface\Calendar\EventNotificationGlow]])
|
||||
f.BossWidgetsFrame.GraphPinGlow:SetTexCoord (0, 1, 0, 1)
|
||||
f.BossWidgetsFrame.GraphPinGlow:SetSize(14, 14)
|
||||
f.BossWidgetsFrame.GraphPinGlow:SetBlendMode("ADD")
|
||||
f.BossWidgetsFrame.GraphPinGlow:SetPoint("center", f.BossWidgetsFrame.GraphPin, "center", 0, 0)
|
||||
dungeonChartFrame.BossWidgetsFrame.GraphPinGlow = dungeonChartFrame.BossWidgetsFrame:CreateTexture(nil, "artwork")
|
||||
dungeonChartFrame.BossWidgetsFrame.GraphPinGlow:SetTexture([[Interface\Calendar\EventNotificationGlow]])
|
||||
dungeonChartFrame.BossWidgetsFrame.GraphPinGlow:SetTexCoord (0, 1, 0, 1)
|
||||
dungeonChartFrame.BossWidgetsFrame.GraphPinGlow:SetSize(14, 14)
|
||||
dungeonChartFrame.BossWidgetsFrame.GraphPinGlow:SetBlendMode("ADD")
|
||||
dungeonChartFrame.BossWidgetsFrame.GraphPinGlow:SetPoint("center", dungeonChartFrame.BossWidgetsFrame.GraphPin, "center", 0, 0)
|
||||
|
||||
f:Hide()
|
||||
dungeonChartFrame:Hide()
|
||||
|
||||
function f.ShowChartFrame()
|
||||
if (f.IsMinimized) then
|
||||
f.IsMinimized = false
|
||||
function dungeonChartFrame.ShowChartFrame()
|
||||
if (dungeonChartFrame.IsMinimized) then
|
||||
dungeonChartFrame.IsMinimized = false
|
||||
fMinimized:Hide()
|
||||
f:Show()
|
||||
dungeonChartFrame:Show()
|
||||
else
|
||||
f:Show()
|
||||
dungeonChartFrame:Show()
|
||||
end
|
||||
end
|
||||
|
||||
local closeButton = CreateFrame("button", "$parentCloseButton", f, "UIPanelCloseButton")
|
||||
local closeButton = CreateFrame("button", "$parentCloseButton", dungeonChartFrame, "UIPanelCloseButton")
|
||||
closeButton:GetNormalTexture():SetDesaturated(true)
|
||||
closeButton:SetWidth(24)
|
||||
closeButton:SetHeight(24)
|
||||
closeButton:SetPoint("topright", f, "topright", 0, -1)
|
||||
closeButton:SetFrameLevel (f:GetFrameLevel()+16)
|
||||
closeButton:SetPoint("topright", dungeonChartFrame, "topright", 0, -1)
|
||||
closeButton:SetFrameLevel(dungeonChartFrame:GetFrameLevel()+16)
|
||||
|
||||
local minimizeButton = CreateFrame("button", "$parentCloseButton", f, "UIPanelCloseButton")
|
||||
local minimizeButton = CreateFrame("button", "$parentCloseButton", dungeonChartFrame, "UIPanelCloseButton")
|
||||
minimizeButton:GetNormalTexture():SetDesaturated(true)
|
||||
minimizeButton:SetWidth(24)
|
||||
minimizeButton:SetHeight(24)
|
||||
minimizeButton:SetPoint("right", closeButton, "left", 2, 0)
|
||||
minimizeButton:SetFrameLevel (f:GetFrameLevel()+16)
|
||||
minimizeButton:SetFrameLevel(dungeonChartFrame:GetFrameLevel()+16)
|
||||
minimizeButton:SetNormalTexture([[Interface\BUTTONS\UI-Panel-HideButton-Up]])
|
||||
minimizeButton:SetPushedTexture([[Interface\BUTTONS\UI-Panel-HideButton-Down]])
|
||||
minimizeButton:SetHighlightTexture([[Interface\BUTTONS\UI-Panel-MinimizeButton-Highlight]])
|
||||
@@ -495,7 +478,7 @@ function mythicDungeonCharts.ShowChart()
|
||||
minimizeButtonWhenMinimized:SetHighlightTexture([[Interface\BUTTONS\UI-Panel-MinimizeButton-Highlight]])
|
||||
|
||||
closeButtonWhenMinimized:SetScript("OnClick", function()
|
||||
f.IsMinimized = false
|
||||
dungeonChartFrame.IsMinimized = false
|
||||
fMinimized:Hide()
|
||||
minimizeButtonWhenMinimized:SetNormalTexture([[Interface\BUTTONS\UI-Panel-HideButton-Up]])
|
||||
minimizeButtonWhenMinimized:SetPushedTexture([[Interface\BUTTONS\UI-Panel-HideButton-Down]])
|
||||
@@ -503,15 +486,15 @@ function mythicDungeonCharts.ShowChart()
|
||||
|
||||
--replace the default click function
|
||||
local minimize_func = function(self)
|
||||
if (f.IsMinimized) then
|
||||
f.IsMinimized = false
|
||||
if (dungeonChartFrame.IsMinimized) then
|
||||
dungeonChartFrame.IsMinimized = false
|
||||
fMinimized:Hide()
|
||||
f:Show()
|
||||
dungeonChartFrame:Show()
|
||||
minimizeButtonWhenMinimized:SetNormalTexture([[Interface\BUTTONS\UI-Panel-HideButton-Up]])
|
||||
minimizeButtonWhenMinimized:SetPushedTexture([[Interface\BUTTONS\UI-Panel-HideButton-Down]])
|
||||
else
|
||||
f.IsMinimized = true
|
||||
f:Hide()
|
||||
dungeonChartFrame.IsMinimized = true
|
||||
dungeonChartFrame:Hide()
|
||||
fMinimized:Show()
|
||||
minimizeButtonWhenMinimized:SetNormalTexture([[Interface\BUTTONS\UI-Panel-CollapseButton-Up]])
|
||||
minimizeButtonWhenMinimized:SetPushedTexture([[Interface\BUTTONS\UI-Panel-CollapseButton-Up]])
|
||||
@@ -526,7 +509,7 @@ function mythicDungeonCharts.ShowChart()
|
||||
local on_switch_enable = function(_, _, state)
|
||||
_detalhes.mythic_plus.show_damage_graphic = state
|
||||
end
|
||||
local enabledSwitch, enabledLabel = Details.gump:CreateSwitch (f, on_switch_enable, _detalhes.mythic_plus.show_damage_graphic, _, _, _, _, _, _, _, _, _, "Enabled", Details.gump:GetTemplate ("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"), "GameFontHighlightLeft")
|
||||
local enabledSwitch, enabledLabel = Details.gump:CreateSwitch(dungeonChartFrame, on_switch_enable, _detalhes.mythic_plus.show_damage_graphic, _, _, _, _, _, _, _, _, _, "Enabled", Details.gump:GetTemplate("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"), "GameFontHighlightLeft")
|
||||
enabledSwitch:SetAsCheckBox()
|
||||
enabledSwitch.tooltip = "Show this chart at the end of a mythic dungeon run.\n\nIf disabled, you can reactivate it again at the options panel > streamer settings."
|
||||
enabledLabel:SetPoint("right", minimizeButton, "left", -22, 0)
|
||||
@@ -534,27 +517,26 @@ function mythicDungeonCharts.ShowChart()
|
||||
Details.gump:SetFontColor(enabledLabel, "gray")
|
||||
enabledSwitch.checked_texture:SetVertexColor(.75, .75, .75)
|
||||
|
||||
local leftDivisorLine = f.BossWidgetsFrame:CreateTexture(nil, "overlay")
|
||||
leftDivisorLine:SetSize(2, f.ChartFrame.Graphic:GetHeight())
|
||||
local leftDivisorLine = dungeonChartFrame.BossWidgetsFrame:CreateTexture(nil, "overlay")
|
||||
leftDivisorLine:SetSize(2, dungeonChartFrame.ChartFrame.Graphic:GetHeight())
|
||||
leftDivisorLine:SetColorTexture (1, 1, 1, 1)
|
||||
leftDivisorLine:SetPoint("bottomleft", f.ChartFrame.Graphic.TextFrame, "bottomleft", -2, 0)
|
||||
leftDivisorLine:SetPoint("bottomleft", dungeonChartFrame.ChartFrame.Graphic.TextFrame, "bottomleft", -2, 0)
|
||||
|
||||
local bottomDivisorLine = f.BossWidgetsFrame:CreateTexture(nil, "overlay")
|
||||
bottomDivisorLine:SetSize(f.ChartFrame.Graphic:GetWidth(), 2)
|
||||
local bottomDivisorLine = dungeonChartFrame.BossWidgetsFrame:CreateTexture(nil, "overlay")
|
||||
bottomDivisorLine:SetSize(dungeonChartFrame.ChartFrame.Graphic:GetWidth(), 2)
|
||||
bottomDivisorLine:SetColorTexture (1, 1, 1, 1)
|
||||
bottomDivisorLine:SetPoint("bottomleft", f.ChartFrame.Graphic.TextFrame, "bottomleft", 0, 0)
|
||||
bottomDivisorLine:SetPoint("bottomleft", dungeonChartFrame.ChartFrame.Graphic.TextFrame, "bottomleft", 0, 0)
|
||||
|
||||
f.ChartFrame.Graphic:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f.ChartFrame.Graphic:SetBackdropColor(.5, .50, .50, 0.8)
|
||||
f.ChartFrame.Graphic:SetBackdropBorderColor(0, 0, 0, 0.5)
|
||||
|
||||
function f.ChartFrame.RefreshBossTimeline (self, bossTable, elapsedTime)
|
||||
dungeonChartFrame.ChartFrame.Graphic:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
dungeonChartFrame.ChartFrame.Graphic:SetBackdropColor(.5, .50, .50, 0.8)
|
||||
dungeonChartFrame.ChartFrame.Graphic:SetBackdropBorderColor(0, 0, 0, 0.5)
|
||||
|
||||
function dungeonChartFrame.ChartFrame.RefreshBossTimeline(self, bossTable, elapsedTime)
|
||||
for i, bossTable in ipairs(mythicDungeonCharts.ChartTable.BossDefeated) do
|
||||
local bossWidget = dungeonChartFrame.BossWidgetsFrame.Widgets [i]
|
||||
|
||||
local bossWidget = f.BossWidgetsFrame.Widgets [i]
|
||||
if (not bossWidget) then
|
||||
local newBossWidget = CreateFrame("frame", "$parentBossWidget" .. i, f.BossWidgetsFrame, "BackdropTemplate")
|
||||
local newBossWidget = CreateFrame("frame", "$parentBossWidget" .. i, dungeonChartFrame.BossWidgetsFrame, "BackdropTemplate")
|
||||
newBossWidget:SetSize(64, 32)
|
||||
newBossWidget:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
newBossWidget:SetBackdropColor(0, 0, 0, 0.1)
|
||||
@@ -564,7 +546,7 @@ function mythicDungeonCharts.ShowChart()
|
||||
bossAvatar:SetPoint("bottomleft", newBossWidget, "bottomleft", 0, 0)
|
||||
newBossWidget.AvatarTexture = bossAvatar
|
||||
|
||||
local verticalLine = Details:GetFramework():CreateImage (newBossWidget, "", 1, f.ChartFrame.Graphic:GetHeight(), "overlay")
|
||||
local verticalLine = Details:GetFramework():CreateImage(newBossWidget, "", 1, dungeonChartFrame.ChartFrame.Graphic:GetHeight(), "overlay")
|
||||
verticalLine:SetColorTexture (1, 1, 1, 0.3)
|
||||
verticalLine:SetPoint("bottomleft", newBossWidget, "bottomright", 0, 0)
|
||||
|
||||
@@ -577,15 +559,15 @@ function mythicDungeonCharts.ShowChart()
|
||||
timeBackground:SetPoint("topleft", timeText, "topleft", -2, 2)
|
||||
timeBackground:SetPoint("bottomright", timeText, "bottomright", 2, 0)
|
||||
|
||||
f.BossWidgetsFrame.Widgets [i] = newBossWidget
|
||||
dungeonChartFrame.BossWidgetsFrame.Widgets [i] = newBossWidget
|
||||
bossWidget = newBossWidget
|
||||
end
|
||||
|
||||
local chartLength = f.ChartFrame.Graphic:GetWidth()
|
||||
local chartLength = dungeonChartFrame.ChartFrame.Graphic:GetWidth()
|
||||
local secondsPerPixel = chartLength / elapsedTime
|
||||
local xPosition = bossTable[1] * secondsPerPixel
|
||||
|
||||
bossWidget:SetPoint("bottomright", f.ChartFrame.Graphic, "bottomleft", xPosition, 0)
|
||||
bossWidget:SetPoint("bottomright", dungeonChartFrame.ChartFrame.Graphic, "bottomleft", xPosition, 0)
|
||||
|
||||
bossWidget.TimeText:SetText(Details:GetFramework():IntegerToTimer (bossTable[1]))
|
||||
|
||||
@@ -597,7 +579,6 @@ function mythicDungeonCharts.ShowChart()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
mythicDungeonCharts.Frame.ChartFrame:Reset()
|
||||
@@ -611,14 +592,17 @@ function mythicDungeonCharts.ShowChart()
|
||||
Details:GetFramework().table.copy (t, Details.mythic_plus.last_mythicrun_chart)
|
||||
mythicDungeonCharts.ChartTable = t
|
||||
mythicDungeonCharts:Debug("no valid data, saved data loaded")
|
||||
|
||||
else
|
||||
mythicDungeonCharts:Debug("no valid data and no saved data, canceling")
|
||||
mythicDungeonCharts.Frame:Hide()
|
||||
return
|
||||
end
|
||||
|
||||
else
|
||||
mythicDungeonCharts.Frame:Hide()
|
||||
mythicDungeonCharts:Debug("no data found, canceling")
|
||||
|
||||
if (verbosemode) then
|
||||
mythicDungeonCharts:Debug("mythicDungeonCharts.ShowChart() failed: no chart table")
|
||||
end
|
||||
@@ -705,6 +689,7 @@ local HideTooltip = function(ticker)
|
||||
mythicDungeonCharts.Frame.BossWidgetsFrame.GraphPinGlow:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
local PixelFrameOnEnter = function(self)
|
||||
local playerName = self.PlayerName
|
||||
--get the percent from the pixel height relative to the chart window
|
||||
@@ -731,6 +716,7 @@ local PixelFrameOnEnter = function(self)
|
||||
GameCooltip2:Show()
|
||||
showID = showID + 1
|
||||
end
|
||||
|
||||
local PixelFrameOnLeave = function(self)
|
||||
local timer = C_Timer.NewTimer(1, HideTooltip)
|
||||
timer.ShowID = showID
|
||||
@@ -738,6 +724,7 @@ end
|
||||
|
||||
local TAXIROUTE_LINEFACTOR = 128 / 126 -- Multiplying factor for texture coordinates
|
||||
local TAXIROUTE_LINEFACTOR_2 = TAXIROUTE_LINEFACTOR / 2 -- Half of that
|
||||
|
||||
function mythicDungeonCharts:CustomDrawLine (C, sx, sy, ex, ey, w, color, layer, linetexture, graphIndex)
|
||||
local relPoint = "BOTTOMLEFT"
|
||||
|
||||
@@ -747,6 +734,7 @@ function mythicDungeonCharts:CustomDrawLine (C, sx, sy, ex, ey, w, color, layer,
|
||||
else
|
||||
return self:DrawVLine(C, sx, sy, ey, w, color, layer)
|
||||
end
|
||||
|
||||
elseif sy == ey then
|
||||
return self:DrawHLine(C, sx, ex, sy, w, color, layer)
|
||||
end
|
||||
@@ -760,8 +748,10 @@ function mythicDungeonCharts:CustomDrawLine (C, sx, sy, ex, ey, w, color, layer,
|
||||
|
||||
if linetexture then --this data series texture
|
||||
T:SetTexture(linetexture)
|
||||
|
||||
elseif C.CustomLine then --overall chart texture
|
||||
T:SetTexture(C.CustomLine)
|
||||
|
||||
else --no texture assigned, use default
|
||||
T:SetTexture(TextureDirectory.."line")
|
||||
end
|
||||
@@ -822,8 +812,6 @@ function mythicDungeonCharts:CustomDrawLine (C, sx, sy, ex, ey, w, color, layer,
|
||||
T:SetPoint("TOPRIGHT", C, relPoint, cx + Bwid, cy + Bhgt)
|
||||
T:Show()
|
||||
|
||||
--[=
|
||||
|
||||
local playerName = mythicDungeonCharts.PlayerGraphIndex [graphIndex]
|
||||
if (mythicDungeonCharts.Frame.ChartFrame.TextureID % 3 == 0 and playerName) then
|
||||
|
||||
@@ -850,8 +838,6 @@ function mythicDungeonCharts:CustomDrawLine (C, sx, sy, ex, ey, w, color, layer,
|
||||
end
|
||||
|
||||
mythicDungeonCharts.Frame.ChartFrame.TextureID = mythicDungeonCharts.Frame.ChartFrame.TextureID + 1
|
||||
--]=]
|
||||
|
||||
return T
|
||||
end
|
||||
|
||||
@@ -906,7 +892,6 @@ mythicDungeonCharts.ClassColors = {
|
||||
["DEMONHUNTER3"] = { r = 0.24, g = 0.09, b = 0.39, colorStr = "ffa330c9" },
|
||||
};
|
||||
|
||||
|
||||
if (debugmode) then
|
||||
C_Timer.After(1, mythicDungeonCharts.ShowChart)
|
||||
end
|
||||
@@ -774,7 +774,7 @@ function DetailsMythicPlusFrame.EventListener.OnDetailsEvent (contextObject, eve
|
||||
--nothing
|
||||
|
||||
elseif (event == "COMBAT_MYTHICDUNGEON_START") then
|
||||
|
||||
print("COMBAT_MYTHICDUNGEON_START", ...)
|
||||
local lower_instance = _detalhes:GetLowerInstanceNumber()
|
||||
if (lower_instance) then
|
||||
lower_instance = _detalhes:GetInstance(lower_instance)
|
||||
@@ -801,7 +801,6 @@ function DetailsMythicPlusFrame.EventListener.OnDetailsEvent (contextObject, eve
|
||||
C_Timer.After(0.5, DetailsMythicPlusFrame.OnChallengeModeStart)
|
||||
|
||||
elseif (event == "COMBAT_MYTHICDUNGEON_END") then
|
||||
|
||||
--ignore the event if ignoring mythic dungeon special treatment
|
||||
if (_detalhes.streamer_config.disable_mythic_dungeon) then
|
||||
return
|
||||
@@ -810,12 +809,10 @@ function DetailsMythicPlusFrame.EventListener.OnDetailsEvent (contextObject, eve
|
||||
--delay to wait the encounter_end trigger first
|
||||
--assuming here the party cleaned the mobs kill objective before going to kill the last boss
|
||||
C_Timer.After(2, DetailsMythicPlusFrame.MythicDungeonFinished)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
DetailsMythicPlusFrame:SetScript("OnEvent", function(_, event, ...)
|
||||
|
||||
if (event == "START_TIMER") then
|
||||
DetailsMythicPlusFrame.LastTimer = GetTime()
|
||||
|
||||
@@ -847,7 +844,5 @@ DetailsMythicPlusFrame:SetScript("OnEvent", function(_, event, ...)
|
||||
DetailsMythicPlusFrame.MythicDungeonFinished (true)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end)
|
||||
|
||||
@@ -5,7 +5,7 @@ do
|
||||
local _detalhes = _G._detalhes
|
||||
local _
|
||||
local _pairs = pairs
|
||||
local _ipairs = ipairs
|
||||
local ipairs = ipairs
|
||||
local _UnitClass = UnitClass
|
||||
local _select = select
|
||||
local _unpack = unpack
|
||||
@@ -42,7 +42,7 @@ do
|
||||
local _, class = _UnitClass (name)
|
||||
|
||||
if (not class) then
|
||||
for index, container in _ipairs(_detalhes.tabela_overall) do
|
||||
for index, container in ipairs(_detalhes.tabela_overall) do
|
||||
local index = container._NameIndexTable [name]
|
||||
if (index) then
|
||||
local actor = container._ActorTable [index]
|
||||
@@ -248,7 +248,7 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
for index, container in _ipairs(_detalhes.tabela_overall) do
|
||||
for index, container in ipairs(_detalhes.tabela_overall) do
|
||||
local index = container._NameIndexTable [name]
|
||||
if (index) then
|
||||
local actor = container._ActorTable [index]
|
||||
|
||||
+2
-2
@@ -1299,9 +1299,9 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
-- /run for o=1,10 do local f=CreateFrame("frame");f:SetPoint("center");f:SetSize(300,300); local t=f:CreateTexture(nil,"overlay");t:SetAllPoints();f:SetScript("OnUpdate",function() t:SetTexture("Interface\\1024")end);end;
|
||||
-- https://www.dropbox.com/s/ulyeqa2z0ummlu7/1024.tga?dl=0
|
||||
|
||||
local time = 0
|
||||
local elapsedTime = 0
|
||||
a:SetScript("OnUpdate", function(self, deltaTime)
|
||||
time = time + deltaTime
|
||||
elapsedTime = elapsedTime + deltaTime
|
||||
|
||||
--texture:SetSize(math.random (50, 300), math.random (50, 300))
|
||||
--local spec = allspecs [math.random (#allspecs)]
|
||||
|
||||
+6
-12
@@ -1,10 +1,4 @@
|
||||
|
||||
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--basic stuff
|
||||
|
||||
local _
|
||||
local _detalhes = _G._detalhes
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
@@ -263,21 +257,21 @@
|
||||
-- raid dps [1]
|
||||
function()
|
||||
local combat = _detalhes.tabela_vigente
|
||||
local time = combat:GetCombatTime()
|
||||
if (not time or time == 0) then
|
||||
local combatTime = combat:GetCombatTime()
|
||||
if (not combatTime or combatTime == 0) then
|
||||
return 0
|
||||
else
|
||||
return ToKFunctions [_detalhes.minimap.text_format] (_, combat.totals_grupo[1] / time)
|
||||
return ToKFunctions [_detalhes.minimap.text_format] (_, combat.totals_grupo[1] / combatTime)
|
||||
end
|
||||
end,
|
||||
-- raid hps [2]
|
||||
function()
|
||||
local combat = _detalhes.tabela_vigente
|
||||
local time = combat:GetCombatTime()
|
||||
if (not time or time == 0) then
|
||||
local combatTime = combat:GetCombatTime()
|
||||
if (not combatTime or combatTime == 0) then
|
||||
return 0
|
||||
else
|
||||
return ToKFunctions [_detalhes.minimap.text_format] (_, combat.totals_grupo[2] / time)
|
||||
return ToKFunctions [_detalhes.minimap.text_format] (_, combat.totals_grupo[2] / combatTime)
|
||||
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
|
||||
@@ -630,7 +630,7 @@ end
|
||||
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)
|
||||
|
||||
@@ -758,7 +758,7 @@ local function DispellInfo (dispell, barra)
|
||||
|
||||
_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")
|
||||
@@ -804,7 +804,7 @@ local function KickBy (magia, barra)
|
||||
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")
|
||||
|
||||
@@ -853,7 +853,7 @@ local function EnemySkills (habilidade, barra)
|
||||
|
||||
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")
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -1387,7 +1387,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
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 (
|
||||
@@ -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
|
||||
@@ -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,7 +1588,7 @@ 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 (
|
||||
@@ -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]
|
||||
@@ -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
|
||||
@@ -1891,7 +1891,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
|
||||
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
|
||||
@@ -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
|
||||
@@ -2005,7 +2005,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
|
||||
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
|
||||
@@ -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
|
||||
|
||||
@@ -4,7 +4,7 @@ do
|
||||
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
|
||||
@@ -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
|
||||
|
||||
@@ -1191,7 +1191,7 @@ _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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user