Small bug fixes and improvements

This commit is contained in:
Tercio Jose
2022-10-10 13:26:13 -03:00
parent b588d5e30c
commit 1ed29008aa
119 changed files with 6556 additions and 6650 deletions
+116 -121
View File
@@ -1,24 +1,21 @@
-- combat class object
local _detalhes = _G._detalhes
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
local _
--[[global]] DETAILS_TOTALS_ONLYGROUP = true
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--local pointers
local _setmetatable = setmetatable -- lua local
local _ipairs = ipairs -- lua local
local ipairs = ipairs -- lua local
local _pairs = pairs -- lua local
local _bit_band = bit.band -- lua local
local _date = date -- lua local
local _table_remove = table.remove -- lua local
local _rawget = rawget
local tremove = table.remove -- lua local
local rawget = rawget
local _math_max = math.max
local _math_floor = math.floor
local _GetTime = GetTime
local floor = math.floor
local GetTime = GetTime
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--constants
@@ -29,13 +26,13 @@
local class_type_cura = _detalhes.atributos.cura
local class_type_e_energy = _detalhes.atributos.e_energy
local class_type_misc = _detalhes.atributos.misc
local REACTION_HOSTILE = 0x00000040
local CONTROL_PLAYER = 0x00000100
--local _tempo = time()
local _tempo = _GetTime()
local _tempo = GetTime()
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--api functions
@@ -52,54 +49,54 @@
function combate:GetDate()
return self.data_inicio, self.data_fim
end
--set the combat date
function combate:SetDate (started, ended)
if (started and type (started) == "string") then
if (started and type(started) == "string") then
self.data_inicio = started
end
if (ended and type (ended) == "string") then
if (ended and type(ended) == "string") then
self.data_fim = ended
end
end
end
--return data for charts
function combate:GetTimeData (name)
return self.TimeData [name]
end
function combate:GetContainer (attribute)
return self [attribute]
end
function combate:GetRoster()
return self.raid_roster
end
function combate:InstanceType()
return _rawget (self, "instance_type")
return rawget (self, "instance_type")
end
function combate:IsTrash()
return _rawget (self, "is_trash")
return rawget (self, "is_trash")
end
function combate:GetDifficulty()
return self.is_boss and self.is_boss.diff
end
function combate:GetBossInfo()
return self.is_boss
end
function combate:GetPhases()
return self.PhaseData
end
function combate:GetPvPInfo()
return self.is_pvp
end
function combate:GetMythicDungeonInfo()
return self.is_mythic_dungeon
end
@@ -107,21 +104,21 @@
function combate:GetMythicDungeonTrashInfo()
return self.is_mythic_dungeon_trash
end
function combate:IsMythicDungeon()
local is_segment = self.is_mythic_dungeon_segment
local run_id = self.is_mythic_dungeon_run_id
return is_segment, run_id
end
function combate:IsMythicDungeonOverall()
return self.is_mythic_dungeon and self.is_mythic_dungeon.OverallSegment
end
function combate:GetArenaInfo()
return self.is_arena
end
function combate:GetDeaths()
return self.last_events_tables
end
@@ -144,29 +141,29 @@
function combate:GetCombatId()
return self.combat_id
end
function combate:GetCombatNumber()
return self.combat_counter
end
function combate:GetAlteranatePower()
return self.alternate_power
end
--return the name of the encounter or enemy
function combate:GetCombatName (try_find)
function combate:GetCombatName(try_find)
if (self.is_pvp) then
return self.is_pvp.name
elseif (self.is_boss) then
return self.is_boss.encounter
elseif (self.is_mythic_dungeon_trash) then
return self.is_mythic_dungeon_trash.ZoneName .. " (" .. Loc ["STRING_SEGMENTS_LIST_TRASH"] .. ")"
elseif (_rawget (self, "is_trash")) then
elseif (rawget (self, "is_trash")) then
return Loc ["STRING_SEGMENT_TRASH"]
else
if (self.enemy) then
return self.enemy
@@ -177,27 +174,27 @@
end
return Loc ["STRING_UNKNOW"]
end
--[[global]] DETAILS_SEGMENTID_OVERALL = -1
--[[global]] DETAILS_SEGMENTID_CURRENT = 0
--enum segments type
--[[global]] DETAILS_SEGMENTTYPE_GENERIC = 0
--[[global]] DETAILS_SEGMENTTYPE_OVERALL = 1
--[[global]] DETAILS_SEGMENTTYPE_DUNGEON_TRASH = 5
--[[global]] DETAILS_SEGMENTTYPE_DUNGEON_BOSS = 6
--[[global]] DETAILS_SEGMENTTYPE_RAID_TRASH = 7
--[[global]] DETAILS_SEGMENTTYPE_RAID_BOSS = 8
--[[global]] DETAILS_SEGMENTTYPE_MYTHICDUNGEON_GENERIC = 10
--[[global]] DETAILS_SEGMENTTYPE_MYTHICDUNGEON_TRASH = 11
--[[global]] DETAILS_SEGMENTTYPE_MYTHICDUNGEON_OVERALL = 12
--[[global]] DETAILS_SEGMENTTYPE_MYTHICDUNGEON_TRASHOVERALL = 13
--[[global]] DETAILS_SEGMENTTYPE_MYTHICDUNGEON_BOSS = 14
--[[global]] DETAILS_SEGMENTTYPE_PVP_ARENA = 20
--[[global]] DETAILS_SEGMENTTYPE_PVP_BATTLEGROUND = 21
@@ -216,31 +213,31 @@
elseif (isMythicDungeonTrashOverall) then
return DETAILS_SEGMENTTYPE_MYTHICDUNGEON_TRASHOVERALL
end
local bossEncounter = self.is_boss
if (bossEncounter) then
return DETAILS_SEGMENTTYPE_MYTHICDUNGEON_BOSS
end
return DETAILS_SEGMENTTYPE_MYTHICDUNGEON_GENERIC
end
end
--arena
local arenaInfo = self.is_arena
if (arenaInfo) then
return DETAILS_SEGMENTTYPE_PVP_ARENA
end
--battleground
local battlegroundInfo = self.is_pvp
if (battlegroundInfo) then
return DETAILS_SEGMENTTYPE_PVP_BATTLEGROUND
end
--dungeon or raid
local instanceType = self.instance_type
if (instanceType == "party") then
local bossEncounter = self.is_boss
if (bossEncounter) then
@@ -248,7 +245,7 @@
else
return DETAILS_SEGMENTTYPE_DUNGEON_TRASH
end
elseif (instanceType == "raid") then
local bossEncounter = self.is_boss
if (bossEncounter) then
@@ -257,12 +254,12 @@
return DETAILS_SEGMENTTYPE_RAID_TRASH
end
end
--overall data
if (self == _detalhes.tabela_overall) then
return DETAILS_SEGMENTTYPE_OVERALL
end
return DETAILS_SEGMENTTYPE_GENERIC
end
@@ -271,38 +268,38 @@
return self [container]._ActorTable
end
function combate:GetActor (container, name)
function combate:GetActor(container, name)
local index = self [container] and self [container]._NameIndexTable [name]
if (index) then
return self [container]._ActorTable [index]
end
return nil
end
--return the combat time in seconds
function combate:GetFormatedCombatTime()
local time = self:GetCombatTime()
local m, s = _math_floor(time/60), _math_floor(time%60)
local combatTime = self:GetCombatTime()
local m, s = floor(combatTime/60), floor(combatTime%60)
return m, s
end
function combate:GetCombatTime()
if (self.end_time) then
return _math_max (self.end_time - self.start_time, 0.1)
elseif (self.start_time and _detalhes.in_combat and self ~= _detalhes.tabela_overall) then
return _math_max (_GetTime() - self.start_time, 0.1)
return _math_max (GetTime() - self.start_time, 0.1)
else
return 0.1
end
end
function combate:GetStartTime()
return self.start_time
end
function combate:SetStartTime (t)
self.start_time = t
end
function combate:GetEndTime()
return self.end_time
end
@@ -312,7 +309,7 @@
--return the total of a specific attribute
local power_table = {0, 1, 3, 6, 0, "alternatepower"}
function combate:GetTotal (attribute, subAttribute, onlyGroup)
if (attribute == 1 or attribute == 2) then
if (onlyGroup) then
@@ -320,7 +317,7 @@
else
return self.totals [attribute]
end
elseif (attribute == 3) then
if (subAttribute == 5) then --resources
return self.totals.resources or 0
@@ -330,7 +327,7 @@
else
return self.totals [attribute] [power_table [subAttribute]]
end
elseif (attribute == 4) then
local subName = _detalhes:GetInternalSubAttributeName (attribute, subAttribute)
if (onlyGroup) then
@@ -339,18 +336,16 @@
return self.totals [attribute] [subName]
end
end
return 0
end
function combate:CreateAlternatePowerTable (actorName)
local t = {last = 0, total = 0}
self.alternate_power [actorName] = t
return t
end
local tremove = _G.tremove
--delete an actor from the combat ~delete ~erase ~remove
function combate:DeleteActor(attribute, actorName, removeDamageTaken, cannotRemap)
local container = self[attribute]
@@ -369,7 +364,7 @@
for i = 1, #actorTable do
local actor = actorTable[i]
if (actor.nome == actorName) then
--print ("Details: found the actor: ", actorName, actor.nome, i)
--print("Details: found the actor: ", actorName, actor.nome, i)
indexToDelete = i
break
end
@@ -412,7 +407,7 @@
if (indexToDelete) then
local actorToDelete = self(attribute, actorName)
local actorToDelete2 = container._ActorTable[indexToDelete]
if (actorToDelete ~= actorToDelete2) then
Details:Msg("error 0xDE8745")
end
@@ -445,18 +440,18 @@
function combate:NovaTabela (iniciada, _tabela_overall, combatId, ...)
local esta_tabela = {true, true, true, true, true}
esta_tabela [1] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_DAMAGE_CLASS, esta_tabela, combatId) --Damage
esta_tabela [2] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_HEAL_CLASS, esta_tabela, combatId) --Healing
esta_tabela [3] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_ENERGY_CLASS, esta_tabela, combatId) --Energies
esta_tabela [4] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS, esta_tabela, combatId) --Misc
esta_tabela [5] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_DAMAGE_CLASS, esta_tabela, combatId) --place holder for customs
_setmetatable (esta_tabela, combate)
setmetatable(esta_tabela, combate)
_detalhes.combat_counter = _detalhes.combat_counter + 1
esta_tabela.combat_counter = _detalhes.combat_counter
--try discover if is a pvp combat
local who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags = ...
if (who_serial) then --aqui ir identificar o boss ou o oponente
@@ -479,45 +474,45 @@
esta_tabela.data_fim = 0
esta_tabela.data_inicio = 0
esta_tabela.tempo_start = _tempo
--record deaths
esta_tabela.last_events_tables = {}
--last events from players
esta_tabela.player_last_events = {}
--players in the raid
esta_tabela.raid_roster = {}
esta_tabela.raid_roster_indexed = {}
--frags
esta_tabela.frags = {}
esta_tabela.frags_need_refresh = false
--alternate power
esta_tabela.alternate_power = {}
--time data container
esta_tabela.TimeData = _detalhes:TimeDataCreateCombatTables()
esta_tabela.PhaseData = {{1, 1}, damage = {}, heal = {}, damage_section = {}, heal_section = {}} --[1] phase number [2] phase started
--for external plugin usage, these tables are guaranteed to be saved with the combat
esta_tabela.spells_cast_timeline = {}
esta_tabela.aura_timeline = {}
esta_tabela.cleu_timeline = {}
--cleu events
esta_tabela.cleu_events = {
n = 1 --event counter
}
--Skill cache (not used)
esta_tabela.CombatSkillCache = {}
-- a tabela sem o tempo de inicio a tabela descartavel do inicio do addon
if (iniciada) then
--esta_tabela.start_time = _tempo
esta_tabela.start_time = _GetTime()
esta_tabela.start_time = GetTime()
esta_tabela.end_time = nil
else
esta_tabela.start_time = 0
@@ -530,7 +525,7 @@
esta_tabela[3].need_refresh = true
esta_tabela[4].need_refresh = true
esta_tabela[5].need_refresh = true
if (_tabela_overall) then --link a tabela de combate do overall
esta_tabela[1].shadow = _tabela_overall[1]
esta_tabela[2].shadow = _tabela_overall[2]
@@ -558,13 +553,13 @@
buff_uptime = 0, --armazena quantos cooldowns a raid usou
debuff_uptime = 0 --armazena quantos cooldowns a raid usou
},
--avoid using this values bellow, they aren't updated by the parser, only on demand by a user interaction.
voidzone_damage = 0,
frags_total = 0,
--end
}
esta_tabela.totals_grupo = {
0, --dano
0, --cura
@@ -574,13 +569,13 @@
[3] = 0, --energy (rogues cat)
[6] = 0, --runepower (dk)
alternatepower = 0,
},
},
{--misc
cc_break = 0, --armazena quantas quebras de CC
ress = 0, --armazena quantos pessoas ele reviveu
interrupt = 0, --armazena quantos interrupt a pessoa deu
dispell = 0, --armazena quantos dispell esta pessoa recebeu
dead = 0, --armazena quantas vezes essa oessia morreu
dead = 0, --armazena quantas vezes essa oessia morreu
cooldowns_defensive = 0, --armazena quantos cooldowns a raid usou
buff_uptime = 0,
debuff_uptime = 0
@@ -606,7 +601,7 @@
--trava o tempo dos jogadores aps o trmino do combate.
function combate:TravarTempos()
if (self [1]) then
for _, jogador in _ipairs(self [1]._ActorTable) do --damage
for _, jogador in ipairs(self [1]._ActorTable) do --damage
if (jogador:Iniciar()) then -- retorna se ele esta com o dps ativo
jogador:TerminarTempo()
jogador:Iniciar (false) --trava o dps do jogador
@@ -621,7 +616,7 @@
end
end
if (self [2]) then
for _, jogador in _ipairs(self [2]._ActorTable) do --healing
for _, jogador in ipairs(self [2]._ActorTable) do --healing
if (jogador:Iniciar()) then -- retorna se ele esta com o dps ativo
jogador:TerminarTempo()
jogador:Iniciar (false) --trava o dps do jogador
@@ -647,11 +642,11 @@
function combate:seta_tempo_decorrido()
--self.end_time = _tempo
self.end_time = _GetTime()
self.end_time = GetTime()
end
function _detalhes.refresh:r_combate (tabela_combate, shadow)
_setmetatable (tabela_combate, _detalhes.combate)
setmetatable(tabela_combate, _detalhes.combate)
tabela_combate.__index = _detalhes.combate
tabela_combate.shadow = shadow
end
@@ -671,50 +666,50 @@
end
--sub dano
for index, actor_T2 in _ipairs(combate2[1]._ActorTable) do
for index, actor_T2 in ipairs(combate2[1]._ActorTable) do
local actor_T1 = combate1[1]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
actor_T1 = actor_T1 - actor_T2
actor_T2:subtract_total (combate1)
end
combate1 [1].need_refresh = true
--sub heal
for index, actor_T2 in _ipairs(combate2[2]._ActorTable) do
for index, actor_T2 in ipairs(combate2[2]._ActorTable) do
local actor_T1 = combate1[2]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
actor_T1 = actor_T1 - actor_T2
actor_T2:subtract_total (combate1)
end
combate1 [2].need_refresh = true
--sub energy
for index, actor_T2 in _ipairs(combate2[3]._ActorTable) do
for index, actor_T2 in ipairs(combate2[3]._ActorTable) do
local actor_T1 = combate1[3]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
actor_T1 = actor_T1 - actor_T2
actor_T2:subtract_total (combate1)
end
combate1 [3].need_refresh = true
--sub misc
for index, actor_T2 in _ipairs(combate2[4]._ActorTable) do
for index, actor_T2 in ipairs(combate2[4]._ActorTable) do
local actor_T1 = combate1[4]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
actor_T1 = actor_T1 - actor_T2
actor_T2:subtract_total (combate1)
end
combate1 [4].need_refresh = true
--reduz o tempo
--reduz o tempo
combate1.start_time = combate1.start_time + combate2:GetCombatTime()
--apaga as mortes da luta diminuida
local amt_mortes = #combate2.last_events_tables --quantas mortes teve nessa luta
if (amt_mortes > 0) then
for i = #combate1.last_events_tables, #combate1.last_events_tables-amt_mortes, -1 do
_table_remove (combate1.last_events_tables, #combate1.last_events_tables)
for i = #combate1.last_events_tables, #combate1.last_events_tables-amt_mortes, -1 do
tremove(combate1.last_events_tables, #combate1.last_events_tables)
end
end
--frags
for fragName, fragAmount in pairs(combate2.frags) do
for fragName, fragAmount in pairs(combate2.frags) do
if (fragAmount) then
if (combate1.frags [fragName]) then
combate1.frags [fragName] = combate1.frags [fragName] - fragAmount
@@ -724,19 +719,19 @@
end
end
combate1.frags_need_refresh = true
--alternate power
local overallPowerTable = combate1.alternate_power
for actorName, powerTable in pairs(combate2.alternate_power) do
for actorName, powerTable in pairs(combate2.alternate_power) do
local power = overallPowerTable [actorName]
if (power) then
power.total = power.total - powerTable.total
end
combate2.alternate_power [actorName].last = 0
end
return combate1
end
combate.__add = function(combate1, combate2)
@@ -746,11 +741,11 @@
if (combate1 ~= _detalhes.tabela_overall) then
custom_combat = combate1
end
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, custom_combat)
elseif (class_type == class_type_cura) then
@@ -760,16 +755,16 @@
elseif (class_type == class_type_misc) then
shadow = _detalhes.atributo_misc:r_connect_shadow (actor, true, custom_combat)
end
shadow.boss_fight_component = actor.boss_fight_component or shadow.boss_fight_component
shadow.fight_component = actor.fight_component or shadow.fight_component
shadow.grupo = actor.grupo or shadow.grupo
end
end
--alternate power
local overallPowerTable = combate1.alternate_power
for actorName, powerTable in pairs(combate2.alternate_power) do
for actorName, powerTable in pairs(combate2.alternate_power) do
local power = overallPowerTable [actorName]
if (not power) then
power = combate1:CreateAlternatePowerTable (actorName)
+129 -129
View File
@@ -15,14 +15,14 @@
local _table_insert = table.insert --lua local
local _table_size = table.getn --lua local
local _setmetatable = setmetatable --lua local
local _ipairs = ipairs --lua local
local ipairs = ipairs --lua local
local _pairs = pairs --lua local
local _rawget= rawget --lua local
local _math_min = math.min --lua local
local _math_max = math.max --lua local
local _bit_band = bit.band --lua local
local _unpack = unpack --lua local
local _type = type --lua local
local type = type --lua local
local _pcall = pcall -- lua local
local _GetSpellInfo = _detalhes.getspellinfo -- api local
@@ -34,7 +34,7 @@
local _GetUnitName = GetUnitName -- api local
local _string_replace = _detalhes.string.replace --details api
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--constants
@@ -116,7 +116,7 @@
DetailsFramework:SetEnvironment(func)
_detalhes.custom_function_cache [instance.customName] = func
else
_detalhes:Msg ("|cFFFF9900error compiling code for custom display " .. (instance.customName or "") .. " |r:", errortext)
_detalhes:Msg("|cFFFF9900error compiling code for custom display " .. (instance.customName or "") .. " |r:", errortext)
end
if (custom_object.tooltip) then
@@ -125,7 +125,7 @@
DetailsFramework:SetEnvironment(tooltip_script)
_detalhes.custom_function_cache [instance.customName .. "Tooltip"] = tooltip_script
else
_detalhes:Msg ("|cFFFF9900error compiling tooltip code for custom display " .. (instance.customName or "") .. " |r:", errortext)
_detalhes:Msg("|cFFFF9900error compiling tooltip code for custom display " .. (instance.customName or "") .. " |r:", errortext)
end
end
@@ -135,7 +135,7 @@
DetailsFramework:SetEnvironment(total_script)
_detalhes.custom_function_cache [instance.customName .. "Total"] = total_script
else
_detalhes:Msg ("|cFFFF9900error compiling total code for custom display " .. (instance.customName or "") .. " |r:", errortext)
_detalhes:Msg("|cFFFF9900error compiling total code for custom display " .. (instance.customName or "") .. " |r:", errortext)
end
end
@@ -145,19 +145,19 @@
DetailsFramework:SetEnvironment(percent_script)
_detalhes.custom_function_cache [instance.customName .. "Percent"] = percent_script
else
_detalhes:Msg ("|cFFFF9900error compiling percent code for custom display " .. (instance.customName or "") .. " |r:", errortext)
_detalhes:Msg("|cFFFF9900error compiling percent code for custom display " .. (instance.customName or "") .. " |r:", errortext)
end
end
end
if (not func) then
_detalhes:Msg (Loc ["STRING_CUSTOM_FUNC_INVALID"], func)
_detalhes:Msg(Loc ["STRING_CUSTOM_FUNC_INVALID"], func)
_detalhes:EndRefresh (instance, 0, combat, combat [1])
end
local okey, _total, _top, _amount = _pcall (func, combat, instance_container, instance)
if (not okey) then
_detalhes:Msg ("|cFFFF9900error on custom display function|r:", _total)
_detalhes:Msg("|cFFFF9900error on custom display function|r:", _total)
return _detalhes:EndRefresh (instance, 0, combat, combat [1])
end
@@ -216,14 +216,14 @@
local total_script = _detalhes.custom_function_cache [instance.customName .. "Total"]
local okey
for index, actor in _ipairs(instance_container._ActorTable) do
for index, actor in ipairs(instance_container._ActorTable) do
local percent, ptotal
if (percent_script) then
okey, percent = _pcall (percent_script, _math_floor(actor.value), top, total, combat, instance, actor)
if (not okey) then
_detalhes:Msg ("|cFFFF9900percent script error|r:", percent)
_detalhes:Msg("|cFFFF9900percent script error|r:", percent)
return _detalhes:EndRefresh (instance, 0, combat, combat [1])
end
else
@@ -233,7 +233,7 @@
if (total_script) then
local okey, value = _pcall (total_script, _math_floor(actor.value), top, total, combat, instance, actor)
if (not okey) then
_detalhes:Msg ("|cFFFF9900total script error|r:", value)
_detalhes:Msg("|cFFFF9900total script error|r:", value)
return _detalhes:EndRefresh (instance, 0, combat, combat [1])
end
@@ -292,7 +292,7 @@
if (source == "[all]") then
for _, actor in _ipairs(combat_container) do
for _, actor in ipairs(combat_container) do
local actortotal = func (_, actor, source, target, spellid, combat, instance_container)
if (actortotal > 0) then
total = total + actortotal
@@ -316,7 +316,7 @@
end
end
for _, actor in _ipairs(combat_container) do
for _, actor in ipairs(combat_container) do
if (actor.grupo) then
if (not func) then
Details:Msg("error on class_custom 'func' is invalid, backtrace:", debugstack())
@@ -422,8 +422,8 @@
row1.lineText4:SetText(_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
row1:SetValue(100)
local r, g, b = unpack (instance.total_bar.color)
row1.textura:SetVertexColor (r, g, b)
local r, g, b = unpack(instance.total_bar.color)
row1.textura:SetVertexColor(r, g, b)
row1.icone_classe:SetTexture(instance.total_bar.icon)
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
@@ -458,8 +458,8 @@
row1.lineText4:SetText(_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
row1:SetValue(100)
local r, g, b = unpack (instance.total_bar.color)
row1.textura:SetVertexColor (r, g, b)
local r, g, b = unpack(instance.total_bar.color)
row1.textura:SetVertexColor(r, g, b)
row1.icone_classe:SetTexture(instance.total_bar.icon)
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
@@ -511,7 +511,7 @@
--local value, top, total, combat, instance = ...
okey, percent = _pcall (percent_script, self.value, top, total, combat, instance, self)
if (not okey) then
_detalhes:Msg ("|cFFFF9900error on custom display function|r:", percent)
_detalhes:Msg("|cFFFF9900error on custom display function|r:", percent)
return _detalhes:EndRefresh (instance, 0, combat, combat [1])
end
else
@@ -530,7 +530,7 @@
if (total_script) then
local okey, value = _pcall (total_script, self.value, top, total, combat, instance, self)
if (not okey) then
_detalhes:Msg ("|cFFFF9900error on custom display function|r:", value)
_detalhes:Msg("|cFFFF9900error on custom display function|r:", value)
return _detalhes:EndRefresh (instance, 0, combat, combat [1])
end
@@ -578,10 +578,10 @@
if (not school_color) then
school_color = _detalhes.school_colors ["unknown"]
end
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (school_color)
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack(school_color)
else
local color = _detalhes.school_colors ["unknown"]
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (color)
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack(color)
end
else
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
@@ -614,10 +614,10 @@
Details.FadeHandler.Fader(esta_barra, "out")
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
esta_barra.textura:SetVertexColor(actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
if (instancia.row_info.texture_background_class_color) then
esta_barra.background:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
esta_barra.background:SetVertexColor(actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
return self:RefreshBarra (esta_barra, instancia)
@@ -674,10 +674,10 @@
if (not school_color) then
school_color = _detalhes.school_colors ["unknown"]
end
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (school_color)
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack(school_color)
else
local color = _detalhes.school_colors ["unknown"]
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (color)
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack(color)
end
else
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
@@ -690,7 +690,7 @@
if (self.classe == "UNKNOW") then
esta_barra.icone_classe:SetTexture("Interface\\LFGFRAME\\LFGROLE_BW")
esta_barra.icone_classe:SetTexCoord (.25, .5, 0, 1)
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
esta_barra.icone_classe:SetVertexColor(1, 1, 1)
elseif (self.classe == "UNGROUPPLAYER") then
if (self.enemy) then
@@ -710,12 +710,12 @@
esta_barra.icone_classe:SetTexCoord (0, 1, 0, 1)
end
end
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
esta_barra.icone_classe:SetVertexColor(1, 1, 1)
elseif (self.classe == "PET") then
esta_barra.icone_classe:SetTexture(instancia.row_info.icon_file)
esta_barra.icone_classe:SetTexCoord (0.25, 0.49609375, 0.75, 1)
esta_barra.icone_classe:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
esta_barra.icone_classe:SetVertexColor(actor_class_color_r, actor_class_color_g, actor_class_color_b)
else
if (self.id) then
@@ -725,17 +725,17 @@
if (instancia.row_info.use_spec_icons) then
if ((self.spec and self.spec ~= 0) or (self.my_actor.spec and self.my_actor.spec ~= 0)) then
esta_barra.icone_classe:SetTexture(instancia.row_info.spec_file)
esta_barra.icone_classe:SetTexCoord (_unpack (_detalhes.class_specs_coords [self.spec or self.my_actor.spec]))
esta_barra.icone_classe:SetTexCoord (_unpack(_detalhes.class_specs_coords [self.spec or self.my_actor.spec]))
else
esta_barra.icone_classe:SetTexture([[Interface\AddOns\Details\images\classes_small]])
esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe]))
esta_barra.icone_classe:SetTexCoord (_unpack(CLASS_ICON_TCOORDS [self.classe]))
end
else
esta_barra.icone_classe:SetTexture(instancia.row_info.icon_file)
esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe]))
esta_barra.icone_classe:SetTexCoord (_unpack(CLASS_ICON_TCOORDS [self.classe]))
end
end
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
esta_barra.icone_classe:SetVertexColor(1, 1, 1)
end
--left text
@@ -746,14 +746,14 @@
end
function atributo_custom:CreateCustomActorContainer()
return _setmetatable ({
return _setmetatable({
_NameIndexTable = {},
_ActorTable = {}
}, {__index = atributo_custom})
end
function atributo_custom:ResetCustomActorContainer()
for _, actor in _ipairs(self._ActorTable) do
for _, actor in ipairs(self._ActorTable) do
actor.value = actor.value - _math_floor(actor.value)
--actor.value = _detalhes:GetOrderNumber(actor.nome)
end
@@ -856,7 +856,7 @@
end
end
local newActor = _setmetatable ({
local newActor = _setmetatable({
nome = actor.nome or actor.name,
classe = class,
value = _detalhes:GetOrderNumber(),
@@ -865,7 +865,7 @@
}, atributo_custom.mt)
newActor.name_complement = name_complement
newActor.displayName = actor.displayName or (_detalhes:GetOnlyName (newActor.nome) .. (name_complement or ""))
newActor.displayName = actor.displayName or (_detalhes:GetOnlyName(newActor.nome) .. (name_complement or ""))
newActor.spec = actor.spec
newActor.enemy = actor.enemy
@@ -891,7 +891,7 @@
newActor.classe = Details:GetClass(actor.nome or actor.name) or "UNKNOW"
end
if (newActor.classe == "UNGROUPPLAYER") then
--atributo_custom:ScheduleTimer ("UpdateClass", 5, {newActor = newActor, actor = actor})
--atributo_custom:ScheduleTimer("UpdateClass", 5, {newActor = newActor, actor = actor})
Details.Schedules.NewTimer(5, atributo_custom.UpdateClass, self, {new_actor = newActor, actor = actor})
end
end
@@ -912,7 +912,7 @@
end
function atributo_custom:CreateCustomDisplayObject()
return _setmetatable ({
return _setmetatable({
name = "new custom",
icon = [[Interface\ICONS\TEMP]],
author = "unknown",
@@ -958,13 +958,13 @@
if (not school_color) then
school_color = _detalhes.school_colors ["unknown"]
end
r, g, b = _unpack (school_color)
r, g, b = _unpack(school_color)
else
r, g, b = actor:GetClassColor()
end
if (actor.id) then
_detalhes:AddTooltipSpellHeaderText (select (1, _GetSpellInfo(actor.id)), "yellow", 1, select (3, _GetSpellInfo(actor.id)), 0.90625, 0.109375, 0.15625, 0.875)
_detalhes:AddTooltipSpellHeaderText (select(1, _GetSpellInfo(actor.id)), "yellow", 1, select(3, _GetSpellInfo(actor.id)), 0.90625, 0.109375, 0.15625, 0.875)
else
_detalhes:AddTooltipSpellHeaderText (custom_object:GetName(), "yellow", 1, custom_object:GetIcon(), 0.90625, 0.109375, 0.15625, 0.875)
end
@@ -980,7 +980,7 @@
end
local okey, errortext = _pcall (func, actor, instance.showing, instance, keydown)
if (not okey) then
_detalhes:Msg ("|cFFFF9900error on custom display tooltip function|r:", errortext)
_detalhes:Msg("|cFFFF9900error on custom display tooltip function|r:", errortext)
return false
end
end
@@ -1084,7 +1084,7 @@
table.remove (_detalhes.custom, index)
for _, instance in _ipairs(_detalhes.tabela_instancias) do
for _, instance in ipairs(_detalhes.tabela_instancias) do
if (instance.atributo == 5 and instance.sub_atributo == index) then
instance:ResetAttribute()
elseif (instance.atributo == 5 and instance.sub_atributo > index) then
@@ -1121,7 +1121,7 @@
--check if there is a instance showing this custom
local showing = false
for index, instance in _ipairs(_detalhes.tabela_instancias) do
for index, instance in ipairs(_detalhes.tabela_instancias) do
if (instance.atributo == 5 and instance.sub_atributo == i) then
showing = true
end
@@ -1135,14 +1135,14 @@
end
--restore metatable and indexes
for index, custom_object in _ipairs(_detalhes.custom) do
_setmetatable (custom_object, atributo_custom)
for index, custom_object in ipairs(_detalhes.custom) do
_setmetatable(custom_object, atributo_custom)
custom_object.__index = atributo_custom
end
end
function _detalhes.clear:c_atributo_custom()
for _, custom_object in _ipairs(_detalhes.custom) do
for _, custom_object in ipairs(_detalhes.custom) do
custom_object.__index = nil
end
end
@@ -1180,7 +1180,7 @@
break
end
end
setmetatable (object, _detalhes.atributo_custom)
setmetatable(object, _detalhes.atributo_custom)
object.__index = _detalhes.atributo_custom
_detalhes.custom [#_detalhes.custom+1] = object
end
@@ -1273,7 +1273,7 @@
local focus_potion = debuff_uptime_container [DETAILS_FOCUS_POTION_ID]
if (focus_potion) then
local name, _, icon = GetSpellInfo(DETAILS_FOCUS_POTION_ID)
GameCooltip:AddLine (name, 1) --can use only 1 focus potion (can't be pre-potion)
GameCooltip:AddLine(name, 1) --can use only 1 focus potion (can't be pre-potion)
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon (icon, 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
end
@@ -1287,7 +1287,7 @@
if (potionUsed) then
local name, _, icon = GetSpellInfo(spellId)
GameCooltip:AddLine (name, potionUsed.activedamt)
GameCooltip:AddLine(name, potionUsed.activedamt)
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon (icon, 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
end
@@ -1309,7 +1309,7 @@
table.remove (self.custom, i)
end
end
setmetatable (PotionUsed, _detalhes.atributo_custom)
setmetatable(PotionUsed, _detalhes.atributo_custom)
PotionUsed.__index = _detalhes.atributo_custom
self.custom [#self.custom+1] = PotionUsed
end
@@ -1366,29 +1366,29 @@
local hs = actor:GetSpell (6262)
if (hs) then
GameCooltip:AddLine (select (1, GetSpellInfo(6262)), _detalhes:ToK(hs.total))
GameCooltip:AddIcon (select (3, GetSpellInfo(6262)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
GameCooltip:AddLine(select(1, GetSpellInfo(6262)), _detalhes:ToK(hs.total))
GameCooltip:AddIcon (select(3, GetSpellInfo(6262)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
GameCooltip:AddStatusBar (100, 1, R, G, B, A)
end
local pot = actor:GetSpell (DETAILS_HEALTH_POTION_ID)
if (pot) then
GameCooltip:AddLine (select (1, GetSpellInfo(DETAILS_HEALTH_POTION_ID)), _detalhes:ToK(pot.total))
GameCooltip:AddIcon (select (3, GetSpellInfo(DETAILS_HEALTH_POTION_ID)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
GameCooltip:AddLine(select(1, GetSpellInfo(DETAILS_HEALTH_POTION_ID)), _detalhes:ToK(pot.total))
GameCooltip:AddIcon (select(3, GetSpellInfo(DETAILS_HEALTH_POTION_ID)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
GameCooltip:AddStatusBar (100, 1, R, G, B, A)
end
local pot = actor:GetSpell (DETAILS_HEALTH_POTION2_ID)
if (pot) then
GameCooltip:AddLine (select (1, GetSpellInfo(DETAILS_HEALTH_POTION2_ID)), _detalhes:ToK(pot.total))
GameCooltip:AddIcon (select (3, GetSpellInfo(DETAILS_HEALTH_POTION2_ID)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
GameCooltip:AddLine(select(1, GetSpellInfo(DETAILS_HEALTH_POTION2_ID)), _detalhes:ToK(pot.total))
GameCooltip:AddIcon (select(3, GetSpellInfo(DETAILS_HEALTH_POTION2_ID)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
GameCooltip:AddStatusBar (100, 1, R, G, B, A)
end
local pot = actor:GetSpell (DETAILS_REJU_POTION_ID)
if (pot) then
GameCooltip:AddLine (select (1, GetSpellInfo(DETAILS_REJU_POTION_ID)), _detalhes:ToK(pot.total))
GameCooltip:AddIcon (select (3, GetSpellInfo(DETAILS_REJU_POTION_ID)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
GameCooltip:AddLine(select(1, GetSpellInfo(DETAILS_REJU_POTION_ID)), _detalhes:ToK(pot.total))
GameCooltip:AddIcon (select(3, GetSpellInfo(DETAILS_REJU_POTION_ID)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
GameCooltip:AddStatusBar (100, 1, R, G, B, A)
end
@@ -1412,7 +1412,7 @@
table.remove (self.custom, i)
end
end
setmetatable (Healthstone, _detalhes.atributo_custom)
setmetatable(Healthstone, _detalhes.atributo_custom)
Healthstone.__index = _detalhes.atributo_custom
self.custom [#self.custom+1] = Healthstone
end
@@ -1431,7 +1431,7 @@
script_version = 3,
total_script = [[
local value, top, total, combat, instance = ...
local minutos, segundos = math.floor (value/60), math.floor (value%60)
local minutos, segundos = math.floor(value/60), math.floor(value%60)
return minutos .. "m " .. segundos .. "s"
]],
percent_script = [[
@@ -1478,7 +1478,7 @@
table.remove (self.custom, i)
end
end
setmetatable (DamageActivityTime, _detalhes.atributo_custom)
setmetatable(DamageActivityTime, _detalhes.atributo_custom)
DamageActivityTime.__index = _detalhes.atributo_custom
self.custom [#self.custom+1] = DamageActivityTime
end
@@ -1495,7 +1495,7 @@
script_version = 2,
total_script = [[
local value, top, total, combat, instance = ...
local minutos, segundos = math.floor (value/60), math.floor (value%60)
local minutos, segundos = math.floor(value/60), math.floor(value%60)
return minutos .. "m " .. segundos .. "s"
]],
percent_script = [[
@@ -1542,7 +1542,7 @@
table.remove (self.custom, i)
end
end
setmetatable (HealActivityTime, _detalhes.atributo_custom)
setmetatable(HealActivityTime, _detalhes.atributo_custom)
HealActivityTime.__index = _detalhes.atributo_custom
self.custom [#self.custom+1] = HealActivityTime
end
@@ -1569,7 +1569,7 @@
for index, character in ipairs(misc_actors) do
if (character.cc_done and character:IsPlayer()) then
local cc_done = floor (character.cc_done)
local cc_done = floor(character.cc_done)
instance_container:AddValue (character, cc_done)
total = total + cc_done
if (cc_done > top) then
@@ -1592,7 +1592,7 @@
for index, spell in ipairs(spells) do
local name, _, icon = GetSpellInfo(spell [1])
GameCooltip:AddLine (name, spell [2])
GameCooltip:AddLine(name, spell [2])
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon (icon, 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
end
@@ -1609,7 +1609,7 @@
_detalhes:AddTooltipHeaderStatusbar (1, 1, 1, 0.6)
for index, target in ipairs(targets) do
GameCooltip:AddLine (target[1], target [2])
GameCooltip:AddLine(target[1], target [2])
_detalhes:AddTooltipBackgroundStatusbar()
local class, _, _, _, _, r, g, b = _detalhes:GetClass (target [1])
@@ -1624,7 +1624,7 @@
]],
total_script = [[
local value, top, total, combat, instance = ...
return floor (value)
return floor(value)
]],
}
@@ -1638,7 +1638,7 @@
end
end
if (not have) then
setmetatable (CC_Done, _detalhes.atributo_custom)
setmetatable(CC_Done, _detalhes.atributo_custom)
CC_Done.__index = _detalhes.atributo_custom
for i, custom in ipairs(self.custom) do
@@ -1734,7 +1734,7 @@
for index, spell in ipairs(spells) do
local name, _, icon = GetSpellInfo(spell [1])
GameCooltip:AddLine (name, spell [2])
GameCooltip:AddLine(name, spell [2])
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon (icon, 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
end
@@ -1743,7 +1743,7 @@
_detalhes:AddTooltipHeaderStatusbar (1, 1, 1, 0.6)
for index, t in ipairs(from) do
GameCooltip:AddLine (t[1], t[2])
GameCooltip:AddLine(t[1], t[2])
_detalhes:AddTooltipBackgroundStatusbar()
local class, _, _, _, _, r, g, b = _detalhes:GetClass (t [1])
@@ -1758,7 +1758,7 @@
]],
total_script = [[
local value, top, total, combat, instance = ...
return floor (value)
return floor(value)
]],
}
@@ -1772,7 +1772,7 @@
end
end
if (not have) then
setmetatable (CC_Received, _detalhes.atributo_custom)
setmetatable(CC_Received, _detalhes.atributo_custom)
CC_Received.__index = _detalhes.atributo_custom
for i, custom in ipairs(self.custom) do
@@ -1808,7 +1808,7 @@
local player
local pet_attribute
local role = DetailsFramework.UnitGroupRolesAssigned ("player")
local role = DetailsFramework.UnitGroupRolesAssigned("player")
local spec = DetailsFramework.GetSpecialization()
role = spec and DetailsFramework.GetSpecializationRole (spec) or role
@@ -1868,7 +1868,7 @@
local GC = GameCooltip
GC:SetOption("YSpacingMod", 0)
local role = DetailsFramework.UnitGroupRolesAssigned ("player")
local role = DetailsFramework.UnitGroupRolesAssigned("player")
if (spell.n_dmg) then
@@ -1888,7 +1888,7 @@
if (misc_actor) then
local debuff_uptime = misc_actor.debuff_uptime_spells and misc_actor.debuff_uptime_spells._ActorTable [spell.id] and misc_actor.debuff_uptime_spells._ActorTable [spell.id].uptime
if (debuff_uptime) then
debuff_uptime_total = floor (debuff_uptime / instance.showing:GetCombatTime() * 100)
debuff_uptime_total = floor(debuff_uptime / instance.showing:GetCombatTime() * 100)
end
local spell_cast = misc_actor.spell_cast and misc_actor.spell_cast [spell.id]
@@ -1909,30 +1909,30 @@
end
--Cooltip code
GC:AddLine ("Casts:", cast_string or "?")
GC:AddLine("Casts:", cast_string or "?")
GC:AddStatusBar (100, 1, R, G, B, A)
if (debuff_uptime_total ~= "") then
GC:AddLine ("Uptime:", (debuff_uptime_total or "?") .. "%")
GC:AddLine("Uptime:", (debuff_uptime_total or "?") .. "%")
GC:AddStatusBar (100, 1, R, G, B, A)
end
GC:AddLine ("Hits:", spell.counter)
GC:AddLine("Hits:", spell.counter)
GC:AddStatusBar (100, 1, R, G, B, A)
local average = spell.total / total_hits
GC:AddLine ("Average:", _detalhes:ToK (average))
GC:AddLine("Average:", _detalhes:ToK (average))
GC:AddStatusBar (100, 1, R, G, B, A)
GC:AddLine ("E-Dps:", _detalhes:ToK (spell.total / combat_time))
GC:AddLine("E-Dps:", _detalhes:ToK (spell.total / combat_time))
GC:AddStatusBar (100, 1, R, G, B, A)
GC:AddLine ("School:", schooltext)
GC:AddLine("School:", schooltext)
GC:AddStatusBar (100, 1, R, G, B, A)
--GC:AddLine (" ")
--GC:AddLine(" ")
GC:AddLine ("Normal Hits: ", spell.n_amt .. " (" ..floor ( spell.n_amt/total_hits*100) .. "%)")
GC:AddLine("Normal Hits: ", spell.n_amt .. " (" ..floor( spell.n_amt/total_hits*100) .. "%)")
GC:AddStatusBar (100, 1, R, G, B, A)
local n_average = spell.n_dmg / spell.n_amt
@@ -1940,12 +1940,12 @@
local P = average/n_average*100
T = P*T/100
GC:AddLine ("Average / E-Dps: ", _detalhes:ToK (n_average) .. " / " .. format ("%.1f",spell.n_dmg / T ))
GC:AddLine("Average / E-Dps: ", _detalhes:ToK (n_average) .. " / " .. format ("%.1f",spell.n_dmg / T ))
GC:AddStatusBar (100, 1, R, G, B, A)
--GC:AddLine (" ")
--GC:AddLine(" ")
GC:AddLine ("Critical Hits: ", spell.c_amt .. " (" ..floor ( spell.c_amt/total_hits*100) .. "%)")
GC:AddLine("Critical Hits: ", spell.c_amt .. " (" ..floor( spell.c_amt/total_hits*100) .. "%)")
GC:AddStatusBar (100, 1, R, G, B, A)
if (spell.c_amt > 0) then
@@ -1955,9 +1955,9 @@
T = P*T/100
local crit_dps = spell.c_dmg / T
GC:AddLine ("Average / E-Dps: ", _detalhes:ToK (c_average) .. " / " .. _detalhes:comma_value (crit_dps))
GC:AddLine("Average / E-Dps: ", _detalhes:ToK (c_average) .. " / " .. _detalhes:comma_value (crit_dps))
else
GC:AddLine ("Average / E-Dps: ", "0 / 0")
GC:AddLine("Average / E-Dps: ", "0 / 0")
end
GC:AddStatusBar (100, 1, R, G, B, A)
@@ -1977,22 +1977,22 @@
local combat_time = instance.showing:GetCombatTime()
--Cooltip code
GC:AddLine ("Hits:", spell.counter)
GC:AddLine("Hits:", spell.counter)
GC:AddStatusBar (100, 1, R, G, B, A)
local average = spell.total / total_hits
GC:AddLine ("Average:", _detalhes:ToK (average))
GC:AddLine("Average:", _detalhes:ToK (average))
GC:AddStatusBar (100, 1, R, G, B, A)
GC:AddLine ("E-Hps:", _detalhes:ToK (spell.total / combat_time))
GC:AddLine("E-Hps:", _detalhes:ToK (spell.total / combat_time))
GC:AddStatusBar (100, 1, R, G, B, A)
GC:AddLine ("School:", schooltext)
GC:AddLine("School:", schooltext)
GC:AddStatusBar (100, 1, R, G, B, A)
--GC:AddLine (" ")
--GC:AddLine(" ")
GC:AddLine ("Normal Hits: ", spell.n_amt .. " (" ..floor ( spell.n_amt/total_hits*100) .. "%)")
GC:AddLine("Normal Hits: ", spell.n_amt .. " (" ..floor( spell.n_amt/total_hits*100) .. "%)")
GC:AddStatusBar (100, 1, R, G, B, A)
local n_average = spell.n_curado / spell.n_amt
@@ -2000,12 +2000,12 @@
local P = average/n_average*100
T = P*T/100
GC:AddLine ("Average / E-Dps: ", _detalhes:ToK (n_average) .. " / " .. format ("%.1f",spell.n_curado / T ))
GC:AddLine("Average / E-Dps: ", _detalhes:ToK (n_average) .. " / " .. format ("%.1f",spell.n_curado / T ))
GC:AddStatusBar (100, 1, R, G, B, A)
--GC:AddLine (" ")
--GC:AddLine(" ")
GC:AddLine ("Critical Hits: ", spell.c_amt .. " (" ..floor ( spell.c_amt/total_hits*100) .. "%)")
GC:AddLine("Critical Hits: ", spell.c_amt .. " (" ..floor( spell.c_amt/total_hits*100) .. "%)")
GC:AddStatusBar (100, 1, R, G, B, A)
if (spell.c_amt > 0) then
@@ -2015,9 +2015,9 @@
T = P*T/100
local crit_dps = spell.c_curado / T
GC:AddLine ("Average / E-Hps: ", _detalhes:ToK (c_average) .. " / " .. _detalhes:comma_value (crit_dps))
GC:AddLine("Average / E-Hps: ", _detalhes:ToK (c_average) .. " / " .. _detalhes:comma_value (crit_dps))
else
GC:AddLine ("Average / E-Hps: ", "0 / 0")
GC:AddLine("Average / E-Hps: ", "0 / 0")
end
GC:AddStatusBar (100, 1, R, G, B, A)
@@ -2026,7 +2026,7 @@
percent_script = [[
local value, top, total, combat, instance = ...
local dps = _detalhes:ToK (floor (value) / combat:GetCombatTime())
local dps = _detalhes:ToK (floor(value) / combat:GetCombatTime())
local percent = string.format("%.1f", value/total*100)
return dps .. ", " .. percent
]],
@@ -2040,7 +2040,7 @@
end
end
if (not have) then
setmetatable (MySpells, _detalhes.atributo_custom)
setmetatable(MySpells, _detalhes.atributo_custom)
MySpells.__index = _detalhes.atributo_custom
for i, custom in ipairs(self.custom) do
@@ -2115,7 +2115,7 @@
local DamageOnStar = RaidTargets [128]
if (DamageOnStar) then
--RAID_TARGET_8 is the built-in localized word for 'Skull'.
GameCooltip:AddLine (RAID_TARGET_8 .. ":", format_func (_, DamageOnStar))
GameCooltip:AddLine(RAID_TARGET_8 .. ":", format_func (_, DamageOnStar))
GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcon_8", 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
Details:AddTooltipBackgroundStatusbar()
end
@@ -2132,7 +2132,7 @@
end
end
if (not have) then
setmetatable (DamageOnSkullTarget, _detalhes.atributo_custom)
setmetatable(DamageOnSkullTarget, _detalhes.atributo_custom)
DamageOnSkullTarget.__index = _detalhes.atributo_custom
for i, custom in ipairs(self.custom) do
@@ -2203,49 +2203,49 @@
local DamageOnStar = RaidTargets [1]
if (DamageOnStar) then
GameCooltip:AddLine (RAID_TARGET_1 .. ":", format_func (_, DamageOnStar))
GameCooltip:AddLine(RAID_TARGET_1 .. ":", format_func (_, DamageOnStar))
GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcon_1", 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
Details:AddTooltipBackgroundStatusbar()
end
local DamageOnCircle = RaidTargets [2]
if (DamageOnCircle) then
GameCooltip:AddLine (RAID_TARGET_2 .. ":", format_func (_, DamageOnCircle))
GameCooltip:AddLine(RAID_TARGET_2 .. ":", format_func (_, DamageOnCircle))
GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcon_2", 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
Details:AddTooltipBackgroundStatusbar()
end
local DamageOnDiamond = RaidTargets [4]
if (DamageOnDiamond) then
GameCooltip:AddLine (RAID_TARGET_3 .. ":", format_func (_, DamageOnDiamond))
GameCooltip:AddLine(RAID_TARGET_3 .. ":", format_func (_, DamageOnDiamond))
GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcon_3", 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
Details:AddTooltipBackgroundStatusbar()
end
local DamageOnTriangle = RaidTargets [8]
if (DamageOnTriangle) then
GameCooltip:AddLine (RAID_TARGET_4 .. ":", format_func (_, DamageOnTriangle))
GameCooltip:AddLine(RAID_TARGET_4 .. ":", format_func (_, DamageOnTriangle))
GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcon_4", 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
Details:AddTooltipBackgroundStatusbar()
end
local DamageOnMoon = RaidTargets [16]
if (DamageOnMoon) then
GameCooltip:AddLine (RAID_TARGET_5 .. ":", format_func (_, DamageOnMoon))
GameCooltip:AddLine(RAID_TARGET_5 .. ":", format_func (_, DamageOnMoon))
GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcon_5", 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
Details:AddTooltipBackgroundStatusbar()
end
local DamageOnSquare = RaidTargets [32]
if (DamageOnSquare) then
GameCooltip:AddLine (RAID_TARGET_6 .. ":", format_func (_, DamageOnSquare))
GameCooltip:AddLine(RAID_TARGET_6 .. ":", format_func (_, DamageOnSquare))
GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcon_6", 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
Details:AddTooltipBackgroundStatusbar()
end
local DamageOnCross = RaidTargets [64]
if (DamageOnCross) then
GameCooltip:AddLine (RAID_TARGET_7 .. ":", format_func (_, DamageOnCross))
GameCooltip:AddLine(RAID_TARGET_7 .. ":", format_func (_, DamageOnCross))
GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcon_7", 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
Details:AddTooltipBackgroundStatusbar()
end
@@ -2262,7 +2262,7 @@
end
end
if (not have) then
setmetatable (DamageOnAnyTarget, _detalhes.atributo_custom)
setmetatable(DamageOnAnyTarget, _detalhes.atributo_custom)
DamageOnAnyTarget.__index = _detalhes.atributo_custom
for i, custom in ipairs(self.custom) do
@@ -2298,9 +2298,9 @@
local total, top, amount = 0, 0, 0
--get the overall combat
local OverallCombat = Details:GetCombat (-1)
local OverallCombat = Details:GetCombat(-1)
--get the current combat
local CurrentCombat = Details:GetCombat (0)
local CurrentCombat = Details:GetCombat(0)
if (not OverallCombat.GetActorList or not CurrentCombat.GetActorList) then
return 0, 0, 0
@@ -2344,16 +2344,16 @@
--Cooltip code
--get the overall combat
local OverallCombat = Details:GetCombat (-1)
local OverallCombat = Details:GetCombat(-1)
--get the current combat
local CurrentCombat = Details:GetCombat (0)
local CurrentCombat = Details:GetCombat(0)
local AllSpells = {}
local playerTotal = 0
--overall
local player = OverallCombat [1]:GetActor (actor.nome)
local player = OverallCombat [1]:GetActor(actor.nome)
if (player) then
playerTotal = playerTotal + player.total
local playerSpells = player:GetSpellList()
@@ -2363,7 +2363,7 @@
end
--current
if (Details.in_combat) then
local player = CurrentCombat [1]:GetActor (actor.nome)
local player = CurrentCombat [1]:GetActor(actor.nome)
if (player) then
playerTotal = playerTotal + player.total
local playerSpells = player:GetSpellList()
@@ -2386,7 +2386,7 @@
local topSpellTotal = sortedList and sortedList[1] and sortedList[1][2] or 0
for i, t in ipairs(sortedList) do
local spellID, total = unpack (t)
local spellID, total = unpack(t)
if (total > 1) then
local spellName, _, spellIcon = Details.GetSpellInfo(spellID)
@@ -2397,7 +2397,7 @@
formatedSpellPercent = formatedSpellPercent .. "0"
end
GameCooltip:AddLine (spellName, format_func (_, total) .. " " .. formatedSpellPercent .. "%")
GameCooltip:AddLine(spellName, format_func (_, total) .. " " .. formatedSpellPercent .. "%")
Details:AddTooltipBackgroundStatusbar(false, total / topSpellTotal * 100)
GameCooltip:AddIcon (spellIcon, 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height, 0.078125, 0.921875, 0.078125, 0.921875)
@@ -2415,11 +2415,11 @@
local value, top, total, combat, instance = ...
--get the time of overall combat
local OverallCombatTime = Details:GetCombat (-1):GetCombatTime()
local OverallCombatTime = Details:GetCombat(-1):GetCombatTime()
--get the time of current combat if the player is in combat
if (Details.in_combat) then
local CurrentCombatTime = Details:GetCombat (0):GetCombatTime()
local CurrentCombatTime = Details:GetCombat(0):GetCombatTime()
OverallCombatTime = OverallCombatTime + CurrentCombatTime
end
@@ -2447,7 +2447,7 @@
table.remove (self.custom, i)
end
end
setmetatable (DynamicOverallDamage, _detalhes.atributo_custom)
setmetatable(DynamicOverallDamage, _detalhes.atributo_custom)
DynamicOverallDamage.__index = _detalhes.atributo_custom
self.custom [#self.custom+1] = DynamicOverallDamage
end
@@ -2479,7 +2479,7 @@
--get the damage absorbed by all the actor pets
for petIndex, petName in ipairs(actor.pets) do
local pet = Combat :GetActor (1, petName)
local pet = Combat :GetActor(1, petName)
if (pet) then
totalAbsorb = totalAbsorb + pet.totalabsorbed
end
@@ -2513,21 +2513,21 @@
--get the damage absorbed by all the actor pets
for petIndex, petName in ipairs(actor.pets) do
local pet = Combat :GetActor (1, petName)
local pet = Combat :GetActor(1, petName)
if (pet) then
totalAbsorb = totalAbsorb + pet.totalabsorbed
end
end
GameCooltip:AddLine (actor:Name(), format_func (_, actor.totalabsorbed))
GameCooltip:AddLine(actor:Name(), format_func (_, actor.totalabsorbed))
Details:AddTooltipBackgroundStatusbar()
for petIndex, petName in ipairs(actor.pets) do
local pet = Combat :GetActor (1, petName)
local pet = Combat :GetActor(1, petName)
if (pet) then
totalAbsorb = totalAbsorb + pet.totalabsorbed
GameCooltip:AddLine (petName, format_func (_, pet.totalabsorbed))
GameCooltip:AddLine(petName, format_func (_, pet.totalabsorbed))
Details:AddTooltipBackgroundStatusbar()
end
@@ -2548,7 +2548,7 @@
table.remove (self.custom, i)
end
end
setmetatable (DamageOnShields, _detalhes.atributo_custom)
setmetatable(DamageOnShields, _detalhes.atributo_custom)
DamageOnShields.__index = _detalhes.atributo_custom
self.custom [#self.custom+1] = DamageOnShields
end
+135 -135
View File
@@ -1,8 +1,8 @@
--damage object
local Details = _G.Details
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local Translit = LibStub ("LibTranslit-1.0")
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
local Translit = LibStub("LibTranslit-1.0")
local gump = Details.gump
local _
@@ -16,15 +16,15 @@
local _table_size = table.getn --lua local
local _setmetatable = setmetatable --lua local
local _getmetatable = getmetatable --lua local
local _ipairs = ipairs --lua local
local ipairs = ipairs --lua local
local _pairs = pairs --lua local
local _rawget= rawget --lua local
local _math_min = math.min --lua local
local _math_max = math.max --lua local
local _math_abs = math.abs --lua local
local abs = math.abs --lua local
local bitBand = bit.band --lua local
local unpack = unpack --lua local
local _type = type --lua local
local type = type --lua local
local GameTooltip = GameTooltip --api local
local _IsInRaid = IsInRaid --api local
local _IsInGroup = IsInGroup --api local
@@ -278,7 +278,7 @@ function Details:ContainerSortEnemies (container, amount, keyName2) --[[exported
local total = 0
for index, player in _ipairs(container) do
for index, player in ipairs(container) do
local npcid1 = Details:GetNpcIdFromGuid(player.serial)
--p rint (player.nome, npcid1, ignored_enemy_npcs [npcid1])
if (bitBand(player.flag_original, 0x00000060) ~= 0 and not ignoredEnemyNpcsTable [npcid1]) then -- um inimigo
@@ -293,7 +293,7 @@ function Details:ContainerSortEnemies (container, amount, keyName2) --[[exported
end
function Details:TooltipForCustom (barra) --[[exported]]
GameCooltip:AddLine (Loc ["STRING_LEFT_CLICK_SHARE"])
GameCooltip:AddLine(Loc ["STRING_LEFT_CLICK_SHARE"])
return true
end
@@ -366,7 +366,7 @@ function Details:GetBarColor(actor) --[[exported]]
end
function Details:GetSpellLink(spellid) --[[exported]]
if (_type(spellid) ~= "number") then
if (type(spellid) ~= "number") then
return spellid
end
@@ -440,7 +440,7 @@ end
spells = container_habilidades:NovoContainer (container_damage)
}
_setmetatable (_new_damageActor, atributo_damage)
_setmetatable(_new_damageActor, atributo_damage)
return _new_damageActor
end
@@ -455,7 +455,7 @@ end
local total = 0
if (Details.time_type == 2 or not Details:CaptureGet ("damage")) then
for _, actor in _ipairs(container) do
for _, actor in ipairs(container) do
if (actor.grupo) then
actor.last_dps = actor.total / combat_time
else
@@ -464,7 +464,7 @@ end
total = total + actor.last_dps
end
else
for _, actor in _ipairs(container) do
for _, actor in ipairs(container) do
actor.last_dps = actor.total / actor:Tempo()
total = total + actor.last_dps
end
@@ -485,7 +485,7 @@ end
local from_spell = tabela [1] --spellid
local from_spellname
if (from_spell) then
from_spellname = select (1, GetSpellInfo(from_spell))
from_spellname = select(1, GetSpellInfo(from_spell))
end
--get a list of all damage actors
@@ -540,7 +540,7 @@ end
else
for playername, ff_table in pairs(character.friendlyfire) do
for spellid, amount in pairs(ff_table.spells) do
local spellname = select (1, GetSpellInfo(spellid))
local spellname = select(1, GetSpellInfo(spellid))
if (spellname == from_spellname) then
local damage_actor = combat (1, playername)
local heal_actor = combat (2, playername)
@@ -608,7 +608,7 @@ end
if (not is_custom_spell) then
for spellid, spell in pairs(character.spells._ActorTable) do
if (spellid ~= from_spell) then
local spellname = select (1, GetSpellInfo(spellid))
local spellname = select(1, GetSpellInfo(spellid))
if (spellname == from_spellname) then
for targetname, amount in pairs(spell.targets) do
@@ -650,8 +650,8 @@ end
GameCooltip:SetOption("StatusBarTexture", "Interface\\AddOns\\Details\\images\\bar_serenity")
local spellname, _, spellicon = select (1, _GetSpellInfo(from_spell))
GameCooltip:AddLine (spellname .. " " .. Loc ["STRING_CUSTOM_ATTRIBUTE_DAMAGE"], nil, nil, headerColor, nil, 10)
local spellname, _, spellicon = select(1, _GetSpellInfo(from_spell))
GameCooltip:AddLine(spellname .. " " .. Loc ["STRING_CUSTOM_ATTRIBUTE_DAMAGE"], nil, nil, headerColor, nil, 10)
GameCooltip:AddIcon (spellicon, 1, 1, 14, 14, 0.078125, 0.921875, 0.078125, 0.921875)
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, Details.tooltip_key_size_width, Details.tooltip_key_size_height, 0, 1, 0, 0.640625, Details.tooltip_key_overlay2)
Details:AddTooltipHeaderStatusbar (1, 1, 1, 0.5)
@@ -661,7 +661,7 @@ end
local lineHeight = Details.tooltip.line_height
for index, t in ipairs(Targets) do
GameCooltip:AddLine (Details:GetOnlyName(t[1]), Details:ToK(t[2]) .. " (" .. format ("%.1f", t[2]/total*100) .. "%)")
GameCooltip:AddLine(Details:GetOnlyName(t[1]), Details:ToK(t[2]) .. " (" .. format ("%.1f", t[2]/total*100) .. "%)")
local class, _, _, _, _, r, g, b = Details:GetClass (t[1])
GameCooltip:AddStatusBar (t[2]/top*100, 1, r, g, b, 0.8, false, byspell_tooltip_background)
@@ -681,7 +681,7 @@ end
end
end
GameCooltip:AddLine (" ")
GameCooltip:AddLine(" ")
Details:AddTooltipReportLineText()
GameCooltip:SetOption("YSpacingMod", 0)
@@ -710,7 +710,7 @@ end
local from_spell = @SPELLID@
local from_spellname
if (from_spell) then
from_spellname = select (1, GetSpellInfo(from_spell))
from_spellname = select(1, GetSpellInfo(from_spell))
end
--get a list of all damage actors
@@ -759,7 +759,7 @@ end
for playername, ff_table in pairs(character.friendlyfire) do
for spellid, amount in pairs(ff_table.spells) do
local spellname = select (1, GetSpellInfo(spellid))
local spellname = select(1, GetSpellInfo(spellid))
if (spellname == from_spellname) then
local damage_actor = combat (1, playername)
local heal_actor = combat (2, playername)
@@ -823,7 +823,7 @@ end
if (not is_custom_spell) then
for spellid, spell in pairs(character.spells._ActorTable) do
if (spellid ~= from_spell) then
local spellname = select (1, GetSpellInfo(spellid))
local spellname = select(1, GetSpellInfo(spellid))
if (spellname == from_spellname) then
for targetname, amount in pairs(spell.targets) do
@@ -876,7 +876,7 @@ end
local custom_name = spellname .. " - " .. Loc ["STRING_CUSTOM_DTBS"] .. ""
--check if already exists
for index, CustomObject in _ipairs(Details.custom) do
for index, CustomObject in ipairs(Details.custom) do
if (CustomObject:GetName() == custom_name) then
--fix for not saving funcs on logout
if (not CustomObject.OnSwitchShow) then
@@ -907,13 +907,13 @@ end
new_custom_object.script = new_code
tinsert(Details.custom, new_custom_object)
setmetatable (new_custom_object, Details.atributo_custom)
setmetatable(new_custom_object, Details.atributo_custom)
new_custom_object.__index = Details.atributo_custom
return instance:TrocaTabela(instance.segmento, 5, #Details.custom)
end
local DTBS_format_name = function(player_name) return Details:GetOnlyName (player_name) end
local DTBS_format_name = function(player_name) return Details:GetOnlyName(player_name) end
local DTBS_format_amount = function(amount) return Details:ToK(amount) .. " (" .. format ("%.1f", amount / bs_tooltip_table.damage_total * 100) .. "%)" end
function atributo_damage:ReportSingleDTBSLine (spell, instance, ShiftKeyDown, ControlKeyDown)
@@ -937,7 +937,7 @@ end
local thisLine = instance.barras [whichRowLine] --pega a referncia da barra na janela
if (not thisLine) then
print ("DEBUG: problema com <instance.thisLine> "..whichRowLine .. " " .. colocacao)
print("DEBUG: problema com <instance.thisLine> "..whichRowLine .. " " .. colocacao)
return
end
@@ -950,7 +950,7 @@ end
thisLine.colocacao = colocacao
if (not _getmetatable (tabela)) then
_setmetatable (tabela, {__call = RefreshBarraBySpell})
_setmetatable(tabela, {__call = RefreshBarraBySpell})
tabela._custom = true
end
@@ -1081,7 +1081,7 @@ end
for i = 1, math.min (min, #damage_taken_table) do
local t = damage_taken_table [i]
GameCooltip:AddLine (Details:GetOnlyName (t[1]), FormatTooltipNumber (_, t[2]) .. " (" .. format ("%.1f", t[2] / total * 100) .. "%)")
GameCooltip:AddLine(Details:GetOnlyName(t[1]), FormatTooltipNumber (_, t[2]) .. " (" .. format ("%.1f", t[2] / total * 100) .. "%)")
local classe = t[3]
if (not classe) then
classe = "UNKNOW"
@@ -1104,11 +1104,11 @@ end
GameCooltip:AddStatusBar (t[2] / top * 100, 1, r, g, b, 1, false, enemies_background)
end
else
GameCooltip:AddLine (Loc ["STRING_NO_DATA"], nil, 1, "white")
GameCooltip:AddLine(Loc ["STRING_NO_DATA"], nil, 1, "white")
GameCooltip:AddIcon (instancia.row_info.icon_file, nil, nil, 14, 14, unpack(Details.class_coords ["UNKNOW"]))
end
GameCooltip:AddLine (" ")
GameCooltip:AddLine(" ")
Details:AddTooltipReportLineText()
GameCooltip:SetOption("StatusBarTexture", "Interface\\AddOns\\Details\\images\\bar_serenity")
@@ -1126,7 +1126,7 @@ end
local thisLine = instancia.barras [whichRowLine] --pega a referncia da barra na janela
if (not thisLine) then
print ("DEBUG: problema com <instancia.thisLine> "..whichRowLine.." "..rank)
print("DEBUG: problema com <instancia.thisLine> "..whichRowLine.." "..rank)
return
end
@@ -1139,7 +1139,7 @@ end
thisLine.colocacao = colocacao
if (not _getmetatable (tabela)) then
_setmetatable (tabela, {__call = RefreshBarraFrags})
_setmetatable(tabela, {__call = RefreshBarraFrags})
tabela._custom = true
end
@@ -1295,7 +1295,7 @@ end
local value, top, total, combat, instance, custom_actor = ...
local uptime = custom_actor.uptime or 0
local minutos, segundos = floor (uptime / 60), floor (uptime % 60)
local minutos, segundos = floor(uptime / 60), floor(uptime % 60)
if (minutos > 0) then
uptime = "" .. minutos .. "m " .. segundos .. "s" .. ""
else
@@ -1313,7 +1313,7 @@ end
local custom_name = spellname .. " - " .. Loc ["STRING_ATTRIBUTE_DAMAGE_DEBUFFS_REPORT"] .. ""
--check if already exists
for index, CustomObject in _ipairs(Details.custom) do
for index, CustomObject in ipairs(Details.custom) do
if (CustomObject:GetName() == custom_name) then
--fix for not saving funcs on logout
if (not CustomObject.OnSwitchShow) then
@@ -1349,7 +1349,7 @@ end
new_custom_object.total_script = new_total_code
tinsert(Details.custom, new_custom_object)
setmetatable (new_custom_object, Details.atributo_custom)
setmetatable(new_custom_object, Details.atributo_custom)
new_custom_object.__index = Details.atributo_custom
return instance:TrocaTabela(instance.segmento, 5, #Details.custom)
@@ -1372,8 +1372,8 @@ end
local t = {}
for index, void_table in ipairs(tooltip_void_zone_temp) do
--ir reportar dano zero tambm
if (void_table[1] and type (void_table[1]) == "string" and void_table[2] and void_table[3] and type (void_table[3]) == "table") then
local actor_table = {Details:GetOnlyName (void_table[1])}
if (void_table[1] and type(void_table[1]) == "string" and void_table[2] and void_table[3] and type(void_table[3]) == "table") then
local actor_table = {Details:GetOnlyName(void_table[1])}
local m, s = _math_floor(void_table[3].uptime / 60), _math_floor(void_table[3].uptime % 60)
if (m > 0) then
actor_table [2] = FormatTooltipNumber (_, void_table[3].damage) .. " (" .. m .. "m " .. s .. "s" .. ")"
@@ -1480,7 +1480,7 @@ end
local lineHeight = Details.tooltip.line_height
for index, t in _ipairs(tooltip_void_zone_temp) do
for index, t in ipairs(tooltip_void_zone_temp) do
if (t[3] == 0) then
break
@@ -1490,9 +1490,9 @@ end
local minutos, segundos = _math_floor(debuff_table.uptime / 60), _math_floor(debuff_table.uptime % 60)
if (minutos > 0) then
GameCooltip:AddLine (Details:GetOnlyName (t[1]), FormatTooltipNumber (_, debuff_table.damage) .. " (" .. minutos .. "m " .. segundos .. "s" .. ")")
GameCooltip:AddLine(Details:GetOnlyName(t[1]), FormatTooltipNumber (_, debuff_table.damage) .. " (" .. minutos .. "m " .. segundos .. "s" .. ")")
else
GameCooltip:AddLine (Details:GetOnlyName (t[1]), FormatTooltipNumber (_, debuff_table.damage) .. " (" .. segundos .. "s" .. ")")
GameCooltip:AddLine(Details:GetOnlyName(t[1]), FormatTooltipNumber (_, debuff_table.damage) .. " (" .. segundos .. "s" .. ")")
end
local classe = Details:GetClass (t[1])
@@ -1517,7 +1517,7 @@ end
end
GameCooltip:AddLine (" ")
GameCooltip:AddLine(" ")
Details:AddTooltipReportLineText()
GameCooltip:SetOption("StatusBarTexture", "Interface\\AddOns\\Details\\images\\bar_serenity")
@@ -1536,7 +1536,7 @@ end
local thisLine = instancia.barras [whichRowLine]
if (not thisLine) then
print ("DEBUG: problema com <instancia.thisLine> "..whichRowLine.." "..rank)
print("DEBUG: problema com <instancia.thisLine> "..whichRowLine.." "..rank)
return
end
@@ -1560,10 +1560,10 @@ end
local porcentagem
if (instancia.row_info.percent_type == 1) then
total = max (total, 0.0001)
total = max(total, 0.0001)
porcentagem = format ("%.1f", self.damage / total * 100)
elseif (instancia.row_info.percent_type == 2) then
local top = max (instancia.top, 0.0001)
local top = max(instancia.top, 0.0001)
porcentagem = format ("%.1f", self.damage / top * 100)
end
@@ -1657,7 +1657,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
--pega qual a sub key que ser usada --sub keys
if (exportar) then
if (_type(exportar) == "boolean") then
if (type(exportar) == "boolean") then
if (subAttribute == 1) then --DAMAGE DONE
keyName = "total"
@@ -1839,10 +1839,10 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
if (this_spell) then
this_spell [1] = spellid
this_spell [2] = 0
this_spell [3] = spell.spellschool or Details.spell_school_cache [select (1, GetSpellInfo(spellid))] or 1
this_spell [3] = spell.spellschool or Details.spell_school_cache [select(1, GetSpellInfo(spellid))] or 1
bs_index_table [spellname] = bs_index
else
this_spell = {spellid, 0, spell.spellschool or Details.spell_school_cache [select (1, GetSpellInfo(spellid))] or 1}
this_spell = {spellid, 0, spell.spellschool or Details.spell_school_cache [select(1, GetSpellInfo(spellid))] or 1}
bs_table [bs_index] = this_spell
bs_index_table [spellname] = bs_index
end
@@ -1874,10 +1874,10 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
if (this_spell) then
this_spell [1] = spellid
this_spell [2] = 0
this_spell [3] = Details.spell_school_cache [select (1, GetSpellInfo(spellid))] or 1
this_spell [3] = Details.spell_school_cache [select(1, GetSpellInfo(spellid))] or 1
bs_index_table [spellname] = bs_index
else
this_spell = {spellid, 0, Details.spell_school_cache [select (1, GetSpellInfo(spellid))] or 1}
this_spell = {spellid, 0, Details.spell_school_cache [select(1, GetSpellInfo(spellid))] or 1}
bs_table [bs_index] = this_spell
bs_index_table [spellname] = bs_index
end
@@ -1932,7 +1932,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
local whichRowLine = 1
local lineContainer = instancia.barras
--print (bs_index, #bs_table, instancia.barraS[1], instancia.barraS[2])
--print(bs_index, #bs_table, instancia.barraS[1], instancia.barraS[2])
for i = instancia.barraS[1], instancia.barraS[2], 1 do
atributo_damage:AtualizarBySpell (bs_table[i], whichRowLine, i, instancia)
@@ -1947,7 +1947,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
local misc_container = combatObject [4]
local voidzone_damage_total = 0
for _, actor in _ipairs(misc_container._ActorTable) do
for _, actor in ipairs(misc_container._ActorTable) do
if (actor.boss_debuff) then
index = index + 1
@@ -2076,7 +2076,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
elseif (windowMode == modo_ALL) then --mostrando ALL
--faz o sort da categoria e retorna o amount corrigido
--print (keyName)
--print(keyName)
if (subAttribute == 2) then
local combat_time = instancia.showing:GetCombatTime()
total = atributo_damage:ContainerRefreshDps (actorTableContent, combat_time)
@@ -2141,7 +2141,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
end
--
if (not isUsingCache) then
for index, player in _ipairs(actorTableContent) do
for index, player in ipairs(actorTableContent) do
if (player.grupo) then -- um player e esta em grupo
if (player[keyName] < 1) then --dano menor que 1, interromper o loop
amount = index - 1
@@ -2212,7 +2212,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
if (following) then
if (isUsingCache) then
local pname = Details.playername
for i, actor in _ipairs(actorTableContent) do
for i, actor in ipairs(actorTableContent) do
if (actor.nome == pname) then
myPos = i
break
@@ -2376,7 +2376,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
end
end
else
-- /run print (Details:GetInstance(1).barraS[2]) -- vai do 5 ao 1 -- qual barra comea no 1 -- i = 5 at 1 -- player 5 atualiza na barra 1 / player 1 atualiza na barra 5
-- /run print(Details:GetInstance(1).barraS[2]) -- vai do 5 ao 1 -- qual barra comea no 1 -- i = 5 at 1 -- player 5 atualiza na barra 1 / player 1 atualiza na barra 5
for i = instancia.barraS[2], instancia.barraS[1], -1 do
if (actorTableContent[i]) then
actorTableContent[i]:RefreshLine(instancia, lineContainer, whichRowLine, i, total, subAttribute, forcar, keyName, combatTime, percentageType, useAnimations, barsShowData, barsBrackets, barsSeparator)
@@ -2582,7 +2582,7 @@ function atributo_damage:RefreshLine(instance, lineContainer, whichRowLine, rank
local thisLine = lineContainer[whichRowLine]
if (not thisLine) then
print ("DEBUG: problema com <instance.thisLine> "..whichRowLine.." "..rank)
print("DEBUG: problema com <instance.thisLine> "..whichRowLine.." "..rank)
return
end
@@ -2687,7 +2687,7 @@ function atributo_damage:RefreshLine(instance, lineContainer, whichRowLine, rank
if (diff_from_topdps) then
local threshold = diff_from_topdps / instance.player_top_dps_threshold * 100
if (threshold < 100) then
threshold = _math_abs (threshold - 100)
threshold = abs(threshold - 100)
else
threshold = 5
end
@@ -3153,7 +3153,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
r, g, b = unpack(Details.class_colors [owner.classe])
else
if (not Details.class_colors [self.classe]) then
return print ("Details!: error class not found:", self.classe, "for", self.nome)
return print("Details!: error class not found:", self.classe, "for", self.nome)
end
r, g, b = unpack(Details.class_colors [self.classe])
end
@@ -3194,7 +3194,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
end
--add actor pets
for petIndex, petName in _ipairs(self:Pets()) do
for petIndex, petName in ipairs(self:Pets()) do
local petActor = instancia.showing[class_type]:PegarCombatente (nil, petName)
if (petActor) then
for _spellid, _skill in _pairs(petActor:GetActorSpells()) do
@@ -3265,16 +3265,16 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
end
if (instancia.sub_atributo == 1 or instancia.sub_atributo == 6) then
GameCooltip:AddLine (nome_magia, FormatTooltipNumber (_, totalDamage) .." ("..percent.."%)")
GameCooltip:AddLine(nome_magia, FormatTooltipNumber (_, totalDamage) .." ("..percent.."%)")
else
GameCooltip:AddLine (nome_magia, FormatTooltipNumber (_, _math_floor(totalDPS)) .." ("..percent.."%)")
GameCooltip:AddLine(nome_magia, FormatTooltipNumber (_, _math_floor(totalDPS)) .." ("..percent.."%)")
end
GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W + 4, icon_size.H + 4, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
Details:AddTooltipBackgroundStatusbar (false, totalDamage/topAbility*100)
end
else
GameCooltip:AddLine (Loc ["STRING_NO_SPELL"])
GameCooltip:AddLine(Loc ["STRING_NO_SPELL"])
end
--spell reflected
@@ -3291,7 +3291,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
local spellName, _, spellIcon = _GetSpellInfo(spellId)
if (spellName) then
GameCooltip:AddLine (spellName, FormatTooltipNumber (_, damageDone) .. " (" .. _math_floor(damageDone / self.total * 100) .. "%)")
GameCooltip:AddLine(spellName, FormatTooltipNumber (_, damageDone) .. " (" .. _math_floor(damageDone / self.total * 100) .. "%)")
Details:AddTooltipBackgroundStatusbar (false, damageDone / self.total * 100)
GameCooltip:AddIcon (spellIcon, 1, 1, icon_size.W, icon_size.H, 0.1, 0.9, 0.1, 0.9)
end
@@ -3326,7 +3326,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
for i = 1, _math_min(max_targets, #ActorTargetsSortTable) do
local este_inimigo = ActorTargetsSortTable [i]
GameCooltip:AddLine (este_inimigo[1], FormatTooltipNumber (_, este_inimigo[2]) .." ("..format("%.1f", este_inimigo[2]/ActorDamageWithPet*100).."%)")
GameCooltip:AddLine(este_inimigo[1], FormatTooltipNumber (_, este_inimigo[2]) .." ("..format("%.1f", este_inimigo[2]/ActorDamageWithPet*100).."%)")
GameCooltip:AddIcon ([[Interface\PetBattles\PetBattle-StatIcons]], nil, nil, icon_size.W, icon_size.H, 0, 0.5, 0, 0.5, {.7, .7, .7, 1}, nil, true)
Details:AddTooltipBackgroundStatusbar (false, este_inimigo[2] / topEnemy * 100)
end
@@ -3345,7 +3345,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
--small blank space
Details:AddTooltipSpellHeaderText ("", headerColor, 1, false, 0.1, 0.9, 0.1, 0.9, true)
for index, nome in _ipairs(meus_pets) do
for index, nome in ipairs(meus_pets) do
if (not quantidade [nome]) then
quantidade [nome] = 1
@@ -3385,8 +3385,8 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
end
end
--GameTooltip:AddLine (" ")
--GameCooltip:AddLine (" ")
--GameTooltip:AddLine(" ")
--GameCooltip:AddLine(" ")
local _quantidade = 0
local added_logo = false
@@ -3399,7 +3399,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
end
local topPet = totais [1] and totais [1][2] or 0
for index, _table in _ipairs(totais) do
for index, _table in ipairs(totais) do
if (_table [2] > 0 and (index <= Details.tooltip.tooltip_max_pets or ismaximized)) then
@@ -3420,9 +3420,9 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
local n = _table [1]:gsub (("%s%<.*"), "")
if (instancia.sub_atributo == 1) then
GameCooltip:AddLine (n, FormatTooltipNumber (_, _table [2]) .. " (" .. _math_floor(_table [2]/self.total*100) .. "%)")
GameCooltip:AddLine(n, FormatTooltipNumber (_, _table [2]) .. " (" .. _math_floor(_table [2]/self.total*100) .. "%)")
else
GameCooltip:AddLine (n, FormatTooltipNumber (_, _math_floor(_table [3])) .. " (" .. _math_floor(_table [2]/self.total*100) .. "%)")
GameCooltip:AddLine(n, FormatTooltipNumber (_, _math_floor(_table [3])) .. " (" .. _math_floor(_table [2]/self.total*100) .. "%)")
end
Details:AddTooltipBackgroundStatusbar (false, _table [2] / topPet * 100)
@@ -3474,7 +3474,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
for i = 1, #playerPhases do
--[1] Phase Number [2] Amount Done [3] Rank [4] Percent
GameCooltip:AddLine ("|cFFF0F0F0Phase|r " .. playerPhases [i][1], FormatTooltipNumber (_, playerPhases [i][2]) .. " (|cFFFFFF00#" .. playerPhases [i][3] .. "|r, " .. format ("%.1f", playerPhases [i][4]) .. "%)")
GameCooltip:AddLine("|cFFF0F0F0Phase|r " .. playerPhases [i][1], FormatTooltipNumber (_, playerPhases [i][2]) .. " (|cFFFFFF00#" .. playerPhases [i][3] .. "|r, " .. format ("%.1f", playerPhases [i][4]) .. "%)")
GameCooltip:AddIcon ([[Interface\Garrison\orderhall-missions-mechanic9]], 1, 1, 14, 14, 11/64, 53/64, 11/64, 53/64)
Details:AddTooltipBackgroundStatusbar()
end
@@ -3495,7 +3495,7 @@ local on_switch_show_frags = function(instance)
return true
end
local ENEMIES_format_name = function(player) if (player == 0) then return false end return Details:GetOnlyName (player.nome) end
local ENEMIES_format_name = function(player) if (player == 0) then return false end return Details:GetOnlyName(player.nome) end
local ENEMIES_format_amount = function(amount) if (amount <= 0) then return false end return Details:ToK(amount) .. " (" .. format ("%.1f", amount / tooltip_temp_table.damage_total * 100) .. "%)" end
function atributo_damage:ReportEnemyDamageTaken (actor, instance, ShiftKeyDown, ControlKeyDown, fromFrags)
@@ -3504,7 +3504,7 @@ function atributo_damage:ReportEnemyDamageTaken (actor, instance, ShiftKeyDown,
local custom_name = inimigo .. " -" .. Loc ["STRING_CUSTOM_ENEMY_DT"]
--procura se j tem um custom:
for index, CustomObject in _ipairs(Details.custom) do
for index, CustomObject in ipairs(Details.custom) do
if (CustomObject:GetName() == custom_name) then
--fix for not saving funcs on logout
if (not CustomObject.OnSwitchShow) then
@@ -3530,7 +3530,7 @@ function atributo_damage:ReportEnemyDamageTaken (actor, instance, ShiftKeyDown,
}
tinsert(Details.custom, new_custom_object)
setmetatable (new_custom_object, Details.atributo_custom)
setmetatable(new_custom_object, Details.atributo_custom)
new_custom_object.__index = Details.atributo_custom
return instance:TrocaTabela(instance.segmento, 5, #Details.custom)
@@ -3543,7 +3543,7 @@ function atributo_damage:ReportEnemyDamageTaken (actor, instance, ShiftKeyDown,
return Details:Reportar (report_table, {_no_current = true, _no_inverse = true, _custom = true})
end
local FRAGS_format_name = function(player_name) return Details:GetOnlyName (player_name) end
local FRAGS_format_name = function(player_name) return Details:GetOnlyName(player_name) end
local FRAGS_format_amount = function(amount) return Details:ToK(amount) .. " (" .. format ("%.1f", amount / frags_tooltip_table.damage_total * 100) .. "%)" end
function atributo_damage:ReportSingleFragsLine (frag, instance, ShiftKeyDown, ControlKeyDown)
@@ -3574,7 +3574,7 @@ function atributo_damage:ToolTip_Enemies (instancia, numero, barra, keydown)
--enemy damage taken
local i = 1
local damage_taken = 0
for _, actor in _ipairs(combat[1]._ActorTable) do
for _, actor in ipairs(combat[1]._ActorTable) do
if (actor.grupo and actor.targets [self.nome]) then
local t = tooltip_temp_table [i]
if (not t) then
@@ -3612,9 +3612,9 @@ function atributo_damage:ToolTip_Enemies (instancia, numero, barra, keydown)
local player = tooltip_temp_table [o][1]
local total = tooltip_temp_table [o][2]
local player_name = Details:GetOnlyName (player:name())
local player_name = Details:GetOnlyName(player:name())
GameCooltip:AddLine (player_name .. " ", FormatTooltipNumber (_, total) .." (" .. format ("%.1f", (total / damage_taken) * 100) .. "%)")
GameCooltip:AddLine(player_name .. " ", FormatTooltipNumber (_, total) .." (" .. format ("%.1f", (total / damage_taken) * 100) .. "%)")
local classe = player:class()
if (not classe) then
@@ -3640,22 +3640,22 @@ function atributo_damage:ToolTip_Enemies (instancia, numero, barra, keydown)
GameCooltip:SetOption("StatusBarTexture", "Interface\\AddOns\\Details\\images\\bar_serenity")
--damage done and heal
GameCooltip:AddLine (" ")
GameCooltip:AddLine (Loc ["STRING_ATTRIBUTE_DAMAGE_ENEMIES_DONE"], FormatTooltipNumber (_, _math_floor(self.total)))
GameCooltip:AddLine(" ")
GameCooltip:AddLine(Loc ["STRING_ATTRIBUTE_DAMAGE_ENEMIES_DONE"], FormatTooltipNumber (_, _math_floor(self.total)))
local half = 0.00048828125
GameCooltip:AddIcon (instancia:GetSkinTexture(), 1, 1, 14, 14, 0.005859375 + half, 0.025390625 - half, 0.3623046875, 0.3818359375)
GameCooltip:AddStatusBar (0, 1, r, g, b, 1, false, enemies_background)
local heal_actor = instancia.showing (2, self.nome)
if (heal_actor) then
GameCooltip:AddLine (Loc ["STRING_ATTRIBUTE_HEAL_ENEMY"], FormatTooltipNumber (_, _math_floor(heal_actor.heal_enemy_amt)))
GameCooltip:AddLine(Loc ["STRING_ATTRIBUTE_HEAL_ENEMY"], FormatTooltipNumber (_, _math_floor(heal_actor.heal_enemy_amt)))
else
GameCooltip:AddLine (Loc ["STRING_ATTRIBUTE_HEAL_ENEMY"], 0)
GameCooltip:AddLine(Loc ["STRING_ATTRIBUTE_HEAL_ENEMY"], 0)
end
GameCooltip:AddIcon (instancia:GetSkinTexture(), 1, 1, 14, 14, 0.037109375 + half, 0.056640625 - half, 0.3623046875, 0.3818359375)
GameCooltip:AddStatusBar (0, 1, r, g, b, 1, false, enemies_background)
GameCooltip:AddLine (" ")
GameCooltip:AddLine(" ")
Details:AddTooltipReportLineText()
GameCooltip:SetOption("YSpacingMod", 0)
@@ -3682,7 +3682,7 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown)
local meus_agressores = {}
if (instancia.sub_atributo == 6) then
for _, actor in _ipairs(showing._ActorTable) do
for _, actor in ipairs(showing._ActorTable) do
if (actor.grupo and actor.targets [self.nome]) then
meus_agressores [#meus_agressores+1] = {actor.nome, actor.targets [self.nome], actor.classe, actor}
end
@@ -3790,19 +3790,19 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown)
end
end
for _, spell in _ipairs(all_spells) do
for _, spell in ipairs(all_spells) do
local spellname, _, spellicon = _GetSpellInfo(spell [1])
GameCooltip:AddLine (spellname .. " (|cFFFFFF00" .. spell [3] .. "|r)", FormatTooltipNumber (_, spell [2]).." (" .. format ("%.1f", (spell [2] / damage_taken) * 100).."%)")
GameCooltip:AddLine(spellname .. " (|cFFFFFF00" .. spell [3] .. "|r)", FormatTooltipNumber (_, spell [2]).." (" .. format ("%.1f", (spell [2] / damage_taken) * 100).."%)")
GameCooltip:AddIcon (spellicon, 1, 1, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
Details:AddTooltipBackgroundStatusbar()
end
else
local aggressorName = Details:GetOnlyName (meus_agressores[i][1])
local aggressorName = Details:GetOnlyName(meus_agressores[i][1])
if (ismaximized and meus_agressores[i][1]:find (Details.playername)) then
GameCooltip:AddLine (aggressorName, FormatTooltipNumber (_, meus_agressores[i][2]).." ("..format("%.1f", (meus_agressores[i][2]/damage_taken) * 100).."%)", nil, "yellow")
GameCooltip:AddLine(aggressorName, FormatTooltipNumber (_, meus_agressores[i][2]).." ("..format("%.1f", (meus_agressores[i][2]/damage_taken) * 100).."%)", nil, "yellow")
else
GameCooltip:AddLine (aggressorName, FormatTooltipNumber (_, meus_agressores[i][2]).." ("..format("%.1f", (meus_agressores[i][2]/damage_taken) * 100).."%)")
GameCooltip:AddLine(aggressorName, FormatTooltipNumber (_, meus_agressores[i][2]).." ("..format("%.1f", (meus_agressores[i][2]/damage_taken) * 100).."%)")
end
local classe = meus_agressores[i][3]
@@ -3821,17 +3821,17 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown)
if (instancia.sub_atributo == 6) then
GameCooltip:AddLine (" ")
GameCooltip:AddLine (Loc ["STRING_ATTRIBUTE_DAMAGE_DONE"], FormatTooltipNumber (_, _math_floor(self.total)))
GameCooltip:AddLine(" ")
GameCooltip:AddLine(Loc ["STRING_ATTRIBUTE_DAMAGE_DONE"], FormatTooltipNumber (_, _math_floor(self.total)))
local half = 0.00048828125
GameCooltip:AddIcon (instancia:GetSkinTexture(), 1, 1, icon_size.W, icon_size.H, 0.005859375 + half, 0.025390625 - half, 0.3623046875, 0.3818359375)
Details:AddTooltipBackgroundStatusbar()
local heal_actor = instancia.showing (2, self.nome)
if (heal_actor) then
GameCooltip:AddLine (Loc ["STRING_ATTRIBUTE_HEAL_DONE"], FormatTooltipNumber (_, _math_floor(heal_actor.heal_enemy_amt)))
GameCooltip:AddLine(Loc ["STRING_ATTRIBUTE_HEAL_DONE"], FormatTooltipNumber (_, _math_floor(heal_actor.heal_enemy_amt)))
else
GameCooltip:AddLine (Loc ["STRING_ATTRIBUTE_HEAL_DONE"], 0)
GameCooltip:AddLine(Loc ["STRING_ATTRIBUTE_HEAL_DONE"], 0)
end
GameCooltip:AddIcon (instancia:GetSkinTexture(), 1, 1, icon_size.W, icon_size.H, 0.037109375 + half, 0.056640625 - half, 0.3623046875, 0.3818359375)
Details:AddTooltipBackgroundStatusbar()
@@ -3900,7 +3900,7 @@ function atributo_damage:ToolTip_FriendlyFire (instancia, numero, barra, keydown
classe = "UNKNOW"
end
GameCooltip:AddLine (Details:GetOnlyName (DamagedPlayers[i][1]), FormatTooltipNumber (_, DamagedPlayers[i][2]).." ("..format("%.1f", DamagedPlayers[i][2]/FriendlyFireTotal*100).."%)")
GameCooltip:AddLine(Details:GetOnlyName(DamagedPlayers[i][1]), FormatTooltipNumber (_, DamagedPlayers[i][2]).." ("..format("%.1f", DamagedPlayers[i][2]/FriendlyFireTotal*100).."%)")
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\espadas", nil, nil, lineHeight, lineHeight)
Details:AddTooltipBackgroundStatusbar()
@@ -3944,7 +3944,7 @@ function atributo_damage:ToolTip_FriendlyFire (instancia, numero, barra, keydown
for i = 1, _math_min(max_abilities2, #SpellsInOrder) do
local nome, _, icone = _GetSpellInfo(SpellsInOrder[i][1])
GameCooltip:AddLine (nome, FormatTooltipNumber (_, SpellsInOrder[i][2]).." ("..format("%.1f", SpellsInOrder[i][2]/FriendlyFireTotal*100).."%)")
GameCooltip:AddLine(nome, FormatTooltipNumber (_, SpellsInOrder[i][2]).." ("..format("%.1f", SpellsInOrder[i][2]/FriendlyFireTotal*100).."%)")
GameCooltip:AddIcon (icone, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
Details:AddTooltipBackgroundStatusbar()
end
@@ -4018,7 +4018,7 @@ function atributo_damage:MontaInfoFriendlyFire()
local FirstPlaceDamage = DamagedPlayers [1] and DamagedPlayers [1][2] or 0
for index, tabela in _ipairs(DamagedPlayers) do
for index, tabela in ipairs(DamagedPlayers) do
local barra = barras [index]
if (not barra) then
@@ -4039,7 +4039,7 @@ function atributo_damage:MontaInfoFriendlyFire()
else
if (barra.on_focus) then
barra.textura:SetStatusBarColor (1, 1, 1, 1) --volta a cor antiga
barra:SetAlpha (.9) --volta a alfa antiga
barra:SetAlpha(.9) --volta a alfa antiga
barra.on_focus = false
end
end
@@ -4051,7 +4051,7 @@ function atributo_damage:MontaInfoFriendlyFire()
barra.textura:SetValue(tabela[2]/FirstPlaceDamage*100)
end
barra.lineText1:SetText(index .. instancia.divisores.colocacao .. Details:GetOnlyName (tabela[1])) --seta o texto da esqueda
barra.lineText1:SetText(index .. instancia.divisores.colocacao .. Details:GetOnlyName(tabela[1])) --seta o texto da esqueda
barra.lineText4:SetText(Details:comma_value (tabela[2]) .. " (" .. format ("%.1f", tabela[3]) .."%)") --seta o texto da direita
local classe = tabela[4]
@@ -4100,7 +4100,7 @@ function atributo_damage:MontaInfoFriendlyFire()
FirstPlaceDamage = SkillTable [1] and SkillTable [1][2] or 0
for index, tabela in _ipairs(SkillTable) do
for index, tabela in ipairs(SkillTable) do
local barra = barras2 [index]
if (not barra) then
@@ -4162,7 +4162,7 @@ function atributo_damage:MontaInfoDamageTaken()
local max_ = meus_agressores [1] and meus_agressores [1][2] or 0
local barra
for index, tabela in _ipairs(meus_agressores) do
for index, tabela in ipairs(meus_agressores) do
barra = barras [index]
if (not barra) then
barra = gump:CriaNovaBarraInfo1 (instancia, index)
@@ -4280,7 +4280,7 @@ end
else
if (row.on_focus) then
row.textura:SetStatusBarColor (1, 1, 1, 1) --volta a cor antiga
row:SetAlpha (.9) --volta a alfa antiga
row:SetAlpha(.9) --volta a alfa antiga
row.on_focus = false
end
end
@@ -4343,7 +4343,7 @@ function atributo_damage:MontaInfoDamageDone()
--local class_color = RAID_CLASS_COLORS [self.classe] and RAID_CLASS_COLORS [self.classe].colorStr
local class_color = "FFCCBBBB"
--local class_color = "FFDDDD44"
for _, PetName in _ipairs(ActorPets) do
for _, PetName in ipairs(ActorPets) do
local PetActor = instancia.showing (class_type, PetName)
if (PetActor) then
local PetSkillsContainer = PetActor.spells._ActorTable
@@ -4376,7 +4376,7 @@ function atributo_damage:MontaInfoDamageDone()
end
--spell bars
for index, tabela in _ipairs(ActorSkillsSortTable) do
for index, tabela in ipairs(ActorSkillsSortTable) do
--index = index + 1 --with the aura bar
index = index
@@ -4435,7 +4435,7 @@ function atributo_damage:MontaInfoDamageDone()
local max_ = meus_agressores[1] and meus_agressores[1][2] or 0 --dano que a primeiro magia vez
local barra
for index, tabela in _ipairs(meus_agressores) do
for index, tabela in ipairs(meus_agressores) do
barra = barras [index]
if (not barra) then --se a barra no existir, criar ela ento
@@ -4449,7 +4449,7 @@ function atributo_damage:MontaInfoDamageDone()
barra.textura:SetValue(tabela[2]/max_*100)
end
barra.lineText1:SetText(index .. ". " .. Details:GetOnlyName (tabela[1])) --seta o texto da esqueda
barra.lineText1:SetText(index .. ". " .. Details:GetOnlyName(tabela[1])) --seta o texto da esqueda
barra.lineText4:SetText(Details:comma_value (tabela[2]) .. " (" .. format ("%.1f", tabela[3]) .. "%)") --seta o texto da direita
barra.icone:SetTexture([[Interface\AddOns\Details\images\classes_small_alpha]]) --CLASSE
@@ -4510,7 +4510,7 @@ function atributo_damage:MontaInfoDamageDone()
local max_inimigos = meus_inimigos[1] and meus_inimigos[1][2] or 0
local barra
for index, tabela in _ipairs(meus_inimigos) do
for index, tabela in ipairs(meus_inimigos) do
barra = info.barras2 [index]
@@ -4537,7 +4537,7 @@ function atributo_damage:MontaInfoDamageDone()
barra.textura:SetStatusBarColor (1, 0.8, 0.8)
barra.textura:SetStatusBarColor (1, 1, 1, 1)
barra.lineText1:SetText(index .. ". " .. Details:GetOnlyName (tabela[1]))
barra.lineText1:SetText(index .. ". " .. Details:GetOnlyName(tabela[1]))
if (info.sub_atributo == 2) then
barra.lineText4:SetText(Details:comma_value ( _math_floor(tabela[2]/meu_tempo)) .. " (" .. format ("%.1f", tabela[3]) .. "%)")
@@ -4570,7 +4570,7 @@ end
------ Detalhe Info Friendly Fire
function atributo_damage:MontaDetalhesFriendlyFire (nome, barra)
for _, barra in _ipairs(info.barras3) do
for _, barra in ipairs(info.barras3) do
barra:Hide()
end
@@ -4600,7 +4600,7 @@ function atributo_damage:MontaDetalhesFriendlyFire (nome, barra)
local max_ = minhas_magias[1] and minhas_magias[1][2] or 0 --dano que a primeiro magia vez
local barra
for index, tabela in _ipairs(minhas_magias) do
for index, tabela in ipairs(minhas_magias) do
barra = barras [index]
if (not barra) then --se a barra no existir, criar ela ento
@@ -4632,7 +4632,7 @@ end
-- detalhes info enemies
function atributo_damage:MontaDetalhesEnemy (spellid, barra)
for _, barra in _ipairs(info.barras3) do
for _, barra in ipairs(info.barras3) do
barra:Hide()
end
@@ -4648,7 +4648,7 @@ function atributo_damage:MontaDetalhesEnemy (spellid, barra)
if (barra.lineText1:IsTruncated()) then
Details:CooltipPreset(2)
GameCooltip:SetOption("FixedWidth", nil)
GameCooltip:AddLine (barra.lineText1.text)
GameCooltip:AddLine(barra.lineText1.text)
GameCooltip:SetOwner(barra, "bottomleft", "topleft", 5, -10)
GameCooltip:ShowCooltip()
end
@@ -4675,7 +4675,7 @@ function atributo_damage:MontaDetalhesEnemy (spellid, barra)
local max_ = target_pool [1] and target_pool [1][2] or 0
local barra
for index, tabela in _ipairs(target_pool) do
for index, tabela in ipairs(target_pool) do
barra = barras [index]
if (not barra) then --se a barra no existir, criar ela ento
@@ -4689,7 +4689,7 @@ function atributo_damage:MontaDetalhesEnemy (spellid, barra)
barra.textura:SetValue(tabela[2]/max_*100) --muito mais rapido...
end
barra.lineText1:SetText(index .. ". " .. Details:GetOnlyName (tabela [1])) --seta o texto da esqueda
barra.lineText1:SetText(index .. ". " .. Details:GetOnlyName(tabela [1])) --seta o texto da esqueda
Details:name_space_info (barra)
if (spell.total > 0) then
@@ -4725,7 +4725,7 @@ end
------ Detalhe Info Damage Taken
function atributo_damage:MontaDetalhesDamageTaken (nome, barra)
for _, barra in _ipairs(info.barras3) do
for _, barra in ipairs(info.barras3) do
barra:Hide()
end
@@ -4765,7 +4765,7 @@ function atributo_damage:MontaDetalhesDamageTaken (nome, barra)
local max_ = minhas_magias[1] and minhas_magias[1][2] or 0 --dano que a primeiro magia vez
local barra
for index, tabela in _ipairs(minhas_magias) do
for index, tabela in ipairs(minhas_magias) do
barra = barras [index]
if (not barra) then --se a barra no existir, criar ela ento
@@ -4824,7 +4824,7 @@ local MontaDetalhesBuffProcs = function(actor, row, instance)
if (spec) then
local mainAuras = Details.important_auras [spec]
if (mainAuras) then
local miscActor = instance:GetShowingCombat():GetActor (4, actor:name())
local miscActor = instance:GetShowingCombat():GetActor(4, actor:name())
if (miscActor and miscActor.buff_uptime_spells) then
--get the auras
local added = 0
@@ -5044,7 +5044,7 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
_table_sort(data, Details.Sort1)
for index, tabela in _ipairs(data) do
for index, tabela in ipairs(data) do
gump:SetaDetalheInfoTexto (index+1, tabela[2], tabela[3], tabela[4], tabela[5], tabela[6], tabela[7], tabela[8])
end
@@ -5060,7 +5060,7 @@ function Details:BuildPlayerDetailsSpellChart()
if (not playerDetailSmallChart) then
playerDetailSmallChart = CreateFrame("frame", "DetailsPlayerDetailSmallChart", info,"BackdropTemplate")
DetailsFramework:ApplyStandardBackdrop (playerDetailSmallChart)
DetailsFramework:ApplyStandardBackdrop(playerDetailSmallChart)
playerDetailSmallChart.Lines = {}
for i = 1, 200 do
@@ -5075,8 +5075,8 @@ function Details:BuildPlayerDetailsSpellChart()
local eventList = {}
--build the list of tokens
for i = 1, select ("#", ... ) do
local tokenId = select (i, ...)
for i = 1, select("#", ... ) do
local tokenId = select(i, ...)
tokenIdList [tokenId] = true
end
@@ -5156,11 +5156,11 @@ function atributo_damage:MontaTooltipDamageTaken (thisLine, index)
_table_sort(habilidades, Details.Sort2)
GameTooltip:AddLine (index..". "..thisLine.nome_inimigo)
GameTooltip:AddLine (Loc ["STRING_DAMAGE_TAKEN_FROM2"]..":")
GameTooltip:AddLine (" ")
GameTooltip:AddLine(index..". "..thisLine.nome_inimigo)
GameTooltip:AddLine(Loc ["STRING_DAMAGE_TAKEN_FROM2"]..":")
GameTooltip:AddLine(" ")
for index, tabela in _ipairs(habilidades) do
for index, tabela in ipairs(habilidades) do
local nome, _, icone = _GetSpellInfo(tabela[1])
if (index < 8) then
GameTooltip:AddDoubleLine (index..". |T"..icone..":0|t "..nome, Details:comma_value (tabela[2]).." ("..format("%.1f", tabela[2]/total*100).."%)", 1, 1, 1, 1, 1, 1)
@@ -5221,7 +5221,7 @@ function atributo_damage:MontaTooltipAlvos (thisLine, index, instancia)
end
--add pets
for _, PetName in _ipairs(self.pets) do
for _, PetName in ipairs(self.pets) do
local PetActor = instancia.showing (class_type, PetName)
if (PetActor) then
local PetSkillsContainer = PetActor.spells._ActorTable
@@ -5274,17 +5274,17 @@ function atributo_damage:MontaTooltipAlvos (thisLine, index, instancia)
local topSpellDamage = habilidades[1] and habilidades[1][2]
if (topSpellDamage) then
for index, tabela in _ipairs(habilidades) do
for index, tabela in ipairs(habilidades) do
if (tabela [2] < 1) then
break
end
if (is_dps) then
--GameCooltip:AddDoubleLine (index..". |T"..tabela[3]..":0|t "..tabela[1], Details:comma_value ( _math_floor(tabela[2] / meu_tempo) ).." (".._cstr("%.1f", tabela[2]/total*100).."%)", 1, 1, 1, 1, 1, 1)
GameCooltip:AddLine (tabela[1], Details:comma_value ( _math_floor(tabela[2] / meu_tempo) ).." ("..format("%.1f", tabela[2]/total*100).."%)")
GameCooltip:AddLine(tabela[1], Details:comma_value ( _math_floor(tabela[2] / meu_tempo) ).." ("..format("%.1f", tabela[2]/total*100).."%)")
else
--GameCooltip:AddDoubleLine (index..". |T"..tabela[3]..":0|t " .. tabela[1], SelectedToKFunction(_, tabela[2]) .. " (".._cstr("%.1f", tabela[2]/total*100).."%)", 1, 1, 1, 1, 1, 1)
GameCooltip:AddLine (tabela[1], SelectedToKFunction(_, tabela[2]) .. " ("..format("%.1f", tabela[2]/total*100).."%)")
GameCooltip:AddLine(tabela[1], SelectedToKFunction(_, tabela[2]) .. " ("..format("%.1f", tabela[2]/total*100).."%)")
end
GameCooltip:AddIcon (tabela[3], nil, nil, icon_size.W + 4, icon_size.H + 4, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
@@ -5480,7 +5480,7 @@ end
shadow.start_time = shadow.start_time - tempo
--pets (add unique pet names)
for _, petName in _ipairs(actor.pets) do
for _, petName in ipairs(actor.pets) do
local hasPet = false
for i = 1, #shadow.pets do
if (shadow.pets[i] == petName) then
@@ -5543,7 +5543,7 @@ end
--soma todos os demais valores
for key, value in _pairs(habilidade) do
if (_type(value) == "number") then
if (type(value) == "number") then
if (key ~= "id" and key ~= "spellschool") then
if (not habilidade_shadow [key]) then
habilidade_shadow [key] = 0
@@ -5695,7 +5695,7 @@ atributo_damage.__add = function(tabela1, tabela2)
end
--pets (add unique pet names)
for _, petName in _ipairs(tabela2.pets) do
for _, petName in ipairs(tabela2.pets) do
local hasPet = false
for i = 1, #tabela1.pets do
if (tabela1.pets[i] == petName) then
@@ -5736,7 +5736,7 @@ atributo_damage.__add = function(tabela1, tabela2)
--soma os valores da habilidade
for key, value in _pairs(habilidade) do
if (_type(value) == "number") then
if (type(value) == "number") then
if (key ~= "id" and key ~= "spellschool") then
if (not habilidade_tabela1 [key]) then
habilidade_tabela1 [key] = 0
@@ -5830,7 +5830,7 @@ atributo_damage.__sub = function(tabela1, tabela2)
--subtrai os valores da habilidade
for key, value in _pairs(habilidade) do
if (_type(value) == "number") then
if (type(value) == "number") then
if (key ~= "id" and key ~= "spellschool") then
if (not habilidade_tabela1 [key]) then
habilidade_tabela1 [key] = 0
@@ -5870,7 +5870,7 @@ end
function Details.refresh:r_atributo_damage (este_jogador, shadow)
--restaura metas do ator
_setmetatable (este_jogador, Details.atributo_damage)
_setmetatable(este_jogador, Details.atributo_damage)
este_jogador.__index = Details.atributo_damage
--restaura as metas dos containers
Details.refresh:r_container_habilidades (este_jogador.spells, shadow and shadow.spells)
@@ -5933,9 +5933,9 @@ end
local player_name = player:name()
if (player_name:find (Details.playername)) then
GameCooltip:AddLine (player_name .. ": ", FormatTooltipNumber (_, total) .. " (" .. _cstr ("%.1f", (total / damage_done) * 100) .. "%)", 2, "yellow")
GameCooltip:AddLine(player_name .. ": ", FormatTooltipNumber (_, total) .. " (" .. _cstr ("%.1f", (total / damage_done) * 100) .. "%)", 2, "yellow")
else
GameCooltip:AddLine (player_name .. ": ", FormatTooltipNumber (_, total) .." (" .. _cstr ("%.1f", (total / damage_done) * 100) .. "%)", 2)
GameCooltip:AddLine(player_name .. ": ", FormatTooltipNumber (_, total) .." (" .. _cstr ("%.1f", (total / damage_done) * 100) .. "%)", 2)
end
local classe = player:class()
+2 -2
View File
@@ -14,13 +14,13 @@ do
return _error.errortext
end
_error.__call = function(_this)
print (_this.errortext)
print(_this.errortext)
end
function _detalhes:NewError (_msg)
local this_error = {}
this_error.errortext = _msg
setmetatable (this_error, _error)
setmetatable(this_error, _error)
return this_error
end
+159 -160
View File
File diff suppressed because it is too large Load Diff
+143 -156
View File
File diff suppressed because it is too large Load Diff
+64 -64
View File
@@ -5,14 +5,14 @@ local _math_floor = math.floor
local _table_sort = table.sort
local _table_insert = table.insert
local _setmetatable = setmetatable
local _ipairs = ipairs
local ipairs = ipairs
local _pairs = pairs
local _rawget= rawget
local _math_min = math.min
local _math_max = math.max
local _bit_band = bit.band
local _unpack = unpack
local _type = type
local type = type
--api locals
local _GetSpellInfo = _detalhes.getspellinfo
local GameTooltip = GameTooltip
@@ -22,7 +22,7 @@ local _IsInGroup = IsInGroup
local _string_replace = _detalhes.string.replace --details api
local _detalhes = _G._detalhes
local AceLocale = LibStub ("AceLocale-3.0")
local AceLocale = LibStub("AceLocale-3.0")
local Loc = AceLocale:GetLocale ( "Details" )
local _
@@ -87,7 +87,7 @@ function atributo_energy:NovaTabela (serial, nome, link)
spells = container_habilidades:NovoContainer (container_energy),
}
_setmetatable (_new_energyActor, atributo_energy)
_setmetatable(_new_energyActor, atributo_energy)
return _new_energyActor
end
@@ -200,7 +200,7 @@ function atributo_energy:AtualizarResources (whichRowLine, colocacao, instancia)
local esta_barra = instancia.barras [whichRowLine]
if (not esta_barra) then
print ("DEBUG: problema com <instancia.esta_barra> "..whichRowLine.." "..colocacao)
print("DEBUG: problema com <instancia.esta_barra> "..whichRowLine.." "..colocacao)
return
end
@@ -298,7 +298,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
amount = _detalhes:ContainerSortResources (conteudo, amount, "resource")
instancia.top = conteudo[1].resource
for index, player in _ipairs(conteudo) do
for index, player in ipairs(conteudo) do
if (player.resource >= 1) then
total = total + player.resource
else
@@ -309,7 +309,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
elseif (modo == modo_GROUP) then
_table_sort (conteudo, _detalhes.SortKeyGroupResources)
for index, player in _ipairs(conteudo) do
for index, player in ipairs(conteudo) do
if (player.grupo) then -- um player e esta em grupo
if (player.resource < 1) then --dano menor que 1, interromper o loop
amount = index - 1
@@ -371,7 +371,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
end
if (exportar) then
if (_type(exportar) == "boolean") then
if (type(exportar) == "boolean") then
--keyName = "received"
else
keyName = exportar.key
@@ -416,7 +416,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
_table_sort (conteudo, sort_alternateenergy_group)
for index, player in _ipairs(conteudo) do
for index, player in ipairs(conteudo) do
if (player.grupo) then
if (player.alternatepower < 1) then
amount = index - 1
@@ -435,7 +435,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
_table_sort (conteudo, sort_energy_group)
for index, player in _ipairs(conteudo) do
for index, player in ipairs(conteudo) do
if (player.grupo) then
if (player.received < 1) then
amount = index - 1
@@ -488,7 +488,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
if (following) then
if (using_cache) then
local pname = _detalhes.playername
for i, actor in _ipairs(conteudo) do
for i, actor in ipairs(conteudo) do
if (actor.nome == pname) then
myPos = i
break
@@ -532,8 +532,8 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
end
row1:SetValue(100)
local r, g, b = unpack (instancia.total_bar.color)
row1.textura:SetVertexColor (r, g, b)
local r, g, b = unpack(instancia.total_bar.color)
row1.textura:SetVertexColor(r, g, b)
row1.icone_classe:SetTexture(instancia.total_bar.icon)
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
@@ -593,8 +593,8 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
end
row1:SetValue(100)
local r, g, b = unpack (instancia.total_bar.color)
row1.textura:SetVertexColor (r, g, b)
local r, g, b = unpack(instancia.total_bar.color)
row1.textura:SetVertexColor(r, g, b)
row1.icone_classe:SetTexture(instancia.total_bar.icon)
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
@@ -653,7 +653,7 @@ function atributo_energy:RefreshLine(instancia, barras_container, whichRowLine,
local esta_barra = instancia.barras[whichRowLine] --pega a referncia da barra na janela
if (not esta_barra) then
print ("DEBUG: problema com <instancia.esta_barra> "..whichRowLine.." "..lugar)
print("DEBUG: problema com <instancia.esta_barra> "..whichRowLine.." "..lugar)
return
end
@@ -737,10 +737,10 @@ function atributo_energy:RefreshBarra2 (esta_barra, instancia, tabela_anterior,
Details.FadeHandler.Fader(esta_barra, "out")
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
esta_barra.textura:SetVertexColor(actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
if (instancia.row_info.texture_background_class_color) then
esta_barra.background:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
esta_barra.background:SetVertexColor(actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
return self:RefreshBarra (esta_barra, instancia)
@@ -816,8 +816,8 @@ function atributo_energy:ToolTip (instancia, numero, barra, keydown)
if (resource_string) then
local icon = _detalhes.resource_icons [self.resource_type]
GameCooltip:AddLine (resource_string, floor (self.resource) .. " (" .. _cstr ("%.2f", self.resource / instancia.showing:GetCombatTime()) .. " per second)", 1, "white")
GameCooltip:AddIcon (icon.file, 1, 1, 16, 16, unpack (icon.coords))
GameCooltip:AddLine(resource_string, floor(self.resource) .. " (" .. _cstr ("%.2f", self.resource / instancia.showing:GetCombatTime()) .. " per second)", 1, "white")
GameCooltip:AddIcon (icon.file, 1, 1, 16, 16, unpack(icon.coords))
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], resource_bg_coords, resource_bg_color, true)
return true
@@ -839,7 +839,7 @@ local reset_tooltips_table = function()
t[1], t[2], t[3] = "", 0, ""
end
for k, v in _pairs (energy_tooltips_hash) do
for k, v in _pairs(energy_tooltips_hash) do
energy_tooltips_hash [k] = nil
end
end
@@ -850,9 +850,9 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
local owner = self.owner
if (owner and owner.classe) then
r, g, b = unpack (_detalhes.class_colors [owner.classe])
r, g, b = unpack(_detalhes.class_colors [owner.classe])
else
r, g, b = unpack (_detalhes.class_colors [self.classe])
r, g, b = unpack(_detalhes.class_colors [self.classe])
end
local powertype = self.powertype
@@ -864,10 +864,10 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
--spells:
local i = 1
for index, actor in _ipairs(container._ActorTable) do
for index, actor in ipairs(container._ActorTable) do
if (actor.powertype == powertype) then
for spellid, spell in _pairs (actor.spells._ActorTable) do
for spellid, spell in _pairs(actor.spells._ActorTable) do
local on_self = spell.targets [name]
if (on_self) then
local already_tracked = energy_tooltips_hash [spellid]
@@ -925,7 +925,7 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
end
local nome_magia, _, icone_magia = _GetSpellInfo(spell [1])
GameCooltip:AddLine (nome_magia, FormatTooltipNumber (_, spell [2]).." (".._cstr("%.1f", (spell [2]/total_regenerado) * 100).."%)")
GameCooltip:AddLine(nome_magia, FormatTooltipNumber (_, spell [2]).." (".._cstr("%.1f", (spell [2]/total_regenerado) * 100).."%)")
GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
_detalhes:AddTooltipBackgroundStatusbar (false, spell [2] / energy_tooltips_table [1][2] * 100)
end
@@ -934,7 +934,7 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
reset_tooltips_table()
i = 1
for index, actor in _ipairs(container._ActorTable) do
for index, actor in ipairs(container._ActorTable) do
if (actor.powertype == powertype) then
local on_self = actor.targets [name]
@@ -983,7 +983,7 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
break
end
GameCooltip:AddLine (source [1], FormatTooltipNumber (_, source [2]).." (".._cstr("%.1f", (source [2] / total_regenerado) * 100).."%)")
GameCooltip:AddLine(source [1], FormatTooltipNumber (_, source [2]).." (".._cstr("%.1f", (source [2] / total_regenerado) * 100).."%)")
_detalhes:AddTooltipBackgroundStatusbar()
local classe = source [3]
@@ -993,7 +993,7 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
if (classe == "UNKNOW") then
GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, nil, icon_size.W, icon_size.H, .25, .5, 0, 1)
else
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, icon_size.W, icon_size.H, _unpack (_detalhes.class_coords [classe]))
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, icon_size.W, icon_size.H, _unpack(_detalhes.class_coords [classe]))
end
end
@@ -1001,7 +1001,7 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
--player generators
local allGeneratorSpells = {}
local allGenerated = 0
for spellid, spellObject in _pairs (self.spells._ActorTable) do
for spellid, spellObject in _pairs(self.spells._ActorTable) do
tinsert(allGeneratorSpells, {spellObject, spellObject.total, spellObject.totalover})
allGenerated = allGenerated + spellObject.total
end
@@ -1014,7 +1014,7 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
for i = 1, #allGeneratorSpells do
local thisGenerator = allGeneratorSpells [i]
local spellName, _, spellIcon = GetSpellInfo(thisGenerator[1].id)
GameCooltip:AddLine (spellName, FormatTooltipNumber (_, thisGenerator[2]) .. " (|cFFFF5555overflow: " .. FormatTooltipNumber (_, thisGenerator[3]) .. "|r | " .. _cstr ("%.1f", (thisGenerator[2] / allGenerated) * 100).."%)")
GameCooltip:AddLine(spellName, FormatTooltipNumber (_, thisGenerator[2]) .. " (|cFFFF5555overflow: " .. FormatTooltipNumber (_, thisGenerator[3]) .. "|r | " .. _cstr ("%.1f", (thisGenerator[2] / allGenerated) * 100).."%)")
GameCooltip:AddIcon (spellIcon, nil, nil, icon_size.W, icon_size.H, .1, .9, .1, .9)
_detalhes:AddTooltipBackgroundStatusbar()
end
@@ -1023,7 +1023,7 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
_detalhes:AddTooltipSpellHeaderText (self.nome .. " Auto Regen Overflow", headerColor, 1, [[Interface\CHARACTERFRAME\Disconnect-Icon]], 0.3, 0.7, 0.3, 0.7)
_detalhes:AddTooltipHeaderStatusbar (r, g, b, 1)
GameCooltip:AddLine ("Auto Regen Overflow", FormatTooltipNumber (_, self.passiveover) .. " ( " .. _cstr ("%.1f", self.passiveover / (self.passiveover + self.total) * 100) .. "%)")
GameCooltip:AddLine("Auto Regen Overflow", FormatTooltipNumber (_, self.passiveover) .. " ( " .. _cstr ("%.1f", self.passiveover / (self.passiveover + self.total) * 100) .. "%)")
GameCooltip:AddIcon ([[Interface\COMMON\Indicator-Red]], nil, nil, icon_size.W, icon_size.H)
_detalhes:AddTooltipBackgroundStatusbar()
@@ -1066,10 +1066,10 @@ function atributo_energy:MontaInfoRegenRecebido()
--spells:
local i = 1
for index, actor in _ipairs(container._ActorTable) do
for index, actor in ipairs(container._ActorTable) do
if (actor.powertype == powertype) then
for spellid, spell in _pairs (actor.spells._ActorTable) do
for spellid, spell in _pairs(actor.spells._ActorTable) do
local on_self = spell.targets [my_name]
if (on_self) then
@@ -1106,7 +1106,7 @@ function atributo_energy:MontaInfoRegenRecebido()
gump:JI_AtualizaContainerBarras (amt)
local max_ = energy_tooltips_table [1][2]
for index, tabela in _ipairs(energy_tooltips_table) do
for index, tabela in ipairs(energy_tooltips_table) do
if (tabela [2] < 1) then
break
@@ -1142,7 +1142,7 @@ function atributo_energy:MontaInfoRegenRecebido()
reset_tooltips_table()
i = 1
for index, actor in _ipairs(container._ActorTable) do
for index, actor in ipairs(container._ActorTable) do
if (actor.powertype == powertype) then
local on_self = actor.targets [my_name]
@@ -1168,7 +1168,7 @@ function atributo_energy:MontaInfoRegenRecebido()
local max_fontes = energy_tooltips_table[1][2]
local barra
for index, tabela in _ipairs(energy_tooltips_table) do
for index, tabela in ipairs(energy_tooltips_table) do
if (tabela [2] < 1) then
break
@@ -1203,7 +1203,7 @@ function atributo_energy:MontaInfoRegenRecebido()
barra.minha_tabela = self
--print ("nome_inimigo = ", tabela [1])
--print("nome_inimigo = ", tabela [1])
barra.nome_inimigo = tabela [1]
barra:Show()
@@ -1213,7 +1213,7 @@ end
function atributo_energy:MontaDetalhesRegenRecebido (nome, barra)
for _, barra in _ipairs(info.barras3) do
for _, barra in ipairs(info.barras3) do
barra:Hide()
end
@@ -1235,7 +1235,7 @@ function atributo_energy:MontaDetalhesRegenRecebido (nome, barra)
--spells:
local i = 1
for index, actor in _ipairs(container._ActorTable) do
for index, actor in ipairs(container._ActorTable) do
if (actor.powertype == powertype) then
local spell = actor.spells._ActorTable [spellid]
if (spell) then
@@ -1264,7 +1264,7 @@ function atributo_energy:MontaDetalhesRegenRecebido (nome, barra)
local max_ = energy_tooltips_table [1][2]
local barra
for index, tabela in _ipairs(from) do
for index, tabela in ipairs(from) do
if (tabela [2] < 1) then
break
@@ -1286,10 +1286,10 @@ function atributo_energy:MontaDetalhesRegenRecebido (nome, barra)
barra.lineText1:SetText(index .. "." .. tabela [1])
barra.lineText4:SetText(_detalhes:comma_value (tabela[2]) .." (" .. _cstr("%.1f", tabela[2] / total_regenerado * 100) .."%)")
barra.textura:SetStatusBarColor (_unpack (_detalhes.class_colors [tabela[3]]))
barra.textura:SetStatusBarColor (_unpack(_detalhes.class_colors [tabela[3]]))
barra.icone:SetTexture("Interface\\AddOns\\Details\\images\\classes_small")
barra.icone:SetTexCoord (_unpack (_detalhes.class_coords [tabela[3]]))
barra.icone:SetTexCoord (_unpack(_detalhes.class_coords [tabela[3]]))
barra:Show() --mostra a barra
@@ -1314,13 +1314,13 @@ function atributo_energy:MontaTooltipAlvos (esta_barra, index)
local actor = container._ActorTable [container._NameIndexTable [esta_barra.nome_inimigo]]
--print ("Mouse Over", actor, esta_barra.nome_inimigo, self.tipo)
--print("Mouse Over", actor, esta_barra.nome_inimigo, self.tipo)
if (actor) then
--spells:
local i = 1
for spellid, spell in _pairs (actor.spells._ActorTable) do
for spellid, spell in _pairs(actor.spells._ActorTable) do
local on_self = spell.targets [my_name]
if (on_self) then
local t = energy_tooltips_table [i]
@@ -1336,9 +1336,9 @@ function atributo_energy:MontaTooltipAlvos (esta_barra, index)
i = i - 1
_table_sort (energy_tooltips_table, _detalhes.Sort2)
--print (i, #energy_tooltips_table)
--print(i, #energy_tooltips_table)
for index, spell in _ipairs(energy_tooltips_table) do
for index, spell in ipairs(energy_tooltips_table) do
if (spell [2] < 1) then
break
end
@@ -1371,7 +1371,7 @@ end
--subtract total from a combat table
function atributo_energy:subtract_total (combat_table)
--print ("reduce total:", combat_table.totals [class_type] [self.powertype], self.total, self.powertype, self.nome)
--print("reduce total:", combat_table.totals [class_type] [self.powertype], self.total, self.powertype, self.nome)
if (self.powertype and combat_table.totals [class_type] [self.powertype]) then
combat_table.totals [class_type] [self.powertype] = combat_table.totals [class_type] [self.powertype] - self.total
if (self.grupo) then
@@ -1381,7 +1381,7 @@ end
end
function atributo_energy:add_total (combat_table)
--print ("add total:", combat_table.totals [class_type] [self.powertype], self.total)
--print("add total:", combat_table.totals [class_type] [self.powertype], self.total)
if (self.powertype and combat_table.totals [class_type] [self.powertype]) then
combat_table.totals [class_type] [self.powertype] = combat_table.totals [class_type] [self.powertype] + self.total
@@ -1423,15 +1423,15 @@ end
end
--targets
for target_name, amount in _pairs (actor.targets) do
for target_name, amount in _pairs(actor.targets) do
shadow.targets [target_name] = 0
end
--spells
for spellid, habilidade in _pairs (actor.spells._ActorTable) do
for spellid, habilidade in _pairs(actor.spells._ActorTable) do
local habilidade_shadow = shadow.spells:PegaHabilidade (spellid, true, "SPELL_ENERGY", false)
--spell targets
for target_name, amount in _pairs (habilidade.targets) do
for target_name, amount in _pairs(habilidade.targets) do
habilidade_shadow.targets [target_name] = 0
end
end
@@ -1467,7 +1467,7 @@ end
end
--pets (add unique pet names)
for _, petName in _ipairs(actor.pets) do
for _, petName in ipairs(actor.pets) do
DetailsFramework.table.addunique (shadow.pets, petName)
end
@@ -1477,7 +1477,7 @@ end
shadow.alternatepower = shadow.alternatepower + actor.alternatepower
if (not actor.powertype) then
--print ("actor without powertype", actor.nome, actor.powertype)
--print("actor without powertype", actor.nome, actor.powertype)
actor.powertype = 1
end
@@ -1496,12 +1496,12 @@ end
end
--targets
for target_name, amount in _pairs (actor.targets) do
for target_name, amount in _pairs(actor.targets) do
shadow.targets [target_name] = (shadow.targets [target_name] or 0) + amount
end
--spells
for spellid, habilidade in _pairs (actor.spells._ActorTable) do
for spellid, habilidade in _pairs(actor.spells._ActorTable) do
local habilidade_shadow = shadow.spells:PegaHabilidade (spellid, true, "SPELL_ENERGY", false)
@@ -1509,7 +1509,7 @@ end
habilidade_shadow.counter = habilidade_shadow.counter + habilidade.counter
--spell targets
for target_name, amount in _pairs (habilidade.targets) do
for target_name, amount in _pairs(habilidade.targets) do
habilidade_shadow.targets [target_name] = (habilidade_shadow.targets [target_name] or 0) + amount
end
@@ -1523,7 +1523,7 @@ function atributo_energy:ColetarLixo (lastevent)
end
function _detalhes.refresh:r_atributo_energy (este_jogador, shadow)
_setmetatable (este_jogador, _detalhes.atributo_energy)
_setmetatable(este_jogador, _detalhes.atributo_energy)
este_jogador.__index = _detalhes.atributo_energy
_detalhes.refresh:r_container_habilidades (este_jogador.spells, shadow and shadow.spells)
@@ -1558,12 +1558,12 @@ atributo_energy.__add = function(tabela1, tabela2)
tabela1.alternatepower = tabela1.alternatepower + tabela2.alternatepower
--targets
for target_name, amount in _pairs (tabela2.targets) do
for target_name, amount in _pairs(tabela2.targets) do
tabela1.targets [target_name] = (tabela1.targets [target_name] or 0) + amount
end
--spells
for spellid, habilidade in _pairs (tabela2.spells._ActorTable) do
for spellid, habilidade in _pairs(tabela2.spells._ActorTable) do
local habilidade_tabela1 = tabela1.spells:PegaHabilidade (spellid, true, "SPELL_ENERGY", false)
@@ -1571,7 +1571,7 @@ atributo_energy.__add = function(tabela1, tabela2)
habilidade_tabela1.counter = habilidade_tabela1.counter + habilidade.counter
--spell targets
for target_name, amount in _pairs (habilidade.targets) do
for target_name, amount in _pairs(habilidade.targets) do
habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) + amount
end
@@ -1596,14 +1596,14 @@ atributo_energy.__sub = function(tabela1, tabela2)
tabela1.alternatepower = tabela1.alternatepower - tabela2.alternatepower
--targets
for target_name, amount in _pairs (tabela2.targets) do
for target_name, amount in _pairs(tabela2.targets) do
if (tabela1.targets [target_name]) then
tabela1.targets [target_name] = tabela1.targets [target_name] - amount
end
end
--spells
for spellid, habilidade in _pairs (tabela2.spells._ActorTable) do
for spellid, habilidade in _pairs(tabela2.spells._ActorTable) do
local habilidade_tabela1 = tabela1.spells:PegaHabilidade (spellid, true, "SPELL_ENERGY", false)
@@ -1611,7 +1611,7 @@ atributo_energy.__sub = function(tabela1, tabela2)
habilidade_tabela1.counter = habilidade_tabela1.counter - habilidade.counter
--spell targets
for target_name, amount in _pairs (habilidade.targets) do
for target_name, amount in _pairs(habilidade.targets) do
if (habilidade_tabela1.targets [target_name]) then
habilidade_tabela1.targets [target_name] = habilidade_tabela1.targets [target_name] - amount
end
+3 -3
View File
@@ -5,7 +5,7 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--local pointers
local _ipairs = ipairs--lua local
local ipairs = ipairs--lua local
local _pairs = pairs--lua local
local _UnitAura = UnitAura--api local
@@ -152,7 +152,7 @@
if (ThisDebuff) then
local ThisDebuffOnTarget = ThisDebuff [serial]
if (ThisDebuffOnTarget) then
for index, buff_name in _ipairs(ThisDebuffOnTarget.buffs) do
for index, buff_name in ipairs(ThisDebuffOnTarget.buffs) do
local buff_info = SpellBuffDetails [buff_name] or {["counter"] = 0, ["total"] = 0, ["critico"] = 0, ["critico_dano"] = 0}
buff_info.counter = buff_info.counter+1
buff_info.total = buff_info.total+amount
@@ -168,7 +168,7 @@
else
for BuffName, _ in _pairs (_detalhes.Buffs.BuffsTable) do
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}
+1 -1
View File
@@ -7,7 +7,7 @@
--local pointers
local _setmetatable = setmetatable --lua local
local _ipairs = ipairs --lua local
local ipairs = ipairs --lua local
local _UnitAura = UnitAura --api local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+2 -2
View File
@@ -6,7 +6,7 @@
--local pointers
local _setmetatable = setmetatable --lua local
local _ipairs = ipairs --lua local
local ipairs = ipairs --lua local
local _UnitAura = UnitAura --api local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -52,7 +52,7 @@
function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spellName)
--print (self.id, GetSpellInfo(self.id))
--print(self.id, GetSpellInfo(self.id))
if (spellID == "BUFF_OR_DEBUFF") then
+100 -100
View File
@@ -8,10 +8,10 @@ local pairs = pairs
local _rawget= rawget
local min = math.min
local _math_max = math.max
local _math_abs = math.abs
local abs = math.abs
local _bit_band = bit.band
local unpack = unpack
local _type = type
local type = type
--api locals
local _GetSpellInfo = _detalhes.getspellinfo
local GameTooltip = GameTooltip
@@ -30,7 +30,7 @@ local _string_replace = _detalhes.string.replace --details api
local _detalhes = _G._detalhes
local Details = _detalhes
local AceLocale = LibStub ("AceLocale-3.0")
local AceLocale = LibStub("AceLocale-3.0")
local Loc = AceLocale:GetLocale ( "Details" )
local gump = _detalhes.gump
@@ -153,7 +153,7 @@ function _detalhes:ContainerSortMisc(container, amount, keyName2)
end
--[[exported]] function _detalhes:GetSpellCastAmount (combat, actorName, spellId)
local misc_actor = combat:GetActor (4, actorName)
local misc_actor = combat:GetActor(4, actorName)
if (misc_actor) then
local spell_cast = misc_actor.spell_cast and misc_actor.spell_cast [spellId]
@@ -228,10 +228,10 @@ function Details:ShowDeathTooltip(combatObject, deathTable)
local evType = event[1]
local spellName, _, spellIcon = _GetSpellInfo(event[2])
local amount = event[3]
local time = event[4]
local eventTime = event[4]
local source = event[6]
if (time + 12 > timeOfDeath) then
if (eventTime + 12 > timeOfDeath) then
if (type(evType) == "boolean") then
--is damage or heal?
if (evType) then --bool true
@@ -252,10 +252,10 @@ function Details:ShowDeathTooltip(combatObject, deathTable)
--end
overkill = " (" .. Details:ToK(overkill) .. " |cFFFF8800overkill|r)"
gameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s |cFFFFFF00" .. spellName .. "|r (|cFFC6B0D9" .. source .. "|r)", "-" .. Details:ToK(amount) .. critOrCrush .. overkill .. " (" .. healthPercent .. "%)", 1, "white", "white")
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s |cFFFFFF00" .. spellName .. "|r (|cFFC6B0D9" .. source .. "|r)", "-" .. Details:ToK(amount) .. critOrCrush .. overkill .. " (" .. healthPercent .. "%)", 1, "white", "white")
else
overkill = ""
gameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "-" .. Details:ToK(amount) .. critOrCrush .. overkill .. " (" .. healthPercent .. "%)", 1, "white", "white")
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "-" .. Details:ToK(amount) .. critOrCrush .. overkill .. " (" .. healthPercent .. "%)", 1, "white", "white")
end
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
@@ -272,12 +272,12 @@ function Details:ShowDeathTooltip(combatObject, deathTable)
if (amount > Details.deathlog_healingdone_min) then
if (combatObject.is_arena) then
if (amount > Details.deathlog_healingdone_min_arena) then
gameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. Details:ToK(amount) .. " (" .. healthPercent .. "%)", 1, "white", "white")
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. Details:ToK(amount) .. " (" .. healthPercent .. "%)", 1, "white", "white")
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
gameCooltip:AddStatusBar(healthPercent, 1, barTypeColors.heal, true)
end
else
gameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. Details:ToK(amount) .. " (" .. healthPercent .. "%)", 1, "white", "white")
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. Details:ToK(amount) .. " (" .. healthPercent .. "%)", 1, "white", "white")
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
gameCooltip:AddStatusBar(healthPercent, 1, barTypeColors.heal, true)
end
@@ -287,7 +287,7 @@ function Details:ShowDeathTooltip(combatObject, deathTable)
elseif (type(evType) == "number") then
if (evType == 1) then
--cooldown
gameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s " .. spellName .. " (" .. source .. ")", "cooldown (" .. healthPercent .. "%)", 1, "white", "white")
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (" .. source .. ")", "cooldown (" .. healthPercent .. "%)", 1, "white", "white")
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
gameCooltip:AddStatusBar(100, 1, barTypeColors.cooldown, true)
@@ -301,7 +301,7 @@ function Details:ShowDeathTooltip(combatObject, deathTable)
elseif (evType == 4) then
--debuff
gameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s [x" .. amount .. "] " .. spellName .. " (" .. source .. ")", "debuff (" .. healthPercent .. "%)", 1, "white", "white")
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s [x" .. amount .. "] " .. spellName .. " (" .. source .. ")", "debuff (" .. healthPercent .. "%)", 1, "white", "white")
gameCooltip:AddIcon(spellIcon)
gameCooltip:AddStatusBar(100, 1, barTypeColors.debuff, true)
@@ -389,7 +389,7 @@ local ReportSingleDeathFunc = function(IsCurrent, IsReverse, AmtLines)
t [#t+1] = table [1] .. table [4] .. table [2] .. table [3]
end
local title = tremove (t, 1)
local title = tremove(t, 1)
t = _detalhes.table.reverse (t)
tinsert(t, 1, title)
@@ -423,7 +423,7 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia)
report_array[1] = {"Details! " .. Loc ["STRING_REPORT_SINGLE_DEATH"] .. " " .. morte [3] .. " " .. Loc ["STRING_ACTORFRAME_REPORTAT"] .. " " .. morte [6], "", "", ""}
for index, evento in ipairs(_detalhes.table.reverse (morte [1])) do
if (evento [1] and type (evento [1]) == "boolean") then --damage
if (evento [1] and type(evento [1]) == "boolean") then --damage
if (evento [3]) then
local elapsed = _cstr ("%.1f", evento [4] - time_of_death) .."s"
local spellname, _, spellicon = _GetSpellInfo(evento [2])
@@ -437,7 +437,7 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia)
spelllink = spellname
end
local source = _detalhes:GetOnlyName (evento [6])
local source = _detalhes:GetOnlyName(evento [6])
local amount = evento [3]
local hp = _math_floor(evento [5] / max_health * 100)
if (hp > 100) then
@@ -447,14 +447,14 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia)
tinsert(report_array, {elapsed .. " ", spelllink, " (" .. source .. ")", "-" .. _detalhes:ToK (amount) .. " (" .. hp .. "%) "})
end
elseif (not evento [1] and type (evento [1]) == "boolean") then --heal
elseif (not evento [1] and type(evento [1]) == "boolean") then --heal
local amount = evento [3]
if (amount > _detalhes.deathlog_healingdone_min) then
local elapsed = _cstr ("%.1f", evento [4] - time_of_death) .."s"
local spelllink = GetSpellLink(evento [2])
local source = _detalhes:GetOnlyName (evento [6])
local source = _detalhes:GetOnlyName(evento [6])
local spellname, _, spellicon = _GetSpellInfo(evento [2])
local hp = _math_floor(evento [5] / max_health * 100)
@@ -473,7 +473,7 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia)
local elapsed = _cstr ("%.1f", evento [4] - time_of_death) .."s"
local spelllink = GetSpellLink(evento [2])
local source = _detalhes:GetOnlyName (evento [6])
local source = _detalhes:GetOnlyName(evento [6])
local spellname, _, spellicon = _GetSpellInfo(evento [2])
local stacks = evento [3]
local hp = _math_floor(evento [5] / max_health * 100)
@@ -524,13 +524,13 @@ function atributo_misc:ReportSingleCooldownLine (misc_actor, instancia)
end
local buff_format_name = function(spellid)
if (_type(spellid) == "string") then
if (type(spellid) == "string") then
return spellid
end
return _detalhes:GetSpellLink(spellid)
end
local buff_format_amount = function(t)
local total, percent = unpack (t)
local total, percent = unpack(t)
local m, s = _math_floor(total / 60), _math_floor(total % 60)
return _cstr ("%.1f", percent) .. "% (" .. m .. "m " .. s .. "s)"
end
@@ -579,7 +579,7 @@ function atributo_misc:DeadAtualizarBarra (morte, whichRowLine, colocacao, insta
local esta_barra = instancia.barras[whichRowLine] --pega a referncia da barra na janela
if (not esta_barra) then
print ("DEBUG: problema com <instancia.esta_barra> "..whichRowLine.." "..lugar)
print("DEBUG: problema com <instancia.esta_barra> "..whichRowLine.." "..lugar)
return
end
@@ -592,7 +592,7 @@ function atributo_misc:DeadAtualizarBarra (morte, whichRowLine, colocacao, insta
esta_barra.colocacao = colocacao
if (not getmetatable (morte)) then
setmetatable (morte, {__call = RefreshBarraMorte})
setmetatable(morte, {__call = RefreshBarraMorte})
morte._custom = true
end
@@ -607,7 +607,7 @@ function atributo_misc:DeadAtualizarBarra (morte, whichRowLine, colocacao, insta
end
--seta a cor da barra e a cor do texto caso eles esteja mostrando com a cor da classe
local r, g, b, a = unpack (_detalhes.class_colors [morte[4]])
local r, g, b, a = unpack(_detalhes.class_colors [morte[4]])
_detalhes:SetBarColors (esta_barra, instancia, r, g, b, a)
if (instancia.row_info.use_spec_icons) then
@@ -615,11 +615,11 @@ function atributo_misc:DeadAtualizarBarra (morte, whichRowLine, colocacao, insta
local spec = instancia.showing (1, nome) and instancia.showing (1, nome).spec or (instancia.showing (2, nome) and instancia.showing (2, nome).spec)
if (spec and spec ~= 0) then
esta_barra.icone_classe:SetTexture(instancia.row_info.spec_file)
esta_barra.icone_classe:SetTexCoord (unpack (_detalhes.class_specs_coords[spec]))
esta_barra.icone_classe:SetTexCoord (unpack(_detalhes.class_specs_coords[spec]))
else
if (CLASS_ICON_TCOORDS [morte[4]]) then
esta_barra.icone_classe:SetTexture(instancia.row_info.icon_file)
esta_barra.icone_classe:SetTexCoord (unpack (CLASS_ICON_TCOORDS [morte[4]]))
esta_barra.icone_classe:SetTexCoord (unpack(CLASS_ICON_TCOORDS [morte[4]]))
else
local texture, l, r, t, b = Details:GetUnknownClassIcon()
esta_barra.icone_classe:SetTexture(texture)
@@ -629,7 +629,7 @@ function atributo_misc:DeadAtualizarBarra (morte, whichRowLine, colocacao, insta
else
if (CLASS_ICON_TCOORDS [morte[4]]) then
esta_barra.icone_classe:SetTexture(instancia.row_info.icon_file)
esta_barra.icone_classe:SetTexCoord (unpack (CLASS_ICON_TCOORDS [morte[4]]))
esta_barra.icone_classe:SetTexCoord (unpack(CLASS_ICON_TCOORDS [morte[4]]))
else
local texture, l, r, t, b = Details:GetUnknownClassIcon()
esta_barra.icone_classe:SetTexture(texture)
@@ -637,7 +637,7 @@ function atributo_misc:DeadAtualizarBarra (morte, whichRowLine, colocacao, insta
end
end
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
esta_barra.icone_classe:SetVertexColor(1, 1, 1)
if (esta_barra.mouse_over and not instancia.baseframe.isMoving) then --precisa atualizar o tooltip
gump:UpdateTooltip (whichRowLine, esta_barra, instancia)
@@ -664,7 +664,7 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo
local modo = instancia.modo
if (exportar) then
if (_type(exportar) == "boolean") then
if (type(exportar) == "boolean") then
if (sub_atributo == 1) then --CC BREAKS
keyName = "cc_break"
elseif (sub_atributo == 2) then --RESS
@@ -891,7 +891,7 @@ function atributo_misc:RefreshLine(instancia, barras_container, whichRowLine, lu
local esta_barra = instancia.barras[whichRowLine] --pega a referncia da barra na janela
if (not esta_barra) then
print ("DEBUG: problema com <instancia.esta_barra> "..whichRowLine.." "..lugar)
print("DEBUG: problema com <instancia.esta_barra> "..whichRowLine.." "..lugar)
return
end
@@ -975,10 +975,10 @@ function atributo_misc:RefreshBarra2 (esta_barra, instancia, tabela_anterior, fo
Details.FadeHandler.Fader(esta_barra, "out")
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
esta_barra.textura:SetVertexColor(actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
if (instancia.row_info.texture_background_class_color) then
esta_barra.background:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
esta_barra.background:SetVertexColor(actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
return self:RefreshBarra (esta_barra, instancia)
@@ -1079,9 +1079,9 @@ function atributo_misc:ToolTipCC (instancia, numero, barra)
local owner = self.owner
if (owner and owner.classe) then
r, g, b = unpack (_detalhes.class_colors [owner.classe])
r, g, b = unpack(_detalhes.class_colors [owner.classe])
else
r, g, b = unpack (_detalhes.class_colors [self.classe])
r, g, b = unpack(_detalhes.class_colors [self.classe])
end
local meu_total = self ["cc_break"]
@@ -1097,7 +1097,7 @@ function atributo_misc:ToolTipCC (instancia, numero, barra)
--quantidade
local nome_magia, _, icone_magia = _GetSpellInfo(_spellid)
GameCooltip:AddLine (nome_magia, _tabela.cc_break .. " (" .. _cstr ("%.1f", _tabela.cc_break / meu_total * 100) .. "%)")
GameCooltip:AddLine(nome_magia, _tabela.cc_break .. " (" .. _cstr ("%.1f", _tabela.cc_break / meu_total * 100) .. "%)")
GameCooltip:AddIcon (icone_magia, nil, nil, lineHeight, lineHeight, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
_detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha)
@@ -1105,7 +1105,7 @@ function atributo_misc:ToolTipCC (instancia, numero, barra)
local quebrou_oque = _tabela.cc_break_oque
for spellid_quebrada, amt_quebrada in pairs(_tabela.cc_break_oque) do
local nome_magia, _, icone_magia = _GetSpellInfo(spellid_quebrada)
GameCooltip:AddLine (nome_magia, amt_quebrada .. " ")
GameCooltip:AddLine(nome_magia, amt_quebrada .. " ")
GameCooltip:AddIcon ([[Interface\Buttons\UI-GroupLoot-Pass-Down]], nil, 1, 14, 14)
GameCooltip:AddIcon (icone_magia, nil, 2, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
GameCooltip:AddStatusBar (100, 1, 1, 0, 0, .2)
@@ -1113,12 +1113,12 @@ function atributo_misc:ToolTipCC (instancia, numero, barra)
--em quem quebrou
for target_name, amount in pairs(_tabela.targets) do
GameCooltip:AddLine (target_name .. ": ", amount .. " ")
GameCooltip:AddLine(target_name .. ": ", amount .. " ")
local classe = _detalhes:GetClass (target_name)
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\espadas]], nil, 1, lineHeight, lineHeight)
if (classe) then
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], nil, 2, lineHeight, lineHeight, unpack (_detalhes.class_coords [classe]))
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], nil, 2, lineHeight, lineHeight, unpack(_detalhes.class_coords [classe]))
else
GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, 2, lineHeight, lineHeight, .25, .5, 0, 1)
end
@@ -1135,9 +1135,9 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
local owner = self.owner
if (owner and owner.classe) then
r, g, b = unpack (_detalhes.class_colors [owner.classe])
r, g, b = unpack(_detalhes.class_colors [owner.classe])
else
r, g, b = unpack (_detalhes.class_colors [self.classe])
r, g, b = unpack(_detalhes.class_colors [self.classe])
end
local meu_total = _math_floor(self ["dispell"])
@@ -1164,12 +1164,12 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
for i = 1, min (25, #meus_dispells) do
local esta_habilidade = meus_dispells[i]
local nome_magia, _, icone_magia = _GetSpellInfo(esta_habilidade[1])
GameCooltip:AddLine (nome_magia, esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
GameCooltip:AddLine(nome_magia, esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
_detalhes:AddTooltipBackgroundStatusbar()
end
else
GameTooltip:AddLine (Loc ["STRING_NO_SPELL"])
GameTooltip:AddLine(Loc ["STRING_NO_SPELL"])
end
--quais habilidades foram dispaladas
@@ -1186,7 +1186,7 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
for i = 1, min (25, #buffs_dispelados) do
local esta_habilidade = buffs_dispelados[i]
local nome_magia, _, icone_magia = _GetSpellInfo(esta_habilidade[1])
GameCooltip:AddLine (nome_magia, esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
GameCooltip:AddLine(nome_magia, esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
_detalhes:AddTooltipBackgroundStatusbar()
end
@@ -1208,7 +1208,7 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
break
end
GameCooltip:AddLine (alvos_dispelados[i][1], _detalhes:comma_value (alvos_dispelados[i][2]) .." (".._cstr ("%.1f", alvos_dispelados[i][3]).."%)")
GameCooltip:AddLine(alvos_dispelados[i][1], _detalhes:comma_value (alvos_dispelados[i][2]) .." (".._cstr ("%.1f", alvos_dispelados[i][3]).."%)")
_detalhes:AddTooltipBackgroundStatusbar()
local targetActor = instancia.showing[4]:PegarCombatente (_, alvos_dispelados[i][1])
@@ -1221,7 +1221,7 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
if (classe == "UNKNOW") then
GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, nil, 14, 14, .25, .5, 0, 1)
else
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, unpack (_detalhes.class_coords [classe]))
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, unpack(_detalhes.class_coords [classe]))
end
end
end
@@ -1270,7 +1270,7 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
end
local n = _table [1]:gsub (("%s%<.*"), "")
GameCooltip:AddLine (n, _table [2] .. " (" .. _math_floor(_table [2]/self.dispell*100) .. "%)")
GameCooltip:AddLine(n, _table [2] .. " (" .. _math_floor(_table [2]/self.dispell*100) .. "%)")
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], 1, 1, 14, 14, 0.25, 0.49609375, 0.75, 1)
end
@@ -1335,7 +1335,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
for raidIndex = 1, _GetNumGroupMembers() do
local target = "raid"..raidIndex.."target"
local his_target = _UnitGUID (target)
local his_target = _UnitGUID(target)
if (his_target and not checked [his_target]) then
local rect = UnitReaction (target, "player")
@@ -1346,7 +1346,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
for debuffIndex = 1, 41 do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff (target, debuffIndex)
if (name and unitCaster) then
local playerGUID = _UnitGUID (unitCaster)
local playerGUID = _UnitGUID(unitCaster)
if (playerGUID) then
local playerName, realmName = _UnitName (unitCaster)
@@ -1367,7 +1367,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
local checked = {}
for raidIndex = 1, _GetNumGroupMembers()-1 do
local his_target = _UnitGUID ("party"..raidIndex.."target")
local his_target = _UnitGUID("party"..raidIndex.."target")
local rect = UnitReaction ("party"..raidIndex.."target", "player")
if (his_target and not checked [his_target] and rect and rect <= 4) then
@@ -1377,7 +1377,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("party"..raidIndex.."target", debuffIndex)
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
local playerGUID = _UnitGUID (unitCaster)
local playerGUID = _UnitGUID(unitCaster)
if (playerGUID) then
if (realmName and realmName ~= "") then
playerName = playerName .. "-" .. realmName
@@ -1390,14 +1390,14 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
end
end
local his_target = _UnitGUID ("playertarget")
local his_target = _UnitGUID("playertarget")
local rect = UnitReaction ("playertarget", "player")
if (his_target and not checked [his_target] and rect and rect <= 4) then
for debuffIndex = 1, 40 do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
local playerGUID = _UnitGUID (unitCaster)
local playerGUID = _UnitGUID(unitCaster)
if (playerGUID) then
if (realmName and realmName ~= "") then
playerName = playerName .. "-" .. realmName
@@ -1409,7 +1409,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
end
else
local his_target = _UnitGUID ("playertarget")
local his_target = _UnitGUID("playertarget")
if (his_target) then
local reaction = UnitReaction ("playertarget", "player")
if (reaction and reaction <= 4) then
@@ -1417,7 +1417,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
local playerGUID = _UnitGUID (unitCaster)
local playerGUID = _UnitGUID(unitCaster)
if (playerGUID) then
if (realmName and realmName ~= "") then
playerName = playerName .. "-" .. realmName
@@ -1451,7 +1451,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
for raidIndex = 1, _GetNumGroupMembers() do
local RaidIndex = "raid" .. raidIndex
local playerGUID = _UnitGUID (RaidIndex)
local playerGUID = _UnitGUID(RaidIndex)
if (playerGUID) then
@@ -1508,7 +1508,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
if (name and unitCaster and UnitExists (unitCaster) and UnitExists ("party" .. groupIndex) and UnitIsUnit (unitCaster, "party" .. groupIndex)) then
local playerName, realmName = _UnitName ("party"..groupIndex)
local playerGUID = _UnitGUID ("party"..groupIndex)
local playerGUID = _UnitGUID("party"..groupIndex)
if (playerGUID) then
if (realmName and realmName ~= "") then
@@ -1535,7 +1535,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
if (name and unitCaster and UnitExists (unitCaster) and UnitIsUnit (unitCaster, "player")) then
local playerName = _UnitName ("player")
local playerGUID = _UnitGUID ("player")
local playerGUID = _UnitGUID("player")
if (playerGUID) then
if (in_or_out == "BUFF_UPTIME_IN") then
if (_detalhes.PotionList [spellid]) then
@@ -1576,7 +1576,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
if (name and unitCaster and UnitExists (unitCaster) and UnitIsUnit (unitCaster, "player")) then
local playerName = _UnitName ("player")
local playerGUID = _UnitGUID ("player")
local playerGUID = _UnitGUID("player")
if (playerGUID) then
if (in_or_out == "BUFF_UPTIME_IN") then
@@ -1609,7 +1609,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
end
--]]
-- _detalhes:Msg (string_output)
-- _detalhes:Msg(string_output)
end
end
@@ -1622,9 +1622,9 @@ function atributo_misc:ToolTipDebuffUptime (instancia, numero, barra)
local owner = self.owner
if (owner and owner.classe) then
r, g, b = unpack (_detalhes.class_colors [owner.classe])
r, g, b = unpack(_detalhes.class_colors [owner.classe])
else
r, g, b = unpack (_detalhes.class_colors [self.classe])
r, g, b = unpack(_detalhes.class_colors [self.classe])
end
local meu_total = self ["debuff_uptime"]
@@ -1640,7 +1640,7 @@ function atributo_misc:ToolTipDebuffUptime (instancia, numero, barra)
end
table.sort (debuffs_usados, _detalhes.Sort2)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELLS"], headerColor, #debuffs_usados, _detalhes.tooltip_spell_icon.file, unpack (_detalhes.tooltip_spell_icon.coords))
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELLS"], headerColor, #debuffs_usados, _detalhes.tooltip_spell_icon.file, unpack(_detalhes.tooltip_spell_icon.coords))
_detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha)
local icon_size = _detalhes.tooltip.icon_size
@@ -1655,13 +1655,13 @@ function atributo_misc:ToolTipDebuffUptime (instancia, numero, barra)
local minutos, segundos = _math_floor(esta_habilidade[2]/60), _math_floor(esta_habilidade[2]%60)
if (esta_habilidade[2] >= _combat_time) then
--GameCooltip:AddLine (nome_magia, minutos .. "m " .. segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)", nil, "gray", "gray")
--GameCooltip:AddLine(nome_magia, minutos .. "m " .. segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)", nil, "gray", "gray")
--GameCooltip:AddStatusBar (100, nil, 1, 0, 1, .3, false)
elseif (minutos > 0) then
GameCooltip:AddLine (nome_magia, minutos .. "m " .. segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)")
GameCooltip:AddLine(nome_magia, minutos .. "m " .. segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)")
_detalhes:AddTooltipBackgroundStatusbar (false, esta_habilidade[2] / _combat_time * 100)
else
GameCooltip:AddLine (nome_magia, segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)")
GameCooltip:AddLine(nome_magia, segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)")
_detalhes:AddTooltipBackgroundStatusbar (false, esta_habilidade[2] / _combat_time * 100)
end
@@ -1669,7 +1669,7 @@ function atributo_misc:ToolTipDebuffUptime (instancia, numero, barra)
end
end
else
GameCooltip:AddLine (Loc ["STRING_NO_SPELL"])
GameCooltip:AddLine(Loc ["STRING_NO_SPELL"])
end
return true
@@ -1710,7 +1710,7 @@ function atributo_misc:ToolTipBuffUptime(instance, barFrame)
local minutes, seconds = floor(spellTable[2] / 60), floor(spellTable[2] % 60)
if (spellTable[2] >= combatTime) then
--GameCooltip:AddLine (nome_magia, minutos .. "m " .. segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)", nil, "gray", "gray")
--GameCooltip:AddLine(nome_magia, minutos .. "m " .. segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)", nil, "gray", "gray")
--GameCooltip:AddStatusBar (100, nil, 1, 0, 1, .3, false)
elseif (minutes > 0) then
@@ -1736,9 +1736,9 @@ function atributo_misc:ToolTipDefensiveCooldowns (instancia, numero, barra)
local owner = self.owner
if (owner and owner.classe) then
r, g, b = unpack (_detalhes.class_colors [owner.classe])
r, g, b = unpack(_detalhes.class_colors [owner.classe])
else
r, g, b = unpack (_detalhes.class_colors [self.classe])
r, g, b = unpack(_detalhes.class_colors [self.classe])
end
local meu_total = _math_floor(self ["cooldowns_defensive"])
@@ -1752,7 +1752,7 @@ function atributo_misc:ToolTipDefensiveCooldowns (instancia, numero, barra)
end
table.sort (cooldowns_usados, _detalhes.Sort2)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELLS"], headerColor, #cooldowns_usados, _detalhes.tooltip_spell_icon.file, unpack (_detalhes.tooltip_spell_icon.coords))
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELLS"], headerColor, #cooldowns_usados, _detalhes.tooltip_spell_icon.file, unpack(_detalhes.tooltip_spell_icon.coords))
_detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha)
local icon_size = _detalhes.tooltip.icon_size
@@ -1763,12 +1763,12 @@ function atributo_misc:ToolTipDefensiveCooldowns (instancia, numero, barra)
for i = 1, min (25, #cooldowns_usados) do
local esta_habilidade = cooldowns_usados[i]
local nome_magia, _, icone_magia = _GetSpellInfo(esta_habilidade[1])
GameCooltip:AddLine (nome_magia, esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
GameCooltip:AddLine(nome_magia, esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
_detalhes:AddTooltipBackgroundStatusbar()
end
else
GameCooltip:AddLine (Loc ["STRING_NO_SPELL"])
GameCooltip:AddLine(Loc ["STRING_NO_SPELL"])
end
--targets
@@ -1780,12 +1780,12 @@ function atributo_misc:ToolTipDefensiveCooldowns (instancia, numero, barra)
end
table.sort (alvos, _detalhes.Sort2)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_TARGETS"], headerColor, #alvos, _detalhes.tooltip_target_icon.file, unpack (_detalhes.tooltip_target_icon.coords))
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_TARGETS"], headerColor, #alvos, _detalhes.tooltip_target_icon.file, unpack(_detalhes.tooltip_target_icon.coords))
_detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha)
if (#alvos > 0) then
for i = 1, min (25, #alvos) do
GameCooltip:AddLine (_detalhes:GetOnlyName (alvos[i][1]) .. ": ", alvos[i][2], 1, "white", "white")
GameCooltip:AddLine(_detalhes:GetOnlyName(alvos[i][1]) .. ": ", alvos[i][2], 1, "white", "white")
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon ("Interface\\Icons\\PALADIN_HOLY", nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
@@ -1804,7 +1804,7 @@ function atributo_misc:ToolTipDefensiveCooldowns (instancia, numero, barra)
local texture, l, r, t, b = _detalhes:GetSpecIcon (specID, false)
GameCooltip:AddIcon (texture, 1, 1, lineHeight, lineHeight, l, r, t, b)
else
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, unpack (_detalhes.class_coords [classe]))
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, unpack(_detalhes.class_coords [classe]))
end
end
end
@@ -1820,9 +1820,9 @@ function atributo_misc:ToolTipRess (instancia, numero, barra)
local owner = self.owner
if (owner and owner.classe) then
r, g, b = unpack (_detalhes.class_colors [owner.classe])
r, g, b = unpack(_detalhes.class_colors [owner.classe])
else
r, g, b = unpack (_detalhes.class_colors [self.classe])
r, g, b = unpack(_detalhes.class_colors [self.classe])
end
local meu_total = self ["ress"]
@@ -1838,19 +1838,19 @@ function atributo_misc:ToolTipRess (instancia, numero, barra)
end
table.sort (meus_ress, _detalhes.Sort2)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELLS"], headerColor, #meus_ress, _detalhes.tooltip_spell_icon.file, unpack (_detalhes.tooltip_spell_icon.coords))
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELLS"], headerColor, #meus_ress, _detalhes.tooltip_spell_icon.file, unpack(_detalhes.tooltip_spell_icon.coords))
_detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha)
if (#meus_ress > 0) then
for i = 1, min (3, #meus_ress) do
local esta_habilidade = meus_ress[i]
local nome_magia, _, icone_magia = _GetSpellInfo(esta_habilidade[1])
GameCooltip:AddLine (nome_magia, esta_habilidade[2] .. " (" .. _cstr ("%.1f", floor (esta_habilidade[2]) / floor (meu_total) * 100).."%)")
GameCooltip:AddLine(nome_magia, esta_habilidade[2] .. " (" .. _cstr ("%.1f", floor(esta_habilidade[2]) / floor(meu_total) * 100).."%)")
GameCooltip:AddIcon (icone_magia, nil, nil, lineHeight, lineHeight, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
_detalhes:AddTooltipBackgroundStatusbar()
end
else
GameCooltip:AddLine (Loc ["STRING_NO_SPELL"])
GameCooltip:AddLine(Loc ["STRING_NO_SPELL"])
end
--quem foi que o cara reviveu
@@ -1862,12 +1862,12 @@ function atributo_misc:ToolTipRess (instancia, numero, barra)
end
table.sort (alvos, _detalhes.Sort2)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_TARGETS"], headerColor, #alvos, _detalhes.tooltip_target_icon.file, unpack (_detalhes.tooltip_target_icon.coords))
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_TARGETS"], headerColor, #alvos, _detalhes.tooltip_target_icon.file, unpack(_detalhes.tooltip_target_icon.coords))
_detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha)
if (#alvos > 0) then
for i = 1, min (3, #alvos) do
GameCooltip:AddLine (alvos[i][1], alvos[i][2])
GameCooltip:AddLine(alvos[i][1], alvos[i][2])
_detalhes:AddTooltipBackgroundStatusbar()
local targetActor = instancia.showing[4]:PegarCombatente (_, alvos[i][1])
@@ -1884,7 +1884,7 @@ function atributo_misc:ToolTipRess (instancia, numero, barra)
local texture, l, r, t, b = _detalhes:GetSpecIcon (specID, false)
GameCooltip:AddIcon (texture, 1, 1, lineHeight, lineHeight, l, r, t, b)
else
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, lineHeight, lineHeight, unpack (_detalhes.class_coords [classe]))
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, lineHeight, lineHeight, unpack(_detalhes.class_coords [classe]))
end
end
end
@@ -1900,9 +1900,9 @@ function atributo_misc:ToolTipInterrupt (instancia, numero, barra)
local owner = self.owner
if (owner and owner.classe) then
r, g, b = unpack (_detalhes.class_colors [owner.classe])
r, g, b = unpack(_detalhes.class_colors [owner.classe])
else
r, g, b = unpack (_detalhes.class_colors [self.classe])
r, g, b = unpack(_detalhes.class_colors [self.classe])
end
local meu_total = self ["interrupt"]
@@ -1920,19 +1920,19 @@ function atributo_misc:ToolTipInterrupt (instancia, numero, barra)
end
table.sort (meus_interrupts, _detalhes.Sort2)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELLS"], headerColor, #meus_interrupts, _detalhes.tooltip_spell_icon.file, unpack (_detalhes.tooltip_spell_icon.coords))
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELLS"], headerColor, #meus_interrupts, _detalhes.tooltip_spell_icon.file, unpack(_detalhes.tooltip_spell_icon.coords))
_detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha)
if (#meus_interrupts > 0) then
for i = 1, min (25, #meus_interrupts) do
local esta_habilidade = meus_interrupts[i]
local nome_magia, _, icone_magia = _GetSpellInfo(esta_habilidade[1])
GameCooltip:AddLine (nome_magia, esta_habilidade[2].." (".._cstr("%.1f", floor (esta_habilidade[2])/floor (meu_total)*100).."%)")
GameCooltip:AddLine(nome_magia, esta_habilidade[2].." (".._cstr("%.1f", floor(esta_habilidade[2])/floor(meu_total)*100).."%)")
GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
_detalhes:AddTooltipBackgroundStatusbar()
end
else
GameTooltip:AddLine (Loc ["STRING_NO_SPELL"])
GameTooltip:AddLine(Loc ["STRING_NO_SPELL"])
end
--quais habilidades foram interrompidas
@@ -1943,14 +1943,14 @@ function atributo_misc:ToolTipInterrupt (instancia, numero, barra)
end
table.sort (habilidades_interrompidas, _detalhes.Sort2)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELL_INTERRUPTED"] .. ":", headerColor, #habilidades_interrompidas, _detalhes.tooltip_target_icon.file, unpack (_detalhes.tooltip_target_icon.coords))
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELL_INTERRUPTED"] .. ":", headerColor, #habilidades_interrompidas, _detalhes.tooltip_target_icon.file, unpack(_detalhes.tooltip_target_icon.coords))
_detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha)
if (#habilidades_interrompidas > 0) then
for i = 1, min (25, #habilidades_interrompidas) do
local esta_habilidade = habilidades_interrompidas[i]
local nome_magia, _, icone_magia = _GetSpellInfo(esta_habilidade[1])
GameCooltip:AddLine (nome_magia, esta_habilidade[2].." (".._cstr("%.1f", floor (esta_habilidade[2])/floor (meu_total)*100).."%)")
GameCooltip:AddLine(nome_magia, esta_habilidade[2].." (".._cstr("%.1f", floor(esta_habilidade[2])/floor(meu_total)*100).."%)")
GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
_detalhes:AddTooltipBackgroundStatusbar()
end
@@ -2000,7 +2000,7 @@ function atributo_misc:ToolTipInterrupt (instancia, numero, barra)
end
local n = _table [1]:gsub (("%s%<.*"), "")
GameCooltip:AddLine (n, _table [2] .. " (" .. _math_floor(_table [2]/self.interrupt*100) .. "%)")
GameCooltip:AddLine(n, _table [2] .. " (" .. _math_floor(_table [2]/self.interrupt*100) .. "%)")
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], 1, 1, 14, 14, 0.25, 0.49609375, 0.75, 1)
end
@@ -2097,7 +2097,7 @@ function atributo_misc:MontaInfoInterrupt()
else
if (barra.on_focus) then
barra.textura:SetStatusBarColor (1, 1, 1, 1) --volta a cor antiga
barra:SetAlpha (.9) --volta a alfa antiga
barra:SetAlpha(.9) --volta a alfa antiga
barra.on_focus = false
end
end
@@ -2269,9 +2269,9 @@ function atributo_misc:MontaTooltipAlvos (esta_barra, index)
table.sort (habilidades, _detalhes.Sort2)
GameTooltip:AddLine (index..". "..inimigo)
GameTooltip:AddLine (Loc ["STRING_SPELL_INTERRUPTED"] .. ":")
GameTooltip:AddLine (" ")
GameTooltip:AddLine(index..". "..inimigo)
GameTooltip:AddLine(Loc ["STRING_SPELL_INTERRUPTED"] .. ":")
GameTooltip:AddLine(" ")
for index, tabela in ipairs(habilidades) do
local nome, rank, icone = _GetSpellInfo(tabela[1])
@@ -2445,7 +2445,7 @@ end
local somar_keys = function(habilidade, habilidade_tabela1)
for key, value in pairs(habilidade) do
if (_type(value) == "number") then
if (type(value) == "number") then
if (key ~= "id" and key ~= "spellschool") then
habilidade_tabela1 [key] = (habilidade_tabela1 [key] or 0) + value
end
@@ -2573,7 +2573,7 @@ function atributo_misc:r_connect_shadow (actor, no_refresh, combat_object)
shadow.debuff_uptime = shadow.debuff_uptime + actor.debuff_uptime
for target_name, amount in pairs(actor.debuff_uptime_targets) do
if (_type(amount) == "table") then --boss debuff
if (type(amount) == "table") then --boss debuff
local t = shadow.debuff_uptime_targets [target_name]
if (not t) then
shadow.debuff_uptime_targets [target_name] = atributo_misc:CreateBuffTargetObject()
@@ -2710,7 +2710,7 @@ function atributo_misc:ColetarLixo (lastevent)
end
function _detalhes.refresh:r_atributo_misc (este_jogador, shadow)
setmetatable (este_jogador, _detalhes.atributo_misc)
setmetatable(este_jogador, _detalhes.atributo_misc)
este_jogador.__index = _detalhes.atributo_misc
--refresh spell cast
@@ -2961,7 +2961,7 @@ atributo_misc.__add = function(tabela1, tabela2)
tabela1.debuff_uptime = tabela1.debuff_uptime + tabela2.debuff_uptime
for target_name, amount in pairs(tabela2.debuff_uptime_targets) do
if (_type(amount) == "table") then --boss debuff
if (type(amount) == "table") then --boss debuff
local t = tabela1.debuff_uptime_targets [target_name]
if (not t) then
tabela1.debuff_uptime_targets [target_name] = atributo_misc:CreateBuffTargetObject()
@@ -3112,7 +3112,7 @@ end
local subtrair_keys = function(habilidade, habilidade_tabela1)
for key, value in pairs(habilidade) do
if (_type(value) == "number") then
if (type(value) == "number") then
if (key ~= "id" and key ~= "spellschool") then
habilidade_tabela1 [key] = (habilidade_tabela1 [key] or 0) - value
end
@@ -3197,7 +3197,7 @@ atributo_misc.__sub = function(tabela1, tabela2)
tabela1.debuff_uptime = tabela1.debuff_uptime - tabela2.debuff_uptime
for target_name, amount in pairs(tabela2.debuff_uptime_targets) do
if (_type(amount) == "table") then --boss debuff
if (type(amount) == "table") then --boss debuff
local t = tabela1.debuff_uptime_targets [target_name]
if (not t) then
tabela1.debuff_uptime_targets [target_name] = atributo_misc:CreateBuffTargetObject()
+30 -30
View File
@@ -19,7 +19,7 @@
local _getmetatable = getmetatable --lua local
local _bit_band = bit.band --lua local
local _table_sort = table.sort --lua local
local _ipairs = ipairs --lua local
local ipairs = ipairs --lua local
local _pairs = pairs --lua local
local AddUnique = DetailsFramework.table.addunique --framework
@@ -90,7 +90,7 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--api functions
function container_combatentes:GetActor (actorName)
function container_combatentes:GetActor(actorName)
local index = self._NameIndexTable [actorName]
if (index) then
return self._ActorTable [index]
@@ -99,7 +99,7 @@
function container_combatentes:GetSpellSource (spellid)
local t = self._ActorTable
--print ("getting the source", spellid, #t)
--print("getting the source", spellid, #t)
for i = 1, #t do
if (t[i].spells._ActorTable [spellid]) then
return t[i].nome
@@ -120,7 +120,7 @@
function container_combatentes:GetTotal (key)
local total = 0
key = key or "total"
for _, actor in _ipairs(self._ActorTable) do
for _, actor in ipairs(self._ActorTable) do
total = total + (actor [key] or 0)
end
@@ -131,7 +131,7 @@
local total = 0
key = key or "total"
local roster = combat.raid_roster
for _, actor in _ipairs(self._ActorTable) do
for _, actor in ipairs(self._ActorTable) do
if (roster [actor.nome]) then
total = total + (actor [key] or 0)
end
@@ -141,7 +141,7 @@
end
function container_combatentes:ListActors()
return _ipairs(self._ActorTable)
return ipairs(self._ActorTable)
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -160,7 +160,7 @@
_NameIndexTable = {}
}
_setmetatable (_newContainer, container_combatentes)
_setmetatable(_newContainer, container_combatentes)
return _newContainer
end
@@ -180,7 +180,7 @@
_detalhes:ScheduleTimer("ReGuessSpec", 6, {novo_objeto})
end
_detalhes:ScheduleTimer("ReGuessSpec", 15, {novo_objeto})
--print (nome, "spec em cache:", have_cached)
--print(nome, "spec em cache:", have_cached)
else
if (_detalhes.streamer_config.quick_detection) then
--shoot detection early if in quick detection
@@ -283,10 +283,10 @@
end
end
if ((_bit_band (flag, IS_GROUP_OBJECT) ~= 0 and actorObject.classe ~= "UNKNOW" and actorObject.classe ~= "UNGROUPPLAYER") or _detalhes:IsInCache (serial)) then
if ((_bit_band (flag, IS_GROUP_OBJECT) ~= 0 and actorObject.classe ~= "UNKNOW" and actorObject.classe ~= "UNGROUPPLAYER") or _detalhes:IsInCache(serial)) then
actorObject.grupo = true
if (_detalhes:IsATank (serial)) then
if (_detalhes:IsATank(serial)) then
actorObject.isTank = true
end
else
@@ -336,7 +336,7 @@
local oponentes = GetNumArenaOpponentSpecs and GetNumArenaOpponentSpecs() or 5
local found = false
for i = 1, oponentes do
local name = GetUnitName ("arena" .. i, true)
local name = GetUnitName("arena" .. i, true)
if (name == nome) then
local spec = GetArenaOpponentSpec and GetArenaOpponentSpec (i)
if (spec) then
@@ -350,14 +350,14 @@
end
end
local role = UnitGroupRolesAssigned and UnitGroupRolesAssigned (nome)
local role = UnitGroupRolesAssigned and UnitGroupRolesAssigned(nome)
if (role and role ~= "NONE") then
actorObject.role = role
found = true
end
if (not found and nome == _detalhes.playername) then
local role = UnitGroupRolesAssigned ("player")
local role = UnitGroupRolesAssigned("player")
if (role and role ~= "NONE") then
actorObject.role = role
end
@@ -398,7 +398,7 @@
--[=[
--Chromie - From 'The Deaths of Chromie'
if (serial and type (serial) == "string") then
if (serial and type(serial) == "string") then
if (serial:match ("^Creature%-0%-%d+%-%d+%-%d+%-122663%-%w+$")) then
actorObject.grupo = true
end
@@ -417,9 +417,9 @@
actorObject.monster = true
end
if (serial and type (serial) == "string") then
if (serial and type(serial) == "string") then
local npcID = _detalhes:GetNpcIdFromGuid (serial)
if (npcID and not _detalhes.npcid_pool [npcID] and type (npcID) == "number") then
if (npcID and not _detalhes.npcid_pool [npcID] and type(npcID) == "number") then
_detalhes.npcid_pool [npcID] = nome
end
end
@@ -437,7 +437,7 @@
local follower_text_object = _G ["DetailsPetOwnerFinderTextLeft3"] --not in use
local find_pet_found_owner = function(ownerName, serial, nome, flag, self)
local ownerGuid = _UnitGUID (ownerName)
local ownerGuid = _UnitGUID(ownerName)
if (ownerGuid) then
_detalhes.tabela_pets:Adicionar (serial, nome, flag, ownerGuid, ownerName, 0x00000417)
local nome_dele, dono_nome, dono_serial, dono_flag = _detalhes.tabela_pets:PegaDono (serial, nome, flag)
@@ -483,7 +483,7 @@
local text1 = line1 and line1:GetText()
if (text1 and text1 ~= "") then
--for _, playerName in ipairs(Details.tabela_vigente.raid_roster_indexed) do
for playerName, _ in _pairs (_detalhes.tabela_vigente.raid_roster) do
for playerName, _ in _pairs(_detalhes.tabela_vigente.raid_roster) do
local pName = playerName
playerName = playerName:gsub ("%-.*", "") --remove realm name
@@ -510,7 +510,7 @@
local line2 = _G ["DetailsPetOwnerFinderTextLeft3"]
local text2 = line2 and line2:GetText()
if (text2 and text2 ~= "") then
for playerName, _ in _pairs (_detalhes.tabela_vigente.raid_roster) do
for playerName, _ in _pairs(_detalhes.tabela_vigente.raid_roster) do
--for _, playerName in ipairs(Details.tabela_vigente.raid_roster_indexed) do
local pName = playerName
playerName = playerName:gsub ("%-.*", "") --remove realm name
@@ -542,10 +542,10 @@
--[[statistics]]-- _detalhes.statistics.container_calls = _detalhes.statistics.container_calls + 1
--if (flag and nome:find ("Kastfall") and bit.band (flag, 0x2000) ~= 0) then
--print ("PET:", nome, _detalhes.tabela_pets.pets [serial], container_pets [serial])
--if (flag and nome:find ("Kastfall") and bit.band(flag, 0x2000) ~= 0) then
--print("PET:", nome, _detalhes.tabela_pets.pets [serial], container_pets [serial])
--else
--print (nome, flag)
--print(nome, flag)
--end
--verifica se um pet, se for confere se tem o nome do dono, se no tiver, precisa por
@@ -648,7 +648,7 @@
--try to guess his class
if (self.shadow) then --no executar 2x
_detalhes:ScheduleTimer ("GuessClass", 1, {novo_objeto, self, 1})
_detalhes:ScheduleTimer("GuessClass", 1, {novo_objeto, self, 1})
end
elseif (shouldScanOnce) then
@@ -677,12 +677,12 @@
if (novo_objeto.classe == "UNGROUPPLAYER") then --is a player
if (_bit_band (flag, REACTION_HOSTILE ) ~= 0) then --is hostile
novo_objeto.enemy = true --print (nome.." EH UM INIMIGO -> " .. engRace)
novo_objeto.enemy = true --print(nome.." EH UM INIMIGO -> " .. engRace)
end
--try to guess his class
if (self.shadow) then --no executar 2x
_detalhes:ScheduleTimer ("GuessClass", 1, {novo_objeto, self, 1})
_detalhes:ScheduleTimer("GuessClass", 1, {novo_objeto, self, 1})
end
end
@@ -703,7 +703,7 @@
--try to guess his class
if (self.shadow) then --no executar 2x
_detalhes:ScheduleTimer ("GuessClass", 1, {novo_objeto, self, 1})
_detalhes:ScheduleTimer("GuessClass", 1, {novo_objeto, self, 1})
end
end
@@ -723,7 +723,7 @@
--try to guess his class
if (self.shadow) then --no executar 2x
_detalhes:ScheduleTimer ("GuessClass", 1, {novo_objeto, self, 1})
_detalhes:ScheduleTimer("GuessClass", 1, {novo_objeto, self, 1})
end
end
@@ -769,7 +769,7 @@
if (_detalhes.debug) then
if (_detalhes.debug_chr and nome:find (_detalhes.debug_chr) and self.tipo == 1) then
local logLine = ""
local when = "[" .. date ("%H:%M:%S") .. format (".%4f", GetTime()-floor (GetTime())) .. "]"
local when = "[" .. date ("%H:%M:%S") .. format (".%4f", GetTime()-floor(GetTime())) .. "]"
local log = "actor created - class: " .. (novo_objeto.classe or "noclass")
local from = debugstack (2, 1, 0)
logLine = logLine .. when .. " " .. log .. " " .. from .. "\n"
@@ -845,7 +845,7 @@
--chama a funo para ser executada em todos os atores
function container_combatentes:ActorCallFunction (funcao, ...)
for index, actor in _ipairs(self._ActorTable) do
for index, actor in ipairs(self._ActorTable) do
funcao (nil, actor, ...)
end
end
@@ -876,7 +876,7 @@
function _detalhes.refresh:r_container_combatentes (container, shadow)
--reconstri meta e indexes
_setmetatable (container, _detalhes.container_combatentes)
_setmetatable(container, _detalhes.container_combatentes)
container.__index = _detalhes.container_combatentes
container.funcao_de_criacao = container_combatentes:FuncaoDeCriacao (container.tipo)
+24 -24
View File
@@ -14,7 +14,7 @@ local _GetNumGroupMembers = _G.GetNumGroupMembers
local _setmetatable = setmetatable
local _bit_band = bit.band --lua local
local _pairs = pairs
local _ipairs = ipairs
local ipairs = ipairs
local _table_wipe = table.wipe
--details locals
@@ -22,7 +22,7 @@ local is_ignored = _detalhes.pets_ignored
function container_pets:NovoContainer()
local esta_tabela = {}
_setmetatable (esta_tabela, _detalhes.container_pets)
_setmetatable(esta_tabela, _detalhes.container_pets)
esta_tabela.pets = {} --armazena a pool -> uma dictionary com o [serial do pet] -> nome do dono
esta_tabela._ActorTable = {} --armazena os 15 ultimos pets do jogador -> [jogador nome] -> {nil, nil, nil, ...}
return esta_tabela
@@ -61,8 +61,8 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
if (_IsInRaid()) then
for i = 1, _GetNumGroupMembers() do
if (pet_serial == _UnitGUID ("raidpet"..i)) then
dono_serial = _UnitGUID ("raid"..i)
if (pet_serial == _UnitGUID("raidpet"..i)) then
dono_serial = _UnitGUID("raid"..i)
dono_flags = 0x00000417 --emulate sourceflag flag
local nome, realm = _UnitName ("raid"..i)
@@ -75,8 +75,8 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
elseif (_IsInGroup()) then
for i = 1, _GetNumGroupMembers()-1 do
if (pet_serial == _UnitGUID ("partypet"..i)) then
dono_serial = _UnitGUID ("party"..i)
if (pet_serial == _UnitGUID("partypet"..i)) then
dono_serial = _UnitGUID("party"..i)
dono_flags = 0x00000417 --emulate sourceflag flag
local nome, realm = _UnitName ("party"..i)
@@ -90,9 +90,9 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
end
if (not dono_nome) then
if (pet_serial == _UnitGUID ("pet")) then
if (pet_serial == _UnitGUID("pet")) then
dono_nome = _GetUnitName ("player")
dono_serial = _UnitGUID ("player")
dono_serial = _UnitGUID("player")
if (_IsInGroup() or _IsInRaid()) then
dono_flags = 0x00000417 --emulate sourceflag flag
else
@@ -114,7 +114,7 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
if (pet_flags and _bit_band (pet_flags, OBJECT_TYPE_PET) ~= 0) then -- um pet
if (not _detalhes.pets_no_owner [pet_serial] and _bit_band (pet_flags, EM_GRUPO) ~= 0) then
_detalhes.pets_no_owner [pet_serial] = {pet_nome, pet_flags}
_detalhes:Msg ("couldn't find the owner of the pet:", pet_nome)
_detalhes:Msg("couldn't find the owner of the pet:", pet_nome)
end
else
is_ignored [pet_serial] = true
@@ -126,7 +126,7 @@ end
function container_pets:Unpet (...)
local unitid = ...
local owner_serial = _UnitGUID (unitid)
local owner_serial = _UnitGUID(unitid)
if (owner_serial) then
--tira o pet existente da tabela de pets e do cache do core
@@ -137,7 +137,7 @@ function container_pets:Unpet (...)
_detalhes.pets_players [owner_serial] = nil
end
--verifica se h um pet novo deste jogador
local pet_serial = _UnitGUID (unitid .. "pet")
local pet_serial = _UnitGUID(unitid .. "pet")
if (pet_serial) then
if (not _detalhes.tabela_pets.pets [pet_serial]) then
local nome, realm = _UnitName (unitid)
@@ -159,14 +159,14 @@ end
function container_pets:BuscarPets()
if (_IsInRaid()) then
for i = 1, _GetNumGroupMembers(), 1 do
local pet_serial = _UnitGUID ("raidpet"..i)
local pet_serial = _UnitGUID("raidpet"..i)
if (pet_serial) then
if (not _detalhes.tabela_pets.pets [pet_serial]) then
local nome, realm = _UnitName ("raid"..i)
if (realm and realm ~= "") then
nome = nome.."-"..realm
end
local owner_serial = _UnitGUID ("raid"..i)
local owner_serial = _UnitGUID("raid"..i)
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("raidpet"..i), 0x1114, owner_serial, nome, 0x514)
_detalhes.parser:RevomeActorFromCache (pet_serial)
container_pets:PlayerPet (owner_serial, pet_serial)
@@ -176,7 +176,7 @@ function container_pets:BuscarPets()
elseif (_IsInGroup()) then
for i = 1, _GetNumGroupMembers()-1, 1 do
local pet_serial = _UnitGUID ("partypet"..i)
local pet_serial = _UnitGUID("partypet"..i)
if (pet_serial) then
if (not _detalhes.tabela_pets.pets [pet_serial]) then
local nome, realm = _UnitName ("party"..i)
@@ -184,24 +184,24 @@ function container_pets:BuscarPets()
if (realm and realm ~= "") then
nome = nome.."-"..realm
end
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("partypet"..i), 0x1114, _UnitGUID ("party"..i), nome, 0x514)
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("partypet"..i), 0x1114, _UnitGUID("party"..i), nome, 0x514)
end
end
end
local pet_serial = _UnitGUID ("pet")
local pet_serial = _UnitGUID("pet")
if (pet_serial) then
if (not _detalhes.tabela_pets.pets [pet_serial]) then
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("pet"), 0x1114, _UnitGUID ("player"), _detalhes.playername, 0x514)
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("pet"), 0x1114, _UnitGUID("player"), _detalhes.playername, 0x514)
end
end
else
local pet_serial = _UnitGUID ("pet")
local pet_serial = _UnitGUID("pet")
if (pet_serial) then
if (not _detalhes.tabela_pets.pets [pet_serial]) then
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("pet"), 0x1114, _UnitGUID ("player"), _detalhes.playername, 0x514)
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("pet"), 0x1114, _UnitGUID("player"), _detalhes.playername, 0x514)
end
end
end
@@ -223,14 +223,14 @@ function container_pets:Adicionar (pet_serial, pet_nome, pet_flags, dono_serial,
end
function _detalhes:WipePets()
return _table_wipe (_detalhes.tabela_pets.pets)
return _table_wipe(_detalhes.tabela_pets.pets)
end
function _detalhes:LimparPets()
--erase old pet table by creating a new one
local newPetTable = {}
--minimum of 90 minutes to clean a pet from the pet table data
for PetSerial, PetTable in _pairs (_detalhes.tabela_pets.pets) do
for PetSerial, PetTable in _pairs(_detalhes.tabela_pets.pets) do
if ( (PetTable[4] + 5400 > _detalhes._tempo + 1) or (PetTable[5] and PetTable[4] + 43200 > _detalhes._tempo) ) then
newPetTable [PetSerial] = PetTable
end
@@ -245,17 +245,17 @@ function _detalhes:UpdatePets()
have_schedule = false
return container_pets:BuscarPets()
end
function _detalhes:SchedulePetUpdate (seconds)
function _detalhes:SchedulePetUpdate(seconds)
if (have_schedule) then
return
end
have_schedule = true
--_detalhes:ScheduleTimer ("UpdatePets", seconds or 5)
--_detalhes:ScheduleTimer("UpdatePets", seconds or 5)
Details.Schedules.NewTimer(seconds or 5, Details.UpdatePets, Details)
end
function _detalhes.refresh:r_container_pets (container)
_setmetatable (container, container_pets)
_setmetatable(container, container_pets)
end
+223 -230
View File
@@ -1,135 +1,130 @@
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local Loc = LibStub("AceLocale-3.0"):GetLocale( "Details" )
--lua api
local _table_remove = table.remove
local _table_insert = table.insert
local _setmetatable = setmetatable
local _table_wipe = table.wipe
local tremove = table.remove
local tinsert = table.insert
local wipe = table.wipe
local _detalhes = _G._detalhes
local gump = _detalhes.gump
local combate = _detalhes.combate
local historico = _detalhes.historico
local barra_total = _detalhes.barra_total
local container_pets = _detalhes.container_pets
local timeMachine = _detalhes.timeMachine
local Details = _G._detalhes
local combatClass = Details.combate
local segmentClass = Details.historico
local timeMachine = Details.timeMachine
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--API
--reset only the overall data
function _detalhes:ResetSegmentOverallData()
return historico:resetar_overall()
function Details:ResetSegmentOverallData()
return segmentClass:resetar_overall()
end
--reset segments and overall data
function _detalhes:ResetSegmentData()
return historico:resetar()
function Details:ResetSegmentData()
return segmentClass:resetar()
end
--returns the current active segment
function _detalhes:GetCurrentCombat()
return _detalhes.tabela_vigente
function Details:GetCurrentCombat()
return Details.tabela_vigente
end
--returns a private table containing all stored segments
function _detalhes:GetCombatSegments()
return _detalhes.tabela_historico.tabelas
function Details:GetCombatSegments()
return Details.tabela_historico.tabelas
end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--internal
function historico:NovoHistorico()
function segmentClass:NovoHistorico()
local esta_tabela = {tabelas = {}}
_setmetatable (esta_tabela, historico)
setmetatable(esta_tabela, segmentClass)
return esta_tabela
end
function historico:adicionar_overall (tabela)
function segmentClass:adicionar_overall (tabela)
local zoneName, zoneType = GetInstanceInfo()
if (zoneType ~= "none" and tabela:GetCombatTime() <= _detalhes.minimum_overall_combat_time) then
if (zoneType ~= "none" and tabela:GetCombatTime() <= Details.minimum_overall_combat_time) then
return
end
if (_detalhes.overall_clear_newboss) then
if (Details.overall_clear_newboss) then
--only for raids
if (tabela.instance_type == "raid" and tabela.is_boss) then
if (_detalhes.last_encounter ~= _detalhes.last_encounter2) then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) new boss detected 'overall_clear_newboss' is true, cleaning overall data.")
if (Details.last_encounter ~= Details.last_encounter2) then
if (Details.debug) then
Details:Msg("(debug) new boss detected 'overall_clear_newboss' is true, cleaning overall data.")
end
for index, combat in ipairs(_detalhes.tabela_historico.tabelas) do
for index, combat in ipairs(Details.tabela_historico.tabelas) do
combat.overall_added = false
end
historico:resetar_overall()
segmentClass:resetar_overall()
end
end
end
if (tabela.overall_added) then
_detalhes:Msg ("error > attempt to add a segment already added > func historico:adicionar_overall()")
Details:Msg("error > attempt to add a segment already added > func historico:adicionar_overall()")
return
end
local mythicInfo = tabela.is_mythic_dungeon
if (mythicInfo) then
--do not add overall mythic+ dungeon segments
if (mythicInfo.TrashOverallSegment) then
_detalhes:Msg ("error > attempt to add a TrashOverallSegment > func historico:adicionar_overall()")
Details:Msg("error > attempt to add a TrashOverallSegment > func historico:adicionar_overall()")
return
elseif (mythicInfo.OverallSegment) then
_detalhes:Msg ("error > attempt to add a OverallSegment > func historico:adicionar_overall()")
Details:Msg("error > attempt to add a OverallSegment > func historico:adicionar_overall()")
return
end
end
--store the segments added to the overall data
_detalhes.tabela_overall.segments_added = _detalhes.tabela_overall.segments_added or {}
Details.tabela_overall.segments_added = Details.tabela_overall.segments_added or {}
local this_clock = tabela.data_inicio
local combatName = tabela:GetCombatName (true)
local combatName = tabela:GetCombatName(true)
local combatTime = tabela:GetCombatTime()
local combatType = tabela:GetCombatType()
tinsert(_detalhes.tabela_overall.segments_added, 1, {name = combatName, elapsed = combatTime, clock = this_clock, type = combatType})
if (#_detalhes.tabela_overall.segments_added > 40) then
tremove (_detalhes.tabela_overall.segments_added, 41)
tinsert(Details.tabela_overall.segments_added, 1, {name = combatName, elapsed = combatTime, clock = this_clock, type = combatType})
if (#Details.tabela_overall.segments_added > 40) then
tremove(Details.tabela_overall.segments_added, 41)
end
if (_detalhes.debug) then
_detalhes:Msg ("(debug) adding the segment to overall data: " .. (tabela:GetCombatName (true) or "no name") .. " with time of: " .. (tabela:GetCombatTime() or "no time"))
if (Details.debug) then
Details:Msg("(debug) adding the segment to overall data: " .. (tabela:GetCombatName(true) or "no name") .. " with time of: " .. (tabela:GetCombatTime() or "no time"))
end
_detalhes.tabela_overall = _detalhes.tabela_overall + tabela
Details.tabela_overall = Details.tabela_overall + tabela
tabela.overall_added = true
if (not _detalhes.tabela_overall.overall_enemy_name) then
_detalhes.tabela_overall.overall_enemy_name = tabela.is_boss and tabela.is_boss.name or tabela.enemy
if (not Details.tabela_overall.overall_enemy_name) then
Details.tabela_overall.overall_enemy_name = tabela.is_boss and tabela.is_boss.name or tabela.enemy
else
if (_detalhes.tabela_overall.overall_enemy_name ~= (tabela.is_boss and tabela.is_boss.name or tabela.enemy)) then
_detalhes.tabela_overall.overall_enemy_name = "-- x -- x --"
if (Details.tabela_overall.overall_enemy_name ~= (tabela.is_boss and tabela.is_boss.name or tabela.enemy)) then
Details.tabela_overall.overall_enemy_name = "-- x -- x --"
end
end
if (_detalhes.tabela_overall.start_time == 0) then
_detalhes.tabela_overall:SetStartTime (tabela.start_time)
_detalhes.tabela_overall:SetEndTime (tabela.end_time)
if (Details.tabela_overall.start_time == 0) then
Details.tabela_overall:SetStartTime (tabela.start_time)
Details.tabela_overall:SetEndTime (tabela.end_time)
else
_detalhes.tabela_overall:SetStartTime (tabela.start_time - _detalhes.tabela_overall:GetCombatTime())
_detalhes.tabela_overall:SetEndTime (tabela.end_time)
Details.tabela_overall:SetStartTime (tabela.start_time - Details.tabela_overall:GetCombatTime())
Details.tabela_overall:SetEndTime (tabela.end_time)
end
if (_detalhes.tabela_overall.data_inicio == 0) then
_detalhes.tabela_overall.data_inicio = _detalhes.tabela_vigente.data_inicio or 0
if (Details.tabela_overall.data_inicio == 0) then
Details.tabela_overall.data_inicio = Details.tabela_vigente.data_inicio or 0
end
_detalhes.tabela_overall:seta_data (_detalhes._detalhes_props.DATA_TYPE_END)
_detalhes:ClockPluginTickOnSegment()
Details.tabela_overall:seta_data (Details._detalhes_props.DATA_TYPE_END)
Details:ClockPluginTickOnSegment()
for id, instance in _detalhes:ListInstances() do
for id, instance in Details:ListInstances() do
if (instance:IsEnabled()) then
if (instance:GetSegment() == -1) then
instance:ForceRefresh()
@@ -138,24 +133,23 @@ function historico:adicionar_overall (tabela)
end
end
function _detalhes:ScheduleAddCombatToOverall (combat) --deprecated (15/03/2019)
local canAdd = _detalhes:CanAddCombatToOverall (combat)
function Details:ScheduleAddCombatToOverall (combat) --deprecated (15/03/2019)
local canAdd = Details:CanAddCombatToOverall (combat)
if (canAdd) then
_detalhes.schedule_add_to_overall = _detalhes.schedule_add_to_overall or {}
tinsert(_detalhes.schedule_add_to_overall, combat)
Details.schedule_add_to_overall = Details.schedule_add_to_overall or {}
tinsert(Details.schedule_add_to_overall, combat)
end
end
function _detalhes:CanAddCombatToOverall (tabela)
function Details:CanAddCombatToOverall (tabela)
--already added
if (tabela.overall_added) then
return false
end
--already scheduled to add
if (_detalhes.schedule_add_to_overall) then --deprecated
for _, combat in ipairs(_detalhes.schedule_add_to_overall) do
if (Details.schedule_add_to_overall) then --deprecated
for _, combat in ipairs(Details.schedule_add_to_overall) do
if (combat == tabela) then
return false
end
@@ -168,77 +162,78 @@ function _detalhes:CanAddCombatToOverall (tabela)
--do not add overall mythic+ dungeon segments
if (mythicInfo.TrashOverallSegment) then
return false
elseif (mythicInfo.OverallSegment) then
return false
end
end
--raid boss - flag 0x1
if (bit.band (_detalhes.overall_flag, 0x1) ~= 0) then
if (bit.band(Details.overall_flag, 0x1) ~= 0) then
if (tabela.is_boss and tabela.instance_type == "raid" and not tabela.is_pvp) then
if (tabela:GetCombatTime() >= 30) then
return true
end
end
end
--raid trash - flag 0x2
if (bit.band (_detalhes.overall_flag, 0x2) ~= 0) then
if (bit.band(Details.overall_flag, 0x2) ~= 0) then
if (tabela.is_trash and tabela.instance_type == "raid") then
return true
end
end
--dungeon boss - flag 0x4
if (bit.band (_detalhes.overall_flag, 0x4) ~= 0) then
if (bit.band(Details.overall_flag, 0x4) ~= 0) then
if (tabela.is_boss and tabela.instance_type == "party" and not tabela.is_pvp) then
return true
end
end
--dungeon trash - flag 0x8
if (bit.band (_detalhes.overall_flag, 0x8) ~= 0) then
if (bit.band(Details.overall_flag, 0x8) ~= 0) then
if ((tabela.is_trash or tabela.is_mythic_dungeon_trash) and tabela.instance_type == "party") then
return true
end
end
--any combat
if (bit.band (_detalhes.overall_flag, 0x10) ~= 0) then
if (bit.band(Details.overall_flag, 0x10) ~= 0) then
return true
end
--is a PvP combat
if (tabela.is_pvp or tabela.is_arena) then
if (tabela.is_pvp or tabela.is_arena) then
return true
end
return false
end
--sai do combate, chamou adicionar a tabela ao histrico
function historico:adicionar (tabela)
function segmentClass:adicionar (tabela)
local tamanho = #self.tabelas
--verifica se precisa dar UnFreeze()
if (tamanho < _detalhes.segments_amount) then --vai preencher um novo index vazio
if (tamanho < Details.segments_amount) then --vai preencher um novo index vazio
local ultima_tabela = self.tabelas[tamanho]
if (not ultima_tabela) then --no ha tabelas no historico, esta ser a #1
--pega a tabela do combate atual
ultima_tabela = tabela
end
_detalhes:InstanciaCallFunction (_detalhes.CheckFreeze, tamanho+1, ultima_tabela)
Details:InstanciaCallFunction(Details.CheckFreeze, tamanho+1, ultima_tabela)
end
--add to history table
_table_insert (self.tabelas, 1, tabela)
tinsert(self.tabelas, 1, tabela)
--count boss tries
local boss = tabela.is_boss and tabela.is_boss.name
if (boss) then
local try_number = _detalhes.encounter_counter [boss]
local try_number = Details.encounter_counter [boss]
if (not try_number) then
local previous_combat
for i = 2, #self.tabelas do
@@ -248,43 +243,43 @@ function historico:adicionar (tabela)
break
end
end
if (not try_number) then
try_number = 1
end
else
try_number = _detalhes.encounter_counter [boss] + 1
try_number = Details.encounter_counter [boss] + 1
end
_detalhes.encounter_counter [boss] = try_number
Details.encounter_counter [boss] = try_number
tabela.is_boss.try_number = try_number
end
--see if can add the encounter to overall data
local canAddToOverall = _detalhes:CanAddCombatToOverall (tabela)
local canAddToOverall = Details:CanAddCombatToOverall (tabela)
if (canAddToOverall) then
--if (InCombatLockdown()) then
-- _detalhes:ScheduleAddCombatToOverall (tabela)
-- if (_detalhes.debug) then
-- _detalhes:Msg ("(debug) overall data flag match > in combat scheduling overall addition.")
-- _detalhes:Msg("(debug) overall data flag match > in combat scheduling overall addition.")
-- end
--else
if (_detalhes.debug) then
_detalhes:Msg ("(debug) overall data flag match addind the combat to overall data.")
if (Details.debug) then
Details:Msg("(debug) overall data flag match addind the combat to overall data.")
end
historico:adicionar_overall (tabela)
segmentClass:adicionar_overall (tabela)
--end
end
--erase trash segments
if (self.tabelas[2]) then
local _segundo_combate = self.tabelas[2]
local container_damage = _segundo_combate [1]
local container_heal = _segundo_combate [2]
--regular cleanup
for _, jogador in ipairs(container_damage._ActorTable) do
for _, jogador in ipairs(container_damage._ActorTable) do
--remover a tabela de last events
jogador.last_events_table = nil
--verifica se ele ainda esta registrado na time machine
@@ -292,7 +287,7 @@ function historico:adicionar (tabela)
jogador:DesregistrarNaTimeMachine()
end
end
for _, jogador in ipairs(container_heal._ActorTable) do
for _, jogador in ipairs(container_heal._ActorTable) do
--remover a tabela de last events
jogador.last_events_table = nil
--verifica se ele ainda esta registrado na time machine
@@ -300,12 +295,12 @@ function historico:adicionar (tabela)
jogador:DesregistrarNaTimeMachine()
end
end
if (_detalhes.trash_auto_remove) then
if (Details.trash_auto_remove) then
local _terceiro_combate = self.tabelas[3]
if (_terceiro_combate and not _terceiro_combate.is_mythic_dungeon_segment) then
if ((_terceiro_combate.is_trash and not _terceiro_combate.is_boss) or (_terceiro_combate.is_temporary)) then
--verificar novamente a time machine
for _, jogador in ipairs(_terceiro_combate [1]._ActorTable) do --damage
@@ -319,33 +314,33 @@ function historico:adicionar (tabela)
end
end
--remover
_table_remove (self.tabelas, 3)
_detalhes:SendEvent("DETAILS_DATA_SEGMENTREMOVED", nil, nil)
tremove(self.tabelas, 3)
Details:SendEvent("DETAILS_DATA_SEGMENTREMOVED", nil, nil)
end
end
end
end
--verifica se precisa apagar a ltima tabela do histrico
if (#self.tabelas > _detalhes.segments_amount) then
if (#self.tabelas > Details.segments_amount) then
local combat_removed, combat_index
--verifica se esto dando try em um boss e remove o combate menos relevante
local bossid = tabela.is_boss and tabela.is_boss.id
local last_segment = self.tabelas [#self.tabelas]
local last_bossid = last_segment.is_boss and last_segment.is_boss.id
if (_detalhes.zone_type == "raid" and bossid and last_bossid and bossid == last_bossid) then
if (Details.zone_type == "raid" and bossid and last_bossid and bossid == last_bossid) then
local shorter_combat
local shorter_id
local min_time = 99999
for i = 4, #self.tabelas do
local combat = self.tabelas [i]
if (combat.is_boss and combat.is_boss.id == bossid and combat:GetCombatTime() < min_time and not combat.is_boss.killed) then
@@ -354,13 +349,13 @@ function historico:adicionar (tabela)
min_time = combat:GetCombatTime()
end
end
if (shorter_combat) then
combat_removed = shorter_combat
combat_index = shorter_id
end
end
if (not combat_removed) then
combat_removed = self.tabelas [#self.tabelas]
combat_index = #self.tabelas
@@ -377,19 +372,19 @@ function historico:adicionar (tabela)
jogador:DesregistrarNaTimeMachine()
end
end
--remover
_table_remove (self.tabelas, combat_index)
_detalhes:SendEvent("DETAILS_DATA_SEGMENTREMOVED")
tremove(self.tabelas, combat_index)
Details:SendEvent("DETAILS_DATA_SEGMENTREMOVED")
end
--chama a funo que ir atualizar as instncias com segmentos no histrico
_detalhes:InstanciaCallFunction (_detalhes.AtualizaSegmentos_AfterCombat, self)
--_detalhes:InstanciaCallFunction (_detalhes.AtualizarJanela)
Details:InstanciaCallFunction(Details.AtualizaSegmentos_AfterCombat, self)
--_detalhes:InstanciaCallFunction(_detalhes.AtualizarJanela)
end
--verifica se tem alguma instancia congelada mostrando o segmento recm liberado
function _detalhes:CheckFreeze (instancia, index_liberado, tabela)
function Details:CheckFreeze (instancia, index_liberado, tabela)
if (instancia.freezed) then --esta congelada
if (instancia.segmento == index_liberado) then
instancia.showing = tabela
@@ -398,127 +393,126 @@ function _detalhes:CheckFreeze (instancia, index_liberado, tabela)
end
end
function _detalhes:SetOverallResetOptions (reset_new_boss, reset_new_challenge, reset_on_logoff, reset_new_pvp)
function Details:SetOverallResetOptions (reset_new_boss, reset_new_challenge, reset_on_logoff, reset_new_pvp)
if (reset_new_boss == nil) then
reset_new_boss = _detalhes.overall_clear_newboss
reset_new_boss = Details.overall_clear_newboss
end
if (reset_new_challenge == nil) then
reset_new_challenge = _detalhes.overall_clear_newchallenge
reset_new_challenge = Details.overall_clear_newchallenge
end
if (reset_on_logoff == nil) then
reset_on_logoff = _detalhes.overall_clear_logout
reset_on_logoff = Details.overall_clear_logout
end
if (reset_new_pvp == nil) then
reset_new_pvp = _detalhes.overall_clear_pvp
reset_new_pvp = Details.overall_clear_pvp
end
_detalhes.overall_clear_newboss = reset_new_boss
_detalhes.overall_clear_newchallenge = reset_new_challenge
_detalhes.overall_clear_logout = reset_on_logoff
_detalhes.overall_clear_pvp = reset_new_pvp
Details.overall_clear_newboss = reset_new_boss
Details.overall_clear_newchallenge = reset_new_challenge
Details.overall_clear_logout = reset_on_logoff
Details.overall_clear_pvp = reset_new_pvp
end
function historico:resetar_overall()
function segmentClass:resetar_overall()
--if (InCombatLockdown()) then
-- _detalhes:Msg (Loc ["STRING_ERASE_IN_COMBAT"])
-- _detalhes:Msg(Loc ["STRING_ERASE_IN_COMBAT"])
-- _detalhes.schedule_remove_overall = true
--else
--fecha a janela de informaes do jogador
_detalhes:FechaJanelaInfo()
_detalhes.tabela_overall = combate:NovaTabela()
for index, instancia in ipairs(_detalhes.tabela_instancias) do
Details:FechaJanelaInfo()
Details.tabela_overall = combatClass:NovaTabela()
for index, instancia in ipairs(Details.tabela_instancias) do
if (instancia.ativa and instancia.segmento == -1) then
instancia:InstanceReset()
instancia:ReajustaGump()
end
end
if (_detalhes.schedule_add_to_overall) then --deprecated
wipe (_detalhes.schedule_add_to_overall)
if (Details.schedule_add_to_overall) then --deprecated
wipe (Details.schedule_add_to_overall)
end
--end
--stop bar testing if any
_detalhes:StopTestBarUpdate()
_detalhes:ClockPluginTickOnSegment()
Details:StopTestBarUpdate()
Details:ClockPluginTickOnSegment()
end
function historico:resetar()
function segmentClass:resetar()
if (Details.bosswindow) then
Details.bosswindow:Reset()
end
if (_detalhes.bosswindow) then
_detalhes.bosswindow:Reset()
end
--stop bar testing if any
_detalhes:StopTestBarUpdate()
if (_detalhes.tabela_vigente.verifica_combate) then --finaliza a checagem se esta ou no no combate
_detalhes:CancelTimer (_detalhes.tabela_vigente.verifica_combate)
Details:StopTestBarUpdate()
if (Details.tabela_vigente.verifica_combate) then --finaliza a checagem se esta ou no no combate
Details:CancelTimer(Details.tabela_vigente.verifica_combate)
end
_detalhes.last_closed_combat = nil
Details.last_closed_combat = nil
--remove mythic dungeon schedules if any
_detalhes.schedule_mythicdungeon_trash_merge = nil
_detalhes.schedule_mythicdungeon_endtrash_merge = nil
_detalhes.schedule_mythicdungeon_overallrun_merge = nil
Details.schedule_mythicdungeon_trash_merge = nil
Details.schedule_mythicdungeon_endtrash_merge = nil
Details.schedule_mythicdungeon_overallrun_merge = nil
--clear other schedules
_detalhes.schedule_flag_boss_components = nil
_detalhes.schedule_store_boss_encounter = nil
Details.schedule_flag_boss_components = nil
Details.schedule_store_boss_encounter = nil
--_detalhes.schedule_remove_overall = nil
--fecha a janela de informaes do jogador
_detalhes:FechaJanelaInfo()
Details:FechaJanelaInfo()
--empty temporary tables
_detalhes.atributo_damage:ClearTempTables()
for _, combate in ipairs(_detalhes.tabela_historico.tabelas) do
_table_wipe (combate)
Details.atributo_damage:ClearTempTables()
for _, combate in ipairs(Details.tabela_historico.tabelas) do
wipe(combate)
end
_table_wipe (_detalhes.tabela_vigente)
_table_wipe (_detalhes.tabela_overall)
_table_wipe (_detalhes.spellcache)
if (_detalhes.schedule_add_to_overall) then --deprecated
wipe (_detalhes.schedule_add_to_overall)
wipe(Details.tabela_vigente)
wipe(Details.tabela_overall)
wipe(Details.spellcache)
if (Details.schedule_add_to_overall) then --deprecated
wipe (Details.schedule_add_to_overall)
end
_detalhes:LimparPets()
_detalhes:ResetSpecCache (true) --forar
Details:LimparPets()
Details:ResetSpecCache (true) --forar
-- novo container de historico
_detalhes.tabela_historico = historico:NovoHistorico() --joga fora a tabela antiga e cria uma nova
Details.tabela_historico = segmentClass:NovoHistorico() --joga fora a tabela antiga e cria uma nova
--novo container para armazenar pets
_detalhes.tabela_pets = _detalhes.container_pets:NovoContainer()
_detalhes:UpdateContainerCombatentes()
_detalhes.container_pets:BuscarPets()
Details.tabela_pets = Details.container_pets:NovoContainer()
Details:UpdateContainerCombatentes()
Details.container_pets:BuscarPets()
-- nova tabela do overall e current
_detalhes.tabela_overall = combate:NovaTabela() --joga fora a tabela antiga e cria uma nova
Details.tabela_overall = combatClass:NovaTabela() --joga fora a tabela antiga e cria uma nova
-- cria nova tabela do combate atual
_detalhes.tabela_vigente = combate:NovaTabela (nil, _detalhes.tabela_overall)
Details.tabela_vigente = combatClass:NovaTabela (nil, Details.tabela_overall)
--marca o addon como fora de combate
_detalhes.in_combat = false
Details.in_combat = false
--zera o contador de combates
_detalhes:NumeroCombate (0)
Details:NumeroCombate (0)
--limpa o cache de magias
_detalhes:ClearSpellCache()
Details:ClearSpellCache()
--limpa a tabela de escudos
_table_wipe (_detalhes.escudos)
wipe(Details.escudos)
--reinicia a time machine
timeMachine:Reiniciar()
_table_wipe (_detalhes.cache_damage_group)
_table_wipe (_detalhes.cache_healing_group)
_detalhes:UpdateParserGears()
wipe(Details.cache_damage_group)
wipe(Details.cache_healing_group)
Details:UpdateParserGears()
if (not InCombatLockdown() and not UnitAffectingCombat ("player")) then
--workarround for the "script run too long" issue while outside the combat lockdown
@@ -527,45 +521,44 @@ function historico:resetar()
end
local successful, errortext = pcall (cleargarbage)
if (not successful) then
_detalhes:Msg ("couldn't call collectgarbage()")
Details:Msg("couldn't call collectgarbage()")
end
else
_detalhes.schedule_hard_garbage_collect = true
Details.schedule_hard_garbage_collect = true
end
_detalhes:InstanciaCallFunction(_detalhes.AtualizaSegmentos) -- atualiza o instancia.showing para as novas tabelas criadas
_detalhes:InstanciaCallFunction(_detalhes.AtualizaSoloMode_AfertReset) -- verifica se precisa zerar as tabela da janela solo mode
_detalhes:InstanciaCallFunction(_detalhes.ResetaGump) --_detalhes:ResetaGump ("de todas as instancias")
_detalhes:InstanciaCallFunction(Details.FadeHandler.Fader, "IN", nil, "barras")
_detalhes:RefreshMainWindow(-1) --atualiza todas as instancias
_detalhes:SendEvent("DETAILS_DATA_RESET", nil, nil)
Details:InstanciaCallFunction(Details.AtualizaSegmentos) -- atualiza o instancia.showing para as novas tabelas criadas
Details:InstanciaCallFunction(Details.AtualizaSoloMode_AfertReset) -- verifica se precisa zerar as tabela da janela solo mode
Details:InstanciaCallFunction(Details.ResetaGump) --_detalhes:ResetaGump ("de todas as instancias")
Details:InstanciaCallFunction(Details.FadeHandler.Fader, "IN", nil, "barras")
Details:RefreshMainWindow(-1) --atualiza todas as instancias
Details:SendEvent("DETAILS_DATA_RESET", nil, nil)
end
function _detalhes.refresh:r_historico (este_historico)
_setmetatable (este_historico, historico)
function Details.refresh:r_historico (este_historico)
setmetatable(este_historico, segmentClass)
--este_historico.__index = historico
end
--[[
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.")
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
@@ -580,7 +573,7 @@ end
end
end
--remover
_table_remove (self.tabelas, 3)
_table_remove(self.tabelas, 3)
_detalhes:SendEvent("DETAILS_DATA_SEGMENTREMOVED", nil, nil)
end
end
+2 -2
View File
@@ -39,7 +39,7 @@ local _
_ActorTable = {}
}
_setmetatable (_newContainer, container_habilidades)
_setmetatable(_newContainer, container_habilidades)
return _newContainer
end
@@ -101,7 +101,7 @@ local _
function _detalhes.refresh:r_container_habilidades (container, shadow)
--reconstri meta e indexes
_setmetatable (container, _detalhes.container_habilidades)
_setmetatable(container, _detalhes.container_habilidades)
container.__index = _detalhes.container_habilidades
local func_criacao = container_habilidades:FuncaoDeCriacao (container.tipo)
container.funcao_de_criacao = func_criacao
+18 -18
View File
@@ -22,14 +22,14 @@ local _table_sort = table.sort --lua local
local _table_insert = table.insert --lua local
local _table_size = table.getn --lua local
local _setmetatable = setmetatable --lua local
local _ipairs = ipairs --lua local
local ipairs = ipairs --lua local
local _pairs = pairs --lua local
local _rawget= rawget --lua local
local _math_min = math.min --lua local
local _math_max = math.max --lua local
local _bit_band = bit.band --lua local
local _unpack = unpack --lua local
local _type = type --lua local
local type = type --lua local
local _GetSpellInfo = _detalhes.getspellinfo -- api local
local _IsInRaid = IsInRaid -- api local
@@ -59,7 +59,7 @@ local temp_table = {}
local target_func = function(main_table)
local i = 1
for name, amount in _pairs (main_table) do
for name, amount in _pairs(main_table) do
local t = temp_table [i]
if (not t) then
t = {"", 0}
@@ -75,7 +75,7 @@ end
local spells_used_func = function(main_table, target)
local i = 1
for spellid, spell_table in _pairs (main_table) do
for spellid, spell_table in _pairs(main_table) do
local target_amount = spell_table.targets [target]
if (target_amount) then
local t = temp_table [i]
@@ -117,14 +117,14 @@ function atributo_custom:damagedoneTooltip (actor, target, spellid, combat, inst
local this_actor = combat (1, targetname)
if (this_actor) then
for name, _ in _pairs (this_actor.damage_from) do
for name, _ in _pairs(this_actor.damage_from) do
local aggressor = combat (1, name)
if (aggressor) then
local spell = aggressor.spells._ActorTable [spellid]
if (spell) then
local on_me = spell.targets [targetname]
if (on_me) then
GameCooltip:AddLine (aggressor.nome, FormatTooltipNumber (_, on_me))
GameCooltip:AddLine(aggressor.nome, FormatTooltipNumber (_, on_me))
_detalhes:AddTooltipBackgroundStatusbar()
end
end
@@ -135,12 +135,12 @@ function atributo_custom:damagedoneTooltip (actor, target, spellid, combat, inst
return
else
local name, _, icon = _GetSpellInfo(spellid)
GameCooltip:AddLine (name)
GameCooltip:AddLine(name)
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
GameCooltip:AddLine (Loc ["STRING_DAMAGE"] .. ": ", spell.total)
GameCooltip:AddLine (Loc ["STRING_HITS"] .. ": ", spell.counter)
GameCooltip:AddLine (Loc ["STRING_CRITICAL_HITS"] .. ": ", spell.c_amt)
GameCooltip:AddLine(Loc ["STRING_DAMAGE"] .. ": ", spell.total)
GameCooltip:AddLine(Loc ["STRING_HITS"] .. ": ", spell.counter)
GameCooltip:AddLine(Loc ["STRING_CRITICAL_HITS"] .. ": ", spell.c_amt)
end
elseif (target) then
@@ -154,7 +154,7 @@ function atributo_custom:damagedoneTooltip (actor, target, spellid, combat, inst
break
end
GameCooltip:AddLine (t[1], FormatTooltipNumber (_, t[2]))
GameCooltip:AddLine(t[1], FormatTooltipNumber (_, t[2]))
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon ([[Interface\FriendsFrame\StatusIcon-Offline]], 1, 1, 14, 14)
end
@@ -172,7 +172,7 @@ function atributo_custom:damagedoneTooltip (actor, target, spellid, combat, inst
end
if (roster [t[1]]) then
GameCooltip:AddLine (t[1], FormatTooltipNumber (_, t[2]))
GameCooltip:AddLine(t[1], FormatTooltipNumber (_, t[2]))
_detalhes:AddTooltipBackgroundStatusbar()
end
end
@@ -180,7 +180,7 @@ function atributo_custom:damagedoneTooltip (actor, target, spellid, combat, inst
elseif (target == "[player]") then
local target_amount = actor.targets [_detalhes.playername]
if (target_amount) then
GameCooltip:AddLine (targetactor.nome, FormatTooltipNumber (_, target_amount))
GameCooltip:AddLine(targetactor.nome, FormatTooltipNumber (_, target_amount))
_detalhes:AddTooltipBackgroundStatusbar()
end
else
@@ -194,7 +194,7 @@ function atributo_custom:damagedoneTooltip (actor, target, spellid, combat, inst
end
local name, _, icon = _GetSpellInfo(t[1])
GameCooltip:AddLine (name, FormatTooltipNumber (_, t[2]))
GameCooltip:AddLine(name, FormatTooltipNumber (_, t[2]))
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
end
@@ -219,7 +219,7 @@ function atributo_custom:damagedone (actor, source, target, spellid, combat, ins
if (spell) then
if (target) then
if (target == "[all]") then
for target_name, amount in _pairs (spell.targets) do
for target_name, amount in _pairs(spell.targets) do
--add amount
--we need to pass a object here in order to get name and class, so we just get the main damage actor from the combat
@@ -236,7 +236,7 @@ function atributo_custom:damagedone (actor, source, target, spellid, combat, ins
elseif (target == "[raid]") then
local roster = combat.raid_roster
for target_name, amount in _pairs (spell.targets) do
for target_name, amount in _pairs(spell.targets) do
if (roster [target_name]) then
--add amount
instance_container:AddValue (combat (1, target_name), amount, true)
@@ -289,14 +289,14 @@ function atributo_custom:damagedone (actor, source, target, spellid, combat, ins
if (target == "[all]") then
local total = 0
for target_name, amount in _pairs (actor.targets) do
for target_name, amount in _pairs(actor.targets) do
total = total + amount
end
return total
elseif (target == "[raid]") then
local total = 0
for target_name, amount in _pairs (actor.targets) do
for target_name, amount in _pairs(actor.targets) do
if (combat.raid_roster [target_name]) then
total = total + amount
end
+18 -18
View File
@@ -15,14 +15,14 @@
local _table_insert = table.insert --lua local
local _table_size = table.getn --lua local
local _setmetatable = setmetatable --lua local
local _ipairs = ipairs --lua local
local ipairs = ipairs --lua local
local _pairs = pairs --lua local
local _rawget= rawget --lua local
local _math_min = math.min --lua local
local _math_max = math.max --lua local
local _bit_band = bit.band --lua local
local _unpack = unpack --lua local
local _type = type --lua local
local type = type --lua local
local _GetSpellInfo = _detalhes.getspellinfo -- api local
local _IsInRaid = IsInRaid -- api local
@@ -52,7 +52,7 @@
local target_func = function(main_table)
local i = 1
for name, amount in _pairs (main_table) do
for name, amount in _pairs(main_table) do
local t = temp_table [i]
if (not t) then
t = {"", 0}
@@ -68,7 +68,7 @@
local spells_used_func = function(main_table, target)
local i = 1
for spellid, spell_table in _pairs (main_table) do
for spellid, spell_table in _pairs(main_table) do
local target_amount = spell_table.targets [target]
if (target_amount) then
local t = temp_table [i]
@@ -111,14 +111,14 @@
local this_actor = combat (2, targetname)
if (this_actor) then
for name, _ in _pairs (this_actor.healing_from) do
for name, _ in _pairs(this_actor.healing_from) do
local healer = combat (2, name)
if (healer) then
local spell = healer.spells._ActorTable [spellid]
if (spell) then
local on_me = spell.targets [targetname]
if (on_me) then
GameCooltip:AddLine (healer.nome, FormatTooltipNumber (_, on_me))
GameCooltip:AddLine(healer.nome, FormatTooltipNumber (_, on_me))
end
end
end
@@ -128,12 +128,12 @@
return
else
local name, _, icon = _GetSpellInfo(spellid)
GameCooltip:AddLine (name)
GameCooltip:AddLine(name)
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
GameCooltip:AddLine (Loc ["STRING_HEAL"] .. ": ", spell.total)
GameCooltip:AddLine (Loc ["STRING_HITS"] .. ": ", spell.counter)
GameCooltip:AddLine (Loc ["STRING_CRITICAL_HITS"] .. ": ", spell.c_amt)
GameCooltip:AddLine(Loc ["STRING_HEAL"] .. ": ", spell.total)
GameCooltip:AddLine(Loc ["STRING_HITS"] .. ": ", spell.counter)
GameCooltip:AddLine(Loc ["STRING_CRITICAL_HITS"] .. ": ", spell.c_amt)
end
elseif (target) then
@@ -147,7 +147,7 @@
break
end
GameCooltip:AddLine (t[1], FormatTooltipNumber (_, t[2]))
GameCooltip:AddLine(t[1], FormatTooltipNumber (_, t[2]))
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon ([[Interface\FriendsFrame\StatusIcon-Offline]], 1, 1, 14, 14)
end
@@ -165,14 +165,14 @@
end
if (roster [t[1]]) then
GameCooltip:AddLine (t[1], FormatTooltipNumber (_, t[2]))
GameCooltip:AddLine(t[1], FormatTooltipNumber (_, t[2]))
end
end
elseif (target == "[player]") then
local target_amount = actor.targets [_detalhes.playername]
if (target_amount) then
GameCooltip:AddLine (targetactor.nome, FormatTooltipNumber (_, target_amount))
GameCooltip:AddLine(targetactor.nome, FormatTooltipNumber (_, target_amount))
end
else
@@ -187,7 +187,7 @@
end
local name, _, icon = _GetSpellInfo(t[1])
GameCooltip:AddLine (name, FormatTooltipNumber (_, t[2]))
GameCooltip:AddLine(name, FormatTooltipNumber (_, t[2]))
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
end
end
@@ -208,7 +208,7 @@
if (spell) then
if (target) then
if (target == "[all]") then
for target_name, amount in _pairs (spell.targets) do
for target_name, amount in _pairs(spell.targets) do
--add amount
--we need to pass a object here in order to get name and class, so we just get the main heal actor from the combat
@@ -225,7 +225,7 @@
elseif (target == "[raid]") then
local roster = combat.raid_roster
for target_name, amount in _pairs (spell.targets) do
for target_name, amount in _pairs(spell.targets) do
if (roster [target_name]) then
--add amount
instance_container:AddValue (combat (1, target_name), amount, true)
@@ -278,14 +278,14 @@
if (target == "[all]") then
local total = 0
for target_name, amount in _pairs (actor.targets) do
for target_name, amount in _pairs(actor.targets) do
total = total + amount
end
return total
elseif (target == "[raid]") then
local total = 0
for target_name, amount in _pairs (actor.targets) do
for target_name, amount in _pairs(actor.targets) do
if (combat.raid_roster [target_name]) then
total = total + amount
end
+4 -4
View File
@@ -13,7 +13,7 @@ local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
function _detalhes:ResetInstanceConfig (maintainsnap)
for key, value in pairs(_detalhes.instance_defaults) do
if (type(value) == "table") then
self [key] = Details.CopyTable (value)
self [key] = Details.CopyTable(value)
else
self [key] = value
end
@@ -60,7 +60,7 @@ function _detalhes:ResetInstanceConfigKeepingValues (maintainsnap)
for key, value in pairs(_detalhes.instance_defaults) do
if (not _detalhes.instance_skin_ignored_values [key]) then
if (type(value) == "table") then
self [key] = Details.CopyTable (value)
self [key] = Details.CopyTable(value)
else
self [key] = value
end
@@ -78,7 +78,7 @@ function _detalhes:LoadInstanceConfig()
for key, value in pairs(_detalhes.instance_defaults) do
if (self [key] == nil) then
if (type(value) == "table") then
self [key] = Details.CopyTable (_detalhes.instance_defaults [key])
self [key] = Details.CopyTable(_detalhes.instance_defaults [key])
else
self [key] = value
end
@@ -87,7 +87,7 @@ function _detalhes:LoadInstanceConfig()
for key2, value2 in pairs(value) do
if (self [key] [key2] == nil) then
if (type(value2) == "table") then
self [key] [key2] = Details.CopyTable (_detalhes.instance_defaults [key] [key2])
self [key] [key2] = Details.CopyTable(_detalhes.instance_defaults [key] [key2])
else
self [key] [key2] = value2
end