v3 Release Candidate.

This commit is contained in:
tercio
2014-11-11 19:49:24 -02:00
parent 1ab15245b4
commit cf3219f436
41 changed files with 2835 additions and 3757 deletions
+2 -1
View File
@@ -12,4 +12,5 @@ move-folders:
Details/plugins/Details_Vanguard: Details_Vanguard
Details/plugins/Details_YouAreNotPrepared: Details_YouAreNotPrepared
Details/plugins/Details_RaidInfo-BlackrockFoundry: Details_RaidInfo-BlackrockFoundry
Details/plugins/Details_RaidInfo-Highmaul: Details_RaidInfo-Highmaul
Details/plugins/Details_RaidInfo-Highmaul: Details_RaidInfo-Highmaul
Details/plugins/Details_DataStorage: Details_DataStorage
+178
View File
@@ -0,0 +1,178 @@
This is a short api document for Details! API, describing attributes, combat, container, actor.
It still is incomplete, we are writing.
Attributes:
=======================================
All these keys are globals.
DETAILS_ATTRIBUTE_DAMAGE = 1
DETAILS_SUBATTRIBUTE_DAMAGEDONE = 1
DETAILS_SUBATTRIBUTE_DPS = 2
DETAILS_SUBATTRIBUTE_DAMAGETAKEN = 3
DETAILS_SUBATTRIBUTE_FRIENDLYFIRE = 4
DETAILS_SUBATTRIBUTE_FRAGS = 5
DETAILS_SUBATTRIBUTE_ENEMIES = 6
DETAILS_SUBATTRIBUTE_VOIDZONES = 7
DETAILS_ATTRIBUTE_HEAL = 2
DETAILS_SUBATTRIBUTE_HEALDONE = 1
DETAILS_SUBATTRIBUTE_HPS = 2
DETAILS_SUBATTRIBUTE_OVERHEAL = 3
DETAILS_SUBATTRIBUTE_HEALTAKEN = 4
DETAILS_SUBATTRIBUTE_HEALENEMY = 5
DETAILS_SUBATTRIBUTE_HEALPREVENTED = 6
DETAILS_ATTRIBUTE_ENERGY = 3
DETAILS_SUBATTRIBUTE_REGENMANA = 1
DETAILS_SUBATTRIBUTE_REGENRAGE = 2
DETAILS_SUBATTRIBUTE_REGENENERGY = 3
DETAILS_SUBATTRIBUTE_REGENRUNE = 4
DETAILS_ATTRIBUTE_MISC = 4
DETAILS_SUBATTRIBUTE_CCBREAK = 1
DETAILS_SUBATTRIBUTE_RESS = 2
DETAILS_SUBATTRIBUTE_INTERRUPT = 3
DETAILS_SUBATTRIBUTE_DISPELL = 4
DETAILS_SUBATTRIBUTE_DEATH = 5
DETAILS_SUBATTRIBUTE_DCOOLDOWN = 6
DETAILS_SUBATTRIBUTE_BUFFUPTIME = 7
DETAILS_SUBATTRIBUTE_DEBUFFUPTIME = 8
Combat Object:
=======================================
Combat Objects holds the containers for each main attribute.
actor = combat ( attribute, character_name )
returns actor object
container = combat:GetContainer (attribute)
chartData = combat:GetTimeData ( chart_data_name )
returns the table containing the data for create a chart.
startDate, endDate = combat:GetDate()
returns the start and end date as %H:%M:%S.
isTrash = combat:IsTrash()
returns true if the combat is a trash segment.
encounterDiff = combat:GetDifficulty()
returns the difficulty number of the raid encounter.
bossInfo = combat:GetBossInfo()
returns the table containing informations about the boss encounter.
deaths = combat:GetDeaths()
returns a numeric table containing the deaths.
combatNumber = combat:GetCombatNumber()
returns the unique ID number for the combat.
combatName = combat:GetCombatName ( try_to_find )
returns the segment name, e.g. "Trainning Dummy", if try_to_find is true, it searches the combat for a enemy name.
characterList = combat:GetActorList ( attribute )
returns a numeric table with all actors of the specific attribute.
time = combat:GetCombatTime()
returns the length of the combat, if the combat is in progress, returns the elapsed time.
DETAILS_TOTALS_ONLYGROUP = true
total = combat:GetTotal ( attribute, subAttribute [, onlyGroup] )
returns the total of the requested attribute.
Container Object:
=======================================
A container is used to store actors, each combat have four containers, one for each attribute.
amount = container:GetAmount (actorName [, key = "total"])
returns the amount of the requested member key, is key is not passed, "total" is used.
total = container:GetTotal (key = "total")
returns the total amount of all actors inside the container, if key is omitted, "total" is used.
total = container:GetTotalOnRaid (key = "total", combat)
similar to GetTotal, but only counts the total of raid members.
ipairs_list = container:ListActors()
returns a iterated table of actors inside the container.
Usage: for index, actor in container:ListActors() do
Actor Object:
=======================================
Holds all total keys, spells and targets of a character.
name = actor:Name()
returns the actor's name.
displayName = actor:GetDisplayName()
returns the name shown on the player bar, can soffer modifications from realm name removed, nicknames, etc.
name = actor:GetOnlyName()
returns only the actor name, remove realm or owner names.
class = actor:Class()
returns the actor class.
activity = actor:Tempo()
returns the activity time for the actor.
isGroupMember = actor:IsGroupPlayer()
return true if the actor is a player and member of the raid group.
isPlayer = actor:IsPlayer()
return true if the actor is a player.
IsneutralOrEnemy = actor:IsNeutralOrEnemy()
return true if the actor is a neutral of an enemy.
isEnemy = actor:IsEnemy()
return true if the actor is a enemy.
list = actor:GetSpellList()
returns a hash table with spellid, spelltable.
spell = actor:GetSpell (spellid)
returns a spell table of requested spell id.
r, g, b = actor:GetBarColor()
returns the color which the player bar will be painted on the window, it respects owner, arena team, enemy, monster.
r, g, b = _detalhes:GetClassColor()
returns the class color.
icon, left, right, top, bottom = actor:GetClassIcon()
returns the icon texture path and the texture's texcoords.
Damage Actor Keys:
total = total of damage done.
total_without_pet = without pet.
damage_taken = total of damage taken.
last_dps = cache of the last calculed dps, it's best take actor.total / actor:Tempo()
last_event = when the last event for this actor occured.
start_time = time when this actor started to apply damage.
end_time = time when the actor stopped with damage.
friendlyfire_total = amount of friendlyfire.
targets = hash table of targets: targetName, amount.
damage_from = hash table of actors which applied damage to this actor: aggresorName, true.
pets = numeric table of GUIDs of pets summoned by this actor.
friendlyfire = hash table of friendly fire targets: targetName, table {total = 0, spells = hash table: spellId, amount}
spells = hash table with spells used to apply damage: spellId, spellTable.
-1
View File
@@ -84,7 +84,6 @@ classes\classe_target.lua
classes\classe_custom.lua
classes\custom_damage_done.lua
classes\custom_healing_done.lua
classes\custom_damage_taken.lua
core\control.lua
+7 -7
View File
File diff suppressed because one or more lines are too long
+27 -10
View File
@@ -55,11 +55,15 @@
return self.TimeData [name]
end
function combate:GetContainer (attribute)
return self [attribute]
end
function combate:IsTrash()
return _rawget (self, "is_trash")
end
function combate:GetDifficult()
function combate:GetDifficulty()
return self.is_boss and self.is_boss.diff
end
@@ -111,6 +115,8 @@
end
--return the total of a specific attribute
local power_table = {0, 1, 3, 6}
function combate:GetTotal (attribute, subAttribute, onlyGroup)
if (attribute == 1 or attribute == 2) then
if (onlyGroup) then
@@ -119,7 +125,17 @@
return self.totals [attribute]
end
elseif (attribute == 3 or attribute == 4) then
elseif (attribute == 3) then
if (subAttribute == 5) then --> resources
return self.totals.resources or 0
end
if (onlyGroup) then
return self.totals_grupo [attribute] [power_table [subAttribute]]
else
return self.totals [attribute] [power_table [subAttribute]]
end
elseif (attribute == 4) then
local subName = _detalhes:GetInternalSubAttributeName (attribute, subAttribute)
if (onlyGroup) then
return self.totals_grupo [attribute] [subName]
@@ -127,6 +143,7 @@
return self.totals [attribute] [subName]
end
end
return 0
end
@@ -217,10 +234,10 @@
0, --> dano
0, --> cura
{--> e_energy
mana = 0, --> mana
e_rage = 0, --> rage
e_energy = 0, --> energy (rogues cat)
runepower = 0 --> runepower (dk)
[0] = 0, --> mana
[1] = 0, --> rage
[3] = 0, --> energy (rogues cat)
[6] = 0 --> runepower (dk)
},
{--> misc
cc_break = 0, --> armazena quantas quebras de CC
@@ -243,10 +260,10 @@
0, --> dano
0, --> cura
{--> e_energy
mana = 0, --> mana
e_rage = 0, --> rage
e_energy = 0, --> energy (rogues cat)
runepower = 0 --> runepower (dk)
[0] = 0, --> mana
[1] = 0, --> rage
[3] = 0, --> energy (rogues cat)
[6] = 0 --> runepower (dk)
},
{--> misc
cc_break = 0, --> armazena quantas quebras de CC
+4 -5
View File
@@ -1003,7 +1003,6 @@
TooltipMaximizedMethod = _detalhes.tooltip.maximize_method
atributo_custom:UpdateDamageDoneBracket()
atributo_custom:UpdateHealingDoneBracket()
atributo_custom:UpdateDamageTakenBracket()
end
function _detalhes:AddDefaultCustomDisplays()
@@ -1036,7 +1035,7 @@
local found_potion = false
--get the spell debuff uptime container
local debuff_uptime_container = player.debuff_uptime and player.debuff_uptime_spell_tables and player.debuff_uptime_spell_tables._ActorTable
local debuff_uptime_container = player.debuff_uptime and player.debuff_uptime_spells and player.debuff_uptime_spells._ActorTable
if (debuff_uptime_container) then
--potion of focus (can't use as pre-potion, so, its amount is always 1
--local focus_potion = debuff_uptime_container [156432] --WoD
@@ -1053,7 +1052,7 @@
end
--get the spell buff uptime container
local buff_uptime_container = player.buff_uptime and player.buff_uptime_spell_tables and player.buff_uptime_spell_tables._ActorTable
local buff_uptime_container = player.buff_uptime and player.buff_uptime_spells and player.buff_uptime_spells._ActorTable
if (buff_uptime_container) then
--potion of the jade serpent
@@ -1135,7 +1134,7 @@
local player, combat, instance = ...
--get the debuff container for potion of focus
local debuff_uptime_container = player.debuff_uptime and player.debuff_uptime_spell_tables and player.debuff_uptime_spell_tables._ActorTable
local debuff_uptime_container = player.debuff_uptime and player.debuff_uptime_spells and player.debuff_uptime_spells._ActorTable
if (debuff_uptime_container) then
--local focus_potion = debuff_uptime_container [156432] --WoD
local focus_potion = debuff_uptime_container [105701] --MoP
@@ -1149,7 +1148,7 @@
end
--get the buff container for all the others potions
local buff_uptime_container = player.buff_uptime and player.buff_uptime_spell_tables and player.buff_uptime_spell_tables._ActorTable
local buff_uptime_container = player.buff_uptime and player.buff_uptime_spells and player.buff_uptime_spells._ActorTable
if (buff_uptime_container) then
--potion of the jade serpent
--local jade_serpent_potion = buff_uptime_container [156426] --WoD
+273 -510
View File
File diff suppressed because it is too large Load Diff
+4 -100
View File
@@ -5,7 +5,6 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> local pointers
local _setmetatable = setmetatable--lua local
local _ipairs = ipairs--lua local
local _pairs = pairs--lua local
local _UnitAura = UnitAura--api local
@@ -68,15 +67,9 @@
a_amt = 0,
a_dmg = 0,
targets = container_combatentes:NovoContainer (container_damage_target)
targets = {}
}
_setmetatable (_newDamageSpell, habilidade_dano)
if (link) then
_newDamageSpell.targets.shadow = link.targets
end
if (token == "SPELL_PERIODIC_DAMAGE") then
_detalhes:SpellIsDot (id)
end
@@ -86,29 +79,16 @@
function habilidade_dano:AddMiss (serial, nome, flags, who_nome, missType)
self.counter = self.counter + 1
local miss = self [missType] or 0
miss = miss + 1
self [missType] = miss
self [missType] = (self [missType] or 0) + 1
self.targets:PegarCombatente (serial, nome, flags, true) --apenas criar o alvo para a abilidade
end
function habilidade_dano:AddFF (amount)
self.counter = self.counter + 1
self.total = self.total + amount
self.targets [nome] = self.targets [nome] or 0
end
function habilidade_dano:Add (serial, nome, flag, amount, who_nome, resisted, blocked, absorbed, critical, glacing, token, multistrike, isoffhand)
self.counter = self.counter + 1
local alvo = self.targets._NameIndexTable [nome]
if (not alvo) then
alvo = self.targets:PegarCombatente (serial, nome, flag, true)
else
alvo = self.targets._ActorTable [alvo]
end
self.targets [nome] = (self.targets [nome] or 0) + amount
if (multistrike) then
self.m_amt = self.m_amt + 1
@@ -140,7 +120,6 @@
end
self.total = self.total + amount
alvo.total = alvo.total + amount
if (glacing) then
self.g_dmg = self.g_dmg+amount --> amount é o total de dano
@@ -223,81 +202,6 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> core
function _detalhes.refresh:r_habilidade_dano (habilidade, shadow) --recebeu o container shadow
_setmetatable (habilidade, habilidade_dano)
habilidade.__index = habilidade_dano
habilidade.shadow = shadow._ActorTable [habilidade.id]
_detalhes.refresh:r_container_combatentes (habilidade.targets, habilidade.shadow.targets)
end
function _detalhes.clear:c_habilidade_dano (habilidade)
--habilidade.__index = {}
habilidade.__index = nil
habilidade.shadow = nil
_detalhes.clear:c_container_combatentes (habilidade.targets)
end
habilidade_dano.__add = function (tabela1, tabela2)
tabela1.total = tabela1.total + tabela2.total
tabela1.counter = tabela1.counter + tabela2.counter
tabela1.successful_casted = tabela1.successful_casted + tabela2.successful_casted
tabela1.n_min = tabela1.n_min + tabela2.n_min
tabela1.n_max = tabela1.n_max + tabela2.n_max
tabela1.n_amt = tabela1.n_amt + tabela2.n_amt
tabela1.n_dmg = tabela1.n_dmg + tabela2.n_dmg
tabela1.c_min = tabela1.c_min + tabela2.c_min
tabela1.c_max = tabela1.c_max + tabela2.c_max
tabela1.c_amt = tabela1.c_amt + tabela2.c_amt
tabela1.c_dmg = tabela1.c_dmg + tabela2.c_dmg
tabela1.g_amt = tabela1.g_amt + tabela2.g_amt
tabela1.g_dmg = tabela1.g_dmg + tabela2.g_dmg
tabela1.r_amt = tabela1.r_amt + tabela2.r_amt
tabela1.r_dmg = tabela1.r_dmg + tabela2.r_dmg
tabela1.b_amt = tabela1.b_amt + tabela2.b_amt
tabela1.b_dmg = tabela1.b_dmg + tabela2.b_dmg
tabela1.a_amt = tabela1.a_amt + tabela2.a_amt
tabela1.a_dmg = tabela1.a_dmg + tabela2.a_dmg
return tabela1
end
habilidade_dano.__sub = function (tabela1, tabela2)
tabela1.total = tabela1.total - tabela2.total
tabela1.counter = tabela1.counter - tabela2.counter
tabela1.successful_casted = tabela1.successful_casted - tabela2.successful_casted
tabela1.n_min = tabela1.n_min - tabela2.n_min
tabela1.n_max = tabela1.n_max - tabela2.n_max
tabela1.n_amt = tabela1.n_amt - tabela2.n_amt
tabela1.n_dmg = tabela1.n_dmg - tabela2.n_dmg
tabela1.c_min = tabela1.c_min - tabela2.c_min
tabela1.c_max = tabela1.c_max - tabela2.c_max
tabela1.c_amt = tabela1.c_amt - tabela2.c_amt
tabela1.c_dmg = tabela1.c_dmg - tabela2.c_dmg
tabela1.g_amt = tabela1.g_amt - tabela2.g_amt
tabela1.g_dmg = tabela1.g_dmg - tabela2.g_dmg
tabela1.r_amt = tabela1.r_amt - tabela2.r_amt
tabela1.r_dmg = tabela1.r_dmg - tabela2.r_dmg
tabela1.b_amt = tabela1.b_amt - tabela2.b_amt
tabela1.b_dmg = tabela1.b_dmg - tabela2.b_dmg
tabela1.a_amt = tabela1.a_amt - tabela2.a_amt
tabela1.a_dmg = tabela1.a_dmg - tabela2.a_dmg
return tabela1
end
function _detalhes:UpdateDamageAbilityGears()
_recording_ability_with_buffs = _detalhes.RecordPlayerAbilityWithBuffs
end
+640 -465
View File
File diff suppressed because it is too large Load Diff
+4 -73
View File
@@ -25,88 +25,19 @@
function habilidade_energy:NovaTabela (id, link, token)
local _newEnergySpell = {
id = id,
counter = 0,
mana = 0,
e_rage = 0,
e_energy = 0,
runepower = 0,
targets = container_combatentes:NovoContainer (container_energy_target)
total = 0,
targets = {}
}
_setmetatable (_newEnergySpell, habilidade_energy)
if (link) then
_newEnergySpell.targets.shadow = link.targets
end
return _newEnergySpell
end
function habilidade_energy:Add (serial, nome, flag, amount, who_nome, powertype)
self.counter = self.counter + 1
local alvo = self.targets._NameIndexTable [nome]
if (not alvo) then
alvo = self.targets:PegarCombatente (serial, nome, flag, true)
else
alvo = self.targets._ActorTable [alvo]
end
if (powertype == 0) then --> MANA
self.mana = self.mana + amount
alvo.mana = alvo.mana + amount
elseif (powertype == 1) then --> e_rage
self.e_rage = self.e_rage + amount
alvo.e_rage = alvo.e_rage + amount
elseif (powertype == 3) then --> ENERGIA
self.e_energy = self.e_energy + amount
alvo.e_energy = alvo.e_energy + amount
elseif (powertype == 6) then --> RUNEPOWER
self.runepower = self.runepower + amount
alvo.runepower = alvo.runepower + amount
end
self.total = self.total + amount
self.targets [nome] = (self.targets [nome] or 0) + amount
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> core
function _detalhes.refresh:r_habilidade_e_energy (habilidade, shadow) --recebeu o container shadow
_setmetatable (habilidade, habilidade_energy)
habilidade.__index = habilidade_energy
if (shadow ~= -1) then
habilidade.shadow = shadow._ActorTable[habilidade.id]
_detalhes.refresh:r_container_combatentes (habilidade.targets, habilidade.shadow.targets)
else
_detalhes.refresh:r_container_combatentes (habilidade.targets, -1)
end
end
function _detalhes.clear:c_habilidade_e_energy (habilidade)
--habilidade.__index = {}
habilidade.__index = {}
habilidade.shadow = nil
_detalhes.clear:c_container_combatentes (habilidade.targets)
end
habilidade_energy.__sub = function (tabela1, tabela2)
tabela1.mana = tabela1.mana - tabela2.mana
tabela1.e_rage = tabela1.e_rage - tabela2.e_rage
tabela1.e_energy = tabela1.e_energy - tabela2.e_energy
tabela1.runepower = tabela1.runepower - tabela2.runepower
tabela1.counter = tabela1.counter - tabela2.counter
return tabela1
end
+173 -283
View File
@@ -105,21 +105,22 @@ function atributo_heal:NovaTabela (serial, nome, link)
heal_enemy_amt = 0,
--container armazenará os IDs das habilidades usadas por este jogador
spell_tables = container_habilidades:NovoContainer (container_heal),
spells = container_habilidades:NovoContainer (container_heal),
--container armazenará os seriais dos alvos que o player aplicou dano
targets = container_combatentes:NovoContainer (container_heal_target)
targets = {},
targets_overheal = {},
targets_absorbs = {}
}
_setmetatable (_new_healActor, atributo_heal)
if (link) then --> se não for a shadow
--if (link) then --> se não for a shadow
--_new_healActor.last_events_table = _detalhes:CreateActorLastEventTable()
--_new_healActor.last_events_table.original = true
_new_healActor.targets.shadow = link.targets
_new_healActor.spell_tables.shadow = link.spell_tables
end
--_new_healActor.targets.shadow = link.targets
--_new_healActor.spells.shadow = link.spells
--end
return _new_healActor
end
@@ -546,22 +547,6 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
end
function atributo_heal:Custom (_customName, _combat, sub_atributo, spell, alvo)
local _Skill = self.spell_tables._ActorTable [tonumber (spell)]
if (_Skill) then
local spellName = _GetSpellInfo (tonumber (spell))
local SkillTargets = _Skill.targets._ActorTable
for _, TargetActor in _ipairs (SkillTargets) do
local TargetActorSelf = _combat (class_type, TargetActor.nome)
if (TargetActorSelf) then
TargetActorSelf.custom = TargetActor.total + TargetActorSelf.custom
_combat.totals [_customName] = _combat.totals [_customName] + TargetActor.total
end
end
end
end
local actor_class_color_r, actor_class_color_g, actor_class_color_b
--function atributo_heal:AtualizaBarra (instancia, qual_barra, lugar, total, sub_atributo, forcar)
@@ -987,9 +972,9 @@ function atributo_heal:ToolTip_HealingTaken (instancia, numero, barra, keydown)
local este_curador = showing._ActorTable[showing._NameIndexTable[nome]]
if (este_curador) then --> checagem por causa do total e do garbage collector que não limpa os nomes que deram dano
local alvos = este_curador.targets
local este_alvo = alvos._ActorTable[alvos._NameIndexTable[self.nome]]
if (este_alvo and este_alvo.total > 0) then
meus_curadores [#meus_curadores+1] = {nome, este_alvo.total, este_curador.classe}
local este_alvo = alvos [self.nome]
if (este_alvo and este_alvo > 0) then
meus_curadores [#meus_curadores+1] = {nome, este_alvo, este_curador.classe}
end
end
end
@@ -1051,7 +1036,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
local ActorHealingTable = {}
local ActorHealingTargets = {}
local ActorSkillsContainer = self.spell_tables._ActorTable
local ActorSkillsContainer = self.spells._ActorTable
local actor_key, skill_key = "total", "total"
if (instancia.sub_atributo == 3) then
@@ -1078,10 +1063,10 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
_table_sort (ActorHealingTable, _detalhes.Sort2)
--> TOP Curados
ActorSkillsContainer = self.targets._ActorTable
for _, TargetTable in _ipairs (ActorSkillsContainer) do
if (TargetTable.total > 0) then
_table_insert (ActorHealingTargets, {TargetTable.nome, TargetTable.total, TargetTable.total/ActorTotal*100})
ActorSkillsContainer = self.targets
for target_name, amount in _pairs (ActorSkillsContainer) do
if (amount > 0) then
_table_insert (ActorHealingTargets, {target_name, amount, amount / ActorTotal * 100})
end
end
_table_sort (ActorHealingTargets, _detalhes.Sort2)
@@ -1203,7 +1188,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
if (my_self) then
local meu_total = my_self.total_without_pet
local tabela = my_self.spell_tables._ActorTable
local tabela = my_self.spells._ActorTable
local meus_danos = {}
local meu_tempo
@@ -1222,9 +1207,9 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
danos [nome] = meus_danos
local meus_inimigos = {}
tabela = my_self.targets._ActorTable
for _, tabela in _ipairs (tabela) do
_table_insert (meus_inimigos, {tabela.nome, tabela.total, tabela.total/meu_total*100})
tabela = my_self.targets
for target_name, amount in _pairs (tabela) do
_table_insert (meus_inimigos, {target_name, amount, amount / meu_total * 100})
end
_table_sort (meus_inimigos,_detalhes.Sort2)
alvos [nome] = meus_inimigos
@@ -1349,9 +1334,9 @@ function atributo_heal:MontaInfoHealTaken()
este_curandeiro = showing._ActorTable[showing._NameIndexTable[nome]]
if (este_curandeiro) then
local alvos = este_curandeiro.targets
local este_alvo = alvos._ActorTable[alvos._NameIndexTable[self.nome]]
local este_alvo = alvos [self.nome]
if (este_alvo) then
meus_curandeiros [#meus_curandeiros+1] = {nome, este_alvo.total, este_alvo.total/healing_taken*100, este_curandeiro.classe}
meus_curandeiros [#meus_curandeiros+1] = {nome, este_alvo, este_alvo/healing_taken*100, este_curandeiro.classe}
end
end
end
@@ -1362,7 +1347,7 @@ function atributo_heal:MontaInfoHealTaken()
return true
end
_table_sort (meus_curandeiros, function (a, b) return a[2] > b[2] end)
_table_sort (meus_curandeiros, _detalhes.Sort2)
gump:JI_AtualizaContainerBarras (amt)
@@ -1387,62 +1372,6 @@ function atributo_heal:MontaInfoHealTaken()
self:UpdadeInfoBar (barra, index, tabela[1], tabela[1], tabela[2], _detalhes:comma_value (tabela[2]), max_, tabela[3], "Interface\\AddOns\\Details\\images\\classes_small", true, texCoords)
end
--[[
for index, tabela in _ipairs (meus_curandeiros) do
local barra = barras [index]
if (not barra) then
barra = gump:CriaNovaBarraInfo1 (instancia, index)
barra.textura:SetStatusBarColor (1, 1, 1, 1)
barra.on_focus = false
end
if (not info.mostrando_mouse_over) then
if (tabela[1] == self.detalhes) then --> tabela [1] = NOME = NOME que esta na caixa da direita
if (not barra.on_focus) then --> se a barra não tiver no foco
barra.textura:SetStatusBarColor (129/255, 125/255, 69/255, 1)
barra.on_focus = true
if (not info.mostrando) then
info.mostrando = barra
end
end
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.on_focus = false
end
end
end
if (index == 1) then
barra.textura:SetValue (100)
else
barra.textura:SetValue (tabela[2]/max_*100) --> muito mais rapido...
end
barra.texto_esquerdo:SetText (index..instancia.divisores.colocacao..tabela[1]) --seta o texto da esqueda
barra.texto_direita:SetText (tabela[2] .." ".. instancia.divisores.abre .._cstr("%.1f", tabela[3]) .."%".. instancia.divisores.fecha) --seta o texto da direita
local classe = tabela[4]
if (not classe) then
classe = "monster"
end
barra.icone:SetTexture ("Interface\\AddOns\\Details\\images\\"..classe:lower().."_small")
barra.minha_tabela = self
barra.show = tabela[1]
barra:Show()
if (self.detalhes and self.detalhes == barra.show) then
self:MontaDetalhes (self.detalhes, barra)
end
end
--]]
end
function atributo_heal:MontaInfoOverHealing()
@@ -1450,7 +1379,7 @@ function atributo_heal:MontaInfoOverHealing()
local instancia = info.instancia
local total = self.totalover
local tabela = self.spell_tables._ActorTable
local tabela = self.spells._ActorTable
local minhas_curas = {}
local barras = info.barras1
@@ -1459,7 +1388,7 @@ function atributo_heal:MontaInfoOverHealing()
_table_insert (minhas_curas, {spellid, tabela.overheal, tabela.overheal/total*100, nome, icone})
end
_table_sort (minhas_curas, function(a, b) return a[2] > b[2] end)
_table_sort (minhas_curas, _detalhes.Sort2)
local amt = #minhas_curas
gump:JI_AtualizaContainerBarras (amt)
@@ -1516,17 +1445,17 @@ function atributo_heal:MontaInfoOverHealing()
--> TOP OVERHEALED
local jogadores_overhealed = {}
tabela = self.targets._ActorTable
tabela = self.targets_overheal
local heal_container = instancia.showing[2]
for _, tabela in _ipairs (tabela) do
for target_name, amount in _pairs (tabela) do
local classe = "UNKNOW"
local actor_object = heal_container._ActorTable [heal_container._NameIndexTable [tabela.nome]]
if (actor_object) then
classe = actor_object.classe
end
_table_insert (jogadores_overhealed, {tabela.nome, tabela.overheal, tabela.overheal/total*100, classe})
_table_insert (jogadores_overhealed, {target_name, amount, amount/total*100, classe})
end
_table_sort (jogadores_overhealed, function(a, b) return a[2] > b[2] end )
_table_sort (jogadores_overhealed, _detalhes.Sort2)
local amt_alvos = #jogadores_overhealed
gump:JI_AtualizaContainerAlvos (amt_alvos)
@@ -1563,14 +1492,8 @@ function atributo_heal:MontaInfoOverHealing()
barra.minha_tabela = self
barra.nome_inimigo = tabela [1]
-- no lugar do spell id colocar o que?
--barra.spellid = tabela[5]
barra:Show()
--if (self.detalhes and self.detalhes == barra.spellid) then
-- self:MontaDetalhes (self.detalhes, barra)
--end
end
end
@@ -1580,7 +1503,7 @@ function atributo_heal:MontaInfoHealingDone()
local instancia = info.instancia
local total = self.total
local tabela = self.spell_tables._ActorTable
local tabela = self.spells._ActorTable
local minhas_curas = {}
local barras = info.barras1
@@ -1604,12 +1527,11 @@ function atributo_heal:MontaInfoHealingDone()
for _, PetName in _ipairs (ActorPets) do
local PetActor = instancia.showing (class_type, PetName)
if (PetActor) then
local PetSkillsContainer = PetActor.spell_tables._ActorTable
local PetSkillsContainer = PetActor.spells._ActorTable
for _spellid, _skill in _pairs (PetSkillsContainer) do --> da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo (_spellid)
_table_insert (minhas_curas, {_spellid, _skill.total, _skill.total/total*100, nome .. " (|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r)", icone, PetActor})
end
--_table_insert (ActorSkillsSortTable, {PetName, PetActor.total, PetActor.total/ActorTotalDamage*100, PetName:gsub ((" <.*"), ""), "Interface\\AddOns\\Details\\images\\classes_small"})
end
end
@@ -1652,11 +1574,11 @@ function atributo_heal:MontaInfoHealingDone()
--> TOP CURADOS
local meus_inimigos = {}
tabela = self.targets._ActorTable
for _, tabela in _ipairs (tabela) do
_table_insert (meus_inimigos, {tabela.nome, tabela.total, tabela.total/total*100})
tabela = self.targets
for target_name, amount in _pairs (tabela) do
_table_insert (meus_inimigos, {target_name, amount, amount / total*100})
end
_table_sort (meus_inimigos, function(a, b) return a[2] > b[2] end )
_table_sort (meus_inimigos, _detalhes.Sort2)
local amt_alvos = #meus_inimigos
gump:JI_AtualizaContainerAlvos (amt_alvos)
@@ -1686,50 +1608,39 @@ function atributo_heal:MontaInfoHealingDone()
barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .." ".. instancia.divisores.abre .. _cstr ("%.1f", tabela[3]) .. instancia.divisores.fecha) --seta o texto da direita
end
-- o que mostrar no local do ícone?
--barra.icone:SetTexture (tabela[4][3])
barra.minha_tabela = self
barra.nome_inimigo = tabela [1]
-- no lugar do spell id colocar o que?
barra.spellid = tabela[5]
barra:Show()
--if (self.detalhes and self.detalhes == barra.spellid) then
-- self:MontaDetalhes (self.detalhes, barra)
--end
end
end
function atributo_heal:MontaTooltipAlvos (esta_barra, index, instancia)
-- eu ja sei quem é o alvo a mostrar os detalhes
-- dar foreach no container de habilidades -- pegar os alvos da habilidade -- e ver se dentro do container tem o meu alvo.
local inimigo = esta_barra.nome_inimigo
local container = self.spell_tables._ActorTable
local container = self.spells._ActorTable
local habilidades = {}
local total
local sub_atributo = info.instancia.sub_atributo
local targets_key = ""
if (sub_atributo == 3) then --> overheal
total = self.totalover
targets_key = "_overheal"
else
total = self.total
end
--> add spells
for spellid, tabela in _pairs (container) do
local alvos = tabela.targets._ActorTable
for _, tabela in _ipairs (alvos) do
if (tabela.nome == inimigo) then
for target_name, amount in _pairs (tabela ["targets" .. targets_key]) do
if (target_name == inimigo) then
local nome, _, icone = _GetSpellInfo (spellid)
if (sub_atributo == 3) then --> overheal
habilidades [#habilidades+1] = {nome, tabela.overheal, icone}
else
habilidades [#habilidades+1] = {nome, tabela.total, icone}
end
habilidades [#habilidades+1] = {nome, amount, icone}
end
end
end
@@ -1739,24 +1650,21 @@ function atributo_heal:MontaTooltipAlvos (esta_barra, index, instancia)
for _, PetName in _ipairs (ActorPets) do
local PetActor = instancia.showing (class_type, PetName)
if (PetActor) then
local PetSkillsContainer = PetActor.spell_tables._ActorTable
local PetSkillsContainer = PetActor.spells._ActorTable
for _spellid, _skill in _pairs (PetSkillsContainer) do
local alvos = _skill.targets._ActorTable
for _, tabela in _ipairs (alvos) do
if (tabela.nome == inimigo) then
for target_name, amount in _pairs (_skill ["targets" .. targets_key]) do
if (target_name == inimigo) then
local nome, _, icone = _GetSpellInfo (_spellid)
if (sub_atributo == 3) then --> overheal
habilidades [#habilidades+1] = {nome .. " (" .. PetName:gsub ((" <.*"), "") .. ")", tabela.overheal, icone}
else
habilidades [#habilidades+1] = {nome .. " (" .. PetName:gsub ((" <.*"), "") .. ")", tabela.total, icone}
end
habilidades [#habilidades+1] = {nome, amount, icone}
end
end
end
end
end
_table_sort (habilidades, function (a, b) return a[2] > b[2] end)
_table_sort (habilidades, _detalhes.Sort2)
--get time type
local meu_tempo
@@ -1796,7 +1704,6 @@ function atributo_heal:MontaTooltipAlvos (esta_barra, index, instancia)
end
return true
--GameTooltip:AddDoubleLine (minhas_curas[i][4][1]..": ", minhas_curas[i][2].." (".._cstr ("%.1f", minhas_curas[i][3]).."%)", 1, 1, 1, 1, 1, 1)
end
@@ -1822,32 +1729,22 @@ function atributo_heal:MontaDetalhesHealingTaken (nome, barra)
local showing = tabela_do_combate [class_type] --> o que esta sendo mostrado -> [1] - dano [2] - cura --> pega o container com ._NameIndexTable ._ActorTable
local este_curandeiro = showing._ActorTable[showing._NameIndexTable[nome]]
local conteudo = este_curandeiro.spell_tables._ActorTable --> _pairs[] com os IDs das magias
local conteudo = este_curandeiro.spells._ActorTable --> _pairs[] com os IDs das magias
local actor = info.jogador.nome
local total = este_curandeiro.targets._ActorTable [este_curandeiro.targets._NameIndexTable [actor]].total
local total = este_curandeiro.targets [actor]
local minhas_magias = {}
for spellid, tabela in _pairs (conteudo) do --> da foreach em cada spellid do container
--> preciso pegar os alvos que esta magia atingiu
local alvos = tabela.targets
local index = alvos._NameIndexTable[actor]
if (index) then --> esta magia deu dano no actor
local este_alvo = alvos._ActorTable[index] --> pega a classe_target
local spell_nome, rank, icone = _GetSpellInfo (spellid)
_table_insert (minhas_magias, {spellid, este_alvo.total, este_alvo.total/total*100, spell_nome, icone})
if (tabela.targets [actor]) then
local spell_nome, _, icone = _GetSpellInfo (spellid)
_table_insert (minhas_magias, {spellid, tabela.targets [actor], tabela.targets [actor] / total*100, spell_nome, icone})
end
end
_table_sort (minhas_magias, function(a, b) return a[2] > b[2] end)
--local amt = #minhas_magias
--gump:JI_AtualizaContainerBarras (amt)
_table_sort (minhas_magias, _detalhes.Sort2)
local max_ = minhas_magias[1] and minhas_magias[1][2] or 0 --> dano que a primeiro magia vez
@@ -1892,9 +1789,9 @@ function atributo_heal:MontaDetalhesHealingDone (spellid, barra)
local esta_magia
if (barra.other_actor) then
esta_magia = barra.other_actor.spell_tables._ActorTable [spellid]
esta_magia = barra.other_actor.spells._ActorTable [spellid]
else
esta_magia = self.spell_tables._ActorTable [spellid]
esta_magia = self.spells._ActorTable [spellid]
end
if (not esta_magia) then
@@ -2048,27 +1945,6 @@ function atributo_heal:MontaDetalhesHealingDone (spellid, barra)
_table_sort (data, _detalhes.Sort1)
--[[
local absorbed = esta_magia.absorbed
if (absorbed > 0) then
local porcentagem_absorbed = absorbed/esta_magia.total*100
data[#data+1] = t3
absorbed_table.p = porcentagem_absorbed
t3[1] = absorbed
t3[2] = absorbed_table
t3[3] = Loc ["STRING_HEAL_ABSORBED"]
t3[4] = ""
t3[5] = ""
t3[6] = ""
t3[7] = ""
t3[8] = absorbed .. " / " .. _cstr ("%.1f", porcentagem_absorbed).."%"
end
--]]
for i = #data+1, 3 do --> para o overheal aparecer na ultima barra
data[i] = nil
@@ -2109,10 +1985,6 @@ function atributo_heal:MontaDetalhesHealingDone (spellid, barra)
end
end
--for i = #data+2, 5 do
-- gump:HidaDetalheInfo (i)
--end
end
--controla se o dps do jogador esta travado ou destravado
@@ -2188,27 +2060,38 @@ end
_detalhes.refresh:r_atributo_heal (actor, shadow)
--> copia o container de alvos (captura de dados)
for index, alvo in _ipairs (actor.targets._ActorTable) do
--> cria e soma o valor do total
local alvo_shadow = shadow.targets:PegarCombatente (nil, alvo.nome, nil, true)
--> refresh no alvo
_detalhes.refresh:r_alvo_da_habilidade (alvo, shadow.targets)
for target_name, amount in _pairs (actor.targets) do
shadow.targets [target_name] = 0
end
for target_name, amount in _pairs (actor.targets_overheal) do
shadow.targets_overheal [target_name] = 0
end
for target_name, amount in _pairs (actor.targets_absorbs) do
shadow.targets_absorbs [target_name] = 0
end
--> copia o container de habilidades (captura de dados)
for spellid, habilidade in _pairs (actor.spell_tables._ActorTable) do
for spellid, habilidade in _pairs (actor.spells._ActorTable) do
--> cria e soma o valor
local habilidade_shadow = shadow.spell_tables:PegaHabilidade (spellid, true, nil, true)
local habilidade_shadow = shadow.spells:PegaHabilidade (spellid, true, nil, true)
--> refresh e soma os valores dos alvos
for index, alvo in _ipairs (habilidade.targets._ActorTable) do
--> cria e soma o valor do total
local alvo_shadow = habilidade_shadow.targets:PegarCombatente (nil, alvo.nome, nil, true)
--> refresh no alvo da habilidade
_detalhes.refresh:r_alvo_da_habilidade (alvo, habilidade_shadow.targets)
end
--> refresh na habilidade
_detalhes.refresh:r_habilidade_cura (habilidade, shadow.spell_tables)
for target_name, amount in _pairs (habilidade.targets) do
if (not habilidade_shadow.targets [target_name]) then
habilidade_shadow.targets [target_name] = 0
end
end
for target_name, amount in _pairs (habilidade.targets_overheal) do
if (not habilidade_shadow.targets_overheal [target_name]) then
habilidade_shadow.targets_overheal [target_name] = 0
end
end
for target_name, amount in _pairs (habilidade.targets_absorbs) do
if (not habilidade_shadow.targets_absorbs [target_name]) then
habilidade_shadow.targets_absorbs [target_name] = 0
end
end
end
return shadow
@@ -2274,34 +2157,32 @@ end
end
--> copia o container de alvos (captura de dados)
for index, alvo in _ipairs (actor.targets._ActorTable) do
--> cria e soma o valor do total
local alvo_shadow = shadow.targets:PegarCombatente (nil, alvo.nome, nil, true)
alvo_shadow.total = alvo_shadow.total + alvo.total
alvo_shadow.overheal = alvo_shadow.overheal + alvo.overheal
alvo_shadow.absorbed = alvo_shadow.absorbed + alvo.absorbed
--> refresh no alvo
if (not no_refresh) then
_detalhes.refresh:r_alvo_da_habilidade (alvo, shadow.targets)
end
for target_name, amount in _pairs (actor.targets) do
shadow.targets [target_name] = (shadow.targets [target_name] or 0) + amount
end
for target_name, amount in _pairs (actor.targets_overheal) do
shadow.targets_overheal [target_name] = (shadow.targets_overheal [target_name] or 0) + amount
end
for target_name, amount in _pairs (actor.targets_absorbs) do
shadow.targets_absorbs [target_name] = (shadow.targets_absorbs [target_name] or 0) + amount
end
--> copia o container de habilidades (captura de dados)
for spellid, habilidade in _pairs (actor.spell_tables._ActorTable) do
for spellid, habilidade in _pairs (actor.spells._ActorTable) do
--> cria e soma o valor
local habilidade_shadow = shadow.spell_tables:PegaHabilidade (spellid, true, nil, true)
local habilidade_shadow = shadow.spells:PegaHabilidade (spellid, true, nil, true)
--> refresh e soma os valores dos alvos
for index, alvo in _ipairs (habilidade.targets._ActorTable) do
--> cria e soma o valor do total
local alvo_shadow = habilidade_shadow.targets:PegarCombatente (nil, alvo.nome, nil, true)
alvo_shadow.total = alvo_shadow.total + alvo.total
alvo_shadow.overheal = alvo_shadow.overheal + alvo.overheal
alvo_shadow.absorbed = alvo_shadow.absorbed + alvo.absorbed
--> refresh no alvo da habilidade
if (not no_refresh) then
_detalhes.refresh:r_alvo_da_habilidade (alvo, habilidade_shadow.targets)
end
for target_name, amount in _pairs (habilidade.targets) do
habilidade_shadow.targets [target_name] = (habilidade_shadow.targets [target_name] or 0) + amount
end
for target_name, amount in _pairs (habilidade.targets_overheal) do
habilidade_shadow.targets_overheal [target_name] = (habilidade_shadow.targets_overheal [target_name] or 0) + amount
end
for target_name, amount in _pairs (habilidade.targets_absorbs) do
habilidade_shadow.targets_absorbs [target_name] = (habilidade_shadow.targets_absorbs [target_name] or 0) + amount
end
--> soma todos os demais valores
for key, value in _pairs (habilidade) do
if (_type (value) == "number") then
@@ -2313,11 +2194,7 @@ end
end
end
end
--> refresh na habilidade
if (not no_refresh) then
_detalhes.refresh:r_habilidade_cura (habilidade, shadow.spell_tables)
end
end
return shadow
@@ -2327,31 +2204,6 @@ function atributo_heal:ColetarLixo (lastevent)
return _detalhes:ColetarLixo (class_type, lastevent)
end
function _detalhes.refresh:r_atributo_heal (este_jogador, shadow)
_setmetatable (este_jogador, atributo_heal)
este_jogador.__index = atributo_heal
if (shadow ~= -1) then
este_jogador.shadow = shadow
_detalhes.refresh:r_container_combatentes (este_jogador.targets, shadow.targets)
_detalhes.refresh:r_container_habilidades (este_jogador.spell_tables, shadow.spell_tables)
else
_detalhes.refresh:r_container_combatentes (este_jogador.targets, -1)
_detalhes.refresh:r_container_habilidades (este_jogador.spell_tables, -1)
end
end
function _detalhes.clear:c_atributo_heal (este_jogador)
--este_jogador.__index = {}
este_jogador.__index = nil
este_jogador.shadow = nil
este_jogador.links = nil
este_jogador.minha_barra = nil
_detalhes.clear:c_container_combatentes (este_jogador.targets)
_detalhes.clear:c_container_habilidades (este_jogador.spell_tables)
end
atributo_heal.__add = function (tabela1, tabela2)
--> tempo decorrido
@@ -2387,25 +2239,29 @@ atributo_heal.__add = function (tabela1, tabela2)
end
--> somar o container de alvos
for index, alvo in _ipairs (tabela2.targets._ActorTable) do
--> pega o alvo no ator
local alvo_tabela1 = tabela1.targets:PegarCombatente (nil, alvo.nome, nil, true)
--> soma os valores
alvo_tabela1.total = alvo_tabela1.total + alvo.total
alvo_tabela1.overheal = alvo_tabela1.overheal + alvo.overheal
alvo_tabela1.absorbed = alvo_tabela1.absorbed + alvo.absorbed
for target_name, amount in _pairs (tabela2.targets) do
tabela1.targets [target_name] = (tabela1.targets [target_name] or 0) + amount
end
for target_name, amount in _pairs (tabela2.targets_overheal) do
tabela1.targets_overheal [target_name] = (tabela1.targets_overheal [target_name] or 0) + amount
end
for target_name, amount in _pairs (tabela2.targets_absorbs) do
tabela1.targets_absorbs [target_name] = (tabela1.targets_absorbs [target_name] or 0) + amount
end
--> soma o container de habilidades
for spellid, habilidade in _pairs (tabela2.spell_tables._ActorTable) do
for spellid, habilidade in _pairs (tabela2.spells._ActorTable) do
--> pega a habilidade no primeiro ator
local habilidade_tabela1 = tabela1.spell_tables:PegaHabilidade (spellid, true, "SPELL_HEAL", false)
local habilidade_tabela1 = tabela1.spells:PegaHabilidade (spellid, true, "SPELL_HEAL", false)
--> soma os alvos
for index, alvo in _ipairs (habilidade.targets._ActorTable) do
local alvo_tabela1 = habilidade_tabela1.targets:PegarCombatente (nil, alvo.nome, nil, true)
alvo_tabela1.total = alvo_tabela1.total + alvo.total
alvo_tabela1.overheal = alvo_tabela1.overheal + alvo.overheal
alvo_tabela1.absorbed = alvo_tabela1.absorbed + alvo.absorbed
for target_name, amount in _pairs (habilidade.targets) do
habilidade_tabela1.targets = (habilidade_tabela1.targets [target_name] or 0) + amount
end
for target_name, amount in _pairs (habilidade.targets_overheal) do
habilidade_tabela1.targets_overheal = (habilidade_tabela1.targets_overheal [target_name] or 0) + amount
end
for target_name, amount in _pairs (habilidade.targets_absorbs) do
habilidade_tabela1.targets_absorbs = (habilidade_tabela1.targets_absorbs [target_name] or 0) + amount
end
--> soma os valores da habilidade
for key, value in _pairs (habilidade) do
@@ -2453,26 +2309,43 @@ atributo_heal.__sub = function (tabela1, tabela2)
end
--> reduz o container de alvos
for index, alvo in _ipairs (tabela2.targets._ActorTable) do
--> pega o alvo no ator
local alvo_tabela1 = tabela1.targets:PegarCombatente (nil, alvo.nome, nil, true)
--> soma os valores
alvo_tabela1.total = alvo_tabela1.total - alvo.total
alvo_tabela1.overheal = alvo_tabela1.overheal - alvo.overheal
alvo_tabela1.absorbed = alvo_tabela1.absorbed - alvo.absorbed
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
for target_name, amount in _pairs (tabela2.targets_overheal) do
if (tabela1.targets_overheal [target_name]) then
tabela1.targets_overheal [target_name] = tabela1.targets_overheal [target_name] - amount
end
end
for target_name, amount in _pairs (tabela2.targets_absorbs) do
if (tabela1.targets_absorbs [target_name]) then
tabela1.targets_absorbs [target_name] = tabela1.targets_absorbs [target_name] - amount
end
end
--> reduz o container de habilidades
for spellid, habilidade in _pairs (tabela2.spell_tables._ActorTable) do
for spellid, habilidade in _pairs (tabela2.spells._ActorTable) do
--> pega a habilidade no primeiro ator
local habilidade_tabela1 = tabela1.spell_tables:PegaHabilidade (spellid, true, "SPELL_HEAL", false)
--> soma os alvos
for index, alvo in _ipairs (habilidade.targets._ActorTable) do
local alvo_tabela1 = habilidade_tabela1.targets:PegarCombatente (nil, alvo.nome, nil, true)
alvo_tabela1.total = alvo_tabela1.total - alvo.total
alvo_tabela1.overheal = alvo_tabela1.overheal - alvo.overheal
alvo_tabela1.absorbed = alvo_tabela1.absorbed - alvo.absorbed
local habilidade_tabela1 = tabela1.spells:PegaHabilidade (spellid, true, "SPELL_HEAL", false)
--> alvos
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
end
for target_name, amount in _pairs (habilidade.targets_overheal) do
if (habilidade_tabela1.targets_overheal [target_name]) then
habilidade_tabela1.targets_overheal [target_name] = habilidade_tabela1.targets_overheal [target_name] - amount
end
end
for target_name, amount in _pairs (habilidade.targets_absorbs) do
if (habilidade_tabela1.targets_absorbs [target_name]) then
habilidade_tabela1.targets_absorbs [target_name] = habilidade_tabela1.targets_absorbs [target_name] - amount
end
end
--> soma os valores da habilidade
for key, value in _pairs (habilidade) do
if (_type (value) == "number") then
@@ -2488,3 +2361,20 @@ atributo_heal.__sub = function (tabela1, tabela2)
return tabela1
end
function _detalhes.refresh:r_atributo_heal (este_jogador, shadow)
_setmetatable (este_jogador, atributo_heal)
este_jogador.__index = atributo_heal
este_jogador.shadow = shadow
_detalhes.refresh:r_container_habilidades (este_jogador.spells, shadow.spells)
end
function _detalhes.clear:c_atributo_heal (este_jogador)
este_jogador.__index = nil
este_jogador.shadow = nil
este_jogador.links = nil
este_jogador.minha_barra = nil
_detalhes.clear:c_container_habilidades (este_jogador.spells)
end
+14 -70
View File
@@ -2,11 +2,6 @@
local _detalhes = _G._detalhes
local _
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> local pointers
local _setmetatable = setmetatable --lua local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
@@ -23,11 +18,15 @@
function habilidade_cura:NovaTabela (id, link)
local _newHealSpell = {
id = id,
counter = 0,
--> totals
total = 0,
totalabsorb = 0,
counter = 0,
id = id,
absorbed = 0,
overheal = 0,
--> multistrike
m_amt = 0,
@@ -46,18 +45,12 @@
c_amt = 0,
c_curado = 0,
absorbed = 0,
overheal = 0,
targets = container_combatentes:NovoContainer (container_heal_target)
--> targets containers
targets = {},
targets_overheal = {},
targets_absorbs = {}
}
_setmetatable (_newHealSpell, habilidade_cura)
if (link) then
_newHealSpell.targets.shadow = link.targets
end
return _newHealSpell
end
@@ -65,12 +58,7 @@
self.counter = self.counter + 1
local alvo = self.targets._NameIndexTable [nome]
if (not alvo) then
alvo = self.targets:PegarCombatente (serial, nome, flag, true)
else
alvo = self.targets._ActorTable [alvo]
end
self.targets [nome] = (self.targets [nome] or 0) + amount
if (multistrike) then
self.m_amt = self.m_amt + 1
@@ -80,21 +68,20 @@
if (absorbed and absorbed > 0) then
self.absorbed = self.absorbed + absorbed
alvo.absorbed = alvo.absorbed + absorbed
end
if (overhealing and overhealing > 0) then
self.overheal = self.overheal + overhealing
alvo.overheal = alvo.overheal + overhealing
self.targets_overheal [nome] = (self.targets_overheal [nome] or 0) + amount
end
if (amount and amount > 0) then
self.total = self.total + amount
alvo.total = alvo.total + amount
if (is_shield) then
self.totalabsorb = self.totalabsorb + amount
self.targets_absorbs [nome] = (self.targets_absorbs [nome] or 0) + amount
end
if (critical) then
@@ -120,46 +107,3 @@
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> core
function _detalhes.refresh:r_habilidade_cura (habilidade, shadow)
_setmetatable (habilidade, habilidade_cura)
habilidade.__index = habilidade_cura
if (shadow ~= -1) then
habilidade.shadow = shadow._ActorTable[habilidade.id]
_detalhes.refresh:r_container_combatentes (habilidade.targets, habilidade.shadow.targets)
else
_detalhes.refresh:r_container_combatentes (habilidade.targets, -1)
end
end
function _detalhes.clear:c_habilidade_cura (habilidade)
--habilidade.__index = {}
habilidade.__index = nil
habilidade.shadow = nil
_detalhes.clear:c_container_combatentes (habilidade.targets)
end
habilidade_cura.__sub = function (tabela1, tabela2)
tabela1.total = tabela1.total - tabela2.total
tabela1.totalabsorb = tabela1.totalabsorb - tabela2.totalabsorb
tabela1.counter = tabela1.counter - tabela2.counter
tabela1.n_min = tabela1.n_min - tabela2.n_min
tabela1.n_max = tabela1.n_max - tabela2.n_max
tabela1.n_amt = tabela1.n_amt - tabela2.n_amt
tabela1.n_curado = tabela1.n_curado - tabela2.n_curado
tabela1.c_min = tabela1.c_min - tabela2.c_min
tabela1.c_max = tabela1.c_max - tabela2.c_max
tabela1.c_amt = tabela1.c_amt - tabela2.c_amt
tabela1.c_curado = tabela1.c_curado - tabela2.c_curado
tabela1.absorbed = tabela1.absorbed - tabela2.absorbed
tabela1.overheal = tabela1.overheal - tabela2.overheal
return tabela1
end
+4
View File
@@ -198,6 +198,10 @@ function _detalhes:IsNormalMode()
end
end
function _detalhes:GetShowingCombat()
return self.showing
end
function _detalhes:GetCustomObject()
return _detalhes.custom [self.sub_atributo]
end
+561 -847
View File
File diff suppressed because it is too large Load Diff
+16 -120
View File
@@ -26,7 +26,7 @@
local _newMiscSpell = {
id = id,
counter = 0,
targets = container_combatentes:NovoContainer (container_misc_target)
targets = {}
}
if (token == "BUFF_UPTIME" or token == "DEBUFF_UPTIME") then
@@ -40,12 +40,6 @@
elseif (token == "SPELL_AURA_BROKEN" or token == "SPELL_AURA_BROKEN_SPELL") then
_newMiscSpell.cc_break_oque = {}
end
_setmetatable (_newMiscSpell, habilidade_misc)
if (link) then
_newMiscSpell.targets.shadow = link.targets
end
return _newMiscSpell
end
@@ -56,15 +50,8 @@
if (spellName == "COOLDOWN") then
self.counter = self.counter + 1
--> alvo
local alvo = self.targets._NameIndexTable [nome]
if (not alvo) then
alvo = self.targets:PegarCombatente (serial, nome, flag, true)
else
alvo = self.targets._ActorTable [alvo]
end
alvo.total = alvo.total + 1
--> target
self.targets [nome] = (self.targets [nome] or 0) + 1
elseif (spellName == "BUFF_UPTIME_REFRESH") then
if (self.actived_at and self.actived) then
@@ -122,45 +109,23 @@
elseif (token == "SPELL_INTERRUPT") then
self.counter = self.counter + 1
if (not self.interrompeu_oque [spellID]) then --> interrompeu_oque a NIL value
if (not self.interrompeu_oque [spellID]) then
self.interrompeu_oque [spellID] = 1
else
self.interrompeu_oque [spellID] = self.interrompeu_oque [spellID] + 1
end
--alvo
local alvo = self.targets._NameIndexTable [nome]
if (not alvo) then
alvo = self.targets:PegarCombatente (serial, nome, flag, true)
else
alvo = self.targets._ActorTable [alvo]
end
alvo.total = alvo.total + 1
--> target
self.targets [nome] = (self.targets [nome] or 0) + 1
elseif (token == "SPELL_RESURRECT") then
if (not self.ress) then
self.ress = 1
else
self.ress = self.ress + 1
end
--alvo
local alvo = self.targets._NameIndexTable [nome]
if (not alvo) then
alvo = self.targets:PegarCombatente (serial, nome, flag, true)
else
alvo = self.targets._ActorTable [alvo]
end
alvo.total = alvo.total + 1
self.ress = (self.ress or 0) + 1
--> target
self.targets [nome] = (self.targets [nome] or 0) + 1
elseif (token == "SPELL_DISPEL" or token == "SPELL_STOLEN") then
if (not self.dispell) then
self.dispell = 1
else
self.dispell = self.dispell + 1
end
self.dispell = (self.dispell or 0) + 1
if (not self.dispell_oque [spellID]) then
self.dispell_oque [spellID] = 1
@@ -168,23 +133,11 @@
self.dispell_oque [spellID] = self.dispell_oque [spellID] + 1
end
--alvo
local alvo = self.targets._NameIndexTable [nome]
if (not alvo) then
alvo = self.targets:PegarCombatente (serial, nome, flag, true)
else
alvo = self.targets._ActorTable [alvo]
end
alvo.total = alvo.total + 1
--> target
self.targets [nome] = (self.targets [nome] or 0) + 1
elseif (token == "SPELL_AURA_BROKEN_SPELL" or token == "SPELL_AURA_BROKEN") then
if (not self.cc_break) then
self.cc_break = 1
else
self.cc_break = self.cc_break + 1
end
self.cc_break = (self.cc_break or 0) + 1
if (not self.cc_break_oque [spellID]) then
self.cc_break_oque [spellID] = 1
@@ -192,65 +145,8 @@
self.cc_break_oque [spellID] = self.cc_break_oque [spellID] + 1
end
--alvo
local alvo = self.targets._NameIndexTable [nome]
if (not alvo) then
alvo = self.targets:PegarCombatente (serial, nome, flag, true)
else
alvo = self.targets._ActorTable [alvo]
end
alvo.total = alvo.total + 1
--> target
self.targets [nome] = (self.targets [nome] or 0) + 1
end
end
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> core
function _detalhes.refresh:r_habilidade_misc (habilidade, shadow) --recebeu o container shadow
_setmetatable (habilidade, habilidade_misc)
habilidade.__index = habilidade_misc
if (shadow ~= -1) then
habilidade.shadow = shadow._ActorTable[habilidade.id]
_detalhes.refresh:r_container_combatentes (habilidade.targets, habilidade.shadow.targets)
else
_detalhes.refresh:r_container_combatentes (habilidade.targets, -1)
end
end
function _detalhes.clear:c_habilidade_misc (habilidade)
--habilidade.__index = {}
habilidade.__index = nil
habilidade.shadow = nil
_detalhes.clear:c_container_combatentes (habilidade.targets)
end
habilidade_misc.__sub = function (tabela1, tabela2)
--interrupts & cooldowns
tabela1.counter = tabela1.counter - tabela2.counter
--buff uptime ou debuff uptime
if (tabela1.uptime and tabela2.uptime) then
tabela1.uptime = tabela1.uptime - tabela2.uptime
end
--ressesrs
if (tabela1.ress and tabela2.ress) then
tabela1.ress = tabela1.ress - tabela2.ress
end
--dispells
if (tabela1.dispell and tabela2.dispell) then
tabela1.dispell = tabela1.dispell - tabela2.dispell
end
--cc_breaks
if (tabela1.cc_break and tabela2.cc_break) then
tabela1.cc_break = tabela1.cc_break - tabela2.cc_break
end
return tabela1
end
+1 -18
View File
@@ -294,7 +294,7 @@
end
end
local novo_objeto = self.funcao_de_criacao (_, serial, nome, shadow_objeto) --> shadow_objeto passa para o classe_damage gravar no .targets e .spell_tables, mas não grava nele mesmo
local novo_objeto = self.funcao_de_criacao (_, serial, nome, shadow_objeto) --> shadow_objeto passa para o classe_damage gravar no .targets e .spells, mas não grava nele mesmo
novo_objeto.nome = nome
-- tipo do container
@@ -311,7 +311,6 @@
if (shadow_objeto) then
novo_objeto.shadow = shadow_objeto
novo_objeto:CriaLink (shadow_objeto) --> criando o link
if (novo_objeto.grupo and _detalhes.in_combat) then
_detalhes.cache_damage_group [#_detalhes.cache_damage_group+1] = novo_objeto
end
@@ -343,7 +342,6 @@
if (shadow_objeto) then
novo_objeto.shadow = shadow_objeto
novo_objeto:CriaLink (shadow_objeto) --> criando o link
if (novo_objeto.grupo and _detalhes.in_combat) then
_detalhes.cache_healing_group [#_detalhes.cache_healing_group+1] = novo_objeto
end
@@ -372,7 +370,6 @@
if (shadow_objeto) then
novo_objeto.shadow = shadow_objeto
novo_objeto:CriaLink (shadow_objeto) --> criando o link
end
if (novo_objeto.classe == "UNGROUPPLAYER") then --> is a player
@@ -399,7 +396,6 @@
if (shadow_objeto) then
novo_objeto.shadow = shadow_objeto
novo_objeto:CriaLink (shadow_objeto) --> criando o link
end
if (novo_objeto.classe == "UNGROUPPLAYER") then --> is a player
@@ -414,17 +410,7 @@
end
elseif (self.tipo == container_damage_target) then --> CONTAINER ALVO DO DAMAGE
if (shadow_objeto) then
novo_objeto.shadow = shadow_objeto
end
elseif (self.tipo == container_heal_target) then --> CONTAINER ALVOS DO HEALING
novo_objeto.overheal = 0
novo_objeto.absorbed = 0
if (shadow_objeto) then
novo_objeto.shadow = shadow_objeto
end
elseif (self.tipo == container_energy_target) then --> CONTAINER ALVOS DO ENERGY
novo_objeto.mana = 0
@@ -489,9 +475,6 @@
elseif (tipo == container_heal) then
return atributo_heal.NovaTabela
elseif (tipo == container_friendlyfire) then
return atributo_damage.FF_funcao_de_criacao
elseif (tipo == container_enemydebufftarget_target) then
return alvo_da_habilidade.NovaTabela
-22
View File
@@ -57,29 +57,7 @@ local _
else
if (criar) then
if (cria_shadow) then
local novo_objeto = self.funcao_de_criacao (nil, id, nil, "")
self._ActorTable [id] = novo_objeto
return novo_objeto
end
local shadow = self.shadow
local shadow_objeto = nil
if (shadow) then
--> apenas verifica se ele existe ou não
shadow_objeto = shadow:PegaHabilidade (id)
--> se não existir, cria-lo
if (not shadow_objeto) then
shadow_objeto = shadow:PegaHabilidade (id, true, token)
end
end
local novo_objeto = self.funcao_de_criacao (nil, id, shadow_objeto, token)
if (shadow_objeto) then
novo_objeto.shadow = shadow_objeto
end
self._ActorTable [id] = novo_objeto
+134 -79
View File
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> attributes functions for customs
--> DAMAGE DONE
--> DAMAGEDONE
--> customized display script
@@ -49,9 +49,59 @@
TooltipMaximizedMethod = _detalhes.tooltip.maximize_method
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> damage done tooltip
local temp_table = {}
local target_func = function (main_table)
local i = 1
for name, amount in _pairs (main_table) do
local t = temp_table [i]
if (not t) then
t = {"", 0}
temp_table [i] = t
end
t[1] = name
t[2] = amount
i = i + 1
end
end
local spells_used_func = function (main_table, target)
local i = 1
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]
if (not t) then
t = {"", 0}
temp_table [i] = t
end
t[1] = spellid
t[2] = target_amount
i = i + 1
end
end
end
local function SortOrder (main_table, func, ...)
for i = 1, #temp_table do
temp_table [i][1] = ""
temp_table [i][2] = 0
end
func (main_table, ...)
_table_sort (temp_table, _detalhes.Sort2)
return temp_table
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> damagedone tooltip
function atributo_custom:damagedoneTooltip (actor, target, spellid, combat, instance)
if (spellid) then
@@ -64,12 +114,11 @@
for name, _ in _pairs (this_actor.damage_from) do
local aggressor = combat (1, name)
if (aggressor) then
local spell = aggressor.spell_tables._ActorTable [spellid]
local spell = aggressor.spells._ActorTable [spellid]
if (spell) then
local on_me = spell.targets._NameIndexTable [targetname]
local on_me = spell.targets [targetname]
if (on_me) then
on_me = spell.targets._ActorTable [on_me]
GameCooltip:AddLine (aggressor.nome, FormatTooltipNumber (_, on_me.total))
GameCooltip:AddLine (aggressor.nome, FormatTooltipNumber (_, on_me))
end
end
end
@@ -90,52 +139,56 @@
elseif (target) then
if (target == "[all]") then
actor.targets:SortByKey ("total")
for _, target_object in _ipairs (actor.targets._ActorTable) do
GameCooltip:AddLine (target_object.nome, FormatTooltipNumber (_, target_object.total))
SortOrder (actor.targets, target_func)
for i = 1, #temp_table do
local t = temp_table [i]
if (t[2] < 1) then
break
end
GameCooltip:AddLine (t[1], FormatTooltipNumber (_, t[2]))
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon ([[Interface\FriendsFrame\StatusIcon-Offline]], 1, 1, 14, 14)
end
elseif (target == "[raid]") then
local roster = combat.raid_roster
actor.targets:SortByKey ("total")
for _, target_object in _ipairs (actor.targets._ActorTable) do
if (roster [target_object.nome]) then
GameCooltip:AddLine (target_object.nome, FormatTooltipNumber (_, target_object.total))
SortOrder (actor.targets, target_func)
for i = 1, #temp_table do
local t = temp_table [i]
if (t[2] < 1) then
break
end
if (roster [t[1]]) then
GameCooltip:AddLine (t[1], FormatTooltipNumber (_, t[2]))
end
end
elseif (target == "[player]") then
local targetactor = actor.targets._NameIndexTable [_detalhes.playername]
if (targetactor) then
targetactor = actor.targets._ActorTable [targetactor]
GameCooltip:AddLine (targetactor.nome, FormatTooltipNumber (_, targetactor.total))
local target_amount = actor.targets [_detalhes.playername]
if (target_amount) then
GameCooltip:AddLine (targetactor.nome, FormatTooltipNumber (_, target_amount))
end
else
local spells_used = {}
SortOrder (actor.spells._ActorTable, spells_used_func, target)
for i = 1, #temp_table do
for spellid, spelltable in _pairs (actor.spell_tables._ActorTable) do
local this_target = spelltable.targets._NameIndexTable [target]
if (this_target) then
this_target = spelltable.targets._ActorTable [this_target]
_table_insert (spells_used, {spellid, this_target.total})
local t = temp_table [i]
if (t[2] < 1) then
break
end
end
_table_sort (spells_used, _detalhes.Sort2)
for index, spell in _ipairs (spells_used) do
local name, _, icon = _GetSpellInfo (spell [1])
GameCooltip:AddLine (name, FormatTooltipNumber (_, spell [2]))
local name, _, icon = _GetSpellInfo (t[1])
GameCooltip:AddLine (name, FormatTooltipNumber (_, t[2]))
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
end
--local targetactor = actor.targets._NameIndexTable [target]
--if (targetactor) then
-- targetactor = actor.targets._ActorTable [targetactor]
-- GameCooltip:AddLine (target, FormatTooltipNumber (_, targetactor.total))
--end
end
else
@@ -144,22 +197,25 @@
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> damage done search
--> damagedone search
function atributo_custom:damagedone (actor, source, target, spellid, combat, instance_container)
if (spellid) then --> spell is always damage done
local spell = actor.spell_tables._ActorTable [spellid]
if (spellid) then --> spell is always damagedone
local spell = actor.spells._ActorTable [spellid]
if (spell) then
if (target) then
if (target == "[all]") then
for _, targetactor in _ipairs (spell.targets._ActorTable) do
for target_name, amount in _pairs (spell.targets) do
--> add amount
instance_container:AddValue (targetactor, targetactor.total, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
--> 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
instance_container:AddValue (combat (1, target_name), amount, true)
--
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + amount
--> add to processed container
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
if (not atributo_custom._TargetActorsProcessed [target_name]) then
atributo_custom._TargetActorsProcessed [target_name] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
end
end
@@ -167,14 +223,14 @@
elseif (target == "[raid]") then
local roster = combat.raid_roster
for _, targetactor in _ipairs (spell.targets._ActorTable) do
if (roster [targetactor.nome]) then
for target_name, amount in _pairs (spell.targets) do
if (roster [target_name]) then
--> add amount
instance_container:AddValue (targetactor, targetactor.total, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
instance_container:AddValue (combat (1, target_name), amount, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + amount
--> add to processed container
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
if (not atributo_custom._TargetActorsProcessed [target_name]) then
atributo_custom._TargetActorsProcessed [target_name] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
end
end
@@ -182,30 +238,28 @@
return 0, true
elseif (target == "[player]") then
local targetactor = spell.targets._NameIndexTable [_detalhes.playername]
if (targetactor) then
targetactor = spell.targets._ActorTable [targetactor]
local target_amount = spell.targets [_detalhes.playername]
if (target_amount) then
--> add amount
instance_container:AddValue (targetactor, targetactor.total, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
instance_container:AddValue (combat (1, _detalhes.playername), target_amount, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + target_amount
--> add to processed container
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
if (not atributo_custom._TargetActorsProcessed [_detalhes.playername]) then
atributo_custom._TargetActorsProcessed [_detalhes.playername] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
end
end
return 0, true
else
local targetactor = actor.targets._NameIndexTable [target]
if (targetactor) then
targetactor = spell.targets._ActorTable [targetactor]
local target_amount = actor.targets [target]
if (target_amount) then
--> add amount
instance_container:AddValue (targetactor, targetactor.total, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
instance_container:AddValue (combat (1, target), target_amount, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + target_amount
--> add to processed container
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
if (not atributo_custom._TargetActorsProcessed [target]) then
atributo_custom._TargetActorsProcessed [target] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
end
end
@@ -221,26 +275,27 @@
elseif (target) then
if (target == "[all]") then
return actor.targets:GetTotal()
local total = 0
for target_name, amount in _pairs (actor.targets) do
total = total + amount
end
return total
elseif (target == "[raid]") then
return actor.targets:GetTotalOnRaid (nil, combat)
local total = 0
for target_name, amount in _pairs (actor.targets) do
if (combat.raid_roster [target_name]) then
total = total + amount
end
end
return total
elseif (target == "[player]") then
local targetactor = actor.targets._NameIndexTable [_detalhes.playername]
if (targetactor) then
return actor.targets._ActorTable [targetactor].total
else
return 0
end
return actor.targets [_detalhes.playername] or 0
else
local targetactor = actor.targets._NameIndexTable [target]
if (targetactor) then
return actor.targets._ActorTable [targetactor].total
else
return 0
end
return actor.targets [targetactor] or 0
end
else
return actor.total or 0
+135 -61
View File
@@ -49,9 +49,60 @@
TooltipMaximizedMethod = _detalhes.tooltip.maximize_method
end
local temp_table = {}
local target_func = function (main_table)
local i = 1
for name, amount in _pairs (main_table) do
local t = temp_table [i]
if (not t) then
t = {"", 0}
temp_table [i] = t
end
t[1] = name
t[2] = amount
i = i + 1
end
end
local spells_used_func = function (main_table, target)
local i = 1
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]
if (not t) then
t = {"", 0}
temp_table [i] = t
end
t[1] = spellid
t[2] = target_amount
i = i + 1
end
end
end
local function SortOrder (main_table, func, ...)
for i = 1, #temp_table do
temp_table [i][1] = ""
temp_table [i][2] = 0
end
func (main_table, ...)
_table_sort (temp_table, _detalhes.Sort2)
return temp_table
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> healing done tooltip
function atributo_custom:healdoneTooltip (actor, target, spellid, combat, instance)
if (spellid) then
@@ -64,12 +115,11 @@
for name, _ in _pairs (this_actor.healing_from) do
local healer = combat (2, name)
if (healer) then
local spell = healer.spell_tables._ActorTable [spellid]
local spell = healer.spells._ActorTable [spellid]
if (spell) then
local on_me = spell.targets._NameIndexTable [targetname]
local on_me = spell.targets [targetname]
if (on_me) then
on_me = spell.targets._ActorTable [on_me]
GameCooltip:AddLine (healer.nome, FormatTooltipNumber (_, on_me.total))
GameCooltip:AddLine (healer.nome, FormatTooltipNumber (_, on_me))
end
end
end
@@ -90,38 +140,61 @@
elseif (target) then
if (target == "[all]") then
actor.targets:SortByKey ("total")
for _, target_object in _ipairs (actor.targets._ActorTable) do
GameCooltip:AddLine (target_object.nome, FormatTooltipNumber (_, target_object.total))
SortOrder (actor.targets, target_func)
for i = 1, #temp_table do
local t = temp_table [i]
if (t[2] < 1) then
break
end
GameCooltip:AddLine (t[1], FormatTooltipNumber (_, t[2]))
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon ([[Interface\FriendsFrame\StatusIcon-Offline]], 1, 1, 14, 14)
end
elseif (target == "[raid]") then
local roster = combat.raid_roster
actor.targets:SortByKey ("total")
for _, target_object in _ipairs (actor.targets._ActorTable) do
if (roster [target_object.nome]) then
GameCooltip:AddLine (target_object.nome, FormatTooltipNumber (_, target_object.total))
SortOrder (actor.targets, target_func)
for i = 1, #temp_table do
local t = temp_table [i]
if (t[2] < 1) then
break
end
if (roster [t[1]]) then
GameCooltip:AddLine (t[1], FormatTooltipNumber (_, t[2]))
end
end
elseif (target == "[player]") then
local targetactor = actor.targets._NameIndexTable [_detalhes.playername]
if (targetactor) then
targetactor = actor.targets._ActorTable [targetactor]
GameCooltip:AddLine (targetactor.nome, FormatTooltipNumber (_, targetactor.total))
local target_amount = actor.targets [_detalhes.playername]
if (target_amount) then
GameCooltip:AddLine (targetactor.nome, FormatTooltipNumber (_, target_amount))
end
else
local targetactor = actor.targets._NameIndexTable [target]
if (targetactor) then
targetactor = actor.targets._ActorTable [targetactor]
GameCooltip:AddLine (target, FormatTooltipNumber (_, targetactor.total))
SortOrder (actor.spells._ActorTable, spells_used_func, target)
for i = 1, #temp_table do
local t = temp_table [i]
if (t[2] < 1) then
break
end
local name, _, icon = _GetSpellInfo (t[1])
GameCooltip:AddLine (name, FormatTooltipNumber (_, t[2]))
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
end
end
else
actor:ToolTip_DamageDone (instance)
actor:ToolTip_HealingDone (instance)
end
end
@@ -131,18 +204,21 @@
function atributo_custom:healdone (actor, source, target, spellid, combat, instance_container)
if (spellid) then --> spell is always healing done
local spell = actor.spell_tables._ActorTable [spellid]
local melee = actor.spell_tables._ActorTable [1]
local spell = actor.spells._ActorTable [spellid]
local melee = actor.spells._ActorTable [1]
if (spell) then
if (target) then
if (target == "[all]") then
for _, targetactor in _ipairs (spell.targets._ActorTable) do
for target_name, amount in _pairs (spell.targets) do
--> add amount
instance_container:AddValue (targetactor, targetactor.total, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
--> 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
instance_container:AddValue (combat (1, target_name), amount, true)
--
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + amount
--> add to processed container
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
if (not atributo_custom._TargetActorsProcessed [target_name]) then
atributo_custom._TargetActorsProcessed [target_name] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
end
end
@@ -150,14 +226,14 @@
elseif (target == "[raid]") then
local roster = combat.raid_roster
for _, targetactor in _ipairs (spell.targets._ActorTable) do
if (roster [targetactor.nome]) then
for target_name, amount in _pairs (spell.targets) do
if (roster [target_name]) then
--> add amount
instance_container:AddValue (targetactor, targetactor.total, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
instance_container:AddValue (combat (1, target_name), amount, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + amount
--> add to processed container
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
if (not atributo_custom._TargetActorsProcessed [target_name]) then
atributo_custom._TargetActorsProcessed [target_name] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
end
end
@@ -165,30 +241,28 @@
return 0, true
elseif (target == "[player]") then
local targetactor = spell.targets._NameIndexTable [_detalhes.playername]
if (targetactor) then
targetactor = spell.targets._ActorTable [targetactor]
local target_amount = spell.targets [_detalhes.playername]
if (target_amount) then
--> add amount
instance_container:AddValue (targetactor, targetactor.total, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
instance_container:AddValue (combat (1, _detalhes.playername), target_amount, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + target_amount
--> add to processed container
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
if (not atributo_custom._TargetActorsProcessed [_detalhes.playername]) then
atributo_custom._TargetActorsProcessed [_detalhes.playername] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
end
end
return 0, true
else
local targetactor = actor.targets._NameIndexTable [target]
if (targetactor) then
targetactor = spell.targets._ActorTable [targetactor]
local target_amount = actor.targets [target]
if (target_amount) then
--> add amount
instance_container:AddValue (targetactor, targetactor.total, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
instance_container:AddValue (combat (1, target), target_amount, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + target_amount
--> add to processed container
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
if (not atributo_custom._TargetActorsProcessed [target]) then
atributo_custom._TargetActorsProcessed [target] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
end
end
@@ -204,26 +278,26 @@
elseif (target) then
if (target == "[all]") then
return actor.targets:GetTotal()
local total = 0
for target_name, amount in _pairs (actor.targets) do
total = total + amount
end
return total
elseif (target == "[raid]") then
return actor.targets:GetTotalOnRaid (nil, combat)
local total = 0
for target_name, amount in _pairs (actor.targets) do
if (combat.raid_roster [target_name]) then
total = total + amount
end
end
return total
elseif (target == "[player]") then
local targetactor = actor.targets._NameIndexTable [_detalhes.playername]
if (targetactor) then
return actor.targets._ActorTable [targetactor].total
else
return 0
end
return actor.targets [_detalhes.playername] or 0
else
local targetactor = actor.targets._NameIndexTable [target]
if (targetactor) then
return actor.targets._ActorTable [targetactor].total
else
return 0
end
return actor.targets [targetactor] or 0
end
else
return actor.total or 0
+21 -22
View File
@@ -59,7 +59,7 @@
for _, actor in _ipairs (_detalhes.tabela_vigente[class_type_dano]._ActorTable) do
if (not actor.grupo and not actor.owner and not actor.nome:find ("[*]") and _bit_band (actor.flag_original, 0x00000060) ~= 0) then --> 0x20+0x40 neutral + enemy reaction
for name, _ in _pairs (actor.targets._NameIndexTable) do
for name, _ in _pairs (actor.targets) do
if (name == _detalhes.playername) then
return actor.nome
else
@@ -76,8 +76,8 @@
for _, actor in _ipairs (_detalhes.tabela_vigente[class_type_dano]._ActorTable) do
if (actor.grupo and not actor.owner) then
for index, target in _ipairs (actor.targets._ActorTable) do
return target.nome
for target_name, _ in _pairs (actor.targets) do
return target_name
end
end
@@ -88,7 +88,7 @@
-- try get the current encounter name during the encounter
local boss_found = function (index, name, zone, mapid, diff)
local boss_found = function (index, name, zone, mapid, diff, encounterid)
local boss_table = {
index = index,
name = name,
@@ -98,6 +98,7 @@
diff = diff,
diff_string = select (4, GetInstanceInfo()),
ej_instance_id = EJ_GetCurrentInstance(),
id = encounterid,
}
_detalhes.tabela_vigente.is_boss = boss_table
@@ -156,7 +157,7 @@
if (_detalhes.encounter_table.name) then
local encounter_table = _detalhes.encounter_table
return boss_found (encounter_table.index, encounter_table.name, encounter_table.zone, encounter_table.mapid, encounter_table.diff)
return boss_found (encounter_table.index, encounter_table.name, encounter_table.zone, encounter_table.mapid, encounter_table.diff, encounter_table.id)
end
for index = 1, 5, 1 do
@@ -192,7 +193,7 @@
if (_detalhes.encounter_table.name) then
local encounter_table = _detalhes.encounter_table
return boss_found (encounter_table.index, encounter_table.name, encounter_table.zone, encounter_table.mapid, encounter_table.diff)
return boss_found (encounter_table.index, encounter_table.name, encounter_table.zone, encounter_table.mapid, encounter_table.diff, encounter_table.id)
end
local ZoneName, InstanceType, DifficultyID, _, _, _, _, ZoneMapID = _GetInstanceInfo()
@@ -210,7 +211,9 @@
BossIndex = BossIds [serial]
if (BossIndex) then
Actor.boss = true
Actor.shadow.boss = true
if (Actor.shadow) then
Actor.shadow.boss = true
end
return boss_found (BossIndex, _detalhes:GetBossName (ZoneMapID, BossIndex), ZoneName, ZoneMapID, DifficultyID)
end
end
@@ -357,18 +360,6 @@
_detalhes:CatchRaidDebuffUptime ("DEBUFF_UPTIME_OUT")
_detalhes:CloseEnemyDebuffsUptime()
--> ugly fix for warlocks soul link, need to rewrite friendly fire code.
for index, actor in pairs (_detalhes.tabela_vigente[1]._ActorTable) do
if (actor.classe == "WARLOCK") then
local soullink = actor.spell_tables._ActorTable [108446]
if (soullink) then
actor.total = actor.total - soullink.total
actor.total_without_pet = actor.total_without_pet - soullink.total
soullink.total = 0
end
end
end
--> pega a zona do jogador e vê se foi uma luta contra um Boss -- identifica se a luta foi com um boss
if (not _detalhes.tabela_vigente.is_boss) then
@@ -451,6 +442,14 @@
if (bossKilled) then
_detalhes.tabela_vigente.is_boss.killed = true
--> add to storage
if (not InCombatLockdown() and not UnitAffectingCombat ("player")) then
pcall (_detalhes.StoreEncounter)
else
_detalhes.schedule_store_boss_encounter = true
end
end
--if (_detalhes:GetBossDetails (_detalhes.tabela_vigente.is_boss.mapid, _detalhes.tabela_vigente.is_boss.index) or ) then
@@ -888,14 +887,14 @@
for _, actor in _ipairs (container._ActorTable) do
if (actor.grupo) then
if (class_type == 1 or class_type == 2) then
for _, target_actor in _ipairs (actor.targets._ActorTable) do
local target_object = container._ActorTable [container._NameIndexTable [target_actor.nome]]
for target_name, amount in _pairs (actor.targets) do
local target_object = container._ActorTable [container._NameIndexTable [target_name]]
if (target_object) then
target_object.fight_component = true
if (target_object.shadow) then
target_object.shadow.fight_component = true
end
fight_component (energy_container, misc_container, target_actor.nome)
fight_component (energy_container, misc_container, target_name)
end
end
if (class_type == 1) then
+120
View File
@@ -1,6 +1,9 @@
local _detalhes = _G._detalhes
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local UnitName = UnitName
local select = select
local floor = floor
local GetNumGroupMembers = GetNumGroupMembers
@@ -203,3 +206,120 @@ function _detalhes:DoBackgroundTasks()
end
_detalhes.background_tasks_loop = _detalhes:ScheduleRepeatingTimer ("DoBackgroundTasks", 120)
local store_instances = {
[1205] = true, --Blackrock Foundry
[1228] = true, --Highmaul
[1136] = true, --SoO
}
function _detalhes:StoreEncounter (combat)
combat = combat or _detalhes.tabela_vigente
if (not combat) then
return
end
local name, type, difficulty, difficultyName, maxPlayers, playerDifficulty, isDynamicInstance, mapID, instanceGroupSize = GetInstanceInfo()
if (not store_instances [mapID]) then
return
end
--> check if is a mythic encounter
local diff = combat:GetDifficulty()
if (difficulty ~= 16) then
--if (diff ~= 16 and false) then --> debug
return
end
local boss_info = combat:GetBossInfo()
local encounter_id = boss_info and boss_info.id
if (not encounter_id) then
return
end
--> check the guild name
local match = 0
local guildName = select (1, GetGuildInfo ("player"))
local raid_size = GetNumGroupMembers() or 0
if (guildName) then
for i = 1, raid_size do
local gName = select (1, GetGuildInfo ("raid" .. i)) or ""
if (gName == guildName) then
match = match + 1
end
end
if (match < raid_size * 0.75) then
return
end
else
return
end
--> check if the storage is already loaded
if (not IsAddOnLoaded ("Details_DataStorage")) then
local loaded, reason = LoadAddOn ("Details_DataStorage")
if (not loaded) then
return
end
end
--> get the storage table
local db = DetailsDataStorage
if (not db and _detalhes.CreateStorageDB) then
db = _detalhes:CreateStorageDB()
if (not db) then
return
end
end
local raid_database = db.RAID_STORAGE
if (not raid_database) then
db.RAID_STORAGE = {}
raid_database = db.RAID_STORAGE
end
--> encounter_database: numeric table with combats
local encounter_database = raid_database [encounter_id]
if (not encounter_database) then
raid_database [encounter_id] = {}
encounter_database = raid_database [encounter_id]
end
--> get raid members data
local this_combat_data = {
damage = {},
heal = {},
date = date ("%H:%M %d/%m/%y"),
time = time(),
elapsed = combat:GetCombatTime(),
guild = guildName,
}
for i = 1, raid_size do
local player_name, player_realm = UnitName ("raid" .. i)
if (player_realm and player_realm ~= "") then
player_name = player_name .. "-" .. player_realm
end
local damage_actor = combat (1, player_name)
if (damage_actor) then
this_combat_data.damage [player_name] = floor (damage_actor.total)
end
local heal_actor = combat (2, player_name)
if (heal_actor) then
this_combat_data.heal [player_name] = floor (heal_actor.total)
end
end
tinsert (encounter_database, this_combat_data)
end
+6 -201
View File
@@ -1,8 +1,3 @@
--File Revision: 1
--Last Modification: 27/07/2013
-- Change Log:
-- 27/07/2013: Finished alpha version.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local _detalhes = _G._detalhes
@@ -146,8 +141,6 @@
end
end
--shadow:FazLinkagem (esta_classe)
end
end
@@ -266,16 +259,9 @@
local owner_actor = _combate (class_type, owner.nome)
if (owner_actor) then
if (owner.grupo or owner.boss or owner.boss_fight_component) then
--if (class_type == 1) then
-- print ("SAVE", _iter.data.nome, "| owner:",_iter.data.owner.nome, tabela_index)
--end
can_erase = false
end
end
else
--if (class_type == 1) then
-- print ("DELETANDO", _iter.data.nome, tabela_index)
--end
end
end
@@ -289,17 +275,13 @@
if (myself.grupo) then
_combate.totals_grupo [myself.tipo] = _combate.totals_grupo [myself.tipo] - myself.total
end
elseif (myself.tipo == class_type_e_energy) then
_combate.totals [myself.tipo] ["mana"] = _combate.totals [myself.tipo] ["mana"] - myself.mana
_combate.totals [myself.tipo] ["e_rage"] = _combate.totals [myself.tipo] ["e_rage"] - myself.e_rage
_combate.totals [myself.tipo] ["e_energy"] = _combate.totals [myself.tipo] ["e_energy"] - myself.e_energy
_combate.totals [myself.tipo] ["runepower"] = _combate.totals [myself.tipo] ["runepower"] - myself.runepower
_combate.totals [myself.tipo] [myself.powertype] = _combate.totals [myself.tipo] [myself.powertype] - myself.total
if (myself.grupo) then
_combate.totals_grupo [myself.tipo] ["mana"] = _combate.totals_grupo [myself.tipo] ["mana"] - myself.mana
_combate.totals_grupo [myself.tipo] ["e_rage"] = _combate.totals_grupo [myself.tipo] ["e_rage"] - myself.e_rage
_combate.totals_grupo [myself.tipo] ["e_energy"] = _combate.totals_grupo [myself.tipo] ["e_energy"] - myself.e_energy
_combate.totals_grupo [myself.tipo] ["runepower"] = _combate.totals_grupo [myself.tipo] ["runepower"] - myself.runepower
_combate.totals_grupo [myself.tipo] [myself.powertype] = _combate.totals_grupo [myself.tipo] [myself.powertype] - myself.total
end
elseif (myself.tipo == class_type_misc) then
if (myself.cc_break) then
_combate.totals [myself.tipo] ["cc_break"] = _combate.totals [myself.tipo] ["cc_break"] - myself.cc_break
@@ -357,8 +339,7 @@
end
for _, esta_classe in _ipairs (conteudo) do
--> limpa o displayName, não precisa salvar
esta_classe.displayName = nil
esta_classe.owner = nil
@@ -370,138 +351,6 @@
_detalhes.clear:c_atributo_energy (esta_classe)
elseif (class_type == class_type_misc) then
_detalhes.clear:c_atributo_misc (esta_classe)
if (esta_classe.interrupt) then
for _, _alvo in _ipairs (esta_classe.interrupt_targets._ActorTable) do
_detalhes.clear:c_alvo_da_habilidade (_alvo)
end
end
if (esta_classe.buff_uptime) then
for _, _alvo in _ipairs (esta_classe.buff_uptime_targets._ActorTable) do
_detalhes.clear:c_alvo_da_habilidade (_alvo)
end
end
if (esta_classe.debuff_uptime) then
for _, _alvo in _ipairs (esta_classe.debuff_uptime_targets._ActorTable) do
_detalhes.clear:c_alvo_da_habilidade (_alvo)
end
end
if (esta_classe.cooldowns_defensive) then
for _, _alvo in _ipairs (esta_classe.cooldowns_defensive_targets._ActorTable) do
_detalhes.clear:c_alvo_da_habilidade (_alvo)
end
end
if (esta_classe.ress) then
for _, _alvo in _ipairs (esta_classe.ress_targets._ActorTable) do
_detalhes.clear:c_alvo_da_habilidade (_alvo)
end
end
if (esta_classe.dispell) then
for _, _alvo in _ipairs (esta_classe.dispell_targets._ActorTable) do
_detalhes.clear:c_alvo_da_habilidade (_alvo)
end
end
if (esta_classe.cc_break) then
for _, _alvo in _ipairs (esta_classe.cc_break_targets._ActorTable) do
_detalhes.clear:c_alvo_da_habilidade (_alvo)
end
end
end
if (class_type ~= class_type_misc) then
for _, _alvo in _ipairs (esta_classe.targets._ActorTable) do
_detalhes.clear:c_alvo_da_habilidade (_alvo)
end
for _, habilidade in _pairs (esta_classe.spell_tables._ActorTable) do
if (class_type == class_type_dano) then
_detalhes.clear:c_habilidade_dano (habilidade)
elseif (class_type == class_type_cura) then
_detalhes.clear:c_habilidade_cura (habilidade)
elseif (class_type == class_type_e_energy) then
_detalhes.clear:c_habilidade_e_energy (habilidade)
end
for _, _alvo in ipairs (habilidade.targets._ActorTable) do
_detalhes.clear:c_alvo_da_habilidade (_alvo)
end
end
else
if (esta_classe.interrupt) then
for _, habilidade in _pairs (esta_classe.interrupt_spell_tables._ActorTable) do
_detalhes.clear:c_habilidade_misc (habilidade)
for _, _alvo in ipairs (habilidade.targets._ActorTable) do
_detalhes.clear:c_alvo_da_habilidade (_alvo)
end
end
end
if (esta_classe.buff_uptime) then
for _, habilidade in _pairs (esta_classe.buff_uptime_spell_tables._ActorTable) do
_detalhes.clear:c_habilidade_misc (habilidade)
for _, _alvo in ipairs (habilidade.targets._ActorTable) do
_detalhes.clear:c_alvo_da_habilidade (_alvo)
end
end
end
if (esta_classe.debuff_uptime) then
for _, habilidade in _pairs (esta_classe.debuff_uptime_spell_tables._ActorTable) do
_detalhes.clear:c_habilidade_misc (habilidade)
for _, _alvo in ipairs (habilidade.targets._ActorTable) do
_detalhes.clear:c_alvo_da_habilidade (_alvo)
end
end
end
if (esta_classe.cooldowns_defensive) then
for _, habilidade in _pairs (esta_classe.cooldowns_defensive_spell_tables._ActorTable) do
_detalhes.clear:c_habilidade_misc (habilidade)
for _, _alvo in ipairs (habilidade.targets._ActorTable) do
_detalhes.clear:c_alvo_da_habilidade (_alvo)
end
end
end
if (esta_classe.ress) then
for _, habilidade in _pairs (esta_classe.ress_spell_tables._ActorTable) do
_detalhes.clear:c_habilidade_misc (habilidade)
for _, _alvo in ipairs (habilidade.targets._ActorTable) do
_detalhes.clear:c_alvo_da_habilidade (_alvo)
end
end
end
if (esta_classe.dispell) then
for _, habilidade in _pairs (esta_classe.dispell_spell_tables._ActorTable) do
_detalhes.clear:c_habilidade_misc (habilidade)
for _, _alvo in ipairs (habilidade.targets._ActorTable) do
_detalhes.clear:c_alvo_da_habilidade (_alvo)
end
end
end
if (esta_classe.cc_break) then
for _, habilidade in _pairs (esta_classe.cc_break_spell_tables._ActorTable) do
_detalhes.clear:c_habilidade_misc (habilidade)
for _, _alvo in ipairs (habilidade.targets._ActorTable) do
_detalhes.clear:c_alvo_da_habilidade (_alvo)
end
end
end
end
end
@@ -757,21 +606,6 @@
if (not _actor.owner) then --> pet
_actor:subtract_total (_combate)
end
--> fix para a weak table
--[[
local shadow = _actor.shadow
local _it = {index = 1, link = shadow.links [1]}
while (_it.link) do
if (_it.link == _actor) then
_table_remove (shadow.links, _it.index)
_it.link = shadow.links [_it.index]
else
_it.index = _it.index+1
_it.link = shadow.links [_it.index]
end
end
--]]
_iter.cleaned = _iter.cleaned+1
@@ -831,32 +665,13 @@
local _actor = _iter.data
--[[
local meus_links = _rawget (_actor, "links")
local can_garbage = true
local new_weak_table = _setmetatable ({}, _detalhes.weaktable) --> precisa da nova weak table para remover os NILS da tabela antiga
if (meus_links) then
for _, ref in _pairs (meus_links) do --> trocando pairs por _ipairs
if (ref) then
can_garbage = false
new_weak_table [#new_weak_table+1] = ref
end
end
_table_wipe (meus_links)
end
--]]
local can_garbage = false
if (not _actor.grupo and not _actor.owner and not _actor.boss_fight_component and not _actor.fight_component) then
can_garbage = true
end
--if (can_garbage or not meus_links) then --> não há referências a este objeto
if (can_garbage) then --> não há referências a este objeto
--print ("garbaged:", _actor.nome)
if (not _actor.owner) then --> pet
_actor:subtract_total (_overall_combat)
end
@@ -864,20 +679,10 @@
--> apaga a referência deste jogador na tabela overall
_iter.cleaned = _iter.cleaned+1
--if (_detalhes.debug) then
-- if (#_actor.links > 0) then
-- _detalhes:Msg ("(debug) " .. _actor.nome, " has been garbaged but have links: ", #_actor.links)
-- end
--end
if (_actor.tipo == 1 or _actor.tipo == 2) then
_actor:DesregistrarNaTimeMachine()
end
_table_remove (conteudo, _iter.index)
_iter.data = conteudo [_iter.index]
else
--_actor.links = new_weak_table
_iter.index = _iter.index + 1
_iter.data = conteudo [_iter.index]
end
+68 -72
View File
@@ -257,17 +257,21 @@
--> register comm
function _detalhes:CommReceived (_, data, _, source)
local prefix, player, realm, dversion, arg6, arg7, arg8, arg9 = _select (2, _detalhes:Deserialize (data))
if (_detalhes.debug) then
_detalhes:Msg ("(debug) network received:", prefix, "length:",string.len (data))
end
--print ("comm received", prefix, _detalhes.network.functions [prefix])
local func = _detalhes.network.functions [prefix]
if (func) then
func (player, realm, dversion, arg6, arg7, arg8, arg9)
else
func = plugins_registred [prefix]
--print ("plugin comm?", func, player, realm, dversion, arg6, arg7, arg8, arg9)
if (func) then
func (player, realm, dversion, arg6, arg7, arg8, arg9)
else
@@ -311,6 +315,7 @@
end
end
--[
function _detalhes.parser_functions:CHAT_MSG_CHANNEL (...)
local message, _, _, _, _, _, _, _, channelName = ...
if (channelName == "Details") then
@@ -327,6 +332,7 @@
end
end
--]]
function _detalhes:SendPluginCommMessage (prefix, channel, ...)
@@ -355,9 +361,11 @@
elseif (channel == "Details") then
local id = _detalhes:GetChannelId (channel)
if (id) then
if (not _detalhes.listener:IsEventRegistered ("CHAT_MSG_CHANNEL")) then
_detalhes.listener:RegisterEvent ("CHAT_MSG_CHANNEL")
end
SendChatMessage (prefix .. "_" .. _detalhes:Serialize (self.__version, ...), "CHANNEL", nil, id)
end
else
_detalhes:SendCommMessage (prefix, _detalhes:Serialize (self.__version, ...), channel)
end
@@ -463,12 +471,50 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> sharer
local city_zones = {
["ShattrathCity"] = true,
["Dalaran"] = true,
["AshranHordeFactionHub"] = true,
["AshranAllianceFactionHub"] = true,
["Orgrimmar"] = true,
["Undercity"] = true,
["ThunderBluff"] = true,
["SilvermoonCity"] = true,
["StormwindCity"] = true,
["Darnassus"] = true,
["Ironforge"] = true,
["TheExodar"] = true,
}
local sub_zones = {
["ShrineofTwoMoons"] = true,
["ShrineofSevenStars"] = true,
}
function _detalhes:IsInCity()
SetMapToCurrentZone()
local mapFileName, _, _, _, microDungeonMapName = GetMapInfo()
if (city_zones [mapFileName]) then
return true
elseif (microDungeonMapName and type (microDungeonMapName) == "string" and sub_zones [microDungeonMapName]) then
return true
end
end
--> entrar no canal após logar no servidor
function _detalhes:EnterChatChannel()
if (not _detalhes.realm_sync) then
return
end
if (not _detalhes:IsInCity()) then
return
end
if (_detalhes.schedule_chat_leave) then
_detalhes:CancelTimer (_detalhes.schedule_chat_leave)
_detalhes.schedule_chat_leave = nil
@@ -477,10 +523,6 @@
local realm = GetRealmName()
realm = realm or ""
--if (realm ~= "Azralon") then
-- return
--end
--> room name
local room_name = "Details"
@@ -497,7 +539,6 @@
end
--> enter
--print ("entrando no canal")
JoinChannelByName (room_name)
_detalhes.is_connected = true
end
@@ -516,10 +557,6 @@
local realm = GetRealmName()
realm = realm or ""
--if (realm ~= "Azralon") then
-- return
--end
--> room name
local room_name = "Details"
local is_in = false
@@ -533,7 +570,6 @@
end
if (is_in) then
--print ("saindo do canal")
LeaveChannelByName (room_name)
end
@@ -542,80 +578,40 @@
_detalhes.listener:UnregisterEvent ("CHAT_MSG_CHANNEL")
end
--> sair do canal quando estiver em grupo
local event_handler = {Enabled = true, __enabled = true, teste = " teste"}
function event_handler:ZONE_TYPE_CHANGED (zone_type)
if (not _detalhes.realm_sync) then
return
end
if (zone_type == "none") then
if (not _detalhes:InGroup()) then
if (_detalhes.schedule_chat_leave) then
_detalhes:CancelTimer (_detalhes.schedule_chat_leave)
end
if (not _detalhes.schedule_chat_enter) then
_detalhes.schedule_chat_enter = _detalhes:ScheduleTimer ("EnterChatChannel", 2)
end
end
else
if (_detalhes:InGroup()) then
if (_detalhes.schedule_chat_enter) then
_detalhes:CancelTimer (_detalhes.schedule_chat_enter)
end
if (not _detalhes.schedule_chat_leave) then
_detalhes.schedule_chat_leave = _detalhes:ScheduleTimer ("LeaveChatChannel", 2)
end
end
end
end
function event_handler:GROUP_ONENTER()
if (not _detalhes.realm_sync) then
return
end
if (_detalhes.zone_type ~= "none") then
function _detalhes:DoZoneCheck()
local in_city = _detalhes:IsInCity()
if (not in_city) then
if (_detalhes.schedule_chat_enter) then
_detalhes:CancelTimer (_detalhes.schedule_chat_enter)
end
if (not _detalhes.schedule_chat_leave) then
_detalhes.schedule_chat_leave = _detalhes:ScheduleTimer ("LeaveChatChannel", 2)
_detalhes.schedule_chat_leave = _detalhes:ScheduleTimer ("LeaveChatChannel", 5)
end
else
if (in_city) then
if (_detalhes.schedule_chat_leave) then
_detalhes:CancelTimer (_detalhes.schedule_chat_leave)
end
if (not _detalhes.schedule_chat_enter) then
_detalhes.schedule_chat_enter = _detalhes:ScheduleTimer ("EnterChatChannel", 5)
end
end
end
end
function _detalhes:CheckChatOnLeaveGroup()
function _detalhes:CheckChatOnZoneChange()
if (not _detalhes.realm_sync) then
return
end
_detalhes.schedule_group_onleave_check = nil
if (_detalhes.zone_type == "none") then
if (_detalhes.schedule_chat_leave) then
_detalhes:CancelTimer (_detalhes.schedule_chat_leave)
end
if (not _detalhes.schedule_chat_enter) then
_detalhes.schedule_chat_enter = _detalhes:ScheduleTimer ("EnterChatChannel", 2)
end
end
_detalhes:ScheduleTimer ("DoZoneCheck", 2)
end
function event_handler:GROUP_ONLEAVE()
if (not _detalhes.realm_sync) then
return
end
if (_detalhes.schedule_group_onleave_check) then
_detalhes:CancelTimer (_detalhes.schedule_group_onleave_check)
_detalhes.schedule_group_onleave_check = nil
end
_detalhes.schedule_group_onleave_check = _detalhes:ScheduleTimer ("CheckChatOnLeaveGroup", 5)
end
_detalhes:RegisterEvent (event_handler, "GROUP_ONENTER", "GROUP_ONENTER")
_detalhes:RegisterEvent (event_handler, "GROUP_ONLEAVE", "GROUP_ONLEAVE")
_detalhes:RegisterEvent (event_handler, "ZONE_TYPE_CHANGED", "ZONE_TYPE_CHANGED")
function _detalhes:IsConnected()
if (not _detalhes.is_connected) then
local id = _detalhes:GetChannelId ("Details")
if (id) then
_detalhes.is_connected = true
end
end
return _detalhes.is_connected
end
+214 -509
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -665,18 +665,18 @@ do
--> showing is the combat table which is current shown on instance
if (child.instance.showing) then
--GetCombatTime() return the time length of combat
local combatTime = child.instance.showing:GetCombatTime()
if (combatTime < 1) then
return child.text:SetText ("0")
end
--GetTotal (attribute, sub attribute, onlyGroup) return the total of requested attribute
local total = child.instance.showing:GetTotal (child.instance.atributo, child.instance.sub_atributo, true)
local dps = _math_floor (total / combatTime)
--print (total, combatTime, dps)
local textStyle = child.options.textStyle
if (textStyle == 1) then
child.text:SetText (_detalhes:ToK (dps))
-22
View File
@@ -373,28 +373,6 @@ end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> internal functions
local LastDamage = 0
local LastDamageRecord = 0
--> record raid/party/player damage every second
function _detalhes:LogDps()
LastDamageRecord = LastDamageRecord + 1
if (LastDamageRecord > 1) then
LastDamageRecord = 0
local NowDamage = (_detalhes.tabela_vigente.totals_grupo[1] - LastDamage) /2
_table_insert (_detalhes.tabela_vigente.DpsGraphic, NowDamage)
if (NowDamage > _detalhes.tabela_vigente.DpsGraphic.max) then
_detalhes.tabela_vigente.DpsGraphic.max = NowDamage
end
LastDamage = _detalhes.tabela_vigente.totals_grupo[1]
end
end
--> is in combat yet?
function _detalhes:EstaEmCombate()
+2 -2
View File
@@ -2201,8 +2201,8 @@
elseif (robot.nome == "Mr. President") then
rawset (_detalhes.spellcache, 56488, {"Nuke", 56488, [[Interface\ICONS\inv_gizmo_supersappercharge]]})
robot.spell_tables:PegaHabilidade (56488, true, "SPELL_DAMAGE")
robot.spell_tables._ActorTable [56488].total = robot.total
robot.spells:PegaHabilidade (56488, true, "SPELL_DAMAGE")
robot.spells._ActorTable [56488].total = robot.total
end
local robot = current_combat[2]:PegarCombatente (0x0000000000000, actors_name [math.random (1, #actors_name)], 0x114, true)
+9 -4
View File
@@ -30,6 +30,7 @@ do
--[[global]] DETAILS_SUBATTRIBUTE_REGENRAGE = 2
--[[global]] DETAILS_SUBATTRIBUTE_REGENENERGY = 3
--[[global]] DETAILS_SUBATTRIBUTE_REGENRUNE = 4
--[[global]] DETAILS_SUBATTRIBUTE_RESOURCES = 5
--[[global]] DETAILS_ATTRIBUTE_MISC = 4
@@ -62,6 +63,7 @@ do
"energy", --rage gained
"energy", --energy generated
"energy", --runic power generated
"energy", --resources
"miscdata", --cc breaks
"miscdata", --ress
@@ -89,7 +91,7 @@ do
--[[ ENERGY ]]
e_energy = 3,--> identifier
[3] = 4, --> sub attributes
[3] = 5, --> sub attributes
--[[ MISC ]]
misc = 4, --> identifier
@@ -176,19 +178,22 @@ do
rage_ganha = 2, -- id 1
energy_ganha = 3, --id 3
rune_ganha = 4, --id 6
resources = 5, --
lista = { --[[ String Names ]]
Loc ["STRING_ATTRIBUTE_ENERGY_MANA"],
Loc ["STRING_ATTRIBUTE_ENERGY_RAGE"],
Loc ["STRING_ATTRIBUTE_ENERGY_ENERGY"],
Loc ["STRING_ATTRIBUTE_ENERGY_RUNEPOWER"]
Loc ["STRING_ATTRIBUTE_ENERGY_RUNEPOWER"],
Loc ["STRING_ATTRIBUTE_ENERGY_RESOURCES"],
},
icones = {
{"Interface\\AddOns\\Details\\images\\atributos_icones_energyze", {0, .125, 0, 1}},
{"Interface\\AddOns\\Details\\images\\atributos_icones_energyze", {.125, .25, 0, 1}},
{"Interface\\AddOns\\Details\\images\\atributos_icones_energyze", {.25, .375, 0, 1}},
{"Interface\\AddOns\\Details\\images\\atributos_icones_energyze", {.375, .5, 0, 1}}
{"Interface\\AddOns\\Details\\images\\atributos_icones_energyze", {.375, .5, 0, 1}},
{"Interface\\AddOns\\Details\\images\\atributos_icones_energyze", {.5, .625, 0, 1}},
},
internal = {"mana", "e_rage", "e_energy", "runepower"}
internal = {"mana", "e_rage", "e_energy", "runepower", "resource"}
},
{
+2 -2
View File
@@ -119,9 +119,9 @@ do
return self.classe or actor.classe
end
function _detalhes:GetActorSpells()
return self.spell_tables._ActorTable
return self.spells._ActorTable
end
function _detalhes:GetSpell (spellid)
return self.spell_tables._ActorTable [spellid]
return self.spells._ActorTable [spellid]
end
end
+4 -4
View File
@@ -79,8 +79,8 @@ do
return false
end
if (Actor.spell_tables) then --> correcao pros containers misc, precisa pegar os diferentes tipos de containers de lá
for spellid, _ in _pairs (Actor.spell_tables._ActorTable) do
if (Actor.spells) then --> correcao pros containers misc, precisa pegar os diferentes tipos de containers de lá
for spellid, _ in _pairs (Actor.spells._ActorTable) do
local class = _detalhes.ClassSpellList [spellid]
if (class) then
Actor.classe = class
@@ -92,7 +92,7 @@ do
container.shadow.need_refresh = true
end
if (Actor.minha_barra) then
if (Actor.minha_barra and type (Actor.minha_barra) == "table") then
Actor.minha_barra.minha_tabela = nil
end
@@ -114,7 +114,7 @@ do
container.shadow.need_refresh = true
end
if (Actor.minha_barra) then
if (Actor.minha_barra and type (Actor.minha_barra) == "table") then
Actor.minha_barra.minha_tabela = nil
end
+40 -19
View File
@@ -91,6 +91,14 @@ function SlashCmdList.DETAILS (msg, editbox)
_detalhes:CheckChatOnLeaveGroup()
end
elseif (msg == "load") then
print (DetailsDataStorage)
local loaded, reason = LoadAddOn ("Details_DataStorage")
print (loaded, reason, DetailsDataStorage)
elseif (msg == "owner2") then
local tip = CreateFrame('GameTooltip', 'GuardianOwnerTooltip', nil, 'GameTooltipTemplate')
@@ -149,21 +157,21 @@ function SlashCmdList.DETAILS (msg, editbox)
end
if (cima) then
local frostbolt = self.spell_tables:PegaHabilidade (116, true, "SPELL_DAMAGE")
local frostfirebolt = self.spell_tables:PegaHabilidade (44614, true, "SPELL_DAMAGE")
local icelance = self.spell_tables:PegaHabilidade (30455, true, "SPELL_DAMAGE")
local frostbolt = self.spells:PegaHabilidade (116, true, "SPELL_DAMAGE")
local frostfirebolt = self.spells:PegaHabilidade (44614, true, "SPELL_DAMAGE")
local icelance = self.spells:PegaHabilidade (30455, true, "SPELL_DAMAGE")
self.spell_tables._ActorTable [116].total = 50000
self.spell_tables._ActorTable [44614].total = 25000
self.spell_tables._ActorTable [30455].total = 25000
self.spells._ActorTable [116].total = 50000
self.spells._ActorTable [44614].total = 25000
self.spells._ActorTable [30455].total = 25000
else
local frostbolt = self.spell_tables:PegaHabilidade (84721, true, "SPELL_DAMAGE")
local frostfirebolt = self.spell_tables:PegaHabilidade (113092, true, "SPELL_DAMAGE")
local icelance = self.spell_tables:PegaHabilidade (122, true, "SPELL_DAMAGE")
local frostbolt = self.spells:PegaHabilidade (84721, true, "SPELL_DAMAGE")
local frostfirebolt = self.spells:PegaHabilidade (113092, true, "SPELL_DAMAGE")
local icelance = self.spells:PegaHabilidade (122, true, "SPELL_DAMAGE")
self.spell_tables._ActorTable [84721].total = 50000
self.spell_tables._ActorTable [113092].total = 25000
self.spell_tables._ActorTable [122].total = 25000
self.spells._ActorTable [84721].total = 50000
self.spells._ActorTable [113092].total = 25000
self.spells._ActorTable [122].total = 25000
end
combat.start_time = time()-30
@@ -483,8 +491,8 @@ function SlashCmdList.DETAILS (msg, editbox)
return
end
if (playerActor and playerActor.buff_uptime_spell_tables and playerActor.buff_uptime_spell_tables._ActorTable) then
for spellid, spellTable in pairs (playerActor.buff_uptime_spell_tables._ActorTable) do
if (playerActor and playerActor.buff_uptime_spells and playerActor.buff_uptime_spells._ActorTable) then
for spellid, spellTable in pairs (playerActor.buff_uptime_spells._ActorTable) do
local spellname = GetSpellInfo (spellid)
if (spellname) then
print (spellid, spellname, spellTable.uptime)
@@ -502,13 +510,26 @@ function SlashCmdList.DETAILS (msg, editbox)
elseif (msg == "comm") then
if (IsInRaid()) then
for i = 1, GetNumGroupMembers() do
local nname, server = UnitName ("raid"..i)
print (nname, server)
--nname = nname.."-"..server
local test_plugin = TESTPLUGIN
if (not test_plugin) then
local p = _detalhes:NewPluginObject ("DetailsTestPlugin", nil, "STATUSBAR")
_detalhes:InstallPlugin ("STATUSBAR", "Plugin Test", [[Interface\COMMON\StreamCircle]], p, "TESTPLUGIN", 1, "Details!", "v1.0")
test_plugin = TESTPLUGIN
function test_plugin:ReceiveAA (a, b, c, d, e, f, g)
print ("working 1", a, b, c, d, e, f, g)
end
function test_plugin:ReceiveAB (a, b, c, d, e, f, g)
print ("working 2", a, b, c, d, e, f, g)
end
test_plugin:RegisterPluginComm ("PTAA", "ReceiveAA")
test_plugin:RegisterPluginComm ("PTAB", "ReceiveAB")
end
test_plugin:SendPluginCommMessage ("PTAA", nil, "teste 1", "teste 2", "teste3")
elseif (msg == "teste") then
+68 -106
View File
@@ -776,53 +776,15 @@ function gump:CriaJanelaInfo()
este_gump.classe_iconePlus:SetHeight (64)
este_gump.classe_iconePlus:SetDrawLayer ("BACKGROUND", 2)
--> cria as 4 partes do fundo da janela
--> top left
este_gump.bg1 = este_gump:CreateTexture (nil, "BORDER")
este_gump.bg1:SetPoint ("TOPLEFT", este_gump, "TOPLEFT", 0, 0)
--este_gump.bg1:SetWidth (512)
--este_gump.bg1:SetHeight (256)
este_gump.bg1:SetDrawLayer ("BORDER", 1)
function _detalhes:SetPlayerDetailsWindowTexture (texture)
este_gump.bg1:SetTexture (texture)
end
_detalhes:SetPlayerDetailsWindowTexture ("Interface\\AddOns\\Details\\images\\info_window_background")
este_gump.bg1_sec_texture = este_gump:CreateTexture (nil, "BORDER")
este_gump.bg1_sec_texture:SetDrawLayer ("BORDER", 2)
--este_gump.bg1_sec_texture:SetPoint ("topleft", este_gump.bg1, "topleft", 356, -86)
este_gump.bg1_sec_texture:SetPoint ("topleft", este_gump.bg1, "topleft", 348, -86)
este_gump.bg1_sec_texture:SetHeight (262)
este_gump.bg1_sec_texture:SetWidth (264)
--> bottom left
este_gump.bg3 = este_gump:CreateTexture (nil, "BORDER")
--este_gump.bg3:SetPoint ("BOTTOMLEFT", este_gump, "BOTTOMLEFT", 0, 0)
este_gump.bg3:SetPoint ("TOPLEFT", este_gump, "TOPLEFT", 0, -256)
este_gump.bg3:SetWidth (512)
este_gump.bg3:SetHeight (128)
este_gump.bg3:SetTexture ("Interface\\AddOns\\Details\\images\\info_bg_part3")
este_gump.bg3:Hide()
--> top right
este_gump.bg2 = este_gump:CreateTexture (nil, "BORDER")
este_gump.bg2:SetPoint ("TOPLEFT", este_gump, "TOPLEFT", 512, 0)
este_gump.bg2:SetWidth (128)
este_gump.bg2:SetHeight (128)
este_gump.bg2:SetTexture ("Interface\\AddOns\\Details\\images\\info_bg_part2")
este_gump.bg2:Hide()
--> bottom right
este_gump.bg4 = este_gump:CreateTexture (nil, "BORDER")
--este_gump.bg4:SetPoint ("BOTTOMRIGHT", este_gump, "BOTTOMRIGHT", 0, 0)
--este_gump.bg4:SetPoint ("BOTTOMLEFT", este_gump, "BOTTOMLEFT", 512, 0)
este_gump.bg4:SetPoint ("TOPLEFT", este_gump, "TOPLEFT", 512, -128)
este_gump.bg4:SetWidth (128)
este_gump.bg4:SetHeight (256)
este_gump.bg4:SetTexture ("Interface\\AddOns\\Details\\images\\info_bg_part4")
este_gump.bg4:Hide()
--> botão de fechar
este_gump.fechar = _CreateFrame ("Button", nil, este_gump, "UIPanelCloseButton")
@@ -845,19 +807,6 @@ function gump:CriaJanelaInfo()
este_gump.no_targets.text:SetTextColor (1, 1, 1, .4)
este_gump.no_targets:Hide()
function este_gump:ToFront()
if (_detalhes.bosswindow) then
if (_detalhes.bosswindow:GetFrameLevel() > este_gump:GetFrameLevel()) then
este_gump:SetFrameLevel (este_gump:GetFrameLevel()+3)
_detalhes.bosswindow:SetFrameLevel (_detalhes.bosswindow:GetFrameLevel()-3)
end
end
end
este_gump.grab = gump:NewDetailsButton (este_gump, este_gump, _, este_gump.ToFront, nil, nil, 590, 73, "", "", "", "", {OnGrab = "PassClick"}, "DetailsJanelaInfoGrab")
este_gump.grab:SetPoint ("topleft",este_gump, "topleft")
este_gump.grab:SetFrameLevel (este_gump:GetFrameLevel()+1)
--> titulo
gump:NewLabel (este_gump, este_gump, nil, "titulo", Loc ["STRING_PLAYER_DETAILS"], "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255})
este_gump.titulo:SetPoint ("center", este_gump, "center")
@@ -1395,19 +1344,17 @@ function gump:CriaJanelaInfo()
tab.selfhealingpersecond:SetText ("0 (0%)")
else
local last_actor_heal = last_combat (2, player.nome)
local este_alvo = actor_heal.targets._NameIndexTable [player.nome]
local este_alvo = actor_heal.targets [player.nome]
if (este_alvo) then
este_alvo = actor_heal.targets._ActorTable [este_alvo]
local heal_total = este_alvo.total
local heal_total = este_alvo
tab.selfhealing:SetText (_detalhes:ToK2 (heal_total))
if (last_actor_heal) then
local este_alvo = last_actor_heal.targets._NameIndexTable [player.nome]
local este_alvo = last_actor_heal.targets [player.nome]
if (este_alvo) then
este_alvo = actor_heal.targets._ActorTable [este_alvo]
local heal = este_alvo
local last_heal = este_alvo.total / last_combat:GetCombatTime()
local last_heal = heal / last_combat:GetCombatTime()
local ps, diff = getpercent (heal_total, last_heal, elapsed_time, true)
tab.selfhealingpersecond:SetText (_detalhes:comma_value (_math_floor (ps)) .. " (" .. diff .. ")")
@@ -1432,7 +1379,7 @@ function gump:CriaJanelaInfo()
for actorName, _ in pairs (heal_from) do
local thisActor = combat (2, actorName)
local targets = thisActor.targets --> targets is a container with target classes
local amount = targets:GetAmount (player.nome, "total")
local amount = targets [player.nome] or 0
myReceivedHeal [#myReceivedHeal+1] = {actorName, amount, thisActor.classe}
end
@@ -1459,7 +1406,7 @@ function gump:CriaJanelaInfo()
local last_actor = last_combat (2, myReceivedHeal [i][1])
if (last_actor) then
local targets = last_actor.targets
local amount = targets:GetAmount (player.nome, "total")
local amount = targets [player.nome] or 0
if (amount) then
local last_heal = amount
@@ -1491,14 +1438,14 @@ function gump:CriaJanelaInfo()
local misc_player = combat (4, player.nome)
if (misc_player) then
if (misc_player.cooldowns_defensive_spell_tables) then
local minha_tabela = misc_player.cooldowns_defensive_spell_tables._ActorTable
if (misc_player.cooldowns_defensive_spells) then
local minha_tabela = misc_player.cooldowns_defensive_spells._ActorTable
local cooldowns_usados = {}
for _spellid, _tabela in pairs (minha_tabela) do
cooldowns_usados [#cooldowns_usados+1] = {_spellid, _tabela.counter}
end
table.sort (cooldowns_usados, function (t1, t2) return t1[2] > t2[2] end)
table.sort (cooldowns_usados, _detalhes.Sort2)
if (#cooldowns_usados > 1) then
for i = 1, #cooldowns_usados do
@@ -1521,8 +1468,8 @@ function gump:CriaJanelaInfo()
--> buffs uptime
if (index_used < 11) then
if (misc_player.buff_uptime_spell_tables) then
local minha_tabela = misc_player.buff_uptime_spell_tables._ActorTable
if (misc_player.buff_uptime_spells) then
local minha_tabela = misc_player.buff_uptime_spells._ActorTable
local encounter_time = combat:GetCombatTime()
@@ -1634,12 +1581,12 @@ function gump:CriaJanelaInfo()
local player_2_target_pool
local player_2_top
if (player_2) then
local player_2_target = player_2.targets._ActorTable
local player_2_target = player_2.targets
player_2_target_pool = {}
for index, target in _ipairs (player_2_target) do
player_2_target_pool [#player_2_target_pool+1] = {target.nome, target.total}
for target_name, amount in _pairs (player_2_target) do
player_2_target_pool [#player_2_target_pool+1] = {target_name, amount}
end
table.sort (player_2_target_pool, function (t1, t2) return t1[2] > t2[2] end)
table.sort (player_2_target_pool, _detalhes.Sort2)
if (player_2_target_pool [1]) then
player_2_top = player_2_target_pool [1] [2]
else
@@ -1653,12 +1600,12 @@ function gump:CriaJanelaInfo()
local player_3_target_pool
local player_3_top
if (player_3) then
local player_3_target = player_3.targets._ActorTable
local player_3_target = player_3.targets
player_3_target_pool = {}
for index, target in _ipairs (player_3_target) do
player_3_target_pool [#player_3_target_pool+1] = {target.nome, target.total}
for target_name, amount in _pairs (player_3_target) do
player_3_target_pool [#player_3_target_pool+1] = {target_name, amount}
end
table.sort (player_3_target_pool, function (t1, t2) return t1[2] > t2[2] end)
table.sort (player_3_target_pool, _detalhes.Sort2)
if (player_3_target_pool [1]) then
player_3_top = player_3_target_pool [1] [2]
else
@@ -1845,10 +1792,10 @@ function gump:CriaJanelaInfo()
--primeiro preenche a nossa barra
local spells_sorted = {}
for spellid, spelltable in _pairs (player.spell_tables._ActorTable) do
for spellid, spelltable in _pairs (player.spells._ActorTable) do
spells_sorted [#spells_sorted+1] = {spelltable, spelltable.total}
end
table.sort (spells_sorted, function (t1, t2) return t1[2] > t2[2] end)
table.sort (spells_sorted, _detalhes.Sort2)
self.player = player:Name()
@@ -1861,10 +1808,10 @@ function gump:CriaJanelaInfo()
frame2.player = other_players [1]:Name()
local player_2_total = other_players [1].total_without_pet
local player_2_spells_sorted = {}
for spellid, spelltable in _pairs (other_players [1].spell_tables._ActorTable) do
for spellid, spelltable in _pairs (other_players [1].spells._ActorTable) do
player_2_spells_sorted [#player_2_spells_sorted+1] = {spelltable, spelltable.total}
end
table.sort (player_2_spells_sorted, function (t1, t2) return t1[2] > t2[2] end)
table.sort (player_2_spells_sorted, _detalhes.Sort2)
local player_2_top = player_2_spells_sorted [1] [2]
local player_2_spell_info = {}
for index, spelltable in _ipairs (player_2_spells_sorted) do
@@ -1879,10 +1826,10 @@ function gump:CriaJanelaInfo()
local player_3_top
if (other_players [2]) then
for spellid, spelltable in _pairs (other_players [2].spell_tables._ActorTable) do
for spellid, spelltable in _pairs (other_players [2].spells._ActorTable) do
player_3_spells_sorted [#player_3_spells_sorted+1] = {spelltable, spelltable.total}
end
table.sort (player_3_spells_sorted, function (t1, t2) return t1[2] > t2[2] end)
table.sort (player_3_spells_sorted, _detalhes.Sort2)
player_3_top = player_3_spells_sorted [1] [2]
for index, spelltable in _ipairs (player_3_spells_sorted) do
player_3_spell_info [spelltable[1].id] = index
@@ -1911,7 +1858,7 @@ function gump:CriaJanelaInfo()
--seta no segundo box
local player_2 = other_players [1]
local spell = player_2.spell_tables._ActorTable [spellid]
local spell = player_2.spells._ActorTable [spellid]
local bar_2 = frame2.bars [i]
-- ~compare
@@ -1967,7 +1914,7 @@ function gump:CriaJanelaInfo()
if (player_3_total) then
local player_3 = other_players [2]
local spell = player_3.spell_tables._ActorTable [spellid]
local spell = player_3.spells._ActorTable [spellid]
if (spell) then
bar_3 [1]:SetTexture (icon)
@@ -2058,12 +2005,12 @@ function gump:CriaJanelaInfo()
local refresh_target_box = function (self)
--player 1 targets
local my_targets = self.tab.player.targets._ActorTable
local my_targets = self.tab.player.targets
local target_pool = {}
for index, target in _ipairs (my_targets) do
target_pool [#target_pool+1] = {target.nome, target.total}
for target_name, amount in _pairs (my_targets) do
target_pool [#target_pool+1] = {target_name, amount}
end
table.sort (target_pool, function (t1, t2) return t1[2] > t2[2] end)
table.sort (target_pool, _detalhes.Sort2)
FauxScrollFrame_Update (self, math.max (#target_pool, 5), 4, 14)
@@ -2121,10 +2068,10 @@ function gump:CriaJanelaInfo()
-- player 1
local player_1_skills = {}
for spellid, spell in _pairs (player_1.spell_tables._ActorTable) do
for index, target in _ipairs (spell.targets._ActorTable) do
if (target.nome == target_name) then
player_1_skills [#player_1_skills+1] = {spellid, target.total}
for spellid, spell in _pairs (player_1.spells._ActorTable) do
for name, amount in _pairs (spell.targets) do
if (name == target_name) then
player_1_skills [#player_1_skills+1] = {spellid, amount}
end
end
end
@@ -2135,10 +2082,10 @@ function gump:CriaJanelaInfo()
local player_2_skills = {}
local player_2_top
if (player_2) then
for spellid, spell in _pairs (player_2.spell_tables._ActorTable) do
for index, target in _ipairs (spell.targets._ActorTable) do
if (target.nome == target_name) then
player_2_skills [#player_2_skills+1] = {spellid, target.total}
for spellid, spell in _pairs (player_2.spells._ActorTable) do
for name, amount in _pairs (spell.targets) do
if (name == target_name) then
player_2_skills [#player_2_skills+1] = {spellid, amount}
end
end
end
@@ -2150,10 +2097,10 @@ function gump:CriaJanelaInfo()
local player_3_skills = {}
local player_3_top
if (player_3) then
for spellid, spell in _pairs (player_3.spell_tables._ActorTable) do
for index, target in _ipairs (spell.targets._ActorTable) do
if (target.nome == target_name) then
player_3_skills [#player_3_skills+1] = {spellid, target.total}
for spellid, spell in _pairs (player_3.spells._ActorTable) do
for name, amount in _pairs (spell.targets) do
if (name == target_name) then
player_3_skills [#player_3_skills+1] = {spellid, amount}
end
end
end
@@ -2354,7 +2301,7 @@ function gump:CriaJanelaInfo()
frame1.tooltip.crit_label2:SetText (critical .. "%")
if (player1_misc) then
local spell = player1_misc.debuff_uptime_spell_tables and player1_misc.debuff_uptime_spell_tables._ActorTable and player1_misc.debuff_uptime_spell_tables._ActorTable [spellid]
local spell = player1_misc.debuff_uptime_spells and player1_misc.debuff_uptime_spells._ActorTable and player1_misc.debuff_uptime_spells._ActorTable [spellid]
if (spell) then
local minutos, segundos = _math_floor (spell.uptime/60), _math_floor (spell.uptime%60)
player1_uptime = spell.uptime
@@ -2429,7 +2376,7 @@ function gump:CriaJanelaInfo()
end
if (player2_misc) then
local spell = player2_misc.debuff_uptime_spell_tables and player2_misc.debuff_uptime_spell_tables._ActorTable and player2_misc.debuff_uptime_spell_tables._ActorTable [spellid]
local spell = player2_misc.debuff_uptime_spells and player2_misc.debuff_uptime_spells._ActorTable and player2_misc.debuff_uptime_spells._ActorTable [spellid]
if (spell and spell.uptime) then
local minutos, segundos = _math_floor (spell.uptime/60), _math_floor (spell.uptime%60)
@@ -2524,7 +2471,7 @@ function gump:CriaJanelaInfo()
end
if (player3_misc) then
local spell = player3_misc.debuff_uptime_spell_tables and player3_misc.debuff_uptime_spell_tables._ActorTable and player3_misc.debuff_uptime_spell_tables._ActorTable [spellid]
local spell = player3_misc.debuff_uptime_spells and player3_misc.debuff_uptime_spells._ActorTable and player3_misc.debuff_uptime_spells._ActorTable [spellid]
if (spell and spell.uptime) then
local minutos, segundos = _math_floor (spell.uptime/60), _math_floor (spell.uptime%60)
@@ -2894,7 +2841,7 @@ function gump:CriaJanelaInfo()
local my_spells = {}
local my_spells_total = 0
--> build my spell list
for spellid, _ in _pairs (playerObject.spell_tables._ActorTable) do
for spellid, _ in _pairs (playerObject.spells._ActorTable) do
my_spells [spellid] = true
my_spells_total = my_spells_total + 1
end
@@ -2907,7 +2854,7 @@ function gump:CriaJanelaInfo()
if (actor.classe == class and actor ~= playerObject) then
local same_spells = 0
for spellid, _ in _pairs (actor.spell_tables._ActorTable) do
for spellid, _ in _pairs (actor.spells._ActorTable) do
if (my_spells [spellid]) then
same_spells = same_spells + 1
end
@@ -3505,13 +3452,28 @@ local target_on_enter = function (self)
if (barra.show and type (barra.show) == "number") then
local actor = barra.other_actor or info.jogador
local spell = actor.spell_tables:PegaHabilidade (barra.show)
local spell = actor.spells:PegaHabilidade (barra.show)
if (spell) then
local ActorTargetsContainer = spell.targets._ActorTable
local ActorTargetsSortTable = {}
local ActorTargetsContainer
local attribute, sub_attribute = info.instancia:GetDisplay()
if (attribute == 1 or attribute == 3) then
ActorTargetsContainer = spell.targets
else
if (sub_attribute == 3) then --overheal
ActorTargetsContainer = spell.targets_overheal
elseif (sub_attribute == 6) then --absorbs
ActorTargetsContainer = spell.targets_absorbs
else
ActorTargetsContainer = spell.targets
end
end
--add and sort
for _, _target in _ipairs (ActorTargetsContainer) do
ActorTargetsSortTable [#ActorTargetsSortTable+1] = {_target.nome, _target [info.target_member] or _target.total or 0}
for target_name, amount in _pairs (ActorTargetsContainer) do
ActorTargetsSortTable [#ActorTargetsSortTable+1] = {target_name, amount or 0}
end
table.sort (ActorTargetsSortTable, _detalhes.Sort2)
Binary file not shown.
+4
View File
@@ -0,0 +1,4 @@
local L = LibStub("AceLocale-3.0"):NewLocale("Details", "deDE")
if not L then return end
@localization(locale="deDE", format="lua_additive_table", escape-non-ascii=true)@
@@ -0,0 +1,14 @@
DETAILS_STORAGE_VERSION = 1
function _detalhes:CreateStorageDB()
DetailsDataStorage = {VERSION = DETAILS_STORAGE_VERSION, RAID_STORAGE = {}}
return DetailsDataStorage
end
DetailsDataStorage = DetailsDataStorage or _detalhes:CreateStorageDB()
if (DetailsDataStorage.VERSION < DETAILS_STORAGE_VERSION) then
--> do revisions
end
@@ -0,0 +1,9 @@
## Interface: 60000
## Title: Details Storage
## Notes: Stores information for Details!
## DefaultState: Enabled
## LoadOnDemand: 1
## Dependencies: Details
## SavedVariables: DetailsDataStorage
Details_DataStorage.lua
@@ -755,7 +755,7 @@ local function CreatePluginFrames()
if (misc) then
local debuff_uptime = misc.debuff_uptime
if (debuff_uptime) then
local this_spell = misc.debuff_uptime_spell_tables._ActorTable [capsule.spellid]
local this_spell = misc.debuff_uptime_spells._ActorTable [capsule.spellid]
if (this_spell) then
GameCooltip:AddLine ("")
local uptime = this_spell.uptime
@@ -38,6 +38,8 @@ local class_type_misc = _detalhes.atributos.misc --> misc
--> main combat object
local _combat_object
local sort_by_name = function (t1, t2) return t1.nome < t2.nome end
local CLASS_ICON_TCOORDS = _G.CLASS_ICON_TCOORDS
EncounterDetails.name = "Encounter Details"
@@ -289,9 +291,9 @@ local function CreatePluginFrames (data)
return true
end
--> create the button to show on toolbar [1] function OnClick [2] texture [3] tooltip [4] width or 14 [5] height or 14 [6] frame name or nil
--EncounterDetails.ToolbarButton = _detalhes.ToolBar:NewPluginToolbarButton (EncounterDetails.OpenWindow, "Interface\\Scenarios\\ScenarioIcon-Boss", Loc ["STRING_PLUGIN_NAME"], Loc ["STRING_TOOLTIP"], 12, 12, "ENCOUNTERDETAILS_BUTTON") --"Interface\\COMMON\\help-i"
EncounterDetails.ToolbarButton = _detalhes.ToolBar:NewPluginToolbarButton (EncounterDetails.OpenWindow, "Interface\\AddOns\\Details_EncounterDetails\\images\\icon", Loc ["STRING_PLUGIN_NAME"], Loc ["STRING_TOOLTIP"], 16, 16, "ENCOUNTERDETAILS_BUTTON") --"Interface\\COMMON\\help-i"
EncounterDetails.ToolbarButton.shadow = true --> loads icon_shadow.tga when the instance is showing icons with shadows
--> setpoint anchors mod if needed
EncounterDetails.ToolbarButton.y = 0.5
EncounterDetails.ToolbarButton.x = 0
@@ -321,6 +323,18 @@ local shift_monitor = function (self)
end
end
local sort_damage_from = function (a, b)
if (a[3] ~= "PET" and b[3] ~= "PET") then
return a[2] > b[2]
elseif (a[3] == "PET" and b[3] ~= "PET") then
return false
elseif (a[3] ~= "PET" and b[3] == "PET") then
return true
else
return a[2] > b[2]
end
end
--> custom tooltip for dead details ---------------------------------------------------------------------------------------------------------
local function KillInfo (deathTable, row)
@@ -442,7 +456,7 @@ local function DispellInfo (dispell, barra)
tabela_jogadores [#tabela_jogadores + 1] = {nome, tabela [1], tabela [2]}
end
_table_sort (tabela_jogadores, function (a, b) return a[2] > b[2] end)
_table_sort (tabela_jogadores, _detalhes.Sort2)
_GameTooltip:ClearLines()
_GameTooltip:AddLine (barra.texto_esquerdo:GetText())
@@ -468,7 +482,7 @@ local function KickBy (magia, barra)
tabela_jogadores [#tabela_jogadores + 1] = {nome, tabela [1], tabela [2]}
end
_table_sort (tabela_jogadores, function (a, b) return a[2] > b[2] end)
_table_sort (tabela_jogadores, _detalhes.Sort2)
_GameTooltip:ClearLines()
_GameTooltip:AddLine (barra.texto_esquerdo:GetText())
@@ -493,7 +507,7 @@ local function EnemySkills (habilidade, barra)
tabela_jogadores [#tabela_jogadores + 1] = {nome, tabela[1], tabela[2]}
end
_table_sort (tabela_jogadores, function (a, b) return a[2] > b[2] end)
_table_sort (tabela_jogadores, _detalhes.Sort2)
_GameTooltip:ClearLines()
_GameTooltip:AddLine (barra.texto_esquerdo:GetText())
@@ -523,21 +537,20 @@ local function DamageTakenDetails (jogador, barra)
local este_agressor = showing._ActorTable[showing._NameIndexTable[nome]]
if (este_agressor) then --> checagem por causa do total e do garbage collector que não limpa os nomes que deram dano
local habilidades = este_agressor.spell_tables._ActorTable
local habilidades = este_agressor.spells._ActorTable
for id, habilidade in _pairs (habilidades) do
--print ("oi - " .. este_agressor.nome)
local alvos = habilidade.targets
for index, alvo in _ipairs (alvos._ActorTable) do
--print ("hello -> "..alvo.nome)
if (alvo.nome == jogador.nome) then
meus_agressores [#meus_agressores+1] = {id, alvo.total, este_agressor.nome}
for target_name, amount in _pairs (alvos) do
if (target_name == jogador.nome) then
meus_agressores [#meus_agressores+1] = {id, amount, este_agressor.nome}
end
end
end
end
end
_table_sort (meus_agressores, function (a, b) return a[2] > b[2] end)
_table_sort (meus_agressores, _detalhes.Sort2)
_GameTooltip:ClearLines()
_GameTooltip:AddLine (barra.texto_esquerdo:GetText())
@@ -952,7 +965,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
_bit_band (jogador.flag_original, 0x00000400) == 0
) then
local habilidades = jogador.spell_tables._ActorTable
local habilidades = jogador.spells._ActorTable
for id, habilidade in _pairs (habilidades) do
--if (habilidades_poll [id]) then
@@ -975,15 +988,15 @@ function EncounterDetails:OpenAndRefresh (_, segment)
--> pega os alvos e adiciona ao [2]
local alvos = habilidade.targets
for index, jogador in _ipairs (alvos._ActorTable) do
for target_name, amount in _pairs (alvos) do
--> ele tem o nome do jogador, vamos ver se este alvo é realmente um jogador verificando na tabela do combate
local tabela_dano_do_jogador = DamageContainer._ActorTable [DamageContainer._NameIndexTable [jogador.nome]]
local tabela_dano_do_jogador = DamageContainer._ActorTable [DamageContainer._NameIndexTable [target_name]]
if (tabela_dano_do_jogador and tabela_dano_do_jogador.grupo) then
if (not esta_habilidade[2] [jogador.nome]) then
esta_habilidade[2] [jogador.nome] = {0, tabela_dano_do_jogador.classe}
if (not esta_habilidade[2] [target_name]) then
esta_habilidade[2] [target_name] = {0, tabela_dano_do_jogador.classe}
end
esta_habilidade[2] [jogador.nome] [1] = esta_habilidade[2] [jogador.nome] [1] + jogador.total
esta_habilidade[2] [target_name] [1] = esta_habilidade[2] [target_name] [1] + amount
end
end
--end
@@ -991,7 +1004,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
elseif (have_pool) then
--> check if the spell id is in the spell poll.
local habilidades = jogador.spell_tables._ActorTable
local habilidades = jogador.spells._ActorTable
for id, habilidade in _pairs (habilidades) do
if (habilidades_poll [id]) then
@@ -1014,15 +1027,15 @@ function EncounterDetails:OpenAndRefresh (_, segment)
--> pega os alvos e adiciona ao [2]
local alvos = habilidade.targets
for index, jogador in _ipairs (alvos._ActorTable) do
for target_name, amount in _pairs (alvos) do
--> ele tem o nome do jogador, vamos ver se este alvo é realmente um jogador verificando na tabela do combate
local tabela_dano_do_jogador = DamageContainer._ActorTable [DamageContainer._NameIndexTable [jogador.nome]]
local tabela_dano_do_jogador = DamageContainer._ActorTable [DamageContainer._NameIndexTable [target_name]]
if (tabela_dano_do_jogador and tabela_dano_do_jogador.grupo) then
if (not esta_habilidade[2] [jogador.nome]) then
esta_habilidade[2] [jogador.nome] = {0, tabela_dano_do_jogador.classe}
if (not esta_habilidade[2] [target_name]) then
esta_habilidade[2] [target_name] = {0, tabela_dano_do_jogador.classe}
end
esta_habilidade[2] [jogador.nome] [1] = esta_habilidade[2] [jogador.nome] [1] + jogador.total
esta_habilidade[2] [target_name] [1] = esta_habilidade[2] [target_name] [1] + amount
end
end
end
@@ -1139,46 +1152,35 @@ function EncounterDetails:OpenAndRefresh (_, segment)
tabela.total = jogador.total
--> em quem ele deu dano
for _, alvo in _ipairs (jogador.targets._ActorTable) do
--local este_jogador = DamageContainer._ActorTable [DamageContainer._NameIndexTable [alvo.nome]]
local este_jogador = _combat_object (1, alvo.nome)
for target_name, amount in _pairs (jogador.targets) do
local este_jogador = _combat_object (1, target_name)
if (este_jogador) then
if (este_jogador.classe ~= "PET" and este_jogador.classe ~= "UNGROUPPLAYER" and este_jogador.classe ~= "UNKNOW") then
tabela.dano_em [#tabela.dano_em +1] = {alvo.nome, alvo.total, este_jogador.classe}
tabela.dano_em_total = tabela.dano_em_total + alvo.total
tabela.dano_em [#tabela.dano_em +1] = {target_name, amount, este_jogador.classe}
tabela.dano_em_total = tabela.dano_em_total + amount
end
else
--print ("actor not found: " ..alvo.nome )
end
end
_table_sort (tabela.dano_em, function(a, b) return a[2] > b[2] end)
_table_sort (tabela.dano_em, _detalhes.Sort2)
--> quem deu dano nele
for agressor, _ in _pairs (jogador.damage_from) do
--local este_jogador = DamageContainer._ActorTable [DamageContainer._NameIndexTable [agressor]]
local este_jogador = _combat_object (1, agressor)
if (este_jogador and este_jogador:IsPlayer()) then
for _, alvo in _ipairs (este_jogador.targets._ActorTable) do
if (alvo.nome == nome) then
tabela.damage_from [#tabela.damage_from+1] = {agressor, alvo.total, este_jogador.classe}
tabela.damage_from_total = tabela.damage_from_total + alvo.total
for target_name, amount in _pairs (este_jogador.targets) do
if (target_name == nome) then
tabela.damage_from [#tabela.damage_from+1] = {agressor, amount, este_jogador.classe}
tabela.damage_from_total = tabela.damage_from_total + amount
end
end
end
end
_table_sort (tabela.damage_from,
function (a, b)
if (a[3] ~= "PET" and b[3] ~= "PET") then
return a[2] > b[2]
elseif (a[3] == "PET" and b[3] ~= "PET") then
return false
elseif (a[3] ~= "PET" and b[3] == "PET") then
return true
else
return a[2] > b[2]
end
end)
_table_sort (tabela.damage_from, sort_damage_from)
tinsert (adds, tabela)
end
@@ -1254,7 +1256,9 @@ function EncounterDetails:OpenAndRefresh (_, segment)
local index = 1
quantidade = 0
table.sort (adds, function (t1, t2) return t1.nome < t2.nome end)
table.sort (adds, sort_by_name)
for index, esta_tabela in _ipairs (adds) do
@@ -1395,7 +1399,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
for spellid, tabela in _pairs (habilidades_interrompidas) do
tabela_em_ordem [#tabela_em_ordem+1] = tabela
end
_table_sort (tabela_em_ordem, function (a, b) return a[2] > b[2] end)
_table_sort (tabela_em_ordem, _detalhes.Sort2)
index = 1
@@ -1417,8 +1421,8 @@ function EncounterDetails:OpenAndRefresh (_, segment)
local successful = 0
--> pegar quantas vezes a magia passou com sucesso.
for _, enemy_actor in _ipairs (DamageContainer._ActorTable) do
if (enemy_actor.spell_tables._ActorTable [spellid]) then
local spell = enemy_actor.spell_tables._ActorTable [spellid]
if (enemy_actor.spells._ActorTable [spellid]) then
local spell = enemy_actor.spells._ActorTable [spellid]
successful = spell.successful_casted
end
end
@@ -1509,7 +1513,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
for spellid, tabela in _pairs (habilidades_dispeladas) do
tabela_em_ordem [#tabela_em_ordem+1] = tabela
end
_table_sort (tabela_em_ordem, function (a, b) return a[2] > b[2] end)
_table_sort (tabela_em_ordem, _detalhes.Sort2)
index = 1
@@ -1568,7 +1572,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
quantidade = 0
-- boss_info.spell_tables_info o erro de lua do boss é a habilidade dele que não foi declarada ainda
-- boss_info.spells_info o erro de lua do boss é a habilidade dele que não foi declarada ainda
local mortes = _combat_object.last_events_tables
local habilidades_info = boss_info and boss_info.spell_mechanics or {} --barra.extra pega esse cara aqui --> então esse erro é das habilidades que não tao
Binary file not shown.
@@ -257,7 +257,7 @@ local throne_of_thunder = {
local actorList = combat:GetActorList (DETAILS_ATTRIBUTE_DAMAGE)
for _, actor in ipairs (actorList) do
local TwistedFate = actor.spell_tables:GetSpell (137972) --> twisted fate adds spell
local TwistedFate = actor.spells:GetSpell (137972) --> twisted fate adds spell
if (TwistedFate) then
if (not actor.lastTwistedFate) then
actor.lastTwistedFate = 0
+18 -67
View File
@@ -3,7 +3,6 @@
if (
-- version 1.21.0
not _G._detalhes.atributo_custom.damagedoneTooltip or
not _G._detalhes.atributo_custom.damagetakenTooltip or
not _G._detalhes.atributo_custom.healdoneTooltip
) then
@@ -313,13 +312,10 @@ function _G._detalhes:Start()
_detalhes:FillUserCustomSpells()
_detalhes:AddDefaultCustomDisplays()
if (_detalhes_database.last_realversion and _detalhes_database.last_realversion < 31 and enable_reset_warning) then
for index, custom in ipairs (_detalhes.custom) do
if (custom.name == Loc ["STRING_CUSTOM_POT_DEFAULT"]) then
-- only on 14/11/2014
--_detalhes.atributo_custom:RemoveCustom (index)
break
end
--> Reset for the new structure
if (_detalhes_database.last_realversion and _detalhes_database.last_realversion < 43 and enable_reset_warning) then
for i = 1, #_detalhes.custom do
_detalhes.atributo_custom:RemoveCustom (i)
end
_detalhes:AddDefaultCustomDisplays()
end
@@ -436,7 +432,7 @@ function _G._detalhes:Start()
--> get in the realm chat channel
if (not _detalhes.schedule_chat_enter and not _detalhes.schedule_chat_leave) then
_detalhes.schedule_chat_enter = _detalhes:ScheduleTimer ("EnterChatChannel", 30)
_detalhes:ScheduleTimer ("CheckChatOnZoneChange", 60)
end
--> open profiler
@@ -495,70 +491,25 @@ function _G._detalhes:Start()
real_time_frame:SetScript ("OnUpdate", function (self, elapsed)
if (_detalhes.in_combat and instance.atributo == 1 and instance.sub_atributo == 1) then
for i = 1, instance:GetNumRows() do
local row = instance:GetRow (index)
if (row:IsShown()) then
local row = instance:GetRow (i)
if (row and row:IsShown()) then
local actor = row.minha_tabela
local right_text = row.texto_direita
if (actor) then
local dps_text = row.ps_text
if (dps_text) then
local new_dps = math.floor (actor.total / actor:Tempo())
local formated_dps = _detalhes.ToKFunctions [_detalhes.ps_abbreviation] (_, new_dps)
row.texto_direita:SetText (row.texto_direita:GetText():gsub (dps_text, formated_dps))
row.ps_text = formated_dps
end
end
end
end
end
end)
--]]
--WOD Spell Test
--[[
local f = CreateFrame ("frame")
f:SetSize (400, 600)
f:SetPoint ("center", UIParent)
local invalid_spells = {}
local amt = 0
--for spellid, class in pairs (_detalhes.ClassSpellList) do
--for spellid, class in pairs (_detalhes.CrowdControlSpells) do
--for spellid, class in pairs (_detalhes.AbsorbSpells) do
--for spellid, class in pairs (_detalhes.DefensiveCooldownSpellsNoBuff) do
--for spellid, class in pairs (_detalhes.DefensiveCooldownSpells) do
--for spellid, class in pairs (_detalhes.HarmfulSpells) do
--for spellid, class in pairs (_detalhes.MiscClassSpells) do
--for spellid, class in pairs (_detalhes.DualSideSpells) do
--for spellid, class in pairs (_detalhes.AttackCooldownSpells) do
for spellid, class in pairs (_detalhes.HelpfulSpells) do
local name = GetSpellInfo (spellid)
if (not name) then
invalid_spells [spellid] = class
amt = amt + 1
local edit = _detalhes.gump:NewTextEntry (f, f, "box"..amt, nil, 150, 12)
edit:SetPoint ("topleft", f, "topleft", 10, amt*13*-1)
edit:SetText (spellid)
edit:SetHook ("OnEditFocusGained", function()
edit:HighlightText()
end)
end
end
print ("Spells Invalid:", amt)
--]]
--[[
local parser = CreateFrame ("frame")
parser:RegisterEvent ("COMBAT_LOG_EVENT_UNFILTERED")
parser:SetScript ("OnEvent", function (self, evento, time, token, ...)
if (token == "SPELL_AURA_APPLIED") then
print (...)
end
end)
--]]
end