1.15.0 Test Version

- Implemented a early support for Dungeons:
the addon is now capable of distinguishing dungeon boss and trash mobs.
not all bosses are implemented yet, atm is:
*Mogu'Shan Palace
*Temple of the Jade Serpent
*Stormstout Brewery

- Implemented Overall Data: Options for it are under combat tab.

- Implemented spell targets on Player Details Window.
Also, fixed lots of small issues like showing damage done where clicking on a Dps bar.
This commit is contained in:
tercio
2014-05-28 18:04:24 -03:00
parent e9e1fe4dfd
commit 9dd43d676d
34 changed files with 1988 additions and 809 deletions
+1
View File
@@ -4,6 +4,7 @@ move-folders:
Details/plugins/Details_EncounterDetails: Details_EncounterDetails
Details/plugins/Details_RaidInfo-ThroneOfThunder: Details_RaidInfo-ThroneOfThunder
Details/plugins/Details_RaidInfo-SiegeOfOrgrimmar: Details_RaidInfo-SiegeOfOrgrimmar
Details/plugins/Details_DungeonInfo-Pandaria: Details_DungeonInfo-Pandaria
Details/plugins/Details_SaveData: Details_SaveData
Details/plugins/Details_SpellDetails: Details_SpellDetails
Details/plugins/Details_TimeAttack: Details_TimeAttack
+3 -3
View File
@@ -8,9 +8,9 @@
_ = nil
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0", "LibHotCorners")
_detalhes.userversion = "v1.14.6"
_detalhes.version = "Alpha 018"
_detalhes.realversion = 18
_detalhes.userversion = "v1.15.0"
_detalhes.version = "Alpha 019"
_detalhes.realversion = 19
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> initialization stuff
+42 -56
View File
@@ -27,6 +27,12 @@ local _table_remove = table.remove
local _tempo = time()
local _
--constants
local class_type_dano = _detalhes.atributos.dano
local class_type_cura = _detalhes.atributos.cura
local class_type_e_energy = _detalhes.atributos.e_energy
local class_type_misc = _detalhes.atributos.misc
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--[[ __call function, get an actor from current combat.
@@ -301,7 +307,7 @@ end
combate.__sub = function (combate1, combate2)
if (combate1~= _detalhes.tabela_overall) then
if (combate1 ~= _detalhes.tabela_overall) then
return
end
@@ -366,62 +372,42 @@ end
combate.__add = function (combate1, combate2)
if (combate1 == _detalhes.tabela_overall or combate2 == _detalhes.tabela_overall) then
return
end
--> add dano
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_T1:add_total (combate1)
actor_T1:add_total (_detalhes.tabela_overall)
end
combate1 [1].need_refresh = true
--> add heal
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_T1:add_total (combate1)
actor_T1:add_total (_detalhes.tabela_overall)
end
combate1 [2].need_refresh = true
--> add energy
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_T1:add_total (combate1)
actor_T1:add_total (_detalhes.tabela_overall)
end
combate1 [3].need_refresh = true
--> add misc
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_T1:add_total (combate1)
actor_T1:add_total (_detalhes.tabela_overall)
end
combate1 [4].need_refresh = true
--> aumenta o tempo
combate1.start_time = combate1.start_time - (combate2.end_time - combate2.start_time)
--> frags
for fragName, fragAmount in pairs (combate2.frags) do
if (fragAmount) then
if (combate1.frags [fragName]) then
combate1.frags [fragName] = combate1.frags [fragName] + fragAmount
else
combate1.frags [fragName] = fragAmount
end
end
end
combate1.frags_need_refresh = true
return combate1
local all_containers = {combate2 [class_type_dano]._ActorTable, combate2 [class_type_cura]._ActorTable, combate2 [class_type_e_energy]._ActorTable, combate2 [class_type_misc]._ActorTable}
--actor.boss_fight_component
--actor.fight_component
--combat.is_boss
--combat.instance_type -- party raid
for class_type, actor_container in ipairs (all_containers) do
for _, actor in ipairs (actor_container) do
local shadow
if (class_type == class_type_dano) then
shadow = _detalhes.atributo_damage:r_connect_shadow (actor, true)
elseif (class_type == class_type_cura) then
shadow = _detalhes.atributo_heal:r_connect_shadow (actor, true)
elseif (class_type == class_type_e_energy) then
shadow = _detalhes.atributo_energy:r_connect_shadow (actor, true)
elseif (class_type == class_type_misc) then
shadow = _detalhes.atributo_misc:r_connect_shadow (actor, true)
end
shadow.boss_fight_component = actor.boss_fight_component
shadow.fight_component = actor.fight_component
shadow.grupo = actor.grupo
--if (shadow:EstaoLinkados (actor)) then
-- shadow:FazLinkagem (actor)
--end
end
end
--if (combate2.end_time and combate2.start_time) then
-- combate1.start_time = combate1.start_time - (combate1.end_time - combate1.start_time)
--end
return combate1
end
function _detalhes:UpdateCombat()
+184 -70
View File
@@ -72,6 +72,8 @@ local CLASS_ICON_TCOORDS = _G.CLASS_ICON_TCOORDS
local key_overlay = {1, 1, 1, .1}
local key_overlay_press = {1, 1, 1, .2}
local headerColor = "yellow"
local info = _detalhes.janela_info
local keyName
@@ -268,9 +270,9 @@ function _detalhes:ToolTipFrags (instancia, frag, esta_barra, keydown)
for aggressor, _ in _pairs (took_damage_from) do
local damager_actor = damage_container._ActorTable[damage_container._NameIndexTable [ aggressor ]]
local damager_actor = damage_container._ActorTable [damage_container._NameIndexTable [ aggressor ]]
if (damager_actor) then --> checagem por causa do total e do garbage collector que não limpa os names que deram dano
if (damager_actor and not damager_actor.owner) then --> checagem por causa do total e do garbage collector que não limpa os names que deram dano
local targets = damager_actor.targets
@@ -285,7 +287,7 @@ function _detalhes:ToolTipFrags (instancia, frag, esta_barra, keydown)
_table_sort (damage_taken_table, _detalhes.Sort2)
GameCooltip:AddLine (Loc ["STRING_FROM"], nil, nil, headerColor, nil, 12)
GameCooltip:AddLine (Loc ["STRING_DAMAGE_FROM"], nil, nil, headerColor, nil, 12)
GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.126953125, 0.1796875, 0, 0.0546875)
local min = 6
@@ -322,7 +324,8 @@ function _detalhes:ToolTipFrags (instancia, frag, esta_barra, keydown)
_detalhes:AddTooltipBackgroundStatusbar()
end
GameCooltip:AddLine (Loc ["STRING_REPORT_LEFTCLICK"], nil, 1, "white")
GameCooltip:AddLine ("")
GameCooltip:AddLine (Loc ["STRING_REPORT_LEFTCLICK"], nil, 1, _unpack (self.click_to_report_color))
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, 16, 0.015625, 0.13671875, 0.4375, 0.59765625)
GameCooltip:ShowCooltip()
@@ -475,6 +478,9 @@ function _detalhes:ToolTipVoidZones (instancia, actor, barra, keydown)
local GameCooltip = GameCooltip
GameCooltip:AddLine (Loc ["STRING_VOIDZONE_TOOLTIP"], nil, nil, headerColor, nil, 12)
GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.126953125, 0.1796875, 0, 0.0546875)
for _, alvo in _ipairs (container) do
local minutos, segundos = _math_floor (alvo.uptime / 60), _math_floor (alvo.uptime % 60)
@@ -495,8 +501,10 @@ function _detalhes:ToolTipVoidZones (instancia, actor, barra, keydown)
end
GameCooltip:AddLine (Loc ["STRING_REPORT_LEFTCLICK"], nil, 1, "white")
GameCooltip:AddLine ("")
GameCooltip:AddLine (Loc ["STRING_REPORT_LEFTCLICK"], nil, 1, _unpack (self.click_to_report_color))
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, 16, 0.015625, 0.13671875, 0.4375, 0.59765625)
GameCooltip:ShowCooltip()
end
@@ -1307,6 +1315,8 @@ end
if (from_resize) then
if (self.owner) then
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.owner.classe])
elseif (self.monster) then
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors.ENEMY)
else
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.classe])
end
@@ -1408,7 +1418,6 @@ function atributo_damage:ToolTip (instancia, numero, barra, keydown)
end
--> tooltip locals
local r, g, b
local headerColor = "yellow"
local barAlha = .6
--[[exported]] function _detalhes.Sort1 (table1, table2)
@@ -1453,7 +1462,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
if (_detalhes.time_type == 1 or not self.grupo) then
meu_tempo = self:Tempo()
elseif (_detalhes.time_type == 2) then
meu_tempo = self:GetCombatTime()
meu_tempo = instancia.showing:GetCombatTime()
end
--add and sort
@@ -1843,6 +1852,9 @@ function atributo_damage:MontaDetalhes (spellid, barra)
elseif (info.sub_atributo == 4) then
return self:MontaDetalhesFriendlyFire (spellid, barra)
elseif (info.sub_atributo == 6) then
if (_bit_band (self.serial, 0x00000400) ~= 0) then --é um jogador
return self:MontaDetalhesDamageDone (spellid, barra)
end
return self:MontaDetalhesEnemy (spellid, barra)
end
end
@@ -1921,15 +1933,21 @@ function atributo_damage:MontaInfoFriendlyFire()
barra.textura:SetValue (tabela[2]/FirstPlaceDamage*100)
end
barra.texto_esquerdo:SetText (index..instancia.divisores.colocacao..tabela[1]) --seta o texto da esqueda
barra.texto_direita:SetText (tabela[2] .." ".. instancia.divisores.abre .._cstr("%.1f", tabela[3]) .."%".. instancia.divisores.fecha) --seta o texto da direita
barra.texto_esquerdo:SetText (index .. instancia.divisores.colocacao .. tabela[1]) --seta o texto da esqueda
barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .. " (" .. _cstr ("%.1f", tabela[3]) .."%)") --seta o texto da direita
local classe = tabela[4]
if (not classe) then
classe = "monster"
end
barra.icone:SetTexture ("Interface\\AddOns\\Details\\images\\"..classe:lower().."_small")
barra.icone:SetTexture (info.instancia.row_info.icon_file)
if (CLASS_ICON_TCOORDS [classe]) then
barra.icone:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [classe]))
else
barra.icone:SetTexture (nil)
end
barra.minha_tabela = self
barra.show = tabela[1]
@@ -1972,7 +1990,7 @@ function atributo_damage:MontaInfoFriendlyFire()
end
barra.texto_esquerdo:SetText (index..instancia.divisores.colocacao..tabela[1]) --seta o texto da esqueda
barra.texto_direita:SetText (tabela[2] .." ".. instancia.divisores.abre .._cstr("%.1f", tabela[3]) .. instancia.divisores.fecha) --seta o texto da direita
barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .." (" .._cstr("%.1f", tabela[3]) .. ")") --seta o texto da direita
barra.icone:SetTexture (tabela[4])
barra.minha_tabela = nil --> desativa o tooltip
@@ -2032,46 +2050,23 @@ function atributo_damage:MontaInfoDamageTaken()
texCoords = _detalhes.class_coords ["UNKNOW"]
end
self:UpdadeInfoBar (barra, index, tabela[1], tabela[1], tabela[2], max_, tabela[3], "Interface\\AddOns\\Details\\images\\classes_small", true, texCoords)
self:UpdadeInfoBar (barra, index, tabela[1], tabela[1], tabela[2], _detalhes:comma_value (tabela[2]), max_, tabela[3], "Interface\\AddOns\\Details\\images\\classes_small", true, texCoords)
end
end
--[[
--> TOP HABILIDADES
local ActorDamage = self.total_without_pet
local ActorSkillsContainer = self.spell_tables._ActorTable
local ActorSkillsSortTable = {}
for _spellid, _skill in _pairs (ActorSkillsContainer) do
ActorSkillsSortTable [#ActorSkillsSortTable+1] = {_spellid, _skill.total}
end
_table_sort (ActorSkillsSortTable, _detalhes.Sort2)
--> TOP INIMIGOS
local ActorTargetsContainer = self.targets._ActorTable
local ActorTargetsSortTable = {}
for _, _target in _ipairs (ActorTargetsContainer) do
ActorTargetsSortTable [#ActorTargetsSortTable+1] = {_target.nome, _target.total}
end
_table_sort (ActorTargetsSortTable, _detalhes.Sort2)
--]]
--[[exported]] function _detalhes:UpdadeInfoBar (row, index, spellid, name, value, max, percent, icon, detalhes, texCoords)
--[[exported]] function _detalhes:UpdadeInfoBar (row, index, spellid, name, value, value_formated, max, percent, icon, detalhes, texCoords)
--> seta o tamanho da barra
if (index == 1) then
row.textura:SetValue (100)
else
row.textura:SetValue (value/max*100)
end
--> seta o texto da esqueda
--row.texto_esquerdo:SetText (index.."."..name)
--if (not) then
--end
row.texto_esquerdo:SetText (index.."."..name)
--> seta o texto da direita
row.texto_direita:SetText (_detalhes:comma_value (value).." (".._cstr("%.1f", percent) .."%)")
row.texto_direita:SetText (value_formated .. " (" .. _cstr ("%.1f", percent) .."%)")
--> seta o icone
if (icon) then
@@ -2093,8 +2088,9 @@ end
row.show = spellid
row:Show() --> mostra a barra
if (detalhes and self.detalhes and self.detalhes == spellid) then
self:MontaDetalhes (spellid, row) --> poderia deixar isso pro final e montar uma tail call??
if (detalhes and self.detalhes and self.detalhes == spellid and info.showing == index) then
--self:MontaDetalhes (spellid, row) --> poderia deixar isso pro final e montar uma tail call??
self:MontaDetalhes (row.show, row, info.instancia) --> poderia deixar isso pro final e montar uma tail call??
end
end
@@ -2128,7 +2124,15 @@ function atributo_damage:MontaInfoDamageDone()
local ActorTotalDamage = self.total
local ActorSkillsSortTable = {}
local ActorSkillsContainer = self.spell_tables._ActorTable
--get time type
local meu_tempo
if (_detalhes.time_type == 1 or not self.grupo) then
meu_tempo = self:Tempo()
elseif (_detalhes.time_type == 2) then
meu_tempo = info.instancia.showing:GetCombatTime()
end
for _spellid, _skill in _pairs (ActorSkillsContainer) do --> da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo (_spellid)
_table_insert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome, icone})
@@ -2144,11 +2148,7 @@ function atributo_damage:MontaInfoDamageDone()
local PetSkillsContainer = PetActor.spell_tables._ActorTable
for _spellid, _skill in _pairs (PetSkillsContainer) do --> da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo (_spellid)
if (class_color) then
_table_insert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome .. " (|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r)", icone, PetActor})
else
_table_insert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome .. " (" .. PetName:gsub ((" <.*"), "") .. ")", icone, PetActor})
end
_table_insert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome .. " (|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r)", icone, PetActor})
end
--_table_insert (ActorSkillsSortTable, {PetName, PetActor.total, PetActor.total/ActorTotalDamage*100, PetName:gsub ((" <.*"), ""), "Interface\\AddOns\\Details\\images\\classes_small"})
end
@@ -2169,8 +2169,14 @@ function atributo_damage:MontaInfoDamageDone()
self:FocusLock (barra, tabela[1])
self:UpdadeInfoBar (barra, index, tabela[1], tabela[4], tabela[2], max_, tabela[3], tabela[5], true)
barra.other_actor = tabela [6]
if (info.sub_atributo == 2) then
self:UpdadeInfoBar (barra, index, tabela[1], tabela[4], tabela[2], _detalhes:comma_value (_math_floor (tabela[2]/meu_tempo)), max_, tabela[3], tabela[5], true)
else
self:UpdadeInfoBar (barra, index, tabela[1], tabela[4], tabela[2], _detalhes:comma_value (tabela[2]), max_, tabela[3], tabela[5], true)
end
end
--> TOP INIMIGOS
@@ -2224,7 +2230,15 @@ function atributo_damage:MontaInfoDamageDone()
barra.texto_esquerdo:SetText (index..instancia.divisores.colocacao..tabela[1]) --seta o texto da esqueda
barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .." ".. instancia.divisores.abre .. _cstr ("%.1f", tabela[3]) .."%".. instancia.divisores.fecha) --seta o texto da direita
--barra.icone:SetTexture (tabela[4]) --CLASSE
barra.icone:SetTexture ([[Interface\AddOns\Details\images\classes_small]]) --CLASSE
local texCoords = _detalhes.class_coords [tabela[4]]
if (not texCoords) then
texCoords = _detalhes.class_coords ["UNKNOW"]
end
barra.icone:SetTexCoord (_unpack (texCoords))
_detalhes:name_space_info (barra)
if (barra.mouse_over) then --> atualizar o tooltip
if (barra.isAlvo) then
@@ -2283,7 +2297,11 @@ function atributo_damage:MontaInfoDamageDone()
end
barra.texto_esquerdo:SetText (index..instancia.divisores.colocacao..tabela[1]) --seta o texto da esqueda
barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .." ".. instancia.divisores.abre .._cstr("%.1f", tabela[3]) .. instancia.divisores.fecha) --seta o texto da direita
if (info.sub_atributo == 2) then
barra.texto_direita:SetText (_detalhes:comma_value ( _math_floor (tabela[2]/meu_tempo)) .." ".. instancia.divisores.abre .._cstr("%.1f", tabela[3]) .. instancia.divisores.fecha) --seta o texto da direita
else
barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .." ".. instancia.divisores.abre .._cstr("%.1f", tabela[3]) .. instancia.divisores.fecha) --seta o texto da direita
end
if (barra.mouse_over) then --> atualizar o tooltip
if (barra.isAlvo) then
@@ -2360,7 +2378,8 @@ function atributo_damage:MontaDetalhesFriendlyFire (nome, barra)
barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .. " " .. instancia.divisores.abre .. _cstr ("%.1f", tabela[3]) .. "%" .. instancia.divisores.fecha) --seta o texto da direita
barra.icone:SetTexture (tabela[5])
barra.icone:SetTexCoord (0, 1, 0, 1)
barra:Show() --> mostra a barra
if (index == 15) then
@@ -2376,7 +2395,7 @@ function atributo_damage:MontaDetalhesEnemy (spellid, barra)
for _, barra in _ipairs (info.barras3) do
barra:Hide()
end
local container = info.instancia.showing[1]
local barras = info.barras3
local instancia = info.instancia
@@ -2393,6 +2412,7 @@ function atributo_damage:MontaDetalhesEnemy (spellid, barra)
else
classe = "UNKNOW"
end
target_pool [#target_pool+1] = {target.nome, target.total, classe}
end
@@ -2457,7 +2477,7 @@ function atributo_damage:MontaDetalhesDamageTaken (nome, barra)
local este_agressor = showing._ActorTable[showing._NameIndexTable[nome]]
if (not este_agressor ) then
print ("EROO este agressor eh NIL")
--print ("EROO este agressor eh NIL")
return
end
@@ -2511,6 +2531,7 @@ function atributo_damage:MontaDetalhesDamageTaken (nome, barra)
barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .." ".. instancia.divisores.abre .._cstr("%.1f", tabela[3]) .."%".. instancia.divisores.fecha) --seta o texto da direita
barra.icone:SetTexture (tabela[5])
barra.icone:SetTexCoord (0, 1, 0, 1)
barra:Show() --> mostra a barra
@@ -2587,7 +2608,6 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
return
end
local esta_magia
if (barra.other_actor) then
@@ -2607,11 +2627,12 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
_detalhes.janela_info.spell_icone:SetTexture (infospell[3])
local total = self.total
local meu_tempo
if (_detalhes.time_type == 1 or not self.grupo) then
meu_tempo = self:Tempo()
elseif (_detalhes.time_type == 2) then
meu_tempo = self:GetCombatTime()
meu_tempo = info.instancia.showing:GetCombatTime()
end
local total_hits = esta_magia.counter
@@ -2620,6 +2641,8 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
local data = {}
--print (debugstack())
--> GERAL
local media = esta_magia.total/total_hits
@@ -2806,17 +2829,40 @@ function atributo_damage:MontaTooltipAlvos (esta_barra, index, instancia)
table.sort (habilidades, function (a, b) return a[2] > b[2] end)
GameTooltip:AddLine (index..". "..inimigo)
GameTooltip:AddLine (Loc ["STRING_DAMAGE_FROM"]..":")
GameTooltip:AddLine (" ")
--get time type
local meu_tempo
if (_detalhes.time_type == 1 or not self.grupo) then
meu_tempo = self:Tempo()
elseif (_detalhes.time_type == 2) then
meu_tempo = info.instancia.showing:GetCombatTime()
end
local is_dps = info.instancia.sub_atributo == 2
if (is_dps) then
GameTooltip:AddLine (index..". "..inimigo)
GameTooltip:AddLine (Loc ["STRING_DAMAGE_DPS_IN"] .. ":")
GameTooltip:AddLine (" ")
else
GameTooltip:AddLine (index..". "..inimigo)
GameTooltip:AddLine (Loc ["STRING_DAMAGE_FROM"] .. ":")
GameTooltip:AddLine (" ")
end
for index, tabela in _ipairs (habilidades) do
if (index < 8) then
GameTooltip:AddDoubleLine (index..". |T"..tabela[3]..":0|t "..tabela[1], _detalhes:comma_value (tabela[2]).." (".._cstr("%.1f", tabela[2]/total*100).."%)", 1, 1, 1, 1, 1, 1)
--GameTooltip:AddTexture (icone)
if (is_dps) then
GameTooltip:AddDoubleLine (index..". |T"..tabela[3]..":0|t "..tabela[1], _detalhes:comma_value ( _math_floor (tabela[2] / meu_tempo) ).." (".._cstr("%.1f", tabela[2]/total*100).."%)", 1, 1, 1, 1, 1, 1)
else
GameTooltip:AddDoubleLine (index..". |T"..tabela[3]..":0|t "..tabela[1], _detalhes:comma_value (tabela[2]).." (".._cstr("%.1f", tabela[2]/total*100).."%)", 1, 1, 1, 1, 1, 1)
end
else
GameTooltip:AddDoubleLine (index..". "..tabela[1], _detalhes:comma_value (tabela[2]).." (".._cstr("%.1f", tabela[2]/total*100).."%)", .65, .65, .65, .65, .65, .65)
if (is_dps) then
GameTooltip:AddDoubleLine (index..". "..tabela[1], _detalhes:comma_value ( _math_floor (tabela[2] / meu_tempo) ).." (".._cstr("%.1f", tabela[2]/total*100).."%)", .65, .65, .65, .65, .65, .65)
else
GameTooltip:AddDoubleLine (index..". "..tabela[1], _detalhes:comma_value (tabela[2]).." (".._cstr("%.1f", tabela[2]/total*100).."%)", .65, .65, .65, .65, .65, .65)
end
end
end
@@ -2879,11 +2925,68 @@ end
end
--> restaura e liga o ator com a sua shadow durante a inicialização (startup function)
function atributo_damage:r_connect_shadow (actor)
function atributo_damage:r_onlyrefresh_shadow (actor)
--> criar uma shadow desse ator se ainda não tiver uma
local overall_dano = _detalhes.tabela_overall [1]
local shadow = overall_dano._ActorTable [overall_dano._NameIndexTable [actor.nome]]
if (not shadow) then
shadow = overall_dano:PegarCombatente (actor.serial, actor.nome, actor.flag_original, true)
shadow.classe = actor.classe
shadow.grupo = actor.grupo
shadow.start_time = time() - 3
shadow.end_time = time()
end
--> restaura a meta e indexes ao ator
_detalhes.refresh:r_atributo_damage (actor, shadow)
--> copia o container de alvos (captura de dados)
for index, alvo in _ipairs (actor.targets._ActorTable) do
--> cria e soma o valor do total
local alvo_shadow = shadow.targets:PegarCombatente (nil, alvo.nome, nil, true)
--> refresh no alvo
_detalhes.refresh:r_alvo_da_habilidade (alvo, shadow.targets)
end
--> copia o container de habilidades (captura de dados)
for spellid, habilidade in _pairs (actor.spell_tables._ActorTable) do
--> cria e soma o valor
local habilidade_shadow = shadow.spell_tables:PegaHabilidade (spellid, true, nil, true)
--> refresh e soma os valores dos alvos
for index, alvo in _ipairs (habilidade.targets._ActorTable) do
--> cria e soma o valor do total
local alvo_shadow = habilidade_shadow.targets:PegarCombatente (nil, alvo.nome, nil, true)
--> refresh no alvo da habilidade
_detalhes.refresh:r_alvo_da_habilidade (alvo, habilidade_shadow.targets)
end
--> refresh na habilidade
_detalhes.refresh:r_habilidade_dano (habilidade, shadow.spell_tables)
end
--> copia o container de friendly fire (captura de dados)
for index, friendlyFire in _ipairs (actor.friendlyfire._ActorTable) do
--> cria ou pega a shadow
local friendlyFire_shadow = shadow.friendlyfire:PegarCombatente (nil, friendlyFire.nome, nil, true)
--> refresh na tabela e no container de habilidades
_setmetatable (friendlyFire, _detalhes)
friendlyFire.shadow = friendlyFire_shadow
for spellid, habilidade in _pairs (friendlyFire.spell_tables._ActorTable) do
--> cria ou pega a habilidade no container de habilidade
local habilidade_shadow = friendlyFire_shadow.spell_tables:PegaHabilidade (spellid, true, nil, true)
--> refresh na habilidade
_detalhes.refresh:r_habilidade_dano (habilidade, friendlyFire_shadow.spell_tables)
end
--> refresh na meta e indexes
_detalhes.refresh:r_container_habilidades (friendlyFire.spell_tables, friendlyFire_shadow.spell_tables)
end
return shadow
end
if (not actor) then
actor = self
end
function atributo_damage:r_connect_shadow (actor, no_refresh)
--> criar uma shadow desse ator se ainda não tiver uma
local overall_dano = _detalhes.tabela_overall [1]
@@ -2898,8 +3001,9 @@ end
end
--> restaura a meta e indexes ao ator
if (not no_refresh) then
_detalhes.refresh:r_atributo_damage (actor, shadow)
end
--> tempo decorrido (captura de dados)
if (actor.end_time) then
local tempo = (actor.end_time or time()) - actor.start_time
@@ -2932,7 +3036,9 @@ end
local alvo_shadow = shadow.targets:PegarCombatente (nil, alvo.nome, nil, true)
alvo_shadow.total = alvo_shadow.total + alvo.total
--> refresh no alvo
_detalhes.refresh:r_alvo_da_habilidade (alvo, shadow.targets)
if (not no_refresh) then
_detalhes.refresh:r_alvo_da_habilidade (alvo, shadow.targets)
end
end
--> copia o container de habilidades (captura de dados)
@@ -2945,7 +3051,9 @@ end
local alvo_shadow = habilidade_shadow.targets:PegarCombatente (nil, alvo.nome, nil, true)
alvo_shadow.total = alvo_shadow.total + alvo.total
--> refresh no alvo da habilidade
_detalhes.refresh:r_alvo_da_habilidade (alvo, habilidade_shadow.targets)
if (not no_refresh) then
_detalhes.refresh:r_alvo_da_habilidade (alvo, habilidade_shadow.targets)
end
end
--> soma todos os demais valores
for key, value in _pairs (habilidade) do
@@ -2960,7 +3068,9 @@ end
end
--> refresh na habilidade
_detalhes.refresh:r_habilidade_dano (habilidade, shadow.spell_tables)
if (not no_refresh) then
_detalhes.refresh:r_habilidade_dano (habilidade, shadow.spell_tables)
end
end
--> copia o container de friendly fire (captura de dados)
@@ -2980,10 +3090,14 @@ end
habilidade_shadow.counter = habilidade_shadow.counter + habilidade.counter
habilidade_shadow.total = habilidade_shadow.total + habilidade.total
--> refresh na habilidade
_detalhes.refresh:r_habilidade_dano (habilidade, friendlyFire_shadow.spell_tables)
if (not no_refresh) then
_detalhes.refresh:r_habilidade_dano (habilidade, friendlyFire_shadow.spell_tables)
end
end
--> refresh na meta e indexes
_detalhes.refresh:r_container_habilidades (friendlyFire.spell_tables, friendlyFire_shadow.spell_tables)
if (not no_refresh) then
_detalhes.refresh:r_container_habilidades (friendlyFire.spell_tables, friendlyFire_shadow.spell_tables)
end
end
return shadow
+39 -47
View File
@@ -98,9 +98,6 @@ end
function habilidade_dano:AddFF (amount)
self.counter = self.counter + 1
self.total = self.total + amount
if (self.shadow) then
return self.shadow:AddFF (amount)
end
end
function habilidade_dano:Add (serial, nome, flag, amount, who_nome, resisted, blocked, absorbed, critical, glacing, token)
@@ -157,61 +154,56 @@ function habilidade_dano:Add (serial, nome, flag, amount, who_nome, resisted, bl
end
--end
if (self.shadow) then
if (_recording_ability_with_buffs) then
if (who_nome == _detalhes.playername) then --aqui ele vai detalhar tudo sobre a magia usada
if (_recording_ability_with_buffs) then
if (who_nome == _detalhes.playername) then --aqui ele vai detalhar tudo sobre a magia usada
local buffsNames = _detalhes.SoloTables.BuffsTableNameCache
local buffsNames = _detalhes.SoloTables.BuffsTableNameCache
local SpellBuffDetails = self.BuffTable
if (not SpellBuffDetails) then
self.BuffTable = {}
SpellBuffDetails = self.BuffTable
end
if (token == "SPELL_PERIODIC_DAMAGE") then
--> precisa ver se ele tinha na hora que aplicou
local SoloDebuffPower = _detalhes.tabela_vigente.SoloDebuffPower
if (SoloDebuffPower) then
local ThisDebuff = SoloDebuffPower [self.id]
if (ThisDebuff) then
local ThisDebuffOnTarget = ThisDebuff [serial]
if (ThisDebuffOnTarget) then
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
if (critical ~= nil) then
buff_info.critico = buff_info.critico+1
buff_info.critico_dano = buff_info.critico_dano+amount
end
SpellBuffDetails [buff_name] = buff_info
local SpellBuffDetails = self.BuffTable
if (not SpellBuffDetails) then
self.BuffTable = {}
SpellBuffDetails = self.BuffTable
end
if (token == "SPELL_PERIODIC_DAMAGE") then
--> precisa ver se ele tinha na hora que aplicou
local SoloDebuffPower = _detalhes.tabela_vigente.SoloDebuffPower
if (SoloDebuffPower) then
local ThisDebuff = SoloDebuffPower [self.id]
if (ThisDebuff) then
local ThisDebuffOnTarget = ThisDebuff [serial]
if (ThisDebuffOnTarget) then
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
if (critical ~= nil) then
buff_info.critico = buff_info.critico+1
buff_info.critico_dano = buff_info.critico_dano+amount
end
SpellBuffDetails [buff_name] = buff_info
end
end
end
else
end
else
for BuffName, _ in _pairs (_detalhes.Buffs.BuffsTable) do
local name = _UnitAura ("player", BuffName)
if (name ~= nil) then
local buff_info = SpellBuffDetails [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
if (critical ~= nil) then
buff_info.critico = buff_info.critico+1
buff_info.critico_dano = buff_info.critico_dano+amount
end
SpellBuffDetails [name] = buff_info
for BuffName, _ in _pairs (_detalhes.Buffs.BuffsTable) do
local name = _UnitAura ("player", BuffName)
if (name ~= nil) then
local buff_info = SpellBuffDetails [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
if (critical ~= nil) then
buff_info.critico = buff_info.critico+1
buff_info.critico_dano = buff_info.critico_dano+amount
end
SpellBuffDetails [name] = buff_info
end
end
end
end
return self.shadow:Add (serial, nome, flag, amount, who_nome, resisted, blocked, absorbed, critical, glacing, token)
end
end
+56 -9
View File
@@ -856,7 +856,7 @@ function atributo_energy:MontaInfoRegenRecebido()
end
self:FocusLock (barra, tabela[1])
self:UpdadeInfoBar (barra, index, tabela[1], tabela[4], tabela[2], max_, tabela[3], tabela[5], true)
self:UpdadeInfoBar (barra, index, tabela[1], tabela[4], tabela[2], _detalhes:comma_value (tabela[2]), max_, tabela[3], tabela[5], true)
barra.minha_tabela = self
barra.show = tabela[1]
@@ -1036,11 +1036,8 @@ end
end
--> restaura e liga o ator com a sua shadow durante a inicialização
function atributo_energy:r_connect_shadow (actor)
if (not actor) then
actor = self
end
function atributo_energy:r_onlyrefresh_shadow (actor)
--> criar uma shadow desse ator se ainda não tiver uma
local overall_energy = _detalhes.tabela_overall [3]
@@ -1055,6 +1052,50 @@ end
--> restaura a meta e indexes ao ator
_detalhes.refresh:r_atributo_energy (actor, shadow)
--> copia o container de alvos (captura de dados)
for index, alvo in _ipairs (actor.targets._ActorTable) do
--> cria e soma o valor do total
local alvo_shadow = shadow.targets:PegarCombatente (nil, alvo.nome, nil, true)
--> refresh no alvo
_detalhes.refresh:r_alvo_da_habilidade (alvo, shadow.targets)
end
--> copia o container de habilidades (captura de dados)
for spellid, habilidade in _pairs (actor.spell_tables._ActorTable) do
--> cria e soma o valor
local habilidade_shadow = shadow.spell_tables:PegaHabilidade (spellid, true, nil, true)
--> refresh e soma os valores dos alvos
for index, alvo in _ipairs (habilidade.targets._ActorTable) do
--> cria e soma o valor do total
local alvo_shadow = habilidade_shadow.targets:PegarCombatente (nil, alvo.nome, nil, true)
--> refresh no alvo da habilidade
_detalhes.refresh:r_alvo_da_habilidade (alvo, habilidade_shadow.targets)
end
--> refresh na meta e indexes
_detalhes.refresh:r_habilidade_e_energy (habilidade, shadow.spell_tables)
end
return shadow
end
function atributo_energy:r_connect_shadow (actor, no_refresh)
--> criar uma shadow desse ator se ainda não tiver uma
local overall_energy = _detalhes.tabela_overall [3]
local shadow = overall_energy._ActorTable [overall_energy._NameIndexTable [actor.nome]]
if (not shadow) then
shadow = overall_energy:PegarCombatente (actor.serial, actor.nome, actor.flag_original, true)
shadow.classe = actor.classe
shadow.grupo = actor.grupo
end
--> restaura a meta e indexes ao ator
if (not no_refresh) then
_detalhes.refresh:r_atributo_energy (actor, shadow)
end
--> total das energias (captura de dados)
shadow.mana = shadow.mana + actor.mana
shadow.e_rage = shadow.e_rage + actor.e_rage
@@ -1089,7 +1130,9 @@ end
local alvo_shadow = shadow.targets:PegarCombatente (nil, alvo.nome, nil, true)
alvo_shadow.total = alvo_shadow.total + alvo.total
--> refresh no alvo
_detalhes.refresh:r_alvo_da_habilidade (alvo, shadow.targets)
if (not no_refresh) then
_detalhes.refresh:r_alvo_da_habilidade (alvo, shadow.targets)
end
end
--> copia o container de habilidades (captura de dados)
@@ -1102,7 +1145,9 @@ end
local alvo_shadow = habilidade_shadow.targets:PegarCombatente (nil, alvo.nome, nil, true)
alvo_shadow.total = alvo_shadow.total + alvo.total
--> refresh no alvo da habilidade
_detalhes.refresh:r_alvo_da_habilidade (alvo, habilidade_shadow.targets)
if (not no_refresh) then
_detalhes.refresh:r_alvo_da_habilidade (alvo, habilidade_shadow.targets)
end
end
--> soma todos os demais valores
for key, value in _pairs (habilidade) do
@@ -1116,7 +1161,9 @@ end
end
end
--> refresh na meta e indexes
_detalhes.refresh:r_habilidade_e_energy (habilidade, shadow.spell_tables)
if (not no_refresh) then
_detalhes.refresh:r_habilidade_e_energy (habilidade, shadow.spell_tables)
end
end
return shadow
-3
View File
@@ -67,9 +67,6 @@ function habilidade_energy:Add (serial, nome, flag, amount, who_nome, powertype)
alvo.runepower = alvo.runepower + amount
end
if (self.shadow) then
return self.shadow:Add (serial, nome, flag, amount, who_nome, powertype)
end
end
function _detalhes.refresh:r_habilidade_e_energy (habilidade, shadow) --recebeu o container shadow
+133 -32
View File
@@ -928,7 +928,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
if (_detalhes.time_type == 1 or not self.grupo) then
meu_tempo = self:Tempo()
elseif (_detalhes.time_type == 2) then
meu_tempo = self:GetCombatTime()
meu_tempo = instancia.showing:GetCombatTime()
end
local ActorTotal = self [actor_key]
@@ -991,8 +991,10 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
end
if (instancia.sub_atributo == 6) then
GameCooltip:AddLine (Loc ["STRING_REPORT_LEFTCLICK"], nil, 1, "white")
GameCooltip:AddLine ("")
GameCooltip:AddLine (Loc ["STRING_REPORT_LEFTCLICK"], nil, 1, _unpack (self.click_to_report_color))
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, 16, 0.015625, 0.13671875, 0.4375, 0.59765625)
GameCooltip:ShowCooltip()
end
@@ -1072,7 +1074,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
if (_detalhes.time_type == 1 or not self.grupo) then
meu_tempo = my_self:Tempo()
elseif (_detalhes.time_type == 2) then
meu_tempo = my_self:GetCombatTime()
meu_tempo = instancia.showing:GetCombatTime()
end
totais [#totais+1] = {nome, my_self.total_without_pet, my_self.total_without_pet/meu_tempo}
@@ -1246,7 +1248,7 @@ function atributo_heal:MontaInfoHealTaken()
texCoords = _detalhes.class_coords ["UNKNOW"]
end
self:UpdadeInfoBar (barra, index, tabela[1], tabela[1], tabela[2], max_, tabela[3], "Interface\\AddOns\\Details\\images\\classes_small", true, texCoords)
self:UpdadeInfoBar (barra, index, tabela[1], tabela[1], tabela[2], _detalhes:comma_value (tabela[2]), max_, tabela[3], "Interface\\AddOns\\Details\\images\\classes_small", true, texCoords)
end
--[[
@@ -1377,19 +1379,25 @@ function atributo_heal:MontaInfoOverHealing()
end
--> TOP OVERHEALED
local meus_inimigos = {}
local jogadores_overhealed = {}
tabela = self.targets._ActorTable
local heal_container = instancia.showing[2]
for _, tabela in _ipairs (tabela) do
_table_insert (meus_inimigos, {tabela.nome, tabela.overheal, tabela.overheal/total*100})
local classe = "UNKNOW"
local actor_object = heal_container._ActorTable [heal_container._NameIndexTable [tabela.nome]]
if (actor_object) then
classe = actor_object.classe
end
_table_insert (jogadores_overhealed, {tabela.nome, tabela.overheal, tabela.overheal/total*100, classe})
end
_table_sort (meus_inimigos, function(a, b) return a[2] > b[2] end )
_table_sort (jogadores_overhealed, function(a, b) return a[2] > b[2] end )
local amt_alvos = #meus_inimigos
local amt_alvos = #jogadores_overhealed
gump:JI_AtualizaContainerAlvos (amt_alvos)
local max_inimigos = meus_inimigos[1] and meus_inimigos[1][2] or 0
local max_inimigos = jogadores_overhealed[1] and jogadores_overhealed[1][2] or 0
for index, tabela in _ipairs (meus_inimigos) do
for index, tabela in _ipairs (jogadores_overhealed) do
local barra = info.barras2 [index]
@@ -1401,15 +1409,21 @@ function atributo_heal:MontaInfoOverHealing()
if (index == 1) then
barra.textura:SetValue (100)
else
barra.textura:SetValue (tabela[2]/max_*100) --> muito mais rapido...
barra.textura:SetValue (tabela[2]/max_*100)
end
barra.texto_esquerdo:SetText (index..instancia.divisores.colocacao..tabela[1]) --seta o texto da esqueda
barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .." ".. instancia.divisores.abre .. _cstr ("%.1f", tabela[3]) .. instancia.divisores.fecha) --seta o texto da direita
barra.texto_esquerdo:SetWidth (barra:GetWidth() - barra.texto_direita:GetStringWidth() - 30)
-- o que mostrar no local do ícone?
--barra.icone:SetTexture (tabela[4][3])
-- icon
barra.icone:SetTexture ([[Interface\AddOns\Details\images\classes_small]])
local texCoords = _detalhes.class_coords [tabela[4]]
if (not texCoords) then
texCoords = _detalhes.class_coords ["UNKNOW"]
end
barra.icone:SetTexCoord (_unpack (texCoords))
barra.minha_tabela = self
barra.nome_inimigo = tabela [1]
@@ -1434,6 +1448,14 @@ function atributo_heal:MontaInfoHealingDone()
local minhas_curas = {}
local barras = info.barras1
--get time type
local meu_tempo
if (_detalhes.time_type == 1 or not self.grupo) then
meu_tempo = self:Tempo()
elseif (_detalhes.time_type == 2) then
meu_tempo = info.instancia.showing:GetCombatTime()
end
for spellid, tabela in _pairs (tabela) do
local nome, rank, icone = _GetSpellInfo (spellid)
_table_insert (minhas_curas, {spellid, tabela.total, tabela.total/total*100, nome, icone})
@@ -1458,7 +1480,11 @@ function atributo_heal:MontaInfoHealingDone()
self:FocusLock (barra, tabela[1])
self:UpdadeInfoBar (barra, index, tabela[1], tabela[4], tabela[2], max_, tabela[3], tabela[5], true)
if (info.sub_atributo == 2) then
self:UpdadeInfoBar (barra, index, tabela[1], tabela[4], tabela[2], _detalhes:comma_value (_math_floor (tabela[2]/meu_tempo)), max_, tabela[3], tabela[5], true)
else
self:UpdadeInfoBar (barra, index, tabela[1], tabela[4], tabela[2], _detalhes:comma_value (tabela[2]), max_, tabela[3], tabela[5], true)
end
barra.minha_tabela = self
barra.show = tabela[1]
@@ -1499,7 +1525,12 @@ function atributo_heal:MontaInfoHealingDone()
end
barra.texto_esquerdo:SetText (index..instancia.divisores.colocacao..tabela[1]) --seta o texto da esqueda
barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .." ".. instancia.divisores.abre .. _cstr ("%.1f", tabela[3]) .. instancia.divisores.fecha) --seta o texto da direita
if (info.sub_atributo == 2) then
barra.texto_direita:SetText (_detalhes:comma_value (_math_floor (tabela[2]/meu_tempo)) .." ".. instancia.divisores.abre .. _cstr ("%.1f", tabela[3]) .. instancia.divisores.fecha) --seta o texto da direita
else
barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .." ".. instancia.divisores.abre .. _cstr ("%.1f", tabela[3]) .. instancia.divisores.fecha) --seta o texto da direita
end
-- o que mostrar no local do ícone?
--barra.icone:SetTexture (tabela[4][3])
@@ -1540,11 +1571,10 @@ function atributo_heal:MontaTooltipAlvos (esta_barra, index)
end
end
else
for spellid, tabela in _pairs (container) do
--> tabela = classe_damage_habilidade
local alvos = tabela.targets._ActorTable
for _, tabela in _ipairs (alvos) do
--> tabela = classe_target
if (tabela.nome == inimigo) then
habilidades [#habilidades+1] = {spellid, tabela.total}
end
@@ -1555,17 +1585,40 @@ function atributo_heal:MontaTooltipAlvos (esta_barra, index)
_table_sort (habilidades, function (a, b) return a[2] > b[2] end)
GameTooltip:AddLine (index..". "..inimigo)
GameTooltip:AddLine (Loc ["STRING_HEALING_FROM"]..":") --> localize-me
GameTooltip:AddLine (" ")
--get time type
local meu_tempo
if (_detalhes.time_type == 1 or not self.grupo) then
meu_tempo = self:Tempo()
elseif (_detalhes.time_type == 2) then
meu_tempo = info.instancia.showing:GetCombatTime()
end
local is_hps = info.instancia.sub_atributo == 2
if (is_hps) then
GameTooltip:AddLine (index..". "..inimigo)
GameTooltip:AddLine (Loc ["STRING_HEALING_HPS_FROM"] .. ":")
GameTooltip:AddLine (" ")
else
GameTooltip:AddLine (index..". "..inimigo)
GameTooltip:AddLine (Loc ["STRING_HEALING_FROM"] .. ":")
GameTooltip:AddLine (" ")
end
for index, tabela in _ipairs (habilidades) do
local nome, rank, icone = _GetSpellInfo (tabela[1])
if (index < 8) then
GameTooltip:AddDoubleLine (index..". |T"..icone..":0|t "..nome, _detalhes:comma_value (tabela[2]).." (".. _cstr ("%.1f", tabela[2]/total*100).."%)", 1, 1, 1, 1, 1, 1)
--GameTooltip:AddTexture (icone)
if (is_hps) then
GameTooltip:AddDoubleLine (index..". |T"..icone..":0|t "..nome, _detalhes:comma_value (_math_floor (tabela[2]/meu_tempo)).." (".. _cstr ("%.1f", tabela[2]/total*100).."%)", 1, 1, 1, 1, 1, 1)
else
GameTooltip:AddDoubleLine (index..". |T"..icone..":0|t "..nome, _detalhes:comma_value (tabela[2]).." (".. _cstr ("%.1f", tabela[2]/total*100).."%)", 1, 1, 1, 1, 1, 1)
end
else
GameTooltip:AddDoubleLine (index..". "..nome, _detalhes:comma_value (tabela[2]).." (".. _cstr ("%.1f", tabela[2]/total*100).."%)", .65, .65, .65, .65, .65, .65)
if (is_hps) then
GameTooltip:AddDoubleLine (index..". "..nome, _detalhes:comma_value (_math_floor (tabela[2]/meu_tempo)).." (".. _cstr ("%.1f", tabela[2]/total*100).."%)", .65, .65, .65, .65, .65, .65)
else
GameTooltip:AddDoubleLine (index..". "..nome, _detalhes:comma_value (tabela[2]).." (".. _cstr ("%.1f", tabela[2]/total*100).."%)", .65, .65, .65, .65, .65, .65)
end
end
end
@@ -1676,7 +1729,7 @@ function atributo_heal:MontaDetalhesHealingDone (spellid, barra)
if (_detalhes.time_type == 1 or not self.grupo) then
meu_tempo = self:Tempo()
elseif (_detalhes.time_type == 2) then
meu_tempo = self:GetCombatTime()
meu_tempo = info.instancia.showing:GetCombatTime()
end
--local total_hits = esta_magia.counter
@@ -1863,11 +1916,7 @@ end
end
--> restaura e liga o ator com a sua shadow durante a inicialização
function atributo_heal:r_connect_shadow (actor)
if (not actor) then
actor = self
end
function atributo_heal:r_onlyrefresh_shadow (actor)
--> criar uma shadow desse ator se ainda não tiver uma
local overall_cura = _detalhes.tabela_overall [2]
@@ -1883,6 +1932,52 @@ end
--> restaura a meta e indexes ao ator
_detalhes.refresh:r_atributo_heal (actor, shadow)
--> copia o container de alvos (captura de dados)
for index, alvo in _ipairs (actor.targets._ActorTable) do
--> cria e soma o valor do total
local alvo_shadow = shadow.targets:PegarCombatente (nil, alvo.nome, nil, true)
--> refresh no alvo
_detalhes.refresh:r_alvo_da_habilidade (alvo, shadow.targets)
end
--> copia o container de habilidades (captura de dados)
for spellid, habilidade in _pairs (actor.spell_tables._ActorTable) do
--> cria e soma o valor
local habilidade_shadow = shadow.spell_tables:PegaHabilidade (spellid, true, nil, true)
--> refresh e soma os valores dos alvos
for index, alvo in _ipairs (habilidade.targets._ActorTable) do
--> cria e soma o valor do total
local alvo_shadow = habilidade_shadow.targets:PegarCombatente (nil, alvo.nome, nil, true)
--> refresh no alvo da habilidade
_detalhes.refresh:r_alvo_da_habilidade (alvo, habilidade_shadow.targets)
end
--> refresh na habilidade
_detalhes.refresh:r_habilidade_cura (habilidade, shadow.spell_tables)
end
return shadow
end
function atributo_heal:r_connect_shadow (actor, no_refresh)
--> criar uma shadow desse ator se ainda não tiver uma
local overall_cura = _detalhes.tabela_overall [2]
local shadow = overall_cura._ActorTable [overall_cura._NameIndexTable [actor.nome]]
if (not shadow) then
shadow = overall_cura:PegarCombatente (actor.serial, actor.nome, actor.flag_original, true)
shadow.classe = actor.classe
shadow.grupo = actor.grupo
shadow.start_time = time() - 3
shadow.end_time = time()
end
--> restaura a meta e indexes ao ator
if (not no_refresh) then
_detalhes.refresh:r_atributo_heal (actor, shadow)
end
--> tempo decorrido (captura de dados)
if (actor.end_time) then
@@ -1932,7 +2027,9 @@ end
alvo_shadow.overheal = alvo_shadow.overheal + alvo.overheal
alvo_shadow.absorbed = alvo_shadow.absorbed + alvo.absorbed
--> refresh no alvo
_detalhes.refresh:r_alvo_da_habilidade (alvo, shadow.targets)
if (not no_refresh) then
_detalhes.refresh:r_alvo_da_habilidade (alvo, shadow.targets)
end
end
--> copia o container de habilidades (captura de dados)
@@ -1947,7 +2044,9 @@ end
alvo_shadow.overheal = alvo_shadow.overheal + alvo.overheal
alvo_shadow.absorbed = alvo_shadow.absorbed + alvo.absorbed
--> refresh no alvo da habilidade
_detalhes.refresh:r_alvo_da_habilidade (alvo, habilidade_shadow.targets)
if (not no_refresh) then
_detalhes.refresh:r_alvo_da_habilidade (alvo, habilidade_shadow.targets)
end
end
--> soma todos os demais valores
for key, value in _pairs (habilidade) do
@@ -1962,7 +2061,9 @@ end
end
--> refresh na habilidade
_detalhes.refresh:r_habilidade_cura (habilidade, shadow.spell_tables)
if (not no_refresh) then
_detalhes.refresh:r_habilidade_cura (habilidade, shadow.spell_tables)
end
end
return shadow
+1 -4
View File
@@ -109,10 +109,7 @@ function habilidade_cura:Add (serial, nome, flag, amount, who_nome, absorbed, cr
else
alvo:AddQuantidade (0)
end
if (self.shadow) then
return self.shadow:Add (serial, nome, flag, amount, who_nome, absorbed, critical, overhealing)
end
end
function _detalhes.refresh:r_habilidade_cura (habilidade, shadow)
+14
View File
@@ -1633,6 +1633,20 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
_detalhes:SendEvent ("DETAILS_INSTANCE_CHANGEATTRIBUTE", nil, instancia, atributo, sub_atributo)
end
if (_detalhes.janela_info:IsShown() and instancia == _detalhes.janela_info.instancia) then
if (not instancia.showing) then
_detalhes:FechaJanelaInfo()
else
local actor = instancia.showing (instancia.atributo, _detalhes.janela_info.jogador.nome)
if (actor) then
instancia:AbreJanelaInfo (actor, true)
else
_detalhes:FechaJanelaInfo()
end
end
--_detalhes:FechaJanelaInfo()
end
if (not instancia.showing) then
if (not iniciando_instancia) then
instancia:Freeze()
+206 -8
View File
@@ -1895,11 +1895,8 @@ end
end
--> restaura e liga o ator com a sua shadow durante a inicialização
function atributo_misc:r_connect_shadow (actor)
if (not actor) then
actor = self
end
function atributo_misc:r_onlyrefresh_shadow (actor)
--> criar uma shadow desse ator se ainda não tiver uma
local overall_misc = _detalhes.tabela_overall [4]
@@ -1918,6 +1915,133 @@ end
--> aplica a meta e indexes
_detalhes.refresh:r_atributo_misc (actor, shadow)
--> somar os alvos do ator
local somar_alvos = function (container)
for index, alvo in _ipairs (actor [container]._ActorTable) do
--> cria e soma o valor do total
local alvo_shadow = shadow [container]:PegarCombatente (nil, alvo.nome, nil, true)
--> refresh no alvo
_detalhes.refresh:r_alvo_da_habilidade (alvo, shadow [container])
end
end
--> somar as habilidades do ator
local somar_habilidades = function (container, shadow)
for spellid, habilidade in _pairs (actor [container]._ActorTable) do
--> cria e soma o valor
local habilidade_shadow = shadow [container]:PegaHabilidade (spellid, true, nil, true)
--> refresh e soma os valores dos alvos
for index, alvo in _ipairs (habilidade.targets._ActorTable) do
--> cria e soma o valor do total
local alvo_shadow = habilidade_shadow.targets:PegarCombatente (nil, alvo.nome, nil, true)
--> refresh no alvo da habilidade
_detalhes.refresh:r_alvo_da_habilidade (alvo, habilidade_shadow.targets)
end
--> refresh na habilidade
_detalhes.refresh:r_habilidade_misc (habilidade, shadow [container])
end
end
--> cooldowns
if (actor.cooldowns_defensive) then
--> copia o container de alvos (captura de dados)
somar_alvos ("cooldowns_defensive_targets", shadow)
--> copia o container de habilidades (captura de dados)
somar_habilidades ("cooldowns_defensive_spell_tables", shadow)
end
--> buff uptime
if (actor.buff_uptime) then
--> copia o container de alvos (captura de dados)
somar_alvos ("buff_uptime_targets", shadow)
--> copia o container de habilidades (captura de dados)
somar_habilidades ("buff_uptime_spell_tables", shadow)
end
--> debuff uptime
if (actor.debuff_uptime) then
--> copia o container de alvos (captura de dados)
somar_alvos ("debuff_uptime_targets", shadow)
--> copia o container de habilidades (captura de dados)
somar_habilidades ("debuff_uptime_spell_tables", shadow)
end
--> interrupt
if (actor.interrupt) then
--> copia o container de alvos (captura de dados)
somar_alvos ("interrupt_targets", shadow)
--> copia o container de habilidades (captura de dados)
somar_habilidades ("interrupt_spell_tables", shadow)
--> copia o que cada habilidade interrompeu
for spellid, habilidade in _pairs (actor.interrupt_spell_tables._ActorTable) do
--> pega o actor da shadow
local habilidade_shadow = shadow.interrupt_spell_tables:PegaHabilidade (spellid, true, nil, true)
--> copia as habilidades interrompidas
habilidade_shadow.interrompeu_oque = habilidade_shadow.interrompeu_oque or {}
end
end
--> ress
if (actor.ress) then
--> copia o container de alvos (captura de dados)
somar_alvos ("ress_targets", shadow)
--> copia o container de habilidades (captura de dados)
somar_habilidades ("ress_spell_tables", shadow)
end
--> dispell
if (actor.dispell) then
--> copia o container de alvos (captura de dados)
somar_alvos ("dispell_targets", shadow)
--> copia o container de habilidades (captura de dados)
somar_habilidades ("dispell_spell_tables", shadow)
--> copia o que cada habilidade dispelou
for spellid, habilidade in _pairs (actor.dispell_spell_tables._ActorTable) do
--> pega o actor da shadow
local habilidade_shadow = shadow.dispell_spell_tables:PegaHabilidade (spellid, true, nil, true)
--> copia as habilidades dispeladas
habilidade_shadow.dispell_oque = habilidade_shadow.dispell_oque or {}
end
end
--> cc break
if (actor.cc_break) then
--> copia o container de alvos (captura de dados)
somar_alvos ("cc_break_targets", shadow)
--> copia o container de habilidades (captura de dados)
somar_habilidades ("cc_break_spell_tables", shadow)
--> copia o que cada habilidade quebrou
for spellid, habilidade in _pairs (actor.cc_break_spell_tables._ActorTable) do
--> pega o actor da shadow
local habilidade_shadow = shadow.cc_break_spell_tables:PegaHabilidade (spellid, true, nil, true)
--> copia as habilidades quebradas
habilidade_shadow.cc_break_oque = habilidade_shadow.cc_break_oque or {}
end
end
return shadow
end
function atributo_misc:r_connect_shadow (actor, no_refresh)
--> criar uma shadow desse ator se ainda não tiver uma
local overall_misc = _detalhes.tabela_overall [4]
local shadow = overall_misc._ActorTable [overall_misc._NameIndexTable [actor.nome]]
if (not actor.nome) then
actor.nome = "unknown"
end
if (not shadow) then
shadow = overall_misc:PegarCombatente (actor.serial, actor.nome, actor.flag_original, true)
shadow.classe = actor.classe
shadow.grupo = actor.grupo
end
--> aplica a meta e indexes
if (not no_refresh) then
_detalhes.refresh:r_atributo_misc (actor, shadow)
end
--> somar as keys das habilidades
local somar_keys = function (habilidade, habilidade_shadow)
for key, value in _pairs (habilidade) do
@@ -1944,7 +2068,9 @@ end
end
--end
--> refresh no alvo
_detalhes.refresh:r_alvo_da_habilidade (alvo, shadow [container])
if (not no_refresh) then
_detalhes.refresh:r_alvo_da_habilidade (alvo, shadow [container])
end
end
end
@@ -1959,17 +2085,29 @@ end
local alvo_shadow = habilidade_shadow.targets:PegarCombatente (nil, alvo.nome, nil, true)
alvo_shadow.total = alvo_shadow.total + alvo.total
--> refresh no alvo da habilidade
_detalhes.refresh:r_alvo_da_habilidade (alvo, habilidade_shadow.targets)
if (not no_refresh) then
_detalhes.refresh:r_alvo_da_habilidade (alvo, habilidade_shadow.targets)
end
end
--> soma todos os demais valores
somar_keys (habilidade, habilidade_shadow)
--> refresh na habilidade
_detalhes.refresh:r_habilidade_misc (habilidade, shadow [container])
if (not no_refresh) then
_detalhes.refresh:r_habilidade_misc (habilidade, shadow [container])
end
end
end
--> cooldowns
if (actor.cooldowns_defensive) then
--> verifica se tem o container
if (not shadow.cooldowns_defensive_targets) then
shadow.cooldowns_defensive = 0
shadow.cooldowns_defensive_targets = container_combatentes:NovoContainer (container_damage_target)
shadow.cooldowns_defensive_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
end
--> soma o total (captura de dados)
shadow.cooldowns_defensive = shadow.cooldowns_defensive + actor.cooldowns_defensive
--> total no combate overall (captura de dados)
@@ -1985,6 +2123,14 @@ end
--> buff uptime
if (actor.buff_uptime) then
--> verifica se tem o container
if (not shadow.buff_uptime_spell_targets) then
shadow.buff_uptime = 0
shadow.buff_uptime_spell_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
shadow.buff_uptime_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --> cria o container das habilidades usadas para interromper
end
--> soma o total (captura de dados)
shadow.buff_uptime = shadow.buff_uptime + actor.buff_uptime
--> copia o container de alvos (captura de dados)
@@ -1995,6 +2141,23 @@ end
--> debuff uptime
if (actor.debuff_uptime) then
--> verifica se tem o container
if (not shadow.debuff_uptime_targets) then
shadow.debuff_uptime = 0
if (actor.boss_debuff) then
shadow.debuff_uptime_targets = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_ENEMYDEBUFFTARGET_CLASS)
shadow.boss_debuff = true
shadow.damage_twin = actor.damage_twin
shadow.spellschool = actor.spellschool
shadow.damage_spellid = actor.damage_spellid
shadow.debuff_uptime = 0
else
shadow.debuff_uptime_targets = container_combatentes:NovoContainer (container_damage_target)
end
shadow.debuff_uptime_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
end
--> soma o total (captura de dados)
shadow.debuff_uptime = shadow.debuff_uptime + actor.debuff_uptime
--> copia o container de alvos (captura de dados)
@@ -2005,6 +2168,15 @@ end
--> interrupt
if (actor.interrupt) then
--verifica se tem o container
if (not shadow.interrupt_targets) then
shadow.interrupt = 0
shadow.interrupt_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
shadow.interrupt_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --> cria o container das habilidades usadas para interromper
shadow.interrompeu_oque = {}
end
--> soma o total (captura de dados)
shadow.interrupt = shadow.interrupt + actor.interrupt
--> total no combate overall (captura de dados)
@@ -2041,6 +2213,14 @@ end
--> ress
if (actor.ress) then
--> verifica se tem o container
if (not shadow.ress_targets) then
shadow.ress = 0
shadow.ress_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
shadow.ress_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --> cria o container das habilidades usadas para interromper
end
--> soma o total (captura de dados)
shadow.ress = shadow.ress + actor.ress
--> total no combate overall (captura de dados)
@@ -2056,6 +2236,15 @@ end
--> dispell
if (actor.dispell) then
--> verifica se tem o container
if (not shadow.dispell_targets) then
shadow.dispell = 0
shadow.dispell_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
shadow.dispell_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --> cria o container das habilidades usadas para interromper
shadow.dispell_oque = {}
end
--> soma o total (captura de dados)
shadow.dispell = shadow.dispell + actor.dispell
--> total no combate overall (captura de dados)
@@ -2092,6 +2281,15 @@ end
end
--> cc break
if (actor.cc_break) then
--> verifica se tem o container
if (not shadow.cc_break) then
shadow.cc_break = 0
shadow.cc_break_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
shadow.cc_break_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --> cria o container das habilidades usadas para interromper
shadow.cc_break_oque = {}
end
--> soma o total (captura de dados)
shadow.cc_break = shadow.cc_break + actor.cc_break
--> total no combate overall (captura de dados)
-24
View File
@@ -70,10 +70,6 @@ function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spel
self.actived_at = _detalhes._tempo
self.actived = true
if (self.shadow) then
return self.shadow:Add (serial, nome, flag, who_nome, token.shadow, spellID, spellName)
end
elseif (spellName == "BUFF_UPTIME_OUT") then
if (self.actived_at and self.actived) then
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
@@ -82,10 +78,6 @@ function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spel
self.actived = false
self.actived_at = nil
if (self.shadow) then
return self.shadow:Add (serial, nome, flag, who_nome, token.shadow, spellID, spellName)
end
elseif (spellName == "BUFF_UPTIME_IN" or spellName == "DEBUFF_UPTIME_IN") then
self.actived = true
self.activedamt = self.activedamt + 1
@@ -98,10 +90,6 @@ function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spel
self.actived_at = _detalhes._tempo
if (self.shadow) then
return self.shadow:Add (serial, nome, flag, who_nome, token.shadow, spellID, spellName)
end
elseif (spellName == "DEBUFF_UPTIME_REFRESH") then
if (self.actived_at and self.actived) then
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
@@ -109,10 +97,6 @@ function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spel
end
self.actived_at = _detalhes._tempo
self.actived = true
if (self.shadow) then
return self.shadow:Add (serial, nome, flag, who_nome, token.shadow, spellID, spellName)
end
elseif (spellName == "DEBUFF_UPTIME_OUT") then
if (self.actived_at and self.actived) then
@@ -128,10 +112,6 @@ function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spel
else
self.actived_at = _detalhes._tempo
end
if (self.shadow) then
return self.shadow:Add (serial, nome, flag, who_nome, token.shadow, spellID, spellName)
end
end
@@ -217,10 +197,6 @@ function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spel
alvo.total = alvo.total + 1
end
if (self.shadow) then
return self.shadow:Add (serial, nome, flag, who_nome, token, spellID, spellName)
end
end
--> habilidade atual e o container de habilidades da shadow
+12 -30
View File
@@ -44,6 +44,7 @@ local OBJECT_TYPE_PET = 0x00001000
local OBJECT_TYPE_NPC = 0x00000800
local OBJECT_TYPE_PLAYER = 0x00000400
local OBJECT_TYPE_PETS = OBJECT_TYPE_PET + OBJECT_TYPE_GUARDIAN
local EM_GRUPO = 0x00000007
local REACTION_HOSTILE = COMBATLOG_OBJECT_REACTION_HOSTILE or 0x00000040
@@ -66,8 +67,7 @@ function container_combatentes:NovoContainer (tipo_do_container, combatTable, co
return _newContainer
end
local function get_class_ (novo_objeto, nome, flag)
local function get_actor_class (novo_objeto, nome, flag)
local _, engClass = _UnitClass (nome)
if (engClass) then
@@ -75,14 +75,11 @@ local function get_class_ (novo_objeto, nome, flag)
return
else
if (flag) then
--print ("tem flag: " .. flag)
--> conferir se o jogador é um player
if (_bit_band (flag, OBJECT_TYPE_PLAYER) ~= 0) then
--print ("eh um player sem grupo: "..novo_objeto.nome)
novo_objeto.classe = "UNGROUPPLAYER"
return
elseif (_bit_band (flag, OBJECT_TYPE_PETGUARDIAN) ~= 0) then
--print ("eh um pet: "..novo_objeto.nome)
novo_objeto.classe = "PET"
return
end
@@ -92,21 +89,6 @@ local function get_class_ (novo_objeto, nome, flag)
end
end
local EM_GRUPO = 0x00000007
function container_combatentes:Dupe (who)
local novo_objeto = {}
if (_getmetatable (who)) then
_setmetatable (novo_objeto, _getmetatable (who))
end
for cprop, value in _pairs (who) do
novo_objeto[cprop] = value
end
return novo_objeto
end
function container_combatentes:GetAmount (actorName, key)
key = key or "total"
local index = self._NameIndexTable [actorName]
@@ -117,7 +99,7 @@ function container_combatentes:GetAmount (actorName, key)
end
end
local read_flag_ = function (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome)
local read_actor_flag = function (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome)
-- converte a flag do wow em flag do details
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -261,8 +243,8 @@ function container_combatentes:PegarCombatente (serial, nome, flag, criar, isOwn
if (self.tipo == container_damage) then --> CONTAINER DAMAGE
get_class_ (novo_objeto, nome, flag)
read_flag_ (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome)
get_actor_class (novo_objeto, nome, flag)
read_actor_flag (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome)
if (dono_do_pet) then
dono_do_pet.pets [#dono_do_pet.pets+1] = nome
@@ -294,8 +276,8 @@ function container_combatentes:PegarCombatente (serial, nome, flag, criar, isOwn
elseif (self.tipo == container_heal) then --> CONTAINER HEALING
get_class_ (novo_objeto, nome, flag)
read_flag_ (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome)
get_actor_class (novo_objeto, nome, flag)
read_actor_flag (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome)
if (dono_do_pet) then
dono_do_pet.pets [#dono_do_pet.pets+1] = nome
@@ -324,8 +306,8 @@ function container_combatentes:PegarCombatente (serial, nome, flag, criar, isOwn
elseif (self.tipo == container_energy) then --> CONTAINER ENERGY
get_class_ (novo_objeto, nome, flag)
read_flag_ (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome)
get_actor_class (novo_objeto, nome, flag)
read_actor_flag (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome)
if (dono_do_pet) then
dono_do_pet.pets [#dono_do_pet.pets+1] = nome
@@ -350,8 +332,8 @@ function container_combatentes:PegarCombatente (serial, nome, flag, criar, isOwn
elseif (self.tipo == container_misc) then --> CONTAINER MISC
get_class_ (novo_objeto, nome, flag)
read_flag_ (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome)
get_actor_class (novo_objeto, nome, flag)
read_actor_flag (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome)
--local teste_classe =
@@ -420,7 +402,7 @@ function container_combatentes:PegarCombatente (serial, nome, flag, criar, isOwn
elseif (self.tipo == container_friendlyfire) then --> CONTAINER FRIENDLY FIRE
get_class_ (novo_objeto, nome)
get_actor_class (novo_objeto, nome)
if (shadow_objeto) then
novo_objeto.shadow = shadow_objeto
+160 -37
View File
@@ -1,3 +1,5 @@
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
--lua api
local _table_remove = table.remove
local _table_insert = table.insert
@@ -19,6 +21,29 @@ function historico:NovoHistorico()
return esta_tabela
end
function historico:adicionar_overall (tabela)
if (_detalhes.overall_clear_newboss) then
if (tabela.instance_type == "raid" and tabela.is_boss) then
if (_detalhes.last_encounter ~= _detalhes.last_encounter2) then
for index, combat in ipairs (_detalhes.tabela_historico.tabelas) do
combat.overall_added = false
end
historico:resetar_overall()
end
end
end
_detalhes.tabela_overall = _detalhes.tabela_overall + tabela
tabela.overall_added = true
if (_detalhes.tabela_overall.start_time == 0) then
_detalhes.tabela_overall.start_time = tabela.start_time
_detalhes.tabela_overall.end_time = tabela.end_time
end
_detalhes:ClockPluginTickOnSegment()
end
--> sai do combate, chamou adicionar a tabela ao histórico
function historico:adicionar (tabela)
@@ -37,12 +62,60 @@ function historico:adicionar (tabela)
--> adiciona no index #1
_table_insert (self.tabelas, 1, tabela)
local overall_added = false
if (not overall_added and bit.band (_detalhes.overall_flag, 0x1) ~= 0) then --> raid boss - flag 0x1
if (tabela.is_boss and tabela.instance_type == "raid" and not tabela.is_pvp) then
overall_added = true
end
--print ("0x1")
end
if (not overall_added and bit.band (_detalhes.overall_flag, 0x2) ~= 0) then --> raid trash - flag 0x2
if (tabela.is_trash and tabela.instance_type == "raid") then --check if the player is in a raid
overall_added = true
end
--print ("0x2")
end
if (not overall_added and bit.band (_detalhes.overall_flag, 0x4) ~= 0) then --> dungeon boss - flag 0x4
if (tabela.is_boss and tabela.instance_type == "party" and not tabela.is_pvp) then --check if this is a dungeon boss
overall_added = true
end
--print ("0x4")
end
if (not overall_added and bit.band (_detalhes.overall_flag, 0x8) ~= 0) then --> dungeon trash - flag 0x8
if (tabela.is_trash and tabela.instance_type == "party") then --check if the player is in a raid
overall_added = true
end
--print ("0x8")
end
if (not overall_added and bit.band (_detalhes.overall_flag, 0x10) ~= 0) then --> any combat
overall_added = true
--print ("0x10")
end
if (overall_added) then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) overall data flag match with the current combat.")
end
if (InCombatLockdown()) then
_detalhes.schedule_add_to_overall = true
if (_detalhes.debug) then
_detalhes:Msg ("(debug) player is in combat, scheduling overall addition.")
end
else
historico:adicionar_overall (tabela)
end
end
if (self.tabelas[2]) then
--> fazer limpeza na tabela
local _segundo_combate = self.tabelas[2]
local _terceiro_combate = self.tabelas[3]
local container_damage = _segundo_combate [1]
local container_heal = _segundo_combate [2]
@@ -65,9 +138,16 @@ function historico:adicionar (tabela)
end
if (_detalhes.trash_auto_remove) then
local _terceiro_combate = self.tabelas[3]
if (_terceiro_combate) then
if (_terceiro_combate.is_trash and not _terceiro_combate.is_boss) then
_detalhes.tabela_overall = _detalhes.tabela_overall - _terceiro_combate
--if (_terceiro_combate.overall_added) then
-- _detalhes.tabela_overall = _detalhes.tabela_overall - _terceiro_combate
-- print ("removendo combate 1")
--end
--> verificar novamente a time machine
for _, jogador in ipairs (_terceiro_combate [1]._ActorTable) do --> damage
if (jogador.timeMachine) then
@@ -83,53 +163,23 @@ function historico:adicionar (tabela)
_table_remove (self.tabelas, 3)
_detalhes:SendEvent ("DETAILS_DATA_SEGMENTREMOVED", nil, nil)
end
end
elseif (_detalhes.trash_concatenate) then
if (_terceiro_combate) then
if (_terceiro_combate.is_trash and _segundo_combate.is_trash and not _terceiro_combate.is_boss and not _segundo_combate.is_boss) then
--> tabela 2 deve ser deletada e somada a tabela 1
if (_detalhes.debug) then
detalhes:Msg ("(debug) concatenating two trash segments.")
end
_segundo_combate = _segundo_combate + _terceiro_combate
_detalhes.tabela_overall = _detalhes.tabela_overall - _terceiro_combate
_segundo_combate.is_trash = true
--> verificar novamente a time machine
for _, jogador in ipairs (_terceiro_combate [1]._ActorTable) do --> damage
if (jogador.timeMachine) then
jogador:DesregistrarNaTimeMachine()
end
end
for _, jogador in ipairs (_terceiro_combate [2]._ActorTable) do --> heal
if (jogador.timeMachine) then
jogador:DesregistrarNaTimeMachine()
end
end
--> remover
_table_remove (self.tabelas, 3)
_detalhes:SendEvent ("DETAILS_DATA_SEGMENTREMOVED", nil, nil)
end
end
end
end
--> chama a função que irá atualizar as instâncias com segmentos no histórico
_detalhes:InstanciaCallFunction (_detalhes.AtualizaSegmentos_AfterCombat, self)
--> verifica se precisa apagar a última tabela do histórico
if (#self.tabelas > _detalhes.segments_amount) then
local combat_removed = self.tabelas [#self.tabelas]
--> diminuir quantidades no overall
_detalhes.tabela_overall = _detalhes.tabela_overall - combat_removed
--_detalhes.tabela_overall.start_time = _detalhes.tabela_overall.start_time + (combat_removed.end_time-combat_removed.start_time)
--if (combat_removed.overall_added) then
-- _detalhes.tabela_overall = _detalhes.tabela_overall - combat_removed
-- print ("removendo combate 2")
--end
--> verificar novamente a time machine
for _, jogador in ipairs (combat_removed [1]._ActorTable) do --> damage
@@ -149,6 +199,9 @@ function historico:adicionar (tabela)
end
--> chama a função que irá atualizar as instâncias com segmentos no histórico
_detalhes:InstanciaCallFunction (_detalhes.AtualizaSegmentos_AfterCombat, self)
_detalhes:InstanciaCallFunction (_detalhes.AtualizarJanela)
end
@@ -162,6 +215,39 @@ function _detalhes:CheckFreeze (instancia, index_liberado, tabela)
end
end
function _detalhes:OverallOptions (reset_new_boss, reset_new_challenge)
if (reset_new_boss == nil) then
reset_new_boss = _detalhes.overall_clear_newboss
end
if (reset_new_challenge == nil) then
reset_new_challenge = _detalhes.overall_clear_newchallenge
end
_detalhes.overall_clear_newboss = reset_new_boss
_detalhes.overall_clear_newchallenge = reset_new_challenge
end
function historico: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()
_detalhes.tabela_overall = combate:NovaTabela()
for index, instancia in ipairs (_detalhes.tabela_instancias) do
if (instancia.ativa and instancia.segmento == -1) then
instancia:InstanceReset()
instancia:ReajustaGump()
end
end
end
_detalhes:ClockPluginTickOnSegment()
end
function historico:resetar()
if (_detalhes.bosswindow) then
@@ -228,3 +314,40 @@ function _detalhes.refresh:r_historico (este_historico)
_setmetatable (este_historico, historico)
--este_historico.__index = historico
end
--[[
elseif (_detalhes.trash_concatenate) then
if (true) then
return
end
if (_terceiro_combate) then
if (_terceiro_combate.is_trash and _segundo_combate.is_trash and not _terceiro_combate.is_boss and not _segundo_combate.is_boss) then
--> tabela 2 deve ser deletada e somada a tabela 1
if (_detalhes.debug) then
detalhes:Msg ("(debug) concatenating two trash segments.")
end
_segundo_combate = _segundo_combate + _terceiro_combate
_detalhes.tabela_overall = _detalhes.tabela_overall - _terceiro_combate
_segundo_combate.is_trash = true
--> verificar novamente a time machine
for _, jogador in ipairs (_terceiro_combate [1]._ActorTable) do --> damage
if (jogador.timeMachine) then
jogador:DesregistrarNaTimeMachine()
end
end
for _, jogador in ipairs (_terceiro_combate [2]._ActorTable) do --> heal
if (jogador.timeMachine) then
jogador:DesregistrarNaTimeMachine()
end
end
--> remover
_table_remove (self.tabelas, 3)
_detalhes:SendEvent ("DETAILS_DATA_SEGMENTREMOVED", nil, nil)
end
end
--]]
+79 -71
View File
@@ -49,6 +49,12 @@
--> try to find the opponent of last fight, can be called during a fight as well
function _detalhes:FindEnemy()
local ZoneName, InstanceType, DifficultyID, _, _, _, _, ZoneMapID = _GetInstanceInfo()
if (InstanceType == "party" or InstanceType == "raid") then
_detalhes.tabela_vigente.is_trash = true
return Loc ["STRING_SEGMENT_TRASH"]
end
local trash_list
if (_detalhes.in_group and _detalhes.last_instance) then
trash_list = _detalhes:GetInstanceTrashInfo (_detalhes.last_instance)
@@ -97,6 +103,25 @@
end
-- try get the current encounter name during the encounter
local boss_found = function (index, name, zone, mapid, diff)
local boss_table = {
index = index,
name = name,
encounter = name,
zone = zone,
mapid = mapid,
diff = diff,
ej_instance_id = EJ_GetCurrentInstance(),
}
_detalhes.tabela_vigente.is_boss = boss_table
_detalhes:SendEvent ("COMBAT_BOSS_FOUND", nil, index, name)
return boss_table
end
function _detalhes:ReadBossFrames()
if (_detalhes.tabela_vigente.is_boss) then
@@ -104,16 +129,8 @@
end
if (_detalhes.encounter_table.name) then
_detalhes.tabela_vigente.is_boss = {
index = _detalhes.encounter_table.index,
name = _detalhes.encounter_table.name,
zone = _detalhes.encounter_table.zone,
mapid = _detalhes.encounter_table.mapid,
encounter = _detalhes.encounter_table.name,
diff = _detalhes.encounter_table.diff
}
_detalhes:SendEvent ("COMBAT_BOSS_FOUND", nil, _detalhes.tabela_vigente.is_boss.index, _detalhes.tabela_vigente.is_boss.name)
return _detalhes.tabela_vigente.is_boss
local encounter_table = _detalhes.encounter_table
return boss_found (encounter_table.index, encounter_table.name, encounter_table.zone, encounter_table.mapid, encounter_table.diff)
end
for index = 1, 5, 1 do
@@ -176,17 +193,9 @@
end
end
end
_detalhes.tabela_vigente.is_boss = {
index = BossIndex,
name = _detalhes:GetBossName (ZoneMapID, BossIndex),
zone = ZoneName,
mapid = ZoneMapID,
encounter = _detalhes:GetBossName (ZoneMapID, BossIndex),
diff = DifficultyID
}
_detalhes:SendEvent ("COMBAT_BOSS_FOUND", nil, _detalhes.tabela_vigente.is_boss.index, _detalhes.tabela_vigente.is_boss.name)
return _detalhes.tabela_vigente.is_boss
return boss_found (BossIndex, _detalhes:GetBossName (ZoneMapID, BossIndex), ZoneName, ZoneMapID, DifficultyID)
end
end
end
@@ -199,17 +208,11 @@
function _detalhes:FindBoss()
if (_detalhes.encounter_table.name) then
return {
index = _detalhes.encounter_table.index,
name = _detalhes.encounter_table.name,
zone = _detalhes.encounter_table.zone,
mapid = _detalhes.encounter_table.mapid,
encounter = _detalhes.encounter_table.name,
diff = _detalhes.encounter_table.diff
}
local encounter_table = _detalhes.encounter_table
return boss_found (encounter_table.index, encounter_table.name, encounter_table.zone, encounter_table.mapid, encounter_table.diff)
end
local ZoneName, _, DifficultyID, _, _, _, _, ZoneMapID = _GetInstanceInfo()
local ZoneName, InstanceType, DifficultyID, _, _, _, _, ZoneMapID = _GetInstanceInfo()
local BossIds = _detalhes:GetBossIds (ZoneMapID)
if (BossIds) then
@@ -219,20 +222,13 @@
if (ActorsContainer) then
for index, Actor in _ipairs (ActorsContainer) do
if (not Actor.grupo) then
local serial = tonumber (Actor.serial:sub(6, 10), 16)
local serial = tonumber (Actor.serial:sub (6, 10), 16)
if (serial) then
BossIndex = BossIds [serial]
if (BossIndex) then
Actor.boss = true
Actor.shadow.boss = true
return {
index = BossIndex,
name =_detalhes:GetBossName (ZoneMapID, BossIndex),
zone = ZoneName,
mapid = ZoneMapID,
encounter = _detalhes:GetBossName (ZoneMapID, BossIndex),
diff = DifficultyID
}
return boss_found (BossIndex, _detalhes:GetBossName (ZoneMapID, BossIndex), ZoneName, ZoneMapID, DifficultyID)
end
end
end
@@ -378,36 +374,31 @@
if (_detalhes.debug) then
_detalhes:Msg ("(debug) ended a combat.")
end
if (_detalhes.schedule_remove_overall and not from_encounter_end and not InCombatLockdown()) then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) found schedule overall data deletion.")
end
_detalhes.schedule_remove_overall = false
_detalhes.tabela_historico:resetar_overall()
end
_detalhes:CatchRaidBuffUptime ("BUFF_UPTIME_OUT")
_detalhes:CatchRaidDebuffUptime ("DEBUFF_UPTIME_OUT")
_detalhes:CloseEnemyDebuffsUptime()
--> pega a zona do jogador e vê se foi uma luta contra um Boss -- identifica se a luta foi com um boss
if (not _detalhes.tabela_vigente.is_boss) then
--> function which runs after a boss encounter to try recognize a encounter
_detalhes.tabela_vigente.is_boss = _detalhes:FindBoss()
_detalhes:FindBoss()
if (not _detalhes.tabela_vigente.is_boss) then
local ZoneName, _, DifficultyID, _, _, _, _, ZoneMapID = _GetInstanceInfo()
local findboss = _detalhes:GetRaidBossFindFunction (ZoneMapID)
if (findboss) then
local BossIndex = findboss()
if (BossIndex) then
_detalhes.tabela_vigente.is_boss = {
index = BossIndex,
name = _detalhes:GetBossName (ZoneMapID, BossIndex),
zone = ZoneName,
mapid = ZoneMapID,
encounter = _detalhes:GetBossName (ZoneMapID, BossIndex),
diff = DifficultyID
}
--print ("boss found using findboss function.")
else
--print ("boss not found")
boss_found (BossIndex, _detalhes:GetBossName (ZoneMapID, BossIndex), ZoneName, ZoneMapID, DifficultyID)
end
end
end
@@ -433,6 +424,10 @@
_detalhes.tabela_vigente:seta_tempo_decorrido() --> salva o end_time
_detalhes.tabela_overall:seta_tempo_decorrido() --seta o end_time
--> flag instance type
local _, InstanceType = _GetInstanceInfo()
_detalhes.tabela_vigente.instance_type = InstanceType
if (not _detalhes.tabela_vigente.is_boss) then
local inimigo = _detalhes:FindEnemy()
@@ -456,21 +451,28 @@
else
_detalhes:FlagActorsOnBossFight()
if (not InCombatLockdown() and not UnitAffectingCombat ("player")) then
_detalhes:FlagActorsOnBossFight()
else
_detalhes.schedule_flag_boss_components = true
end
if (_detalhes:GetBossDetails (_detalhes.tabela_vigente.is_boss.mapid, _detalhes.tabela_vigente.is_boss.index)) then
_detalhes.tabela_vigente.enemy = _detalhes.tabela_vigente.is_boss.encounter
if (_detalhes.tabela_vigente.instance_type == "raid") then
_detalhes.last_encounter2 = _detalhes.last_encounter
_detalhes.last_encounter = _detalhes.tabela_vigente.is_boss.name
end
if (bossKilled) then
_detalhes.tabela_vigente.is_boss.killed = true
end
if (from_encounter_end) then
--_detalhes.tabela_vigente.start_time = _detalhes.encounter_table ["start"]
_detalhes.tabela_vigente.end_time = _detalhes.encounter_table ["end"]
end
--> encounter boss function
@@ -495,7 +497,7 @@
end
--> schedule clean up
_detalhes:ScheduleTimer ("IniciarColetaDeLixo", 15, true)
--_detalhes:ScheduleTimer ("IniciarColetaDeLixo", 15, true)
else
if (_detalhes.debug) then
@@ -517,14 +519,6 @@
else
--> this is a little bit complicated, need a specific function for combat cancellation
if (_detalhes.tabela_overall.end_time) then --> no inicio do combate o tempo do overall vai pra NIL o.0
_detalhes.tabela_overall.start_time = _detalhes.tabela_overall.start_time + tempo_do_combate --> assim ele descarta o tempo de combate na tabela do everall
else
_detalhes.tabela_overall.start_time = 0 --> tempo inicio igual a zero pois se o end_time é NIL significa que é a primeira vez que ocorre o combate na tabela overall
end
_detalhes.tabela_overall = _detalhes.tabela_overall - _detalhes.tabela_vigente --> isso aqui é novo, ele vai subtrair da overall qualquer dado adicionado na tabela descardata
--_table_wipe (_detalhes.tabela_vigente) --> descarta ela, não será mais usada
_detalhes.tabela_vigente = _detalhes.tabela_historico.tabelas[1] --> pega a tabela do ultimo combate
@@ -794,9 +788,8 @@
for class_type, container in _ipairs (_detalhes.tabela_vigente) do
for _, actor in _ipairs (container._ActorTable) do
actor.boss_fight_component = true
local shadow = _detalhes.tabela_overall (class_type, actor.nome)
if (shadow) then
shadow.boss_fight_component = true
if (actor.shadow) then
actor.shadow.boss_fight_component = true
end
end
end
@@ -806,10 +799,16 @@
local on_energy = energy_container._ActorTable [energy_container._NameIndexTable [name]]
if (on_energy) then
on_energy.fight_component = true
if (on_energy.shadow) then
on_energy.shadow.fight_component = true
end
end
local on_misc = misc_container._ActorTable [misc_container._NameIndexTable [name]]
if (on_misc) then
on_misc.fight_component = true
if (on_misc.shadow) then
on_misc.shadow.fight_component = true
end
end
end
@@ -829,6 +828,9 @@
local target_object = container._ActorTable [container._NameIndexTable [target_actor.nome]]
if (target_object) then
target_object.fight_component = true
if (target_object.shadow) then
target_object.shadow.fight_component = true
end
fight_component (energy_container, misc_container, target_actor.nome)
end
end
@@ -837,6 +839,9 @@
local target_object = container._ActorTable [container._NameIndexTable [damager_actor]]
if (target_object) then
target_object.fight_component = true
if (target_object.shadow) then
target_object.shadow.fight_component = true
end
fight_component (energy_container, misc_container, damager_actor)
end
end
@@ -845,6 +850,9 @@
local target_object = container._ActorTable [container._NameIndexTable [healer_actor]]
if (target_object) then
target_object.fight_component = true
if (target_object.shadow) then
target_object.shadow.fight_component = true
end
fight_component (energy_container, misc_container, healer_actor)
end
end
+57 -29
View File
@@ -117,20 +117,35 @@
local shadow
if (class_type == class_type_dano) then
shadow = atributo_damage:r_connect_shadow (esta_classe)
if (combate.overall_added) then
shadow = atributo_damage:r_connect_shadow (esta_classe)
else
shadow = atributo_damage:r_onlyrefresh_shadow (esta_classe)
end
elseif (class_type == class_type_cura) then
shadow = atributo_heal:r_connect_shadow (esta_classe)
if (combate.overall_added) then
shadow = atributo_heal:r_connect_shadow (esta_classe)
else
shadow = atributo_heal:r_onlyrefresh_shadow (esta_classe)
end
elseif (class_type == class_type_e_energy) then
shadow = atributo_energy:r_connect_shadow (esta_classe)
if (combate.overall_added) then
shadow = atributo_energy:r_connect_shadow (esta_classe)
else
shadow = atributo_energy:r_onlyrefresh_shadow (esta_classe)
end
elseif (class_type == class_type_misc) then
shadow = atributo_misc:r_connect_shadow (esta_classe)
if (combate.overall_added) then
shadow = atributo_misc:r_connect_shadow (esta_classe)
else
shadow = atributo_misc:r_onlyrefresh_shadow (esta_classe)
end
end
shadow:FazLinkagem (esta_classe)
--shadow:FazLinkagem (esta_classe)
end
end
@@ -578,7 +593,7 @@
function _detalhes:CheckMemoryAfterCombat()
if (_detalhes.next_memory_check < time()) then
if (_detalhes.debug) then
_detalhes:Msg ("checking memory after combat.")
_detalhes:Msg ("(debug) checking memory after combat.")
end
_detalhes.next_memory_check = time()+_detalhes.intervalo_memoria
UpdateAddOnMemoryUsage()
@@ -594,11 +609,11 @@
UpdateAddOnMemoryUsage()
local memory = GetAddOnMemoryUsage ("Details")
if (_detalhes.debug) then
_detalhes:Msg ("checking memory periodically. Using: ",math.floor (memory), "of", _detalhes.memory_ram)
_detalhes:Msg ("(debug) checking memory periodically. Using: ",math.floor (memory), "of", _detalhes.memory_ram * 1000)
end
if (memory > _detalhes.memory_ram) then
if (memory > _detalhes.memory_ram * 1000) then
if (_detalhes.debug) then
_detalhes:Msg ("Memory is too high, starting garbage collector")
_detalhes:Msg ("(debug) Memory is too high, starting garbage collector")
end
_detalhes:IniciarColetaDeLixo (1, 60) --> sending 1 only check for combat and ignore garbage collect cooldown
end
@@ -612,7 +627,7 @@
return
elseif (_detalhes.in_combat or _InCombatLockdown() or _detalhes:IsInInstance()) then
if (_detalhes.debug) then
_detalhes:Msg ("garbage collect queued due combatlockdown (forced false)")
_detalhes:Msg ("(debug) garbage collect queued due combatlockdown (forced false)")
end
_detalhes:ScheduleTimer ("IniciarColetaDeLixo", 5)
return
@@ -622,7 +637,7 @@
if (forcar == 1) then
if (_detalhes.in_combat or _InCombatLockdown()) then
if (_detalhes.debug) then
_detalhes:Msg ("garbage collect queued due combatlockdown (forced 1)")
_detalhes:Msg ("(debug) garbage collect queued due combatlockdown (forced 1)")
end
_detalhes:ScheduleTimer ("IniciarColetaDeLixo", 5, forcar)
return
@@ -633,9 +648,9 @@
if (_detalhes.debug) then
if (forcar) then
_detalhes:Msg ("collecting garbage with forced state: ", forcar)
_detalhes:Msg ("(debug) collecting garbage with forced state: ", forcar)
else
_detalhes:Msg ("collecting garbage.")
_detalhes:Msg ("(debug) collecting garbage.")
end
end
@@ -672,7 +687,7 @@
--> print cache states
if (_detalhes.debug) then
_detalhes:Msg ("removed: damage "..damage.." heal "..heal.." energy "..energy.." misc "..misc)
_detalhes:Msg ("(debug) removed: damage "..damage.." heal "..heal.." energy "..energy.." misc "..misc)
end
--> elimina pets antigos
@@ -687,12 +702,11 @@
collectgarbage()
UpdateAddOnMemoryUsage()
local memory2 = GetAddOnMemoryUsage ("Details")
_detalhes:Msg ("memory antes: "..memory.." memory depois: "..memory2)
_detalhes:Msg ("(debug) memory before: "..memory.." memory after: "..memory2)
end
end
--> combates Normais
local function FazColeta (_combate, tipo, intervalo_overwrite)
@@ -700,7 +714,7 @@
local _iter = {index = 1, data = conteudo[1], cleaned = 0}
local _tempo = _time()
local links_removed = 0
--local links_removed = 0
while (_iter.data) do
@@ -714,7 +728,7 @@
t = _actor.last_event + _detalhes.intervalo_coleta
end
if (not _actor.grupo and not _actor.boss and not _actor.fight_component and not _actor.boss_fight_component and t < _tempo) then
if (t < _tempo and not _actor.grupo and not _actor.boss and not _actor.fight_component and not _actor.boss_fight_component) then
local owner = _actor.owner
if (owner) then
local owner_actor = _combate (tipo, owner.nome)
@@ -732,6 +746,7 @@
end
--> fix para a weak table
--[[
local shadow = _actor.shadow
local _it = {index = 1, link = shadow.links [1]}
while (_it.link) do
@@ -743,7 +758,8 @@
_it.link = shadow.links [_it.index]
end
end
--]]
_iter.cleaned = _iter.cleaned+1
if (_actor.tipo == 1 or _actor.tipo == 2) then
@@ -774,6 +790,8 @@
--> Combate overall
function _detalhes:ColetarLixo (tipo, lastevent)
--print ("fazendo coleta...")
local _tempo = _time()
local limpados = 0
@@ -791,7 +809,7 @@
limpados = limpados + FazColeta (_combate, tipo, lastevent)
end
--> limpa a tabela overall
--> limpa a tabela overall para o atributo atual (limpa para os 4, um de cada vez através do ipairs)
local _overall_combat = _detalhes.tabela_overall
local conteudo = _overall_combat [tipo]._ActorTable
local _iter = {index = 1, data = conteudo[1], cleaned = 0} --> ._ActorTable[1] para pegar o primeiro index
@@ -800,6 +818,7 @@
local _actor = _iter.data
--[[
local meus_links = _rawget (_actor, "links")
local can_garbage = true
local new_weak_table = _setmetatable ({}, _detalhes.weaktable) --> precisa da nova weak table para remover os NILS da tabela antiga
@@ -813,8 +832,17 @@
end
_table_wipe (meus_links)
end
if (can_garbage or not meus_links) then --> não há referências a este objeto
--]]
local can_garbage = false
if (not _actor.grupo and not _actor.owner and not _actor.boss_fight_component and not _actor.fight_component) then
can_garbage = true
end
--if (can_garbage or not meus_links) then --> não há referências a este objeto
if (can_garbage) then --> não há referências a este objeto
--print ("garbaged:", _actor.nome)
if (not _actor.owner) then --> pet
_actor:subtract_total (_overall_combat)
@@ -823,11 +851,11 @@
--> apaga a referência deste jogador na tabela overall
_iter.cleaned = _iter.cleaned+1
if (_detalhes.debug) then
if (#_actor.links > 0) then
_detalhes:Msg (_actor.nome, " has been garbaged but have links: ", #_actor.links)
end
end
--if (_detalhes.debug) then
-- if (#_actor.links > 0) then
-- _detalhes:Msg ("(debug) " .. _actor.nome, " has been garbaged but have links: ", #_actor.links)
-- end
--end
if (_actor.tipo == 1 or _actor.tipo == 2) then
_actor:DesregistrarNaTimeMachine()
@@ -836,7 +864,7 @@
_iter.data = conteudo [_iter.index]
else
_actor.links = new_weak_table
--_actor.links = new_weak_table
_iter.index = _iter.index + 1
_iter.data = conteudo [_iter.index]
end
+108 -296
View File
@@ -51,21 +51,14 @@
--> current combat and overall pointers
local _current_combat = _detalhes.tabela_vigente or {} --> placeholder table
local _overall_combat = _detalhes.tabela_overall or {} --> placeholder table
--> total container pointers
local _current_total = _current_combat.totals
local _current_gtotal = _current_combat.totals_grupo
local _overall_total = _overall_combat.totals
local _overall_gtotal = _overall_combat.totals_grupo
--> actors container pointers
local _current_damage_container = _current_combat [1]
local _overall_damage_container = _overall_combat [1]
local _current_heal_container = _current_combat [2]
local _overall_heal_container = _overall_combat [2]
local _current_energy_container = _current_combat [3]
local _overall_energy_container = _overall_combat [3]
local _current_misc_container = _current_combat [4]
local _overall_misc_container = _overall_combat [4]
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> cache
@@ -171,7 +164,6 @@
end
_current_damage_container.need_refresh = true
_overall_damage_container.need_refresh = true
------------------------------------------------------------------------------------------------
--> get actors
@@ -220,14 +212,6 @@
end
--if (who_name == "Guardian of Ancient Kings") then --remover
-- print ("MELEE GAK 1", meu_dono)
--end
--> damager shadow
local shadow = este_jogador.shadow
local shadow_of_target = jogador_alvo.shadow
--> last event
este_jogador.last_event = _tempo
@@ -236,7 +220,6 @@
if (este_jogador.grupo) then
_current_gtotal [1] = _current_gtotal [1]+amount
_overall_gtotal [1] = _overall_gtotal [1]+amount
elseif (jogador_alvo.grupo) then
@@ -312,12 +295,6 @@
jogador_alvo.damage_from [who_name] = true
end
--> his shadow
shadow_of_target.damage_taken = shadow_of_target.damage_taken + amount --> adiciona o dano tomado
if (not shadow_of_target.damage_from [who_name]) then --> adiciona a pool de dano tomado de quem
shadow_of_target.damage_from [who_name] = true
end
------------------------------------------------------------------------------------------------
--> time start
@@ -329,7 +306,6 @@
meu_dono:Iniciar (true)
if (meu_dono.end_time) then
meu_dono.end_time = nil
meu_dono.shadow.end_time = nil
else
meu_dono:IniciarTempo (_tempo-3.0, meu_dono.shadow)
end
@@ -337,9 +313,8 @@
if (este_jogador.end_time) then
este_jogador.end_time = nil
shadow.end_time = nil
else
este_jogador:IniciarTempo (_tempo-3.0, shadow)
este_jogador:IniciarTempo (_tempo-3.0, este_jogador.shadow)
end
if (este_jogador.nome == _detalhes.playername and token ~= "SPELL_PERIODIC_DAMAGE") then --> iniciando o dps do "PLAYER"
@@ -361,7 +336,6 @@
if (raid_members_cache [who_serial] and raid_members_cache [alvo_serial]) then
este_jogador.friendlyfire_total = este_jogador.friendlyfire_total + amount
shadow.friendlyfire_total = shadow.friendlyfire_total + amount
local amigo = este_jogador.friendlyfire._NameIndexTable [alvo_name]
if (not amigo) then
@@ -371,7 +345,6 @@
end
amigo.total = amigo.total + amount
amigo.shadow.total = amigo.shadow.total + amount
local spell = amigo.spell_tables._ActorTable [spellid]
if (not spell) then
@@ -381,7 +354,6 @@
return spell:AddFF (amount) --adiciona a classe da habilidade, a classe da habilidade se encarrega de adicionar aos alvos dela
else
_current_total [1] = _current_total [1]+amount
_overall_total [1] = _overall_total [1]+amount
end
@@ -391,7 +363,6 @@
--> actor owner (if any)
if (meu_dono) then --> se for dano de um Pet
meu_dono.total = meu_dono.total + amount --> e adiciona o dano ao pet
meu_dono.shadow.total = meu_dono.shadow.total + amount --> e adiciona o dano ao pet
--> add owner targets
local owner_target = meu_dono.targets._NameIndexTable [alvo_name]
@@ -407,11 +378,9 @@
--> actor
este_jogador.total = este_jogador.total + amount
shadow.total = shadow.total + amount
--> actor without pets
este_jogador.total_without_pet = este_jogador.total_without_pet + amount
shadow.total_without_pet = shadow.total_without_pet + amount
--> actor targets
local este_alvo = este_jogador.targets._NameIndexTable [alvo_name]
@@ -421,7 +390,6 @@
este_alvo = este_jogador.targets._ActorTable [este_alvo]
end
este_alvo.total = este_alvo.total + amount
este_alvo.shadow.total = este_alvo.shadow.total + amount
--> actor spells table
local spell = este_jogador.spell_tables._ActorTable [spellid]
@@ -515,10 +483,6 @@
-----------------------------------------------------------------------------------------------------------------------------------------
function parser:summon (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellName)
--if (alvo_name == "Guardian of Ancient Kings") then --remover
-- print ("Summon GAK 1", who_name)
--end
--> pet summon another pet
local sou_pet = _detalhes.tabela_pets.pets [who_serial]
if (sou_pet) then --> okey, ja é um pet
@@ -575,7 +539,6 @@
end
_current_heal_container.need_refresh = true
_overall_heal_container.need_refresh = true
------------------------------------------------------------------------------------------------
--> get actors
@@ -595,9 +558,6 @@
healing_cache [alvo_name] = jogador_alvo
end
end
local shadow = este_jogador.shadow
local shadow_of_target = jogador_alvo.shadow
este_jogador.last_event = _tempo
@@ -611,14 +571,7 @@
este_jogador.heal_enemy [spellid] = este_jogador.heal_enemy [spellid] + cura_efetiva
end
if (not este_jogador.shadow.heal_enemy [spellid]) then
shadow.heal_enemy [spellid] = cura_efetiva
else
shadow.heal_enemy [spellid] = shadow.heal_enemy [spellid] + cura_efetiva
end
este_jogador.heal_enemy_amt = este_jogador.heal_enemy_amt + cura_efetiva
shadow.heal_enemy_amt = shadow.heal_enemy_amt + cura_efetiva
return
end
@@ -628,7 +581,6 @@
if (este_jogador.grupo) then
_current_combat.totals_grupo[2] = _current_combat.totals_grupo[2] + cura_efetiva
_overall_combat.totals_grupo[2] = _overall_combat.totals_grupo[2] + cura_efetiva
end
if (jogador_alvo.grupo) then
@@ -659,9 +611,9 @@
este_jogador:Iniciar (true) --inicia o dps do jogador
if (este_jogador.end_time) then --> o combate terminou, reabrir o tempo
este_jogador.end_time = nil
shadow.end_time = nil --> não tenho certeza se isso aqui não pode dar merda
este_jogador.shadow.end_time = nil --> não tenho certeza se isso aqui não pode dar merda
else
este_jogador:IniciarTempo (_tempo-3.0, shadow)
este_jogador:IniciarTempo (_tempo-3.0, este_jogador.shadow)
end
end
@@ -680,7 +632,6 @@
--> combat total
_current_total [2] = _current_total [2] + cura_efetiva
_overall_total [2] = _overall_total [2] + cura_efetiva
--> healing taken
jogador_alvo.healing_taken = jogador_alvo.healing_taken + cura_efetiva --> adiciona o dano tomado
@@ -688,28 +639,18 @@
jogador_alvo.healing_from [who_name] = true
end
--> healing taken shadow
shadow_of_target.healing_taken = shadow_of_target.healing_taken+cura_efetiva --> adiciona o dano tomado
if (not shadow_of_target.healing_from [who_name]) then --> adiciona a pool de dano tomado de quem
shadow_of_target.healing_from [who_name] = true
end
--> actor healing amount
este_jogador.total = este_jogador.total + cura_efetiva
shadow.total = shadow.total + cura_efetiva
if (is_shield) then
este_jogador.totalabsorb = este_jogador.totalabsorb + cura_efetiva
shadow.totalabsorb = shadow.totalabsorb + cura_efetiva
end
este_jogador.total_without_pet = este_jogador.total_without_pet + cura_efetiva
shadow.total_without_pet = shadow.total_without_pet + cura_efetiva
--> pet
if (meu_dono) then
meu_dono.total = meu_dono.total + cura_efetiva --> heal do pet
meu_dono.shadow.total = meu_dono.shadow.total + cura_efetiva --> heal do pet na shadow
local owner_target = meu_dono.targets._NameIndexTable [alvo_name]
if (not owner_target) then
@@ -718,21 +659,17 @@
owner_target = meu_dono.targets._ActorTable [owner_target]
end
owner_target.total = owner_target.total + amount
end
--> target amount
este_alvo.total = este_alvo.total + cura_efetiva
este_alvo.shadow.total = este_alvo.shadow.total + cura_efetiva
end
if (overhealing > 0) then
este_jogador.totalover = este_jogador.totalover + overhealing
shadow.totalover = shadow.totalover + overhealing
este_alvo.overheal = este_alvo.overheal + overhealing
if (meu_dono) then
meu_dono.totalover = meu_dono.totalover + overhealing
meu_dono.shadow.totalover = meu_dono.shadow.totalover + overhealing
end
end
@@ -1162,7 +1099,6 @@
este_jogador = _current_misc_container:PegarCombatente (who_serial, spellname, who_flags, true)
misc_cache [spellname] = este_jogador
end
local shadow = este_jogador.shadow
------------------------------------------------------------------------------------------------
--> build containers on the fly
@@ -1176,18 +1112,19 @@
este_jogador.debuff_uptime_spell_tables = container_habilidades:NovoContainer (container_misc)
este_jogador.debuff_uptime_targets = container_combatentes:NovoContainer (container_enemydebufftarget_target)
if (not shadow.debuff_uptime_targets) then
shadow.boss_debuff = true
shadow.damage_twin = who_name
shadow.spellschool = spellschool
shadow.damage_spellid = spellid
shadow.debuff_uptime = 0
shadow.debuff_uptime_spell_tables = container_habilidades:NovoContainer (container_misc)
shadow.debuff_uptime_targets = container_combatentes:NovoContainer (container_enemydebufftarget_target)
if (not este_jogador.shadow.debuff_uptime_targets) then
este_jogador.shadow.boss_debuff = true
este_jogador.shadow.damage_twin = who_name
este_jogador.shadow.spellschool = spellschool
este_jogador.shadow.damage_spellid = spellid
este_jogador.shadow.debuff_uptime = 0
este_jogador.shadow.debuff_uptime_spell_tables = container_habilidades:NovoContainer (container_misc)
este_jogador.shadow.debuff_uptime_targets = container_combatentes:NovoContainer (container_enemydebufftarget_target)
end
este_jogador.debuff_uptime_targets.shadow = shadow.debuff_uptime_targets
este_jogador.debuff_uptime_spell_tables.shadow = shadow.debuff_uptime_spell_tables
este_jogador.debuff_uptime_targets.shadow = este_jogador.shadow.debuff_uptime_targets
este_jogador.debuff_uptime_spell_tables.shadow = este_jogador.shadow.debuff_uptime_spell_tables
end
------------------------------------------------------------------------------------------------
@@ -1213,18 +1150,6 @@
end
este_alvo.actived_at = _tempo
--> shadows
este_alvo = este_alvo.shadow
este_jogador = este_jogador.shadow
este_alvo.actived = true
este_alvo.activedamt = este_alvo.activedamt + 1
if (este_alvo.actived_at and este_alvo.actived) then
este_alvo.uptime = este_alvo.uptime + _tempo - este_alvo.actived_at
este_jogador.debuff_uptime = este_jogador.debuff_uptime + _tempo - este_alvo.actived_at
end
este_alvo.actived_at = _tempo
elseif (in_out == "DEBUFF_UPTIME_REFRESH") then
if (este_alvo.actived_at and este_alvo.actived) then
este_alvo.uptime = este_alvo.uptime + _tempo - este_alvo.actived_at
@@ -1233,17 +1158,6 @@
este_alvo.actived_at = _tempo
este_alvo.actived = true
--> shadows
este_alvo = este_alvo.shadow
este_jogador = este_jogador.shadow
if (este_alvo.actived_at and este_alvo.actived) then
este_alvo.uptime = este_alvo.uptime + _tempo - este_alvo.actived_at
este_jogador.debuff_uptime = este_jogador.debuff_uptime + _tempo - este_alvo.actived_at
end
este_alvo.actived_at = _tempo
este_alvo.actived = true
elseif (in_out == "DEBUFF_UPTIME_OUT") then
if (este_alvo.actived_at and este_alvo.actived) then
este_alvo.uptime = este_alvo.uptime + _detalhes._tempo - este_alvo.actived_at
@@ -1258,25 +1172,6 @@
else
este_alvo.actived_at = _tempo
end
--> shadows
este_alvo = este_alvo.shadow
este_jogador = este_jogador.shadow
if (este_alvo.actived_at and este_alvo.actived) then
este_alvo.uptime = este_alvo.uptime + _detalhes._tempo - este_alvo.actived_at
este_jogador.debuff_uptime = este_jogador.debuff_uptime + _tempo - este_alvo.actived_at --> token = actor misc object
end
este_alvo.activedamt = este_alvo.activedamt - 1
if (este_alvo.activedamt == 0) then
este_alvo.actived = false
este_alvo.actived_at = nil
else
este_alvo.actived_at = _tempo
end
end
end
@@ -1285,7 +1180,6 @@
--> early checks and fixes
_current_misc_container.need_refresh = true
_overall_misc_container.need_refresh = true
------------------------------------------------------------------------------------------------
--> get actors
@@ -1294,7 +1188,6 @@
este_jogador = _current_misc_container:PegarCombatente (who_serial, who_name, who_flags, true)
misc_cache [who_name] = este_jogador
end
local shadow = este_jogador.shadow
------------------------------------------------------------------------------------------------
--> build containers on the fly
@@ -1304,14 +1197,14 @@
este_jogador.debuff_uptime_spell_tables = container_habilidades:NovoContainer (container_misc)
este_jogador.debuff_uptime_targets = container_combatentes:NovoContainer (container_damage_target)
if (not shadow.debuff_uptime_targets) then
shadow.debuff_uptime = 0
shadow.debuff_uptime_spell_tables = container_habilidades:NovoContainer (container_misc)
shadow.debuff_uptime_targets = container_combatentes:NovoContainer (container_damage_target)
if (not este_jogador.shadow.debuff_uptime_targets) then
este_jogador.shadow.debuff_uptime = 0
este_jogador.shadow.debuff_uptime_spell_tables = container_habilidades:NovoContainer (container_misc)
este_jogador.shadow.debuff_uptime_targets = container_combatentes:NovoContainer (container_damage_target)
end
este_jogador.debuff_uptime_targets.shadow = shadow.debuff_uptime_targets
este_jogador.debuff_uptime_spell_tables.shadow = shadow.debuff_uptime_spell_tables
este_jogador.debuff_uptime_targets.shadow = este_jogador.shadow.debuff_uptime_targets
este_jogador.debuff_uptime_spell_tables.shadow = este_jogador.shadow.debuff_uptime_spell_tables
end
------------------------------------------------------------------------------------------------
@@ -1335,7 +1228,6 @@
--> early checks and fixes
_current_misc_container.need_refresh = true
_overall_misc_container.need_refresh = true
------------------------------------------------------------------------------------------------
--> get actors
@@ -1344,7 +1236,6 @@
este_jogador = _current_misc_container:PegarCombatente (who_serial, who_name, who_flags, true)
misc_cache [who_name] = este_jogador
end
local shadow = este_jogador.shadow
------------------------------------------------------------------------------------------------
--> build containers on the fly
@@ -1354,14 +1245,14 @@
este_jogador.buff_uptime_spell_tables = container_habilidades:NovoContainer (container_misc)
este_jogador.buff_uptime_targets = container_combatentes:NovoContainer (container_damage_target)
if (not shadow.buff_uptime_targets) then
shadow.buff_uptime = 0
shadow.buff_uptime_spell_tables = container_habilidades:NovoContainer (container_misc)
shadow.buff_uptime_targets = container_combatentes:NovoContainer (container_damage_target)
if (not este_jogador.shadow.buff_uptime_targets) then
este_jogador.shadow.buff_uptime = 0
este_jogador.shadow.buff_uptime_spell_tables = container_habilidades:NovoContainer (container_misc)
este_jogador.shadow.buff_uptime_targets = container_combatentes:NovoContainer (container_damage_target)
end
este_jogador.buff_uptime_targets.shadow = shadow.buff_uptime_targets
este_jogador.buff_uptime_spell_tables.shadow = shadow.buff_uptime_spell_tables
este_jogador.buff_uptime_targets.shadow = este_jogador.shadow.buff_uptime_targets
este_jogador.buff_uptime_spell_tables.shadow = este_jogador.shadow.buff_uptime_spell_tables
end
------------------------------------------------------------------------------------------------
@@ -1433,7 +1324,6 @@
end
_current_energy_container.need_refresh = true
_overall_energy_container.need_refresh = true
------------------------------------------------------------------------------------------------
--> get actors
@@ -1464,9 +1354,6 @@
este_alvo = este_jogador.targets._ActorTable [este_alvo]
end
local shadow = este_jogador.shadow
local shadow_of_target = jogador_alvo.shadow
este_jogador.last_event = _tempo
------------------------------------------------------------------------------------------------
@@ -1474,34 +1361,26 @@
--> combat total
_current_total [3] [key_regenType] = _current_total [3] [key_regenType] + amount
_overall_total [3] [key_regenType] = _overall_total [3] [key_regenType] + amount
if (este_jogador.grupo) then
_current_gtotal [3] [key_regenType] = _current_gtotal [3] [key_regenType] + amount
_overall_gtotal [3] [key_regenType] = _overall_gtotal [3] [key_regenType] + amount
end
--> regen produced amount
este_jogador [key_regenType] = este_jogador [key_regenType] + amount
shadow [key_regenType] = shadow [key_regenType] + amount
este_alvo [key_regenType] = este_alvo [key_regenType] + amount
--> target regenerated amount
jogador_alvo [key_regenDone] = jogador_alvo [key_regenDone] + amount
shadow_of_target [key_regenDone] = shadow_of_target [key_regenDone] + amount
--> regen from
if (not jogador_alvo [key_regenFrom] [who_name]) then
jogador_alvo [key_regenFrom] [who_name] = true
end
if (not shadow_of_target [key_regenFrom] [who_name]) then
shadow_of_target [key_regenFrom] [who_name] = true
end
--> owner
if (meu_dono) then
meu_dono [key_regenType] = meu_dono [key_regenType] + amount --> e adiciona o dano ao pet
meu_dono.shadow [key_regenType] = meu_dono.shadow [key_regenType] + amount --> e adiciona o dano ao pet
end
--> actor spells table
@@ -1526,7 +1405,6 @@
--> early checks and fixes
_current_misc_container.need_refresh = true
_overall_misc_container.need_refresh = true
------------------------------------------------------------------------------------------------
--> get actors
@@ -1539,7 +1417,6 @@
misc_cache [who_name] = este_jogador
end
end
local shadow = este_jogador.shadow
------------------------------------------------------------------------------------------------
--> build containers on the fly
@@ -1548,15 +1425,15 @@
este_jogador.cooldowns_defensive = 0
este_jogador.cooldowns_defensive_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
este_jogador.cooldowns_defensive_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades
if (not shadow.cooldowns_defensive_targets) then
shadow.cooldowns_defensive = 0
shadow.cooldowns_defensive_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
shadow.cooldowns_defensive_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades usadas
if (not este_jogador.shadow.cooldowns_defensive_targets) then
este_jogador.shadow.cooldowns_defensive = 0
este_jogador.shadow.cooldowns_defensive_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
este_jogador.shadow.cooldowns_defensive_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades usadas
end
este_jogador.cooldowns_defensive_targets.shadow = shadow.cooldowns_defensive_targets
este_jogador.cooldowns_defensive_spell_tables.shadow = shadow.cooldowns_defensive_spell_tables
este_jogador.cooldowns_defensive_targets.shadow = este_jogador.shadow.cooldowns_defensive_targets
este_jogador.cooldowns_defensive_spell_tables.shadow = este_jogador.shadow.cooldowns_defensive_spell_tables
end
------------------------------------------------------------------------------------------------
@@ -1564,15 +1441,12 @@
--> actor cooldowns used
este_jogador.cooldowns_defensive = este_jogador.cooldowns_defensive + 1
shadow.cooldowns_defensive = shadow.cooldowns_defensive + 1
--> combat totals
_current_total [4].cooldowns_defensive = _current_total [4].cooldowns_defensive + 1
_overall_total [4].cooldowns_defensive = _overall_total [4].cooldowns_defensive + 1
if (este_jogador.grupo) then
_current_gtotal [4].cooldowns_defensive = _current_gtotal [4].cooldowns_defensive + 1
_overall_gtotal [4].cooldowns_defensive = _overall_gtotal [4].cooldowns_defensive + 1
if (who_name == alvo_name) then
@@ -1651,7 +1525,6 @@
end
_current_misc_container.need_refresh = true
_overall_misc_container.need_refresh = true
------------------------------------------------------------------------------------------------
--> get actors
@@ -1664,7 +1537,6 @@
misc_cache [who_name] = este_jogador
end
end
local shadow = este_jogador.shadow
------------------------------------------------------------------------------------------------
--> build containers on the fly
@@ -1674,16 +1546,17 @@
este_jogador.interrupt_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
este_jogador.interrupt_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades usadas para interromper
este_jogador.interrompeu_oque = {}
if (not shadow.interrupt_targets) then
shadow.interrupt = 0
shadow.interrupt_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
shadow.interrupt_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades usadas para interromper
shadow.interrompeu_oque = {}
if (not este_jogador.shadow.interrupt_targets) then
este_jogador.shadow.interrupt = 0
este_jogador.shadow.interrupt_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
este_jogador.shadow.interrupt_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades usadas para interromper
este_jogador.shadow.interrompeu_oque = {}
end
este_jogador.interrupt_targets.shadow = shadow.interrupt_targets
este_jogador.interrupt_spell_tables.shadow = shadow.interrupt_spell_tables
este_jogador.interrupt_targets.shadow = este_jogador.shadow.interrupt_targets
este_jogador.interrupt_spell_tables.shadow = este_jogador.shadow.interrupt_spell_tables
end
------------------------------------------------------------------------------------------------
@@ -1691,15 +1564,12 @@
--> actor interrupt amount
este_jogador.interrupt = este_jogador.interrupt + 1
shadow.interrupt = shadow.interrupt + 1
--> combat totals
_current_total [4].interrupt = _current_total [4].interrupt + 1
_overall_total [4].interrupt = _overall_total [4].interrupt + 1
if (este_jogador.grupo) then
_current_gtotal [4].interrupt = _current_gtotal [4].interrupt + 1
_overall_gtotal [4].interrupt = _overall_gtotal [4].interrupt + 1
end
--> update last event
@@ -1713,12 +1583,6 @@
este_jogador.interrompeu_oque [extraSpellID] = este_jogador.interrompeu_oque [extraSpellID] + 1
end
if (not shadow.interrompeu_oque [extraSpellID]) then
shadow.interrompeu_oque [extraSpellID] = 1
else
shadow.interrompeu_oque [extraSpellID] = shadow.interrompeu_oque [extraSpellID] + 1
end
--> actor targets
local este_alvo = este_jogador.interrupt_targets._NameIndexTable [alvo_name]
if (not este_alvo) then
@@ -1780,6 +1644,8 @@
return
end
-- para aqui --
------------------------------------------------------------------------------------------------
--> record how many times the spell has been casted successfully
@@ -1792,7 +1658,6 @@
end
_current_misc_container.need_refresh = true
_overall_misc_container.need_refresh = true
------------------------------------------------------------------------------------------------
--> get actors
@@ -1816,13 +1681,13 @@
este_jogador.spellcast = 0
este_jogador.spellcast_spell_tables = container_habilidades:NovoContainer (container_misc)
if (not shadow.spellcast_targets) then
shadow.spellcast = 0
shadow.spellcast_spell_tables = container_habilidades:NovoContainer (container_misc)
if (not este_jogador.shadow.spellcast_targets) then
este_jogador.shadow.spellcast = 0
este_jogador.shadow.spellcast_spell_tables = container_habilidades:NovoContainer (container_misc)
end
este_jogador.spellcast_targets.shadow = shadow.spellcast_targets
este_jogador.spellcast_spell_tables.shadow = shadow.spellcast_spell_tables
este_jogador.spellcast_targets.shadow = este_jogador.shadow.spellcast_targets
este_jogador.spellcast_spell_tables.shadow = este_jogador.shadow.spellcast_spell_tables
end
------------------------------------------------------------------------------------------------
@@ -1860,7 +1725,6 @@
end
_current_misc_container.need_refresh = true
_overall_misc_container.need_refresh = true
------------------------------------------------------------------------------------------------
--> get actors
@@ -1879,7 +1743,6 @@
end
end
--]]
local shadow = este_jogador.shadow
------------------------------------------------------------------------------------------------
--> build containers on the fly
@@ -1890,16 +1753,16 @@
este_jogador.dispell_targets = container_combatentes:NovoContainer (container_damage_target)
este_jogador.dispell_spell_tables = container_habilidades:NovoContainer (container_misc)
este_jogador.dispell_oque = {}
if (not shadow.dispell_targets) then
shadow.dispell = 0
shadow.dispell_targets = container_combatentes:NovoContainer (container_damage_target)
shadow.dispell_spell_tables = container_habilidades:NovoContainer (container_misc)
shadow.dispell_oque = {}
if (not este_jogador.shadow.dispell_targets) then
este_jogador.shadow.dispell = 0
este_jogador.shadow.dispell_targets = container_combatentes:NovoContainer (container_damage_target)
este_jogador.shadow.dispell_spell_tables = container_habilidades:NovoContainer (container_misc)
este_jogador.shadow.dispell_oque = {}
end
este_jogador.dispell_targets.shadow = shadow.dispell_targets
este_jogador.dispell_spell_tables.shadow = shadow.dispell_spell_tables
este_jogador.dispell_targets.shadow = este_jogador.shadow.dispell_targets
este_jogador.dispell_spell_tables.shadow = este_jogador.shadow.dispell_spell_tables
end
------------------------------------------------------------------------------------------------
@@ -1911,16 +1774,13 @@
--> total dispells in combat
_current_total [4].dispell = _current_total [4].dispell + 1
_overall_total [4].dispell = _overall_total [4].dispell + 1
if (este_jogador.grupo) then
_current_gtotal [4].dispell = _current_gtotal [4].dispell + 1
_overall_gtotal [4].dispell = _overall_gtotal [4].dispell + 1
end
--> actor dispell amount
este_jogador.dispell = este_jogador.dispell + 1
shadow.dispell = shadow.dispell + 1
--> dispell what
if (extraSpellID) then
@@ -1929,12 +1789,6 @@
else
este_jogador.dispell_oque [extraSpellID] = este_jogador.dispell_oque [extraSpellID] + 1
end
if (not shadow.dispell_oque [extraSpellID]) then
shadow.dispell_oque [extraSpellID] = 1
else
shadow.dispell_oque [extraSpellID] = shadow.dispell_oque [extraSpellID] + 1
end
end
--> actor targets
@@ -1965,7 +1819,6 @@
end
_current_misc_container.need_refresh = true
_overall_misc_container.need_refresh = true
------------------------------------------------------------------------------------------------
--> get actors
@@ -1978,8 +1831,6 @@
misc_cache [who_name] = este_jogador
end
end
local shadow = este_jogador.shadow
------------------------------------------------------------------------------------------------
--> build containers on the fly
@@ -1989,15 +1840,15 @@
este_jogador.ress = 0
este_jogador.ress_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
este_jogador.ress_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades usadas para interromper
if (not shadow.ress_targets) then
shadow.ress = 0
shadow.ress_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
shadow.ress_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades usadas para interromper
if (not este_jogador.shadow.ress_targets) then
este_jogador.shadow.ress = 0
este_jogador.shadow.ress_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
este_jogador.shadow.ress_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades usadas para interromper
end
este_jogador.ress_targets.shadow = shadow.ress_targets
este_jogador.ress_spell_tables.shadow = shadow.ress_spell_tables
este_jogador.ress_targets.shadow = este_jogador.shadow.ress_targets
este_jogador.ress_spell_tables.shadow = este_jogador.shadow.ress_spell_tables
end
------------------------------------------------------------------------------------------------
@@ -2009,16 +1860,13 @@
--> combat ress total
_current_total [4].ress = _current_total [4].ress + 1
_overall_total [4].ress = _overall_total [4].ress + 1
if (este_jogador.grupo) then
_current_combat.totals_grupo[4].ress = _current_combat.totals_grupo[4].ress+1
_overall_combat.totals_grupo[4].ress = _overall_combat.totals_grupo[4].ress+1
end
--> add ress amount
este_jogador.ress = este_jogador.ress + 1
shadow.ress = shadow.ress + 1
--> add battle ress
if (_UnitAffectingCombat (who_name)) then
@@ -2087,7 +1935,6 @@
end
_current_misc_container.need_refresh = true
_overall_misc_container.need_refresh = true
------------------------------------------------------------------------------------------------
--> get actors
@@ -2106,7 +1953,6 @@
end
end
--]]
local shadow = este_jogador.shadow
------------------------------------------------------------------------------------------------
--> build containers on the fly
@@ -2118,15 +1964,15 @@
este_jogador.cc_break_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades usadas para interromper
este_jogador.cc_break_oque = {}
if (not shadow.cc_break) then
shadow.cc_break = 0
shadow.cc_break_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
shadow.cc_break_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades usadas para interromper
shadow.cc_break_oque = {}
if (not este_jogador.shadow.cc_break) then
este_jogador.shadow.cc_break = 0
este_jogador.shadow.cc_break_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
este_jogador.shadow.cc_break_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades usadas para interromper
este_jogador.shadow.cc_break_oque = {}
end
este_jogador.cc_break_targets.shadow = shadow.cc_break_targets
este_jogador.cc_break_spell_tables.shadow = shadow.cc_break_spell_tables
este_jogador.cc_break_targets.shadow = este_jogador.shadow.cc_break_targets
este_jogador.cc_break_spell_tables.shadow = este_jogador.shadow.cc_break_spell_tables
end
------------------------------------------------------------------------------------------------
@@ -2138,16 +1984,13 @@
--> combat cc break total
_current_total [4].cc_break = _current_total [4].cc_break + 1
_overall_total [4].cc_break = _overall_total [4].cc_break + 1
if (este_jogador.grupo) then
_current_combat.totals_grupo[4].cc_break = _current_combat.totals_grupo[4].cc_break+1
_overall_combat.totals_grupo[4].cc_break = _overall_combat.totals_grupo[4].cc_break+1
end
--> add amount
este_jogador.cc_break = este_jogador.cc_break + 1
shadow.cc_break = shadow.cc_break + 1
--> broke what
if (not este_jogador.cc_break_oque [spellid]) then
@@ -2156,12 +1999,6 @@
este_jogador.cc_break_oque [spellid] = este_jogador.cc_break_oque [spellid] + 1
end
if (not shadow.cc_break_oque [spellid]) then
shadow.cc_break_oque [spellid] = 1
else
shadow.cc_break_oque [spellid] = shadow.cc_break_oque [spellid] + 1
end
--> actor targets
local este_alvo = este_jogador.cc_break_targets._NameIndexTable [alvo_name]
if (not este_alvo) then
@@ -2212,58 +2049,8 @@
_current_combat.frags [alvo_name] = _current_combat.frags [alvo_name] + 1
end
if (not _overall_combat.frags [alvo_name]) then
_overall_combat.frags [alvo_name] = 1
else
_overall_combat.frags [alvo_name] = _overall_combat.frags [alvo_name] + 1
end
_current_combat.frags_need_refresh = true
_overall_combat.frags_need_refresh = true
--> encounter end --[[REMOVED]] it's deprecated since encounter end and start replace this
--[[
local encounter_type = _detalhes.encounter.type
if (encounter_type) then
if (encounter_type == 1 or encounter_type == 2) then
local npcTable = _detalhes.encounter.data
local serial = tonumber (alvo_serial:sub (6, 10), 16)
--vardump (npcTable)
if (npcTable [serial] ~= nil) then --> ~= default false
_detalhes.encounter.data [serial] = true
--> check if it's done
local its_done = true
for npcID, killed in pairs (_detalhes.encounter.data) do
if (not killed) then
its_done = false
--print ("npc",npcID,"NAO esta morto","quem morreu:",alvo_name)
break
else
--print ("npc",npcID,"esta morto","quem morreu:",alvo_name)
end
end
--> combat finished
if (its_done) then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) combat finished: encounter objective is completed")
end
--print ("saindo do combate")
_detalhes:SairDoCombate (true)
end
end
end
end
--]]
--> player death
elseif (not _UnitIsFeignDeath (alvo_name)) then
if (
@@ -2280,13 +2067,10 @@
--_detalhes:ScheduleTimer ("TrueDead", 1, {time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags})
_current_misc_container.need_refresh = true
_overall_misc_container.need_refresh = true
--> combat totals
_current_total [4].dead = _current_total [4].dead + 1
_overall_total [4].dead = _overall_total [4].dead + 1
_current_gtotal [4].dead = _current_gtotal [4].dead + 1
_overall_gtotal [4].dead = _overall_gtotal [4].dead + 1
--> main actor no container de misc que irá armazenar a morte
local este_jogador, meu_dono = misc_cache [alvo_name]
@@ -2375,7 +2159,6 @@
--print ("A morte teve "..#esta_morte.." eventos")
_table_insert (_current_combat.last_events_tables, #_current_combat.last_events_tables+1, t)
_table_insert (_overall_combat.last_events_tables, #_current_combat.last_events_tables+1, t)
--> reseta a pool
dano.last_events_table = _detalhes:CreateActorLastEventTable()
@@ -2612,6 +2395,8 @@
local encounterID, encounterName, difficultyID, raidSize = _select (1, ...)
local zoneName, _, _, _, _, _, _, zoneMapID = _GetInstanceInfo()
--print (encounterID, encounterName, difficultyID, raidSize)
_detalhes.encounter_table ["start"] = time()
_detalhes.encounter_table ["end"] = nil
@@ -2729,6 +2514,29 @@
_detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Stop()
end
end
if (_detalhes.schedule_flag_boss_components) then
_detalhes.schedule_flag_boss_components = false
_detalhes:FlagActorsOnBossFight()
end
if (_detalhes.schedule_remove_overall) then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) found schedule overall data deletion.")
end
_detalhes.schedule_remove_overall = false
_detalhes.tabela_historico:resetar_overall()
end
if (_detalhes.schedule_add_to_overall) then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) found schedule overall data addition.")
end
_detalhes.schedule_add_to_overall = false
_detalhes.historico:adicionar_overall (_detalhes.tabela_vigente)
end
return
elseif (evento == "GROUP_ROSTER_UPDATE") then
@@ -2773,7 +2581,17 @@
elseif (evento == "INSTANCE_ENCOUNTER_ENGAGE_UNIT") then
--> Nothing to do here
return
elseif (evento == "START_TIMER") then
if (C_Scenario.IsChallengeMode() and _detalhes.overall_clear_newchallenge) then
_detalhes.historico:resetar_overall()
end
elseif (evento == "WORLD_STATE_TIMER_START") then
--> Nothing to do here
return
elseif (evento == "PLAYER_LOGOUT") then
--> close info window
@@ -2984,23 +2802,17 @@
--> refresh combat tables
_current_combat = _detalhes.tabela_vigente
_overall_combat = _detalhes.tabela_overall
--> refresh total containers
_current_total = _current_combat.totals
_current_gtotal = _current_combat.totals_grupo
_overall_total = _overall_combat.totals
_overall_gtotal = _overall_combat.totals_grupo
--> refresh actors containers
_current_damage_container = _current_combat [1]
_overall_damage_container = _overall_combat [1]
_current_heal_container = _current_combat [2]
_overall_heal_container = _overall_combat [2]
_current_energy_container = _current_combat [3]
_overall_energy_container = _overall_combat [3]
_current_misc_container = _current_combat [4]
_overall_misc_container = _overall_combat [4]
--> refresh data capture options
_recording_self_buffs = _detalhes.RecordPlayerSelfBuffs
+9 -4
View File
@@ -835,7 +835,7 @@ do
function PSegment:CreateChildObject (instance)
local myframe = _detalhes.StatusBar:CreateChildFrame (instance, "DetailsPSegmentInstance" .. instance:GetInstanceId(), DEFAULT_CHILD_WIDTH, DEFAULT_CHILD_HEIGHT)
local new_child = _detalhes.StatusBar:CreateChildTable (instance, PSegment, myframe)
new_child.options.segmentType = new_child.options.segmentType or 1
new_child.options.segmentType = new_child.options.segmentType or 2
return new_child
end
@@ -919,12 +919,17 @@ do
_detalhes:CancelTimer (Clock.tick)
end
function _detalhes:ClockPluginTickOnSegment()
_detalhes:ClockPluginTick (true)
end
--1 sec tick
function _detalhes:ClockPluginTick()
function _detalhes:ClockPluginTick (force)
for index, child in _ipairs (Clock.childs) do
local instance = child.instance
if (child.enabled and instance:IsEnabled()) then
if (instance.showing) then
if (instance.showing and ( (instance.segmento ~= -1) or (instance.segmento == -1 and not _detalhes.in_combat) or force) ) then
local timeType = child.options.timeType
if (timeType == 1) then
@@ -1050,7 +1055,7 @@ do
--> Register needed events
_detalhes:RegisterEvent (Clock, "COMBAT_PLAYER_ENTER", Clock.PlayerEnterCombat)
_detalhes:RegisterEvent (Clock, "COMBAT_PLAYER_LEAVE", Clock.PlayerLeaveCombat)
_detalhes:RegisterEvent (Clock, "DETAILS_INSTANCE_CHANGESEGMENT", _detalhes.ClockPluginTick)
_detalhes:RegisterEvent (Clock, "DETAILS_INSTANCE_CHANGESEGMENT", _detalhes.ClockPluginTickOnSegment)
_detalhes:RegisterEvent (Clock, "DETAILS_DATA_SEGMENTREMOVED", _detalhes.ClockPluginTick)
_detalhes:RegisterEvent (Clock, "DETAILS_DATA_RESET", Clock.DataReset)
+1 -1
View File
@@ -775,7 +775,7 @@
end
--
_detalhes.times_of_tutorial = 0
_detalhes:ScheduleTimer ("delay_tutorial", 20)
_detalhes:ScheduleTimer ("delay_tutorial", 5)
end
end
+20 -4
View File
@@ -5,7 +5,8 @@ do
local _rawget = rawget
local _setmetatable = setmetatable
local _ipairs = ipairs
--> default weaktable
_detalhes.weaktable = {__mode = "v"}
@@ -18,12 +19,27 @@ do
end
meus_links [#meus_links+1] = objeto
end
--> check if there is a link between tables
function _detalhes:EstaoLinkados (objeto)
local meus_links = _rawget (self, "links")
if (not meus_links) then
return false
end
for index, actor in _ipairs (meus_links) do
if (actor == objeto) then
return true
end
end
return false
end
--> create the link
function _detalhes:CriaLink (link)
--> se tiver a tabela no overall
if (link) then
link:FazLinkagem (self)
end
--if (link) then
-- link:FazLinkagem (self)
--end
end
end
+3
View File
@@ -271,6 +271,9 @@ function _detalhes:LoadConfig()
_detalhes.switch.slots = _detalhes_database.switchSaved.slots
_detalhes.switch.table = _detalhes_database.switchSaved.table
--> last boss
_detalhes.last_encounter = _detalhes_database.last_encounter
--> buffs
_detalhes.savedbuffs = _detalhes_database.savedbuffs
_detalhes.Buffs:BuildTables()
+5 -1
View File
@@ -564,8 +564,12 @@ local default_profile = {
--> cloud capture
cloud_capture = true,
--> combat time mim
--> combat
minimum_combat_time = 5,
overall_flag = 0xD,
overall_clear_newboss = true,
overall_clear_newchallenge = true,
--> skins
standard_skin = false, --?
+3
View File
@@ -482,6 +482,9 @@ function _detalhes:SaveConfig()
_detalhes_database.switchSaved.slots = _detalhes.switch.slots
_detalhes_database.switchSaved.table = _detalhes.switch.table
--> last boss
_detalhes_database.last_encounter = _detalhes.last_encounter
--> last versions
_detalhes_database.last_realversion = _detalhes.realversion --> core number
_detalhes_database.last_version = _detalhes.userversion --> version
+60
View File
@@ -92,6 +92,66 @@ function SlashCmdList.DETAILS (msg, editbox)
-------- debug ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
elseif (msg == "addcombat") then
local combat = _detalhes.combate:NovaTabela (true, _detalhes.tabela_overall, 1)
local self = combat[1]:PegarCombatente (UnitGUID ("player"), UnitName ("player"), 1297, true)
self.total = 100000
self.total_without_pet = 100000
if (not _detalhes.um___) then
_detalhes.um___ = 0
_detalhes.next_um = 3
end
local cima = true
_detalhes.um___ = _detalhes.um___ + 1
if (_detalhes.um___ == _detalhes.next_um) then
_detalhes.next_um = _detalhes.next_um + 3
cima = false
end
if (cima) then
local frostbolt = self.spell_tables:PegaHabilidade (116, true, "SPELL_DAMAGE")
local frostfirebolt = self.spell_tables:PegaHabilidade (44614, true, "SPELL_DAMAGE")
local icelance = self.spell_tables:PegaHabilidade (30455, true, "SPELL_DAMAGE")
self.spell_tables._ActorTable [116].total = 50000
self.spell_tables._ActorTable [44614].total = 25000
self.spell_tables._ActorTable [30455].total = 25000
else
local frostbolt = self.spell_tables:PegaHabilidade (84721, true, "SPELL_DAMAGE")
local frostfirebolt = self.spell_tables:PegaHabilidade (113092, true, "SPELL_DAMAGE")
local icelance = self.spell_tables:PegaHabilidade (122, true, "SPELL_DAMAGE")
self.spell_tables._ActorTable [84721].total = 50000
self.spell_tables._ActorTable [113092].total = 25000
self.spell_tables._ActorTable [122].total = 25000
end
combat.start_time = time()-30
combat.end_time = time()
combat.totals_grupo [1] = 100000
combat.totals [1] = 100000
--combat.instance_type = "raid"
--combat.is_trash = true
_detalhes.tabela_vigente = combat
_detalhes.tabela_historico:adicionar (combat)
_detalhes:InstanciaCallFunction (_detalhes.gump.Fade, "in", nil, "barras")
_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:AtualizaGumpPrincipal (-1, true) --atualiza todas as instancias
elseif (msg == "pets") then
local f = _detalhes:CreateListPanel()
+228 -49
View File
@@ -26,34 +26,58 @@ local classe_icones = _G.CLASS_ICON_TCOORDS
--self = instancia
--jogador = classe_damage ou classe_heal
function _detalhes:AbreJanelaInfo (jogador)
function _detalhes:AbreJanelaInfo (jogador, from_att_change)
if (not _detalhes.row_singleclick_overwrite [self.atributo] or not _detalhes.row_singleclick_overwrite [self.atributo][self.sub_atributo]) then
_detalhes:FechaJanelaInfo()
return
elseif (_type (_detalhes.row_singleclick_overwrite [self.atributo][self.sub_atributo]) == "function") then
if (from_att_change) then
_detalhes:FechaJanelaInfo()
return
end
return _detalhes.row_singleclick_overwrite [self.atributo][self.sub_atributo] (_, jogador, self)
end
if (self.modo == _detalhes._detalhes_props["MODO_RAID"]) then
_detalhes:FechaJanelaInfo()
return
end
--> _detalhes.info_jogador armazena o jogador que esta sendo mostrado na janela de detalhes
if (info.jogador and info.jogador == jogador) then
if (info.jogador and info.jogador == jogador and self and info.atributo and self.atributo == info.atributo and self.sub_atributo == info.sub_atributo) then
_detalhes:FechaJanelaInfo() --> se clicou na mesma barra então fecha a janela de detalhes
return
elseif (not jogador) then
_detalhes:FechaJanelaInfo()
return
end
if (info.barras1) then
for index, barra in ipairs (info.barras1) do
barra.other_actor = nil
end
end
if (info.barras2) then
for index, barra in ipairs (info.barras2) do
barra.icone:SetTexture (nil)
barra.icone:SetTexCoord (0, 1, 0, 1)
end
end
--> vamos passar os parâmetros para dentro da tabela da janela...
info.ativo = true --> sinaliza o addon que a janela esta aberta
info.atributo = self.atributo --> instancia.atributo -> grava o atributo (damage, heal, etc)
info.sub_atributo = self.sub_atributo --> instancia.sub_atributo -> grava o sub atributo (damage done, dps, damage taken, etc)
info.jogador = jogador --> de qual jogador (objeto classe_damage)
info.instancia = self --> salva a referência da instância que pediu o info
info.target_text = Loc ["STRING_TARGETS"] .. ":"
info.target_member = "total"
info.target_persecond = false
info.mostrando = nil
local nome = info.jogador.nome --> nome do jogador
@@ -71,7 +95,11 @@ function _detalhes:AbreJanelaInfo (jogador)
info.nome:SetText (nome)
info.atributo_nome:SetText (atributo_nome)
local avatar = NickTag:GetNicknameTable (jogador.serial)
local serial = jogador.serial
local avatar
if (serial ~= "") then
avatar = NickTag:GetNicknameTable (serial)
end
if (avatar and avatar [1]) then
info.nome:SetText (avatar [1] or nome)
@@ -113,6 +141,8 @@ function _detalhes:AbreJanelaInfo (jogador)
info.atributo_nome:SetPoint ("CENTER", info.nome, "CENTER", 0, 14)
info.no_targets:Hide()
info.no_targets.text:Hide()
gump:TrocaBackgroundInfo (info)
gump:HidaAllBarrasInfo()
@@ -177,88 +207,98 @@ end
-- for beta todo: info background need a major rewrite
function gump:TrocaBackgroundInfo()
if (info.atributo == 1) then --> DANO
if (info.sub_atributo == 1 or info.sub_atributo == 2) then --> damage done / dps
if (info.tipo ~= 1) then --> janela com as divisorias
info.bg1:SetTexture ([[Interface\AddOns\Details\images\info_window_background]])
info.bg1_sec_texture:SetTexture (nil)
info.targets:SetText (Loc ["STRING_TARGETS"] .. ":")
info.tipo = 1
end
if (info.sub_atributo == 2) then
info.targets:SetText (Loc ["STRING_TARGETS"] .. " " .. Loc ["STRING_ATTRIBUTE_DAMAGE_DPS"] .. ":")
info.target_persecond = true
else
info.targets:SetText (Loc ["STRING_TARGETS"] .. ":")
end
elseif (info.sub_atributo == 3) then --> damage taken
if (info.tipo ~= 2) then --> janela com fundo diferente
info.bg1:SetTexture ([[Interface\AddOns\Details\images\info_window_background]])
info.bg1_sec_texture:SetTexture ([[Interface\AddOns\Details\images\info_window_damagetaken]])
info.targets:SetText (Loc ["STRING_TARGETS"] .. ":")
info.tipo = 2
end
info.targets:SetText (Loc ["STRING_TARGETS"] .. ":")
info.no_targets:Show()
info.no_targets.text:Show()
elseif (info.sub_atributo == 4) then --> friendly fire
if (info.tipo ~= 3) then --> janela com fundo diferente
info.bg1:SetTexture ([[Interface\AddOns\Details\images\info_window_background]])
info.bg1_sec_texture:SetTexture ([[Interface\AddOns\Details\images\info_window_friendlyfire]])
info.targets:SetText (Loc ["STRING_SPELLS"] .. ":")
info.bg1_sec_texture:SetTexture ([[Interface\AddOns\Details\images\info_window_damagetaken]])
info.tipo = 3
end
info.targets:SetText (Loc ["STRING_SPELLS"] .. ":")
elseif (info.sub_atributo == 6) then --> enemies
if (info.tipo ~= 3) then --> janela com fundo diferente
info.bg1:SetTexture ([[Interface\AddOns\Details\images\info_window_background]])
info.bg1_sec_texture:SetTexture ([[Interface\AddOns\Details\images\info_window_damagetaken]])
info.targets:SetText (Loc ["STRING_DAMAGE_TAKEN_FROM"])
info.tipo = 3
end
info.targets:SetText (Loc ["STRING_DAMAGE_TAKEN_FROM"])
end
elseif (info.atributo == 2) then --> HEALING
if (info.sub_atributo == 1 or info.sub_atributo == 2 or info.sub_atributo == 3) then --> damage done / dps
if (info.tipo ~= 1) then --> janela com as divisorias
--info.bg1:SetTexture ("Interface\\AddOns\\Details\\images\\info_bg_part1") --> top left
--info.bg3:SetTexture ("Interface\\AddOns\\Details\\images\\info_bg_part3") --> bottom left
--info.bg2:SetTexture ("Interface\\AddOns\\Details\\images\\info_bg_part2") --> top right
--info.bg4:SetTexture ("Interface\\AddOns\\Details\\images\\info_bg_part4") --> bottom right
info.bg1:SetTexture ([[Interface\AddOns\Details\images\info_window_background]])
info.bg1_sec_texture:SetTexture (nil)
info.targets:SetText (Loc ["STRING_TARGETS"] .. ":")
info.tipo = 1
end
if (info.sub_atributo == 3) then
info.targets:SetText (Loc ["STRING_OVERHEALED"] .. ":")
info.target_member = "overheal"
info.target_text = Loc ["STRING_OVERHEALED"] .. ":"
elseif (info.sub_atributo == 2) then
info.targets:SetText (Loc ["STRING_TARGETS"] .. " " .. Loc ["STRING_ATTRIBUTE_HEAL_HPS"] .. ":")
info.target_persecond = true
else
info.targets:SetText (Loc ["STRING_TARGETS"] .. ":")
end
elseif (info.sub_atributo == 4) then --> Healing taken
if (info.tipo ~= 2) then --> janela com fundo diferente
--info.bg1:SetTexture ("Interface\\AddOns\\Details\\images\\bg_part1_sr") --> top left
--info.bg3:SetTexture ("Interface\\AddOns\\Details\\images\\bg_part3_sr") --> bottom left
--info.bg2:SetTexture ("Interface\\AddOns\\Details\\images\\bg_part2_sr") --> top right
--info.bg4:SetTexture ("Interface\\AddOns\\Details\\images\\bg_part4_sr") --> bottom right
if (info.tipo ~= 2) then --> janela com fundo diferente
info.bg1:SetTexture ([[Interface\AddOns\Details\images\info_window_background]])
info.bg1_sec_texture:SetTexture ([[Interface\AddOns\Details\images\info_window_damagetaken]])
info.targets:SetText (Loc ["STRING_TARGETS"] .. ":")
info.tipo = 2
end
info.targets:SetText (Loc ["STRING_TARGETS"] .. ":")
info.no_targets:Show()
info.no_targets.text:Show()
end
elseif (info.atributo == 3) then --> REGEN
if (info.tipo ~= 2) then --> janela com fundo diferente
--info.bg1:SetTexture ("Interface\\AddOns\\Details\\images\\bg_part1_sr") --> top left
--info.bg3:SetTexture ("Interface\\AddOns\\Details\\images\\bg_part3_sr") --> bottom left
--info.bg2:SetTexture ("Interface\\AddOns\\Details\\images\\bg_part2_sr") --> top right
--info.bg4:SetTexture ("Interface\\AddOns\\Details\\images\\bg_part4_sr") --> bottom right
info.bg1:SetTexture ([[Interface\AddOns\Details\images\info_window_background]])
info.bg1_sec_texture:SetTexture (nil)
info.targets:SetText ("Vindo de:")
info.tipo = 2
end
info.targets:SetText ("Vindo de:")
elseif (info.atributo == 4) then --> MISC
if (info.tipo ~= 2) then --> janela com fundo diferente
--info.bg1:SetTexture ("Interface\\AddOns\\Details\\images\\bg_part1_sr") --> top left
--info.bg3:SetTexture ("Interface\\AddOns\\Details\\images\\bg_part3_sr") --> bottom left
--info.bg2:SetTexture ("Interface\\AddOns\\Details\\images\\bg_part2_sr") --> top right
--info.bg4:SetTexture ("Interface\\AddOns\\Details\\images\\bg_part4_sr") --> bottom right
info.bg1:SetTexture ([[Interface\AddOns\Details\images\info_window_background]])
info.bg1_sec_texture:SetTexture (nil)
info.targets:SetText (Loc ["STRING_TARGETS"] .. ":")
info.tipo = 2
end
info.targets:SetText (Loc ["STRING_TARGETS"] .. ":")
end
end
@@ -710,10 +750,10 @@ local function cria_container_alvos (este_gump)
insets = {left = 1, right = 1, top = 0, bottom = 1},})
container_alvos_window:SetBackdropBorderColor (0,0,0,0)
container_alvos:SetBackdrop({
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16,
insets = {left = 1, right = 1, top = 0, bottom = 1},})
container_alvos:SetBackdropColor (50/255, 50/255, 50/255, 0.6)
--container_alvos:SetBackdrop({
-- bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16,
-- insets = {left = 1, right = 1, top = 0, bottom = 1},})
--container_alvos:SetBackdropColor (50/255, 50/255, 50/255, 0.6)
container_alvos:SetAllPoints (container_alvos_window)
container_alvos:SetWidth (300)
@@ -789,9 +829,10 @@ function gump:CriaJanelaInfo()
este_gump.bg1_sec_texture = este_gump:CreateTexture (nil, "BORDER")
este_gump.bg1_sec_texture:SetDrawLayer ("BORDER", 2)
este_gump.bg1_sec_texture:SetPoint ("topleft", este_gump.bg1, "topleft", 356, -86)
--este_gump.bg1_sec_texture:SetPoint ("topleft", este_gump.bg1, "topleft", 356, -86)
este_gump.bg1_sec_texture:SetPoint ("topleft", este_gump.bg1, "topleft", 348, -86)
este_gump.bg1_sec_texture:SetHeight (262)
este_gump.bg1_sec_texture:SetWidth (258)
este_gump.bg1_sec_texture:SetWidth (264)
--> bottom left
este_gump.bg3 = este_gump:CreateTexture (nil, "BORDER")
@@ -828,6 +869,19 @@ function gump:CriaJanelaInfo()
este_gump.fechar:SetText ("X")
este_gump.fechar:SetFrameLevel (este_gump:GetFrameLevel()+2)
este_gump.no_targets = este_gump:CreateTexture (nil, "overlay")
este_gump.no_targets:SetPoint ("BOTTOMLEFT", este_gump, "BOTTOMLEFT", 20, 6)
este_gump.no_targets:SetSize (301, 100)
este_gump.no_targets:SetTexture ([[Interface\QUESTFRAME\UI-QUESTLOG-EMPTY-TOPLEFT]])
este_gump.no_targets:SetTexCoord (0.015625, 1, 0.01171875, 0.390625)
este_gump.no_targets:SetDesaturated (true)
este_gump.no_targets:SetAlpha (.7)
este_gump.no_targets.text = este_gump:CreateFontString (nil, "overlay", "GameFontNormal")
este_gump.no_targets.text:SetPoint ("center", este_gump.no_targets, "center")
este_gump.no_targets.text:SetText (Loc ["STRING_NO_TARGET_BOX"])
este_gump.no_targets.text:SetTextColor (1, 1, 1, .4)
este_gump.no_targets:Hide()
function este_gump:ToFront()
if (_detalhes.bosswindow) then
if (_detalhes.bosswindow:GetFrameLevel() > este_gump:GetFrameLevel()) then
@@ -1561,8 +1615,12 @@ function gump:CriaJanelaInfo()
end
if (amt_positive < 2) then
_detalhes.player_details_tabs[1]:Hide()
--_detalhes.player_details_tabs[1]:Hide()
_detalhes.player_details_tabs[1]:SetPoint ("BOTTOMLEFT", info.container_barras, "TOPLEFT", 390 - (67 * (2-1)), 1)
end
_detalhes.player_details_tabs[1]:Click()
end
este_gump:SetScript ("OnHide", function (self)
@@ -1638,12 +1696,32 @@ function _detalhes:CreatePlayerDetailsTab (tabname, condition, fillfunction, onc
newtab:SetScript ("OnClick", function()
for _, tab in _ipairs (_detalhes.player_details_tabs) do
tab.frame:Hide()
tab.leftSelectedTexture:SetVertexColor (1, 1, 1, 1)
tab.middleSelectedTexture:SetVertexColor (1, 1, 1, 1)
tab.rightSelectedTexture:SetVertexColor (1, 1, 1, 1)
end
newtab.leftSelectedTexture:SetVertexColor (1, .7, 0, 1)
newtab.middleSelectedTexture:SetVertexColor (1, .7, 0, 1)
newtab.rightSelectedTexture:SetVertexColor (1, .7, 0, 1)
newtab.frame:Show()
end)
else
--> custom
newtab:SetScript ("OnClick", onclick)
newtab:SetScript ("OnClick", function()
for _, tab in _ipairs (_detalhes.player_details_tabs) do
tab.frame:Hide()
tab.leftSelectedTexture:SetVertexColor (1, 1, 1, 1)
tab.middleSelectedTexture:SetVertexColor (1, 1, 1, 1)
tab.rightSelectedTexture:SetVertexColor (1, 1, 1, 1)
end
newtab.leftSelectedTexture:SetVertexColor (1, .7, 0, 1)
newtab.middleSelectedTexture:SetVertexColor (1, .7, 0, 1)
newtab.rightSelectedTexture:SetVertexColor (1, .7, 0, 1)
onclick()
end)
end
--> remove os scripts padroes
@@ -2030,8 +2108,13 @@ local function CriaTexturaBarra (instancia, barra)
barra.textura:SetAllPoints (barra)
--barra.textura:SetStatusBarTexture (instancia.row_info.texture_file)
barra.textura:SetStatusBarTexture (_detalhes.default_texture)
barra.textura:SetStatusBarColor(.5, .5, .5, 0)
barra.textura:SetMinMaxValues(0,100)
barra.textura:SetStatusBarColor (.5, .5, .5, 0)
barra.textura:SetMinMaxValues (0,100)
if (barra.targets) then
barra.targets:SetParent (barra.textura)
barra.targets:SetFrameLevel (barra.textura:GetFrameLevel()+2)
end
barra.texto_esquerdo = barra.textura:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
barra.texto_esquerdo:SetPoint ("LEFT", barra.textura, "LEFT", 22, 0)
@@ -2042,7 +2125,11 @@ local function CriaTexturaBarra (instancia, barra)
barra.texto_esquerdo:SetWordWrap (false)
barra.texto_direita = barra.textura:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
barra.texto_direita:SetPoint ("RIGHT", barra.textura, "RIGHT", -2)
if (barra.targets) then
barra.texto_direita:SetPoint ("RIGHT", barra.targets, "LEFT", -2, 0)
else
barra.texto_direita:SetPoint ("RIGHT", barra, "RIGHT", -2, 0)
end
barra.texto_direita:SetJustifyH ("RIGHT")
barra.texto_direita:SetTextColor (1,1,1,1)
@@ -2059,9 +2146,7 @@ local miniframe_func_on_enter = function (self)
GameTooltip:Show()
end
end
barra:GetScript("OnEnter")(barra)
end
local miniframe_func_on_leave = function (self)
@@ -2069,6 +2154,87 @@ local miniframe_func_on_leave = function (self)
self:GetParent():GetScript("OnLeave")(self:GetParent())
end
local target_on_enter = function (self)
local barra = self:GetParent():GetParent()
if (barra.show and type (barra.show) == "number") then
local actor = barra.other_actor or info.jogador
local spell = actor.spell_tables:PegaHabilidade (barra.show)
if (spell) then
local ActorTargetsContainer = spell.targets._ActorTable
local ActorTargetsSortTable = {}
--add and sort
for _, _target in _ipairs (ActorTargetsContainer) do
ActorTargetsSortTable [#ActorTargetsSortTable+1] = {_target.nome, _target [info.target_member] or _target.total or 0}
end
table.sort (ActorTargetsSortTable, _detalhes.Sort2)
local spellname = _GetSpellInfo (barra.show)
GameTooltip:SetOwner (self, "ANCHOR_TOPRIGHT")
GameTooltip:AddLine (barra.index .. ". " .. spellname)
GameTooltip:AddLine (info.target_text)
GameTooltip:AddLine (" ")
--get time type
local meu_tempo
if (_detalhes.time_type == 1 or not actor.grupo) then
meu_tempo = actor:Tempo()
elseif (_detalhes.time_type == 2) then
meu_tempo = info.instancia.showing:GetCombatTime()
end
for index, target in ipairs (ActorTargetsSortTable) do
if (target [2] > 0) then
local class = _detalhes:GetClass (target [1])
if (class and _detalhes.class_coords [class]) then
local cords = _detalhes.class_coords [class]
if (info.target_persecond) then
GameTooltip:AddDoubleLine (index .. ". |TInterface\\AddOns\\Details\\images\\classes_small_alpha:14:14:0:0:128:128:"..cords[1]*128 ..":"..cords[2]*128 ..":"..cords[3]*128 ..":"..cords[4]*128 .."|t " .. target [1], _detalhes:comma_value ( _math_floor (target [2] / meu_tempo) ), 1, 1, 1, 1, 1, 1)
else
GameTooltip:AddDoubleLine (index .. ". |TInterface\\AddOns\\Details\\images\\classes_small_alpha:14:14:0:0:128:128:"..cords[1]*128 ..":"..cords[2]*128 ..":"..cords[3]*128 ..":"..cords[4]*128 .."|t " .. target [1], _detalhes:comma_value (target [2]), 1, 1, 1, 1, 1, 1)
end
else
if (info.target_persecond) then
GameTooltip:AddDoubleLine (index .. ". " .. target [1], _detalhes:comma_value ( _math_floor (target [2] / meu_tempo)), 1, 1, 1, 1, 1, 1)
else
GameTooltip:AddDoubleLine (index .. ". " .. target [1], _detalhes:comma_value (target [2]), 1, 1, 1, 1, 1, 1)
end
end
end
end
GameTooltip:Show()
else
GameTooltip:SetOwner (self, "ANCHOR_TOPRIGHT")
GameTooltip:AddLine (barra.index .. ". " .. barra.show)
GameTooltip:AddLine (info.target_text)
GameTooltip:AddLine (Loc ["STRING_NO_TARGET"], 1, 1, 1)
GameTooltip:AddLine (Loc ["STRING_MORE_INFO"], 1, 1, 1)
GameTooltip:Show()
end
else
GameTooltip:SetOwner (self, "ANCHOR_TOPRIGHT")
GameTooltip:AddLine (barra.index .. ". " .. barra.show)
GameTooltip:AddLine (info.target_text)
GameTooltip:AddLine (Loc ["STRING_NO_TARGET"], 1, 1, 1)
GameTooltip:AddLine (Loc ["STRING_MORE_INFO"], 1, 1, 1)
GameTooltip:Show()
end
self.texture:SetAlpha (1)
self:SetAlpha (1)
barra:GetScript("OnEnter")(barra)
end
local target_on_leave = function (self)
GameTooltip:Hide()
self:GetParent():GetParent():GetScript("OnLeave")(self:GetParent():GetParent())
self.texture:SetAlpha (.7)
self:SetAlpha (.7)
end
function gump:CriaNovaBarraInfo1 (instancia, index)
if (_detalhes.janela_info.barras1 [index]) then
@@ -2081,6 +2247,7 @@ function gump:CriaNovaBarraInfo1 (instancia, index)
local esta_barra = _CreateFrame ("Button", "Details_infobox1_bar_"..index, info.container_barras.gump)
esta_barra:SetWidth (300) --> tamanho da barra de acordo com o tamanho da janela
esta_barra:SetHeight (16) --> altura determinada pela instância
esta_barra.index = index
local y = (index-1)*17 --> 17 é a altura da barra
y = y*-1 --> baixo
@@ -2093,8 +2260,20 @@ function gump:CriaNovaBarraInfo1 (instancia, index)
esta_barra:EnableMouse (true)
esta_barra:RegisterForClicks ("LeftButtonDown","RightButtonUp")
esta_barra.targets = CreateFrame ("frame", "Details_infobox1_bar_"..index.."Targets", esta_barra)
esta_barra.targets:SetPoint ("right", esta_barra, "right")
esta_barra.targets:SetSize (15, 15)
esta_barra.targets.texture = esta_barra.targets:CreateTexture (nil, overlay)
esta_barra.targets.texture:SetTexture ([[Interface\MINIMAP\TRACKING\Target]])
esta_barra.targets.texture:SetAllPoints()
esta_barra.targets.texture:SetDesaturated (true)
esta_barra.targets:SetAlpha (.7)
esta_barra.targets.texture:SetAlpha (.7)
esta_barra.targets:SetScript ("OnEnter", target_on_enter)
esta_barra.targets:SetScript ("OnLeave", target_on_leave)
CriaTexturaBarra (instancia, esta_barra)
--> icone
esta_barra.miniframe = CreateFrame ("frame", nil, esta_barra)
esta_barra.miniframe:SetSize (14, 14)
+125
View File
@@ -2783,6 +2783,113 @@ function window:CreateFrame2()
window:CreateLineBackground2 (frame2, "timetypeDropdown", "timetypeLabel", Loc ["STRING_OPTIONS_TIMEMEASURE_DESC"])
--> Overall Data
g:NewLabel (frame2, _, "$parentOverallDataAnchor", "OverallDataLabel", Loc ["STRING_OPTIONS_OVERALL_ANCHOR"], "GameFontNormal")
--raid boss
g:NewLabel (frame2, _, "$parentOverallDataRaidBossLabel", "OverallDataRaidBossLabel", Loc ["STRING_OPTIONS_OVERALL_RAIDBOSS"], "GameFontHighlightLeft")
--
g:NewSwitch (frame2, _, "$parentOverallDataRaidBossSlider", "OverallDataRaidBossSlider", 60, 20, _, _, false)
frame2.OverallDataRaidBossSlider:SetPoint ("left", frame2.OverallDataRaidBossLabel, "right", 2, 0)
--
frame2.OverallDataRaidBossSlider.OnSwitch = function (self, _, value)
if (value) then
_detalhes.overall_flag = _detalhes.overall_flag + 0x1
else
_detalhes.overall_flag = _detalhes.overall_flag - 0x1
end
end
--
window:CreateLineBackground2 (frame2, "OverallDataRaidBossSlider", "OverallDataRaidBossLabel", Loc ["STRING_OPTIONS_OVERALL_RAIDBOSS_DESC"])
--raid cleanup
g:NewLabel (frame2, _, "$parentOverallDataRaidCleaupLabel", "OverallDataRaidCleaupLabel", Loc ["STRING_OPTIONS_OVERALL_RAIDCLEAN"], "GameFontHighlightLeft")
--
g:NewSwitch (frame2, _, "$parentOverallDataRaidCleaupSlider", "OverallDataRaidCleaupSlider", 60, 20, _, _, false)
frame2.OverallDataRaidCleaupSlider:SetPoint ("left", frame2.OverallDataRaidCleaupLabel, "right", 2, 0)
--
frame2.OverallDataRaidCleaupSlider.OnSwitch = function (self, _, value)
if (value) then
_detalhes.overall_flag = _detalhes.overall_flag + 0x2
else
_detalhes.overall_flag = _detalhes.overall_flag - 0x2
end
end
--
window:CreateLineBackground2 (frame2, "OverallDataRaidCleaupSlider", "OverallDataRaidCleaupLabel", Loc ["STRING_OPTIONS_OVERALL_RAIDCLEAN_DESC"])
--dungeon boss
g:NewLabel (frame2, _, "$parentOverallDataDungeonBossLabel", "OverallDataDungeonBossLabel", Loc ["STRING_OPTIONS_OVERALL_DUNGEONBOSS"], "GameFontHighlightLeft")
--
g:NewSwitch (frame2, _, "$parentOverallDataDungeonBossSlider", "OverallDataDungeonBossSlider", 60, 20, _, _, false)
frame2.OverallDataDungeonBossSlider:SetPoint ("left", frame2.OverallDataDungeonBossLabel, "right", 2, 0)
--
frame2.OverallDataDungeonBossSlider.OnSwitch = function (self, _, value)
if (value) then
_detalhes.overall_flag = _detalhes.overall_flag + 0x4
else
_detalhes.overall_flag = _detalhes.overall_flag - 0x4
end
end
--
window:CreateLineBackground2 (frame2, "OverallDataDungeonBossSlider", "OverallDataDungeonBossLabel", Loc ["STRING_OPTIONS_OVERALL_DUNGEONBOSS_DESC"])
--dungeon cleanup
g:NewLabel (frame2, _, "$parentOverallDataDungeonCleaupLabel", "OverallDataDungeonCleaupLabel", Loc ["STRING_OPTIONS_OVERALL_DUNGEONCLEAN"], "GameFontHighlightLeft")
--
g:NewSwitch (frame2, _, "$parentOverallDataDungeonCleaupSlider", "OverallDataDungeonCleaupSlider", 60, 20, _, _, false)
frame2.OverallDataDungeonCleaupSlider:SetPoint ("left", frame2.OverallDataDungeonCleaupLabel, "right", 2, 0)
--
frame2.OverallDataDungeonCleaupSlider.OnSwitch = function (self, _, value)
if (value) then
_detalhes.overall_flag = _detalhes.overall_flag + 0x8
else
_detalhes.overall_flag = _detalhes.overall_flag - 0x8
end
end
--
window:CreateLineBackground2 (frame2, "OverallDataDungeonCleaupSlider", "OverallDataDungeonCleaupLabel", Loc ["STRING_OPTIONS_OVERALL_DUNGEONCLEAN_DESC"])
--everything
g:NewLabel (frame2, _, "$parentOverallDataAllLabel", "OverallDataAllLabel", Loc ["STRING_OPTIONS_OVERALL_ALL"], "GameFontHighlightLeft")
--
g:NewSwitch (frame2, _, "$parentOverallDataAllSlider", "OverallDataAllSlider", 60, 20, _, _, false)
frame2.OverallDataAllSlider:SetPoint ("left", frame2.OverallDataAllLabel, "right", 2, 0)
--
frame2.OverallDataAllSlider.OnSwitch = function (self, _, value)
if (value) then
_detalhes.overall_flag = _detalhes.overall_flag + 0x10
else
_detalhes.overall_flag = _detalhes.overall_flag - 0x10
end
end
--
window:CreateLineBackground2 (frame2, "OverallDataAllSlider", "OverallDataAllLabel", Loc ["STRING_OPTIONS_OVERALL_ALL_DESC"])
--erase on new boss
g:NewLabel (frame2, _, "$parentOverallNewBossLabel", "OverallNewBossLabel", Loc ["STRING_OPTIONS_OVERALL_NEWBOSS"], "GameFontHighlightLeft")
--
g:NewSwitch (frame2, _, "$parentOverallNewBossSlider", "OverallNewBossSlider", 60, 20, _, _, false)
frame2.OverallNewBossSlider:SetPoint ("left", frame2.OverallNewBossLabel, "right", 2, 0)
--
frame2.OverallNewBossSlider.OnSwitch = function (self, _, value)
_detalhes:OverallOptions (value)
end
--
window:CreateLineBackground2 (frame2, "OverallNewBossSlider", "OverallNewBossLabel", Loc ["STRING_OPTIONS_OVERALL_NEWBOSS_DESC"])
--erase on challenge mode
g:NewLabel (frame2, _, "$parentOverallNewChallengeLabel", "OverallNewChallengeLabel", Loc ["STRING_OPTIONS_OVERALL_CHALLENGE"], "GameFontHighlightLeft")
--
g:NewSwitch (frame2, _, "$parentOverallNewChallengeSlider", "OverallNewChallengeSlider", 60, 20, _, _, false)
frame2.OverallNewChallengeSlider:SetPoint ("left", frame2.OverallNewChallengeLabel, "right", 2, 0)
--
frame2.OverallNewChallengeSlider.OnSwitch = function (self, _, value)
_detalhes:OverallOptions (nil, value)
end
--
window:CreateLineBackground2 (frame2, "OverallNewChallengeSlider", "OverallNewChallengeLabel", Loc ["STRING_OPTIONS_OVERALL_CHALLENGE_DESC"])
--> anchors
--general anchor
g:NewLabel (frame2, _, "$parentGeneralAnchor", "GeneralAnchorLabel", Loc ["STRING_OPTIONS_GENERAL_ANCHOR"], "GameFontNormal")
@@ -2796,6 +2903,15 @@ function window:CreateFrame2()
{"GeneralAnchorLabel", 1, true},
{"fragsPvpLabel", 2},
{"timetypeLabel", 3},
{"OverallDataLabel", 4, true},
{"OverallDataRaidBossLabel", 5},
{"OverallDataRaidCleaupLabel", 6},
{"OverallDataDungeonBossLabel", 7},
{"OverallDataDungeonCleaupLabel", 8},
{"OverallDataAllLabel", 9},
{"OverallNewBossLabel", 10},
{"OverallNewChallengeLabel", 11},
}
window:arrange_menu (frame2, left_side, x, window.top_start_at)
@@ -5768,6 +5884,15 @@ function window:update_all (editing_instance)
_G.DetailsOptionsWindow2FragsPvpSlider.MyObject:SetValue (_detalhes.only_pvp_frags)
_G.DetailsOptionsWindow2TTDropdown.MyObject:Select (_detalhes.time_type)
_G.DetailsOptionsWindow2OverallDataRaidBossSlider.MyObject:SetValue (bit.band (_detalhes.overall_flag, 0x1) ~= 0)
_G.DetailsOptionsWindow2OverallDataRaidCleaupSlider.MyObject:SetValue (bit.band (_detalhes.overall_flag, 0x2) ~= 0)
_G.DetailsOptionsWindow2OverallDataDungeonBossSlider.MyObject:SetValue (bit.band (_detalhes.overall_flag, 0x4) ~= 0)
_G.DetailsOptionsWindow2OverallDataDungeonCleaupSlider.MyObject:SetValue (bit.band (_detalhes.overall_flag, 0x8) ~= 0)
_G.DetailsOptionsWindow2OverallDataAllSlider.MyObject:SetValue (bit.band (_detalhes.overall_flag, 0x10) ~= 0)
_G.DetailsOptionsWindow2OverallNewBossSlider.MyObject:SetValue (_detalhes.overall_clear_newboss)
_G.DetailsOptionsWindow2OverallNewChallengeSlider.MyObject:SetValue (_detalhes.overall_clear_newchallenge)
--> window 3
_G.DetailsOptionsWindow3SkinDropdown.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow3SkinDropdown.MyObject:Select (editing_instance.skin)
+30 -23
View File
@@ -3788,7 +3788,9 @@ local build_segment_list = function (self, elapsed)
if (thisCombat.is_boss and thisCombat.is_boss.name) then
if (thisCombat.is_boss.killed) then
if (thisCombat.instance_type == "party") then
CoolTip:AddLine (thisCombat.is_boss.name .." (#"..i..")", _, 1, {170/255, 167/255, 255/255, 1})
elseif (thisCombat.is_boss.killed) then
CoolTip:AddLine (thisCombat.is_boss.name .." (#"..i..")", _, 1, "lime")
else
CoolTip:AddLine (thisCombat.is_boss.name .." (#"..i..")", _, 1, "red")
@@ -3803,6 +3805,14 @@ local build_segment_list = function (self, elapsed)
local background = _detalhes:GetRaidIcon (thisCombat.is_boss.mapid)
if (background) then
CoolTip:SetWallpaper (2, background, nil, {1, 1, 1, 0.5})
elseif (thisCombat.instance_type == "party") then
local ej_id = thisCombat.is_boss.ej_instance_id
if (ej_id) then
local name, description, bgImage, buttonImage, loreImage, dungeonAreaMapID, link = EJ_GetInstanceInfo (ej_id)
if (bgImage) then
CoolTip:SetWallpaper (2, bgImage, {0.09, 0.698125, 0, 0.833984375}, {1, 1, 1, 0.5})
end
end
end
else
@@ -3869,7 +3879,17 @@ local build_segment_list = function (self, elapsed)
end
local background = _detalhes:GetRaidIcon (_detalhes.tabela_vigente.is_boss.mapid)
CoolTip:SetWallpaper (2, background, nil, {1, 1, 1, 0.5})
if (background) then
CoolTip:SetWallpaper (2, background, nil, {1, 1, 1, 0.5})
elseif (_detalhes.tabela_vigente.instance_type == "party") then
local ej_id = _detalhes.tabela_vigente.is_boss.ej_instance_id
if (ej_id) then
local name, description, bgImage, buttonImage, loreImage, dungeonAreaMapID, link = EJ_GetInstanceInfo (ej_id)
if (bgImage) then
CoolTip:SetWallpaper (2, bgImage, {0.09, 0.698125, 0, 0.833984375}, {1, 1, 1, 0.5})
end
end
end
else
CoolTip:SetWallpaper (2, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-StatsBackground]], {0.5078125, 0.1171875, 0.017578125, 0.1953125}, {1, 1, 1, .5})
end
@@ -5124,11 +5144,16 @@ end
GameCooltip:SetOption ("TextHeightMod", 0)
GameCooltip:SetOption ("IgnoreButtonAutoHeight", false)
GameCooltip:AddLine (Loc ["STRING_ERASE_DATA"], nil, 1, "white", nil, 10, SharedMedia:Fetch ("font", "Friz Quadrata TT"))
--GameCooltip:AddIcon ([[Interface\Buttons\UI-MinusButton-Up]], 1, 1)
GameCooltip:AddIcon ([[Interface\PetBattles\DeadPetIcon]], 1, 1)
local font = SharedMedia:Fetch ("font", "Friz Quadrata TT")
GameCooltip:AddLine (Loc ["STRING_ERASE_DATA"], nil, 1, "white", nil, 10, font)
GameCooltip:AddIcon ([[Interface\Buttons\UI-StopButton]], 1, 1, 14, 14, 0, 1, 0, 1, "red")
GameCooltip:AddMenu (1, _detalhes.tabela_historico.resetar)
GameCooltip:AddLine (Loc ["STRING_ERASE_DATA_OVERALL"], nil, 1, "white", nil, 10, font)
GameCooltip:AddIcon ([[Interface\Buttons\UI-StopButton]], 1, 1, 14, 14, 0, 1, 0, 1, "orange")
GameCooltip:AddMenu (1, _detalhes.tabela_historico.resetar_overall)
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
show_anti_overlap (self.instance, self, "top")
@@ -5761,24 +5786,6 @@ function gump:CriaCabecalho (baseframe, instancia)
baseframe.cabecalho.reset:SetHighlightTexture ([[Interface\Addons\Details\Images\reset_button]])
baseframe.cabecalho.reset:SetPushedTexture ([[Interface\Addons\Details\Images\reset_button]])
--[[
if (_G.GameCooltip.active) then
local passou = 0
self:SetScript ("OnUpdate", function (self, elapsed)
passou = passou+elapsed
if (passou > 0.3) then
if (not _G.GameCooltip.mouse_over and not _G.GameCooltip.button_over) then
_G.GameCooltip:ShowMe (false)
end
self:SetScript ("OnUpdate", nil)
end
end)
else
self:SetScript ("OnUpdate", nil)
end
end)
--]]
--> fim botão reset
--> Botão de Ajuda ----------------------------------------------------------------------------------------------------------------------------------------------------
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,361 @@
local MoguShanPalace = {
id = 994,
ej_id = 321,
name = "Mogu'Shan Palace",
boss_names = {
"Trial of the King",
"Gekkan",
"Xin the Weaponmaster",
},
boss_ids = {
--debug
--[61945] = 2,
[61445] = 1, --haiayn
[61442] = 1, --kuai
[61453] = 1, --mushiba
[61444] = 1, --ming
--[61337] = 2, --ironhide
--[61340] = 2, --hexxer
--[61339] = 2, --oracle
[61243] = 2, --gekkan
--[61338] = 2, --skulker
[61398] = 3, --xin
},
encounters = {
[1] = {
boss = "Trial of the King",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Ming the Cunning]],
},
[2] = {
boss = "Gekkan",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Gekkan]],
},
[3] = {
boss = "Xin the Weaponmaster",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Xin the Weaponmaster]],
},
},
}
_detalhes:InstallEncounter (MoguShanPalace)
local TempleOfJadeSerpent = {
id = 960,
ej_id = 313,
name = "Temple of the Jade Serpent",
boss_names = {
"Wise Mari",
"Lorewalker Stonestep",
"Liu Flameheart",
"Sha of Doubt",
},
boss_ids = {
[56448] = 1, --wise mary
[56843] = 2, --lorewalker stonestep
[59051] = 2, --strife
[59726] = 2, --peril
[56872] = 2, --osong
[56732] = 3, --liu framehearth
[56762] = 3, --yulon
[56439] = 4, --sha of doubt
[56792] = 4, --add
},
encounters = {
[1] = {
boss = "Wise Mari",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Wise Mari]],
},
[2] = {
boss = "Lorewalker Stonestep",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Lorewalker Stonestep]],
},
[3] = {
boss = "Liu Flameheart",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Liu Flameheart]],
},
[4] = {
boss = "Sha of Doubt",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Sha of Doubt]],
},
},
}
_detalhes:InstallEncounter (TempleOfJadeSerpent)
local StormsStoutBrewery = {
id = 961,
ej_id = 302,
name = "Stormstout Brewery",
boss_names = {
"Ook-Ook",
"Hoptallus",
"Yan-Zhu the Uncasked",
},
boss_ids = {
[56637] = 1, --ook-ook
[56717] = 2, --hoptallus
[59479] = 3, --yan-zhu
},
encounters = {
[1] = {
boss = "Ook-Ook",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Ook Ook]],
},
[2] = {
boss = "Hoptallus",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Hoptallus]],
},
[3] = {
boss = "Yan-Zhu the Uncasked",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Yan Zhu the Uncasked]],
},
},
}
_detalhes:InstallEncounter (StormsStoutBrewery)
local ScarletHalls = {
id = 1001,
name = "Scarlet Halls",
boss_names = {
"Houndmaster Braun",
"Armsmaster Harlan",
"Flameweaver Koegler",
},
boss_ids = {
[0] = 1, --
[0] = 2, --
[0] = 3, --
},
encounters = {
[1] = {
boss = "Houndmaster Braun",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Houndmaster Braun]],
},
[2] = {
boss = "Armsmaster Harlan",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Armsmaster Harlan]],
},
[3] = {
boss = "Flameweaver Koegler",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Flameweaver Koegler]],
},
},
}
_detalhes:InstallEncounter (ScarletHalls)
local ShadoPanMonastery = {
id = 959,
name = "Shado-Pan Monastery",
boss_names = {
"Gu Cloudstrike",
"Master Snowdrift",
"Sha of Violence",
"Taran Zhu",
},
boss_ids = {
[0] = 1, --
[0] = 2, --
[0] = 3, --
},
encounters = {
[1] = {
boss = "Gu Cloudstrike",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Gu Cloudstrike]],
},
[2] = {
boss = "Master Snowdrift",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Master Snowdrift]],
},
[3] = {
boss = "Sha of Violence",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Sha of Violence]],
},
[4] = {
boss = "Taran Zhu",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Taran Zhu]],
},
},
}
_detalhes:InstallEncounter (ShadoPanMonastery)
local ScarletMonastery = {
id = 1004,
name = "Scarlet Monastery",
boss_names = {
"Thalnos the Soulrender",
"Brother Korloff",
"High Inquisitor Whitemane",
},
boss_ids = {
[0] = 1, --
[0] = 2, --
[0] = 3, --
},
encounters = {
[1] = {
boss = "Thalnos the Soulrender",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Thalnos the Soulrender]],
},
[2] = {
boss = "Brother Korloff",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Brother Korloff]],
},
[3] = {
boss = "High Inquisitor Whitemane",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-High Inquisitor Whitemane]],
},
},
}
_detalhes:InstallEncounter (ScarletMonastery)
local SiegeOfNiuzaoTemple = {
id = 1011,
name = "Siege of Niuzao Temple",
boss_names = {
"Vizier Jin'bak",
"Commander Vo'jak",
"General Pa'valak",
"Wing Leader Ner'onok",
},
boss_ids = {
[0] = 1, --
[0] = 2, --
[0] = 3, --
},
encounters = {
[1] = {
boss = "Vizier Jin'bak",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Vizier Jinbak]],
},
[2] = {
boss = "Commander Vo'jak",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Commander Vojak]],
},
[3] = {
boss = "General Pa'valak",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-General Pavalak]],
},
[4] = {
boss = "Wing Leader Ner'onok",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Wing Leader Neronok]],
},
},
}
_detalhes:InstallEncounter (SiegeOfNiuzaoTemple)
local GateOfSettingSun = {
id = 962,
name = "Gate of the Setting Sun",
boss_names = {
"Saboteur Kip'tilak",
"Striker Ga'dok",
"Commander Ri'mok",
"Raigonn",
},
boss_ids = {
[0] = 1, --
[0] = 2, --
[0] = 3, --
},
encounters = {
[1] = {
boss = "Saboteur Kip'tilak",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Saboteur Kiptilak]],
},
[2] = {
boss = "Striker Ga'dok",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Striker Gadok]],
},
[3] = {
boss = "Commander Ri'mok",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Commander Rimok]],
},
[4] = {
boss = "Raigonn",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Raigonn]],
},
},
}
_detalhes:InstallEncounter (GateOfSettingSun)
local Scholomance = {
id = 1007,
name = "Scholomance",
boss_names = {
"Instructor Chillheart",
"Jandice Barov",
"Rattlegore",
"Lilian Voss",
"Darkmaster Gandling",
},
boss_ids = {
[0] = 1, --
[0] = 2, --
[0] = 3, --
},
encounters = {
[1] = {
boss = "Instructor Chillheart",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Instructor Chillheart]],
},
[2] = {
boss = "Jandice Barov",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Jandice Barov]],
},
[3] = {
boss = "Rattlegore",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Rattlegore]],
},
[4] = {
boss = "Lilian Voss",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Lillian Voss]],
},
[5] = {
boss = "Darkmaster Gandling",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Darkmaster Gandling]],
},
},
}
_detalhes:InstallEncounter (Scholomance)
@@ -0,0 +1,6 @@
## Interface: 50400
## Title: Details: Mists of Pandaria Dungeons
## Notes: Plugin for Details
## RequiredDeps: Details
Details_DungeonInfo-Pandaria.lua
+8 -4
View File
@@ -63,6 +63,8 @@ function _G._detalhes:Start()
--cc breaks, ress, interrupts, dispells, deaths
self.row_singleclick_overwrite [4] = {true, true, true, true, self.atributo_misc.ReportSingleDeadLine, self.atributo_misc.ReportSingleCooldownLine, self.atributo_misc.ReportSingleBuffUptimeLine, self.atributo_misc.ReportSingleDebuffUptimeLine}
self.click_to_report_color = {1, 0.8, 0, 1}
--self.click_to_report_color = {0, 1, 0, 1}
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> initialize
@@ -187,7 +189,9 @@ function _G._detalhes:Start()
--> start garbage collector
self.ultima_coleta = 0
self.intervalo_coleta = 720
--self.intervalo_coleta = 10
self.intervalo_memoria = 180
--self.intervalo_memoria = 20
self.garbagecollect = self:ScheduleRepeatingTimer ("IniciarColetaDeLixo", self.intervalo_coleta)
self.memorycleanup = self:ScheduleRepeatingTimer ("CheckMemoryPeriodically", self.intervalo_memoria)
self.next_memory_check = time()+self.intervalo_memoria
@@ -342,11 +346,11 @@ function _G._detalhes:Start()
end
--_detalhes:OpenWelcomeWindow()
-- _detalhes:OpenWelcomeWindow()
--desligado por preocaução
if (self.tutorial.logons < 2) then
--self:StartTutorial()
--desligado por precaução
if (self.tutorial.logons < 2 and self.is_first_run) then
self:StartTutorial()
end
--> feedback trhead