- Auras and Voidzones rework: now shows the total damage, dps and percentage. Also fixed its tooltip where many times the damage applied on players was showing as zero.
- Enemies now show damage taken from players on the tooltip. - Right clicking an Enemy Real-Time Damage Taken bar, back to enemies instead of showing bookmark panel. - Enemy Real-Time Damage Taken now show spells used by the player on its tooltip. - Fixed a bug with the slash command show, where it was ignoring the window limit estabilished on options panel. - Fixed few bugs with scroll bars on dropdowns and player details window. - Tank comparison percentages now uses the same percentage calc as comparison for players.
This commit is contained in:
@@ -223,7 +223,11 @@
|
||||
cooldowns_defensive = 0, --> armazena quantos cooldowns a raid usou
|
||||
buff_uptime = 0, --> armazena quantos cooldowns a raid usou
|
||||
debuff_uptime = 0 --> armazena quantos cooldowns a raid usou
|
||||
}
|
||||
},
|
||||
|
||||
--> avoid using this values bellow, they aren't updated by the parser, only on demand by a user interaction.
|
||||
voidzone_damage = 0,
|
||||
--> end
|
||||
}
|
||||
|
||||
esta_tabela.totals_grupo = {
|
||||
|
||||
+205
-562
@@ -51,124 +51,225 @@
|
||||
|
||||
local ToKFunctions = _detalhes.ToKFunctions
|
||||
local SelectedToKFunction = ToKFunctions [1]
|
||||
local UsingCustomRightText = false
|
||||
local UsingCustomLeftText = false
|
||||
local FormatTooltipNumber = ToKFunctions [8]
|
||||
local TooltipMaximizedMethod = 1
|
||||
local UsingCustomRightText = false
|
||||
local UsingCustomLeftText = false
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> core
|
||||
|
||||
function atributo_custom:GetCombatContainerIndex (attribute)
|
||||
return combat_containers [attribute]
|
||||
end
|
||||
|
||||
function atributo_custom:RefreshWindow (instance, combat, force, export)
|
||||
|
||||
--> get the custom object
|
||||
local custom_object = instance:GetCustomObject()
|
||||
|
||||
if (not custom_object) then
|
||||
return instance:ResetAttribute()
|
||||
function atributo_custom:GetCombatContainerIndex (attribute)
|
||||
return combat_containers [attribute]
|
||||
end
|
||||
|
||||
--> save the custom name in the instance
|
||||
instance.customName = custom_object:GetName()
|
||||
|
||||
--> get the container holding the custom actor objects for this instance
|
||||
local instance_container = atributo_custom:GetInstanceCustomActorContainer (instance)
|
||||
|
||||
local last_shown = atributo_custom._InstanceLastCustomShown [instance:GetId()]
|
||||
if (last_shown and last_shown ~= custom_object:GetName()) then
|
||||
instance_container:WipeCustomActorContainer()
|
||||
end
|
||||
atributo_custom._InstanceLastCustomShown [instance:GetId()] = custom_object:GetName()
|
||||
|
||||
local last_combat_shown = atributo_custom._InstanceLastCombatShown [instance:GetId()]
|
||||
if (last_combat_shown and last_combat_shown ~= combat) then
|
||||
instance_container:WipeCustomActorContainer()
|
||||
end
|
||||
atributo_custom._InstanceLastCombatShown [instance:GetId()] = combat
|
||||
|
||||
--> declare the main locals
|
||||
local total = 0
|
||||
local top = 0
|
||||
local amount = 0
|
||||
|
||||
--> check if is a custom script
|
||||
if (custom_object:IsScripted()) then
|
||||
function atributo_custom:RefreshWindow (instance, combat, force, export)
|
||||
|
||||
--> be save reseting the values on every refresh
|
||||
instance_container:ResetCustomActorContainer()
|
||||
|
||||
local func
|
||||
if (_detalhes.custom_function_cache [instance.customName]) then
|
||||
func = _detalhes.custom_function_cache [instance.customName]
|
||||
else
|
||||
func = loadstring (custom_object.script)
|
||||
if (not func) then
|
||||
_detalhes.custom_function_cache [instance.customName] = func
|
||||
--> get the custom object
|
||||
local custom_object = instance:GetCustomObject()
|
||||
|
||||
if (not custom_object) then
|
||||
return instance:ResetAttribute()
|
||||
end
|
||||
|
||||
--> save the custom name in the instance
|
||||
instance.customName = custom_object:GetName()
|
||||
|
||||
--> get the container holding the custom actor objects for this instance
|
||||
local instance_container = atributo_custom:GetInstanceCustomActorContainer (instance)
|
||||
|
||||
local last_shown = atributo_custom._InstanceLastCustomShown [instance:GetId()]
|
||||
if (last_shown and last_shown ~= custom_object:GetName()) then
|
||||
instance_container:WipeCustomActorContainer()
|
||||
end
|
||||
atributo_custom._InstanceLastCustomShown [instance:GetId()] = custom_object:GetName()
|
||||
|
||||
local last_combat_shown = atributo_custom._InstanceLastCombatShown [instance:GetId()]
|
||||
if (last_combat_shown and last_combat_shown ~= combat) then
|
||||
instance_container:WipeCustomActorContainer()
|
||||
end
|
||||
atributo_custom._InstanceLastCombatShown [instance:GetId()] = combat
|
||||
|
||||
--> declare the main locals
|
||||
local total = 0
|
||||
local top = 0
|
||||
local amount = 0
|
||||
|
||||
--> check if is a custom script
|
||||
if (custom_object:IsScripted()) then
|
||||
|
||||
--> be save reseting the values on every refresh
|
||||
instance_container:ResetCustomActorContainer()
|
||||
|
||||
local func
|
||||
if (_detalhes.custom_function_cache [instance.customName]) then
|
||||
func = _detalhes.custom_function_cache [instance.customName]
|
||||
else
|
||||
func = loadstring (custom_object.script)
|
||||
if (not func) then
|
||||
_detalhes.custom_function_cache [instance.customName] = func
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (not func) then
|
||||
_detalhes:Msg (Loc ["STRING_CUSTOM_FUNC_INVALID"], func)
|
||||
_detalhes:EndRefresh (instance, 0, combat, combat [1])
|
||||
end
|
||||
|
||||
--> call the loop function
|
||||
total, top, amount = func (combat, instance_container, instance)
|
||||
|
||||
else
|
||||
--> get the attribute
|
||||
local attribute = custom_object:GetAttribute()
|
||||
|
||||
--> get the custom function (actor, source, target, spellid)
|
||||
local func = atributo_custom [attribute]
|
||||
|
||||
--> get the combat container
|
||||
local container_index = self:GetCombatContainerIndex (attribute)
|
||||
local combat_container = combat [container_index]._ActorTable
|
||||
|
||||
if (not func) then
|
||||
_detalhes:Msg (Loc ["STRING_CUSTOM_FUNC_INVALID"], func)
|
||||
_detalhes:EndRefresh (instance, 0, combat, combat [1])
|
||||
end
|
||||
|
||||
--> call the loop function
|
||||
total, top, amount = func (combat, instance_container, instance)
|
||||
|
||||
else
|
||||
--> get the attribute
|
||||
local attribute = custom_object:GetAttribute()
|
||||
|
||||
--> get the custom function (actor, source, target, spellid)
|
||||
local func = atributo_custom [attribute]
|
||||
|
||||
--> get the combat container
|
||||
local container_index = self:GetCombatContainerIndex (attribute)
|
||||
local combat_container = combat [container_index]._ActorTable
|
||||
|
||||
--> build container
|
||||
total, top, amount = atributo_custom:BuildActorList (func, custom_object.source, custom_object.target, custom_object.spellid, combat, combat_container, container_index, instance_container, instance, custom_object)
|
||||
--> build container
|
||||
total, top, amount = atributo_custom:BuildActorList (func, custom_object.source, custom_object.target, custom_object.spellid, combat, combat_container, container_index, instance_container, instance, custom_object)
|
||||
|
||||
end
|
||||
|
||||
if (custom_object:IsSpellTarget()) then
|
||||
amount = atributo_custom._TargetActorsProcessedAmt
|
||||
total = atributo_custom._TargetActorsProcessedTotal
|
||||
top = atributo_custom._TargetActorsProcessedTop
|
||||
end
|
||||
|
||||
if (amount == 0) then
|
||||
if (force) then
|
||||
if (instance:IsGroupMode()) then
|
||||
for i = 1, instance.rows_fit_in_window do
|
||||
gump:Fade (instance.barras [i], "in", 0.3)
|
||||
end
|
||||
end
|
||||
end
|
||||
instance:EsconderScrollBar()
|
||||
return _detalhes:EndRefresh (instance, total, combat, combat [container_index])
|
||||
end
|
||||
|
||||
combat.totals [custom_object:GetName()] = total
|
||||
|
||||
instance_container:Sort()
|
||||
instance_container:Remap()
|
||||
|
||||
if (export) then
|
||||
return total, instance_container._ActorTable, top, amount
|
||||
end
|
||||
|
||||
instance:AtualizarScrollBar (amount)
|
||||
|
||||
atributo_custom:Refresh (instance, instance_container, combat, force, total, top)
|
||||
|
||||
return _detalhes:EndRefresh (instance, total, combat, combat [container_index])
|
||||
|
||||
end
|
||||
|
||||
if (custom_object:IsSpellTarget()) then
|
||||
amount = atributo_custom._TargetActorsProcessedAmt
|
||||
total = atributo_custom._TargetActorsProcessedTotal
|
||||
top = atributo_custom._TargetActorsProcessedTop
|
||||
end
|
||||
function atributo_custom:BuildActorList (func, source, target, spellid, combat, combat_container, container_index, instance_container, instance, custom_object)
|
||||
|
||||
if (amount == 0) then
|
||||
if (force) then
|
||||
if (instance:IsGroupMode()) then
|
||||
for i = 1, instance.rows_fit_in_window do
|
||||
gump:Fade (instance.barras [i], "in", 0.3)
|
||||
--> do the loop
|
||||
|
||||
local total = 0
|
||||
local top = 0
|
||||
local amount = 0
|
||||
|
||||
--> check if is a spell target custom
|
||||
if (custom_object:IsSpellTarget()) then
|
||||
table.wipe (atributo_custom._TargetActorsProcessed)
|
||||
atributo_custom._TargetActorsProcessedAmt = 0
|
||||
atributo_custom._TargetActorsProcessedTotal = 0
|
||||
atributo_custom._TargetActorsProcessedTop = 0
|
||||
instance_container:ResetCustomActorContainer()
|
||||
end
|
||||
|
||||
if (source == "[all]") then
|
||||
|
||||
for _, actor in _ipairs (combat_container) do
|
||||
local actortotal = func (_, actor, source, target, spellid, combat, instance_container)
|
||||
if (actortotal > 0) then
|
||||
total = total + actortotal
|
||||
amount = amount + 1
|
||||
|
||||
if (actortotal > top) then
|
||||
top = actortotal
|
||||
end
|
||||
|
||||
instance_container:SetValue (actor, actortotal)
|
||||
end
|
||||
end
|
||||
|
||||
elseif (source == "[raid]") then
|
||||
|
||||
if (_detalhes.in_combat and instance.segmento == 0 and not export) then
|
||||
if (container_index == 1) then
|
||||
combat_container = _detalhes.cache_damage_group
|
||||
elseif (container_index == 2) then
|
||||
combat_container = _detalhes.cache_healing_group
|
||||
end
|
||||
end
|
||||
|
||||
for _, actor in _ipairs (combat_container) do
|
||||
if (actor.grupo) then
|
||||
local actortotal = func (_, actor, source, target, spellid, combat, instance_container)
|
||||
|
||||
if (actortotal > 0) then
|
||||
total = total + actortotal
|
||||
amount = amount + 1
|
||||
|
||||
if (actortotal > top) then
|
||||
top = actortotal
|
||||
end
|
||||
|
||||
instance_container:SetValue (actor, actortotal)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
elseif (source == "[player]") then
|
||||
local pindex = combat [container_index]._NameIndexTable [_detalhes.playername]
|
||||
if (pindex) then
|
||||
local actor = combat [container_index]._ActorTable [pindex]
|
||||
local actortotal = func (_, actor, source, target, spellid, combat, instance_container)
|
||||
|
||||
if (actortotal > 0) then
|
||||
total = total + actortotal
|
||||
amount = amount + 1
|
||||
|
||||
if (actortotal > top) then
|
||||
top = actortotal
|
||||
end
|
||||
|
||||
instance_container:SetValue (actor, actortotal)
|
||||
end
|
||||
end
|
||||
else
|
||||
|
||||
local pindex = combat [container_index]._NameIndexTable [source]
|
||||
if (pindex) then
|
||||
local actor = combat [container_index]._ActorTable [pindex]
|
||||
local actortotal = func (_, actor, source, target, spellid, combat, instance_container)
|
||||
|
||||
if (actortotal > 0) then
|
||||
total = total + actortotal
|
||||
amount = amount + 1
|
||||
|
||||
if (actortotal > top) then
|
||||
top = actortotal
|
||||
end
|
||||
|
||||
instance_container:SetValue (actor, actortotal)
|
||||
end
|
||||
end
|
||||
end
|
||||
instance:EsconderScrollBar()
|
||||
return _detalhes:EndRefresh (instance, total, combat, combat [container_index])
|
||||
|
||||
return total, top, amount
|
||||
end
|
||||
|
||||
combat.totals [custom_object:GetName()] = total
|
||||
|
||||
instance_container:Sort()
|
||||
instance_container:Remap()
|
||||
|
||||
if (export) then
|
||||
return total, instance_container._ActorTable, top, amount
|
||||
end
|
||||
|
||||
instance:AtualizarScrollBar (amount)
|
||||
|
||||
atributo_custom:Refresh (instance, instance_container, combat, force, total, top)
|
||||
|
||||
return _detalhes:EndRefresh (instance, total, combat, combat [container_index])
|
||||
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> refresh functions
|
||||
@@ -272,468 +373,8 @@ end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function atributo_custom:BuildActorList (func, source, target, spellid, combat, combat_container, container_index, instance_container, instance, custom_object)
|
||||
|
||||
--> do the loop
|
||||
|
||||
local total = 0
|
||||
local top = 0
|
||||
local amount = 0
|
||||
|
||||
--> check if is a spell target custom
|
||||
if (custom_object:IsSpellTarget()) then
|
||||
table.wipe (atributo_custom._TargetActorsProcessed)
|
||||
atributo_custom._TargetActorsProcessedAmt = 0
|
||||
atributo_custom._TargetActorsProcessedTotal = 0
|
||||
atributo_custom._TargetActorsProcessedTop = 0
|
||||
instance_container:ResetCustomActorContainer()
|
||||
end
|
||||
|
||||
if (source == "[all]") then
|
||||
|
||||
for _, actor in _ipairs (combat_container) do
|
||||
local actortotal = func (_, actor, source, target, spellid, combat, instance_container)
|
||||
if (actortotal > 0) then
|
||||
total = total + actortotal
|
||||
amount = amount + 1
|
||||
|
||||
if (actortotal > top) then
|
||||
top = actortotal
|
||||
end
|
||||
|
||||
instance_container:SetValue (actor, actortotal)
|
||||
end
|
||||
end
|
||||
|
||||
elseif (source == "[raid]") then
|
||||
|
||||
if (_detalhes.in_combat and instance.segmento == 0 and not export) then
|
||||
if (container_index == 1) then
|
||||
combat_container = _detalhes.cache_damage_group
|
||||
elseif (container_index == 2) then
|
||||
combat_container = _detalhes.cache_healing_group
|
||||
end
|
||||
end
|
||||
|
||||
for _, actor in _ipairs (combat_container) do
|
||||
if (actor.grupo) then
|
||||
local actortotal = func (_, actor, source, target, spellid, combat, instance_container)
|
||||
|
||||
if (actortotal > 0) then
|
||||
total = total + actortotal
|
||||
amount = amount + 1
|
||||
|
||||
if (actortotal > top) then
|
||||
top = actortotal
|
||||
end
|
||||
|
||||
instance_container:SetValue (actor, actortotal)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
elseif (source == "[player]") then
|
||||
local pindex = combat [container_index]._NameIndexTable [_detalhes.playername]
|
||||
if (pindex) then
|
||||
local actor = combat [container_index]._ActorTable [pindex]
|
||||
local actortotal = func (_, actor, source, target, spellid, combat, instance_container)
|
||||
|
||||
if (actortotal > 0) then
|
||||
total = total + actortotal
|
||||
amount = amount + 1
|
||||
|
||||
if (actortotal > top) then
|
||||
top = actortotal
|
||||
end
|
||||
|
||||
instance_container:SetValue (actor, actortotal)
|
||||
end
|
||||
end
|
||||
else
|
||||
|
||||
local pindex = combat [container_index]._NameIndexTable [source]
|
||||
if (pindex) then
|
||||
local actor = combat [container_index]._ActorTable [pindex]
|
||||
local actortotal = func (_, actor, source, target, spellid, combat, instance_container)
|
||||
|
||||
if (actortotal > 0) then
|
||||
total = total + actortotal
|
||||
amount = amount + 1
|
||||
|
||||
if (actortotal > top) then
|
||||
top = actortotal
|
||||
end
|
||||
|
||||
instance_container:SetValue (actor, actortotal)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return total, top, amount
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> attributes functions
|
||||
|
||||
--> damage done
|
||||
function atributo_custom:damagedoneTooltip (actor, target, spellid, combat, instance)
|
||||
|
||||
if (spellid) then
|
||||
|
||||
if (instance:GetCustomObject():IsSpellTarget()) then
|
||||
local targetname = actor.nome
|
||||
local this_actor = combat (1, targetname)
|
||||
|
||||
if (this_actor) then
|
||||
for name, _ in _pairs (this_actor.damage_from) do
|
||||
local aggressor = combat (1, name)
|
||||
if (aggressor) then
|
||||
local spell = aggressor.spell_tables._ActorTable [spellid]
|
||||
if (spell) then
|
||||
local on_me = spell.targets._NameIndexTable [targetname]
|
||||
if (on_me) then
|
||||
on_me = spell.targets._ActorTable [on_me]
|
||||
GameCooltip:AddLine (aggressor.nome, FormatTooltipNumber (_, on_me.total))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return
|
||||
else
|
||||
local name, _, icon = _GetSpellInfo (spellid)
|
||||
GameCooltip:AddLine (name)
|
||||
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
|
||||
|
||||
GameCooltip:AddLine (Loc ["STRING_DAMAGE"] .. ": ", spell.total)
|
||||
GameCooltip:AddLine (Loc ["STRING_HITS"] .. ": ", spell.counter)
|
||||
GameCooltip:AddLine (Loc ["STRING_CRITICAL_HITS"] .. ": ", spell.c_amt)
|
||||
end
|
||||
|
||||
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))
|
||||
_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))
|
||||
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))
|
||||
end
|
||||
else
|
||||
local targetactor = actor.targets._NameIndexTable [target]
|
||||
if (targetactor) then
|
||||
targetactor = actor.targets._ActorTable [targetactor]
|
||||
GameCooltip:AddLine (target, FormatTooltipNumber (_, targetactor.total))
|
||||
end
|
||||
end
|
||||
|
||||
else
|
||||
actor:ToolTip_DamageDone (instance)
|
||||
end
|
||||
end
|
||||
|
||||
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 (spell) then
|
||||
if (target) then
|
||||
if (target == "[all]") then
|
||||
for _, targetactor in _ipairs (spell.targets._ActorTable) do
|
||||
--> add amount
|
||||
instance_container:AddValue (targetactor, targetactor.total, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
|
||||
--> add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
|
||||
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
|
||||
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
|
||||
end
|
||||
end
|
||||
return 0, true
|
||||
|
||||
elseif (target == "[raid]") then
|
||||
local roster = combat.raid_roster
|
||||
for _, targetactor in _ipairs (spell.targets._ActorTable) do
|
||||
if (roster [targetactor.nome]) then
|
||||
--> add amount
|
||||
instance_container:AddValue (targetactor, targetactor.total, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
|
||||
--> add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
|
||||
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
|
||||
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
return 0, true
|
||||
|
||||
elseif (target == "[player]") then
|
||||
local targetactor = spell.targets._NameIndexTable [_detalhes.playername]
|
||||
if (targetactor) then
|
||||
targetactor = spell.targets._ActorTable [targetactor]
|
||||
--> add amount
|
||||
instance_container:AddValue (targetactor, targetactor.total, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
|
||||
--> add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
|
||||
atributo_custom._TargetActorsProcessed [targetactor.nome] = 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]
|
||||
--> add amount
|
||||
instance_container:AddValue (targetactor, targetactor.total, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
|
||||
--> add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
|
||||
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
|
||||
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
|
||||
end
|
||||
end
|
||||
return 0, true
|
||||
end
|
||||
else
|
||||
return spell.total
|
||||
end
|
||||
else
|
||||
return 0
|
||||
end
|
||||
|
||||
elseif (target) then
|
||||
|
||||
if (target == "[all]") then
|
||||
return actor.targets:GetTotal()
|
||||
|
||||
elseif (target == "[raid]") then
|
||||
return actor.targets:GetTotalOnRaid (nil, combat)
|
||||
|
||||
elseif (target == "[player]") then
|
||||
local targetactor = actor.targets._NameIndexTable [_detalhes.playername]
|
||||
if (targetactor) then
|
||||
return actor.targets._ActorTable [targetactor].total
|
||||
else
|
||||
return 0
|
||||
end
|
||||
|
||||
else
|
||||
local targetactor = actor.targets._NameIndexTable [target]
|
||||
if (targetactor) then
|
||||
return actor.targets._ActorTable [targetactor].total
|
||||
else
|
||||
return 0
|
||||
end
|
||||
end
|
||||
else
|
||||
return actor.total or 0
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--> healing done
|
||||
|
||||
function atributo_custom:healdoneTooltip (actor, target, spellid, combat, instance)
|
||||
|
||||
if (spellid) then
|
||||
|
||||
if (instance:GetCustomObject():IsSpellTarget()) then
|
||||
local targetname = actor.nome
|
||||
local this_actor = combat (2, targetname)
|
||||
|
||||
if (this_actor) then
|
||||
for name, _ in _pairs (this_actor.healing_from) do
|
||||
local healer = combat (2, name)
|
||||
if (healer) then
|
||||
local spell = healer.spell_tables._ActorTable [spellid]
|
||||
if (spell) then
|
||||
local on_me = spell.targets._NameIndexTable [targetname]
|
||||
if (on_me) then
|
||||
on_me = spell.targets._ActorTable [on_me]
|
||||
GameCooltip:AddLine (healer.nome, FormatTooltipNumber (_, on_me.total))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return
|
||||
else
|
||||
local name, _, icon = _GetSpellInfo (spellid)
|
||||
GameCooltip:AddLine (name)
|
||||
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
|
||||
|
||||
GameCooltip:AddLine (Loc ["STRING_HEAL"] .. ": ", spell.total)
|
||||
GameCooltip:AddLine (Loc ["STRING_HITS"] .. ": ", spell.counter)
|
||||
GameCooltip:AddLine (Loc ["STRING_CRITICAL_HITS"] .. ": ", spell.c_amt)
|
||||
end
|
||||
|
||||
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))
|
||||
_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))
|
||||
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))
|
||||
end
|
||||
else
|
||||
local targetactor = actor.targets._NameIndexTable [target]
|
||||
if (targetactor) then
|
||||
targetactor = actor.targets._ActorTable [targetactor]
|
||||
GameCooltip:AddLine (target, FormatTooltipNumber (_, targetactor.total))
|
||||
end
|
||||
end
|
||||
|
||||
else
|
||||
actor:ToolTip_DamageDone (instance)
|
||||
end
|
||||
end
|
||||
|
||||
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]
|
||||
if (spell) then
|
||||
if (target) then
|
||||
if (target == "[all]") then
|
||||
for _, targetactor in _ipairs (spell.targets._ActorTable) do
|
||||
--> add amount
|
||||
instance_container:AddValue (targetactor, targetactor.total, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
|
||||
--> add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
|
||||
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
|
||||
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
|
||||
end
|
||||
end
|
||||
return 0, true
|
||||
|
||||
elseif (target == "[raid]") then
|
||||
local roster = combat.raid_roster
|
||||
for _, targetactor in _ipairs (spell.targets._ActorTable) do
|
||||
if (roster [targetactor.nome]) then
|
||||
--> add amount
|
||||
instance_container:AddValue (targetactor, targetactor.total, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
|
||||
--> add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
|
||||
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
|
||||
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
return 0, true
|
||||
|
||||
elseif (target == "[player]") then
|
||||
local targetactor = spell.targets._NameIndexTable [_detalhes.playername]
|
||||
if (targetactor) then
|
||||
targetactor = spell.targets._ActorTable [targetactor]
|
||||
--> add amount
|
||||
instance_container:AddValue (targetactor, targetactor.total, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
|
||||
--> add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
|
||||
atributo_custom._TargetActorsProcessed [targetactor.nome] = 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]
|
||||
--> add amount
|
||||
instance_container:AddValue (targetactor, targetactor.total, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
|
||||
--> add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
|
||||
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
|
||||
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
|
||||
end
|
||||
end
|
||||
return 0, true
|
||||
end
|
||||
else
|
||||
return spell.total
|
||||
end
|
||||
else
|
||||
return 0
|
||||
end
|
||||
|
||||
elseif (target) then
|
||||
|
||||
if (target == "[all]") then
|
||||
return actor.targets:GetTotal()
|
||||
|
||||
elseif (target == "[raid]") then
|
||||
return actor.targets:GetTotalOnRaid (nil, combat)
|
||||
|
||||
elseif (target == "[player]") then
|
||||
local targetactor = actor.targets._NameIndexTable [_detalhes.playername]
|
||||
if (targetactor) then
|
||||
return actor.targets._ActorTable [targetactor].total
|
||||
else
|
||||
return 0
|
||||
end
|
||||
|
||||
else
|
||||
local targetactor = actor.targets._NameIndexTable [target]
|
||||
if (targetactor) then
|
||||
return actor.targets._ActorTable [targetactor].total
|
||||
else
|
||||
return 0
|
||||
end
|
||||
end
|
||||
else
|
||||
return actor.total or 0
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> custom object functions
|
||||
|
||||
@@ -964,7 +605,7 @@ end
|
||||
|
||||
function atributo_custom:ResetCustomActorContainer()
|
||||
for _, actor in _ipairs (self._ActorTable) do
|
||||
actor.value = _detalhes:GetAlphabeticalOrderNumber (actor.nome)
|
||||
actor.value = _detalhes:GetOrderNumber (actor.nome)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1004,7 +645,7 @@ end
|
||||
local new_actor = _setmetatable ({
|
||||
nome = actor.nome,
|
||||
classe = actor.classe,
|
||||
value = _detalhes:GetAlphabeticalOrderNumber (actor.nome),
|
||||
value = _detalhes:GetOrderNumber (actor.nome),
|
||||
}, atributo_custom.mt)
|
||||
|
||||
new_actor.displayName = new_actor.nome
|
||||
@@ -1231,9 +872,11 @@ end
|
||||
SelectedToKFunction = ToKFunctions [_detalhes.ps_abbreviation]
|
||||
FormatTooltipNumber = ToKFunctions [_detalhes.tooltip.abbreviation]
|
||||
TooltipMaximizedMethod = _detalhes.tooltip.maximize_method
|
||||
atributo_custom:UpdateDamageDoneBracket()
|
||||
atributo_custom:UpdateHealingDoneBracket()
|
||||
atributo_custom:UpdateDamageTakenBracket()
|
||||
end
|
||||
|
||||
|
||||
function _detalhes:AddDefaultCustomDisplays()
|
||||
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
|
||||
+139
-28
@@ -184,6 +184,16 @@
|
||||
GameCooltip:AddLine (Loc ["STRING_LEFT_CLICK_SHARE"])
|
||||
return true
|
||||
end
|
||||
|
||||
--[[ Void Zone Sort]]
|
||||
local void_zone_sort = function (t1, t2)
|
||||
if (t1.damage == t2.damage) then
|
||||
return t1.nome <= t2.nome
|
||||
else
|
||||
return t1.damage > t2.damage
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--[[exported]] function _detalhes.Sort1 (table1, table2)
|
||||
return table1 [1] > table2 [1]
|
||||
@@ -237,7 +247,7 @@
|
||||
|
||||
function atributo_damage:NovaTabela (serial, nome, link)
|
||||
|
||||
local alphabetical = _detalhes:GetAlphabeticalOrderNumber (nome)
|
||||
local alphabetical = _detalhes:GetOrderNumber (nome)
|
||||
|
||||
--> constructor
|
||||
local _new_damageActor = {
|
||||
@@ -452,6 +462,8 @@
|
||||
esta_barra.texto_esquerdo:SetText (colocacao .. ". " .. tabela [1])
|
||||
esta_barra.texto_direita:SetText (tabela [2])
|
||||
|
||||
esta_barra.texto_esquerdo:SetSize (esta_barra:GetWidth() - esta_barra.texto_direita:GetStringWidth() - 20, 15)
|
||||
|
||||
if (colocacao == 1) then
|
||||
esta_barra.statusbar:SetValue (100)
|
||||
else
|
||||
@@ -598,8 +610,30 @@
|
||||
self.minha_barra = qual_barra
|
||||
esta_barra.colocacao = colocacao
|
||||
|
||||
local total = instancia.showing.totals.voidzone_damage
|
||||
|
||||
local combat_time = instancia.showing:GetCombatTime()
|
||||
local dps = _math_floor (self.damage / combat_time)
|
||||
|
||||
local formated_damage = SelectedToKFunction (_, self.damage)
|
||||
local formated_dps = SelectedToKFunction (_, dps)
|
||||
|
||||
local porcentagem
|
||||
|
||||
if (instancia.row_info.percent_type == 1) then
|
||||
porcentagem = _cstr ("%.1f", self.damage / total * 100)
|
||||
elseif (instancia.row_info.percent_type == 2) then
|
||||
porcentagem = _cstr ("%.1f", self.damage / instancia.top * 100)
|
||||
end
|
||||
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_damage, formated_dps, porcentagem, self))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (formated_damage .. " (" .. formated_dps .. ", " .. porcentagem .. "%)")
|
||||
end
|
||||
|
||||
esta_barra.texto_esquerdo:SetText (colocacao .. ". " .. self.nome)
|
||||
esta_barra.texto_direita:SetText (self.debuff_uptime)
|
||||
esta_barra.texto_esquerdo:SetSize (esta_barra:GetWidth() - esta_barra.texto_direita:GetStringWidth() - 20, 15)
|
||||
|
||||
esta_barra.statusbar:SetValue (100)
|
||||
|
||||
@@ -627,6 +661,7 @@
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> main refresh function
|
||||
|
||||
|
||||
function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, exportar, refresh_needed)
|
||||
|
||||
local showing = tabela_do_combate [class_type] --> o que esta sendo mostrado -> [1] - dano [2] - cura --> pega o container com ._NameIndexTable ._ActorTable
|
||||
@@ -774,22 +809,67 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
|
||||
local index = 0
|
||||
local misc_container = tabela_do_combate [4]
|
||||
local voidzone_damage_total = 0
|
||||
|
||||
for _, actor in _ipairs (misc_container._ActorTable) do
|
||||
if (actor.boss_debuff) then
|
||||
|
||||
index = index + 1
|
||||
|
||||
local twin_damage_actor = showing._NameIndexTable [actor.damage_twin]
|
||||
--pega no container de dano o actor responsável por aplicar o debuff
|
||||
local twin_damage_actor = showing._NameIndexTable [actor.damage_twin] or showing._NameIndexTable ["[*] " .. actor.damage_twin]
|
||||
|
||||
if (twin_damage_actor) then
|
||||
local index = twin_damage_actor
|
||||
twin_damage_actor = showing._ActorTable [twin_damage_actor]
|
||||
actor.damage = twin_damage_actor.total
|
||||
|
||||
local spell = twin_damage_actor.spell_tables._ActorTable [actor.damage_spellid]
|
||||
|
||||
if (spell) then
|
||||
|
||||
--> fix spell, sometimes there is two spells with the same name, one is the cast and other is the debuff
|
||||
if (spell.total == 0 and not actor.damage_spellid_fixed) then
|
||||
local curname = _GetSpellInfo (actor.damage_spellid)
|
||||
for spellid, spelltable in _pairs (twin_damage_actor.spell_tables._ActorTable) do
|
||||
if (spelltable.total > spell.total) then
|
||||
local name = _GetSpellInfo (spellid)
|
||||
if (name == curname) then
|
||||
actor.damage_spellid = spellid
|
||||
spell = spelltable
|
||||
end
|
||||
end
|
||||
end
|
||||
actor.damage_spellid_fixed = true
|
||||
end
|
||||
|
||||
actor.damage = spell.total
|
||||
voidzone_damage_total = voidzone_damage_total + spell.total
|
||||
|
||||
elseif (not actor.damage_spellid_fixed) then --not
|
||||
--> fix spell, if the spellid passed for debuff uptime is actully the spell id of a ability and not if the aura it self
|
||||
actor.damage_spellid_fixed = true
|
||||
local found = false
|
||||
for spellid, spelltable in _pairs (twin_damage_actor.spell_tables._ActorTable) do
|
||||
local name = _GetSpellInfo (spellid)
|
||||
if (actor.damage_twin:find (name)) then
|
||||
actor.damage = spelltable.total
|
||||
voidzone_damage_total = voidzone_damage_total + spelltable.total
|
||||
actor.damage_spellid = spellid
|
||||
found = true
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if (not found) then
|
||||
actor.damage = 0
|
||||
end
|
||||
else
|
||||
actor.damage = 0
|
||||
end
|
||||
else
|
||||
actor.damage = 0
|
||||
end
|
||||
|
||||
vtable [index] = actor
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -800,12 +880,8 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
end
|
||||
end
|
||||
|
||||
--print ("size: ", tsize)
|
||||
|
||||
if (tsize > 0 and vtable[1]) then
|
||||
_table_sort (vtable, function (t1, t2)
|
||||
return t1.damage > t2.damage
|
||||
end)
|
||||
_table_sort (vtable, void_zone_sort)
|
||||
instancia.top = vtable [1].damage
|
||||
end
|
||||
total = index
|
||||
@@ -819,6 +895,8 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
return _detalhes:EndRefresh (instancia, total, tabela_do_combate, showing) --> retorna a tabela que precisa ganhar o refresh
|
||||
end
|
||||
|
||||
tabela_do_combate.totals.voidzone_damage = voidzone_damage_total
|
||||
|
||||
--esta mostrando ALL então posso seguir o padrão correto? primeiro, atualiza a scroll bar...
|
||||
instancia:AtualizarScrollBar (total)
|
||||
|
||||
@@ -1509,9 +1587,9 @@ function atributo_damage:ToolTip (instancia, numero, barra, keydown)
|
||||
if (instancia.atributo == 5) then --> custom
|
||||
return self:TooltipForCustom (barra)
|
||||
else
|
||||
if (instancia.sub_atributo == 1 or instancia.sub_atributo == 2 or instancia.sub_atributo == 6) then --> damage done or Dps or enemy
|
||||
if (instancia.sub_atributo == 1 or instancia.sub_atributo == 2) then --> damage done or Dps or enemy
|
||||
return self:ToolTip_DamageDone (instancia, numero, barra, keydown)
|
||||
elseif (instancia.sub_atributo == 3) then --> damage taken
|
||||
elseif (instancia.sub_atributo == 3 or instancia.sub_atributo == 6) then --> damage taken
|
||||
return self:ToolTip_DamageTaken (instancia, numero, barra, keydown)
|
||||
elseif (instancia.sub_atributo == 4) then --> friendly fire
|
||||
return self:ToolTip_FriendlyFire (instancia, numero, barra, keydown)
|
||||
@@ -1749,7 +1827,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
|
||||
--> enemies
|
||||
if (instancia.sub_atributo == 6) then
|
||||
GameCooltip:AddLine (" ")
|
||||
GameCooltip:AddLine ("|cFFFFCC00middle button|r: real-time damage taken")
|
||||
GameCooltip:AddLine (Loc ["STRING_MIDDLECLICK_DAMAGETAKEN"])
|
||||
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, 16, 14/512, 64/512, 127/512, 204/512)
|
||||
end
|
||||
|
||||
@@ -1798,21 +1876,37 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown)
|
||||
ismaximized = true
|
||||
end
|
||||
|
||||
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_FROM"], headerColor, r, g, b, #meus_agressores)
|
||||
if (instancia.sub_atributo == 6) then
|
||||
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_DAMAGE_TAKEN_FROM"], headerColor, r, g, b, #meus_agressores)
|
||||
GameCooltip:AddIcon ([[Interface\Buttons\UI-MicroStream-Red]], 1, 1, 14, 14, 0.1875, 0.8125, 0.15625, 0.78125)
|
||||
else
|
||||
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_FROM"], headerColor, r, g, b, #meus_agressores)
|
||||
GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.126953125, 0.1796875, 0, 0.0546875)
|
||||
end
|
||||
|
||||
GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.126953125, 0.1796875, 0, 0.0546875)
|
||||
|
||||
if (ismaximized) then
|
||||
--highlight
|
||||
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay_press)
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, 1)
|
||||
if (instancia.sub_atributo == 6) then
|
||||
GameCooltip:AddStatusBar (100, 1, 0.7, g, b, 1)
|
||||
else
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, 1)
|
||||
end
|
||||
else
|
||||
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay)
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
if (instancia.sub_atributo == 6) then
|
||||
GameCooltip:AddStatusBar (100, 1, 0.7, 0, 0, barAlha)
|
||||
else
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
end
|
||||
end
|
||||
|
||||
for i = 1, max do
|
||||
GameCooltip:AddLine (meus_agressores[i][1]..": ", FormatTooltipNumber (_, meus_agressores[i][2]).." (".._cstr("%.1f", (meus_agressores[i][2]/damage_taken) * 100).."%)")
|
||||
if (ismaximized and meus_agressores[i][1]:find (_detalhes.playername)) then
|
||||
GameCooltip:AddLine (meus_agressores[i][1]..": ", FormatTooltipNumber (_, meus_agressores[i][2]).." (".._cstr("%.1f", (meus_agressores[i][2]/damage_taken) * 100).."%)", nil, "yellow")
|
||||
else
|
||||
GameCooltip:AddLine (meus_agressores[i][1]..": ", FormatTooltipNumber (_, meus_agressores[i][2]).." (".._cstr("%.1f", (meus_agressores[i][2]/damage_taken) * 100).."%)")
|
||||
end
|
||||
local classe = meus_agressores[i][3]
|
||||
|
||||
if (not classe) then
|
||||
@@ -1827,6 +1921,13 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown)
|
||||
_detalhes:AddTooltipBackgroundStatusbar()
|
||||
end
|
||||
|
||||
--> enemies
|
||||
if (instancia.sub_atributo == 6) then
|
||||
GameCooltip:AddLine (" ")
|
||||
GameCooltip:AddLine (Loc ["STRING_MIDDLECLICK_DAMAGETAKEN"])
|
||||
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, 16, 14/512, 64/512, 127/512, 204/512)
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -2893,20 +2994,15 @@ function atributo_damage:MontaTooltipDamageTaken (esta_barra, index)
|
||||
end
|
||||
|
||||
function atributo_damage: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 habilidades = {}
|
||||
--local total = self.total_without_pet
|
||||
local total = self.total
|
||||
|
||||
for spellid, tabela in _pairs (container) do
|
||||
--> tabela = classe_damage_habilidade
|
||||
local alvos = tabela.targets._ActorTable
|
||||
for _, tabela in _ipairs (alvos) do
|
||||
--> tabela = classe_target
|
||||
if (tabela.nome == inimigo) then
|
||||
local nome, _, icone = _GetSpellInfo (spellid)
|
||||
habilidades [#habilidades+1] = {nome, tabela.total, icone}
|
||||
@@ -2920,9 +3016,14 @@ function atributo_damage:MontaTooltipAlvos (esta_barra, index, instancia)
|
||||
local PetActor = instancia.showing (class_type, PetName)
|
||||
if (PetActor) then
|
||||
local PetSkillsContainer = PetActor.spell_tables._ActorTable
|
||||
for _spellid, _skill in _pairs (PetSkillsContainer) do --> da foreach em cada spellid do container
|
||||
local nome, _, icone = _GetSpellInfo (_spellid)
|
||||
habilidades [#habilidades+1] = {nome .. " (" .. PetName:gsub ((" <.*"), "") .. ")", _skill.total, icone}
|
||||
for _spellid, _skill in _pairs (PetSkillsContainer) do
|
||||
local alvos = _skill.targets._ActorTable
|
||||
for _, tabela in _ipairs (alvos) do
|
||||
if (tabela.nome == inimigo) then
|
||||
local nome, _, icone = _GetSpellInfo (_spellid)
|
||||
habilidades [#habilidades+1] = {nome .. " (" .. PetName:gsub ((" <.*"), "") .. ")", tabela.total, icone}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -2995,6 +3096,16 @@ end
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> core functions
|
||||
|
||||
--> limpa as tabelas temporárias ao resetar
|
||||
function atributo_damage:ClearTempTables()
|
||||
for i = #ntable, 1, -1 do
|
||||
ntable [i] = nil
|
||||
end
|
||||
for i = #vtable, 1, -1 do
|
||||
vtable [i] = nil
|
||||
end
|
||||
end
|
||||
|
||||
--> atualize a funcao de abreviacao
|
||||
function atributo_damage:UpdateSelectedToKFunction()
|
||||
SelectedToKFunction = ToKFunctions [_detalhes.ps_abbreviation]
|
||||
|
||||
+15
-12
@@ -72,24 +72,27 @@ local keyName
|
||||
function atributo_energy:NovaTabela (serial, nome, link)
|
||||
|
||||
--> constructor
|
||||
|
||||
local alphabetical = _detalhes:GetOrderNumber (nome)
|
||||
|
||||
local _new_energyActor = {
|
||||
|
||||
last_event = 0,
|
||||
tipo = class_type, --> atributo 3 = e_energy
|
||||
|
||||
mana = 0,
|
||||
e_rage = 0,
|
||||
e_energy = 0,
|
||||
runepower = 0,
|
||||
focus = 0,
|
||||
holypower = 0,
|
||||
mana = alphabetical,
|
||||
e_rage = alphabetical,
|
||||
e_energy = alphabetical,
|
||||
runepower = alphabetical,
|
||||
focus = alphabetical,
|
||||
holypower = alphabetical,
|
||||
|
||||
mana_r = 0,
|
||||
e_rage_r = 0,
|
||||
e_energy_r = 0,
|
||||
runepower_r = 0,
|
||||
focus_r = 0,
|
||||
holypower_r = 0,
|
||||
mana_r = alphabetical,
|
||||
e_rage_r = alphabetical,
|
||||
e_energy_r = alphabetical,
|
||||
runepower_r = alphabetical,
|
||||
focus_r = alphabetical,
|
||||
holypower_r = alphabetical,
|
||||
|
||||
mana_from = {},
|
||||
e_rage_from = {},
|
||||
|
||||
@@ -69,7 +69,7 @@ local keyName
|
||||
|
||||
function atributo_heal:NovaTabela (serial, nome, link)
|
||||
|
||||
local alphabetical = _detalhes:GetAlphabeticalOrderNumber (nome)
|
||||
local alphabetical = _detalhes:GetOrderNumber (nome)
|
||||
|
||||
--> constructor
|
||||
local _new_healActor = {
|
||||
|
||||
@@ -295,7 +295,7 @@ end
|
||||
|
||||
-- reabre todas as instancias
|
||||
function _detalhes:ReabrirTodasInstancias (temp)
|
||||
for index = #_detalhes.tabela_instancias, 1, -1 do
|
||||
for index = math.min (#_detalhes.tabela_instancias, _detalhes.instances_amount), 1, -1 do
|
||||
local instancia = _detalhes:GetInstance (index)
|
||||
instancia:AtivarInstancia (temp)
|
||||
end
|
||||
|
||||
@@ -268,6 +268,9 @@ function historico:resetar()
|
||||
--> fecha a janela de informações do jogador
|
||||
_detalhes:FechaJanelaInfo()
|
||||
|
||||
--> empty temporary tables
|
||||
_detalhes.atributo_damage:ClearTempTables()
|
||||
|
||||
for _, combate in ipairs (_detalhes.tabela_historico.tabelas) do
|
||||
_table_wipe (combate)
|
||||
end
|
||||
|
||||
@@ -0,0 +1,250 @@
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> attributes functions for customs
|
||||
--> DAMAGE DONE
|
||||
|
||||
--> customized display script
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
|
||||
local _cstr = string.format --lua local
|
||||
local _math_floor = math.floor --lua local
|
||||
local _table_sort = table.sort --lua local
|
||||
local _table_insert = table.insert --lua local
|
||||
local _table_size = table.getn --lua local
|
||||
local _setmetatable = setmetatable --lua local
|
||||
local _ipairs = ipairs --lua local
|
||||
local _pairs = pairs --lua local
|
||||
local _rawget= rawget --lua local
|
||||
local _math_min = math.min --lua local
|
||||
local _math_max = math.max --lua local
|
||||
local _bit_band = bit.band --lua local
|
||||
local _unpack = unpack --lua local
|
||||
local _type = type --lua local
|
||||
|
||||
local _GetSpellInfo = _detalhes.getspellinfo -- api local
|
||||
local _IsInRaid = IsInRaid -- api local
|
||||
local _IsInGroup = IsInGroup -- api local
|
||||
local _GetNumGroupMembers = GetNumGroupMembers -- api local
|
||||
local _GetNumPartyMembers = GetNumPartyMembers or GetNumSubgroupMembers -- api local
|
||||
local _GetNumRaidMembers = GetNumRaidMembers or GetNumGroupMembers -- api local
|
||||
local _GetUnitName = GetUnitName -- api local
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> constants
|
||||
|
||||
local atributo_custom = _detalhes.atributo_custom
|
||||
|
||||
local ToKFunctions = _detalhes.ToKFunctions
|
||||
local SelectedToKFunction = ToKFunctions [1]
|
||||
local FormatTooltipNumber = ToKFunctions [8]
|
||||
local TooltipMaximizedMethod = 1
|
||||
|
||||
function atributo_custom:UpdateDamageDoneBracket()
|
||||
SelectedToKFunction = ToKFunctions [_detalhes.ps_abbreviation]
|
||||
FormatTooltipNumber = ToKFunctions [_detalhes.tooltip.abbreviation]
|
||||
TooltipMaximizedMethod = _detalhes.tooltip.maximize_method
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> damage done tooltip
|
||||
|
||||
function atributo_custom:damagedoneTooltip (actor, target, spellid, combat, instance)
|
||||
|
||||
if (spellid) then
|
||||
|
||||
if (instance:GetCustomObject():IsSpellTarget()) then
|
||||
local targetname = actor.nome
|
||||
local this_actor = combat (1, targetname)
|
||||
|
||||
if (this_actor) then
|
||||
for name, _ in _pairs (this_actor.damage_from) do
|
||||
local aggressor = combat (1, name)
|
||||
if (aggressor) then
|
||||
local spell = aggressor.spell_tables._ActorTable [spellid]
|
||||
if (spell) then
|
||||
local on_me = spell.targets._NameIndexTable [targetname]
|
||||
if (on_me) then
|
||||
on_me = spell.targets._ActorTable [on_me]
|
||||
GameCooltip:AddLine (aggressor.nome, FormatTooltipNumber (_, on_me.total))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return
|
||||
else
|
||||
local name, _, icon = _GetSpellInfo (spellid)
|
||||
GameCooltip:AddLine (name)
|
||||
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
|
||||
|
||||
GameCooltip:AddLine (Loc ["STRING_DAMAGE"] .. ": ", spell.total)
|
||||
GameCooltip:AddLine (Loc ["STRING_HITS"] .. ": ", spell.counter)
|
||||
GameCooltip:AddLine (Loc ["STRING_CRITICAL_HITS"] .. ": ", spell.c_amt)
|
||||
end
|
||||
|
||||
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))
|
||||
_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))
|
||||
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))
|
||||
end
|
||||
else
|
||||
local spells_used = {}
|
||||
|
||||
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})
|
||||
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]))
|
||||
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
|
||||
actor:ToolTip_DamageDone (instance)
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> damage done 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 (spell) then
|
||||
if (target) then
|
||||
if (target == "[all]") then
|
||||
for _, targetactor in _ipairs (spell.targets._ActorTable) do
|
||||
--> add amount
|
||||
instance_container:AddValue (targetactor, targetactor.total, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
|
||||
--> add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
|
||||
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
|
||||
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
|
||||
end
|
||||
end
|
||||
return 0, true
|
||||
|
||||
elseif (target == "[raid]") then
|
||||
local roster = combat.raid_roster
|
||||
for _, targetactor in _ipairs (spell.targets._ActorTable) do
|
||||
if (roster [targetactor.nome]) then
|
||||
--> add amount
|
||||
instance_container:AddValue (targetactor, targetactor.total, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
|
||||
--> add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
|
||||
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
|
||||
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
return 0, true
|
||||
|
||||
elseif (target == "[player]") then
|
||||
local targetactor = spell.targets._NameIndexTable [_detalhes.playername]
|
||||
if (targetactor) then
|
||||
targetactor = spell.targets._ActorTable [targetactor]
|
||||
--> add amount
|
||||
instance_container:AddValue (targetactor, targetactor.total, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
|
||||
--> add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
|
||||
atributo_custom._TargetActorsProcessed [targetactor.nome] = 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]
|
||||
--> add amount
|
||||
instance_container:AddValue (targetactor, targetactor.total, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
|
||||
--> add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
|
||||
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
|
||||
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
|
||||
end
|
||||
end
|
||||
return 0, true
|
||||
end
|
||||
else
|
||||
return spell.total
|
||||
end
|
||||
else
|
||||
return 0
|
||||
end
|
||||
|
||||
elseif (target) then
|
||||
|
||||
if (target == "[all]") then
|
||||
return actor.targets:GetTotal()
|
||||
|
||||
elseif (target == "[raid]") then
|
||||
return actor.targets:GetTotalOnRaid (nil, combat)
|
||||
|
||||
elseif (target == "[player]") then
|
||||
local targetactor = actor.targets._NameIndexTable [_detalhes.playername]
|
||||
if (targetactor) then
|
||||
return actor.targets._ActorTable [targetactor].total
|
||||
else
|
||||
return 0
|
||||
end
|
||||
|
||||
else
|
||||
local targetactor = actor.targets._NameIndexTable [target]
|
||||
if (targetactor) then
|
||||
return actor.targets._ActorTable [targetactor].total
|
||||
else
|
||||
return 0
|
||||
end
|
||||
end
|
||||
else
|
||||
return actor.total or 0
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
@@ -0,0 +1,251 @@
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> attributes functions for customs
|
||||
--> DAMAGE TAKEN
|
||||
|
||||
--> customized display script
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
|
||||
local _cstr = string.format --lua local
|
||||
local _math_floor = math.floor --lua local
|
||||
local _table_sort = table.sort --lua local
|
||||
local _table_insert = table.insert --lua local
|
||||
local _table_size = table.getn --lua local
|
||||
local _setmetatable = setmetatable --lua local
|
||||
local _ipairs = ipairs --lua local
|
||||
local _pairs = pairs --lua local
|
||||
local _rawget= rawget --lua local
|
||||
local _math_min = math.min --lua local
|
||||
local _math_max = math.max --lua local
|
||||
local _bit_band = bit.band --lua local
|
||||
local _unpack = unpack --lua local
|
||||
local _type = type --lua local
|
||||
|
||||
local _GetSpellInfo = _detalhes.getspellinfo -- api local
|
||||
local _IsInRaid = IsInRaid -- api local
|
||||
local _IsInGroup = IsInGroup -- api local
|
||||
local _GetNumGroupMembers = GetNumGroupMembers -- api local
|
||||
local _GetNumPartyMembers = GetNumPartyMembers or GetNumSubgroupMembers -- api local
|
||||
local _GetNumRaidMembers = GetNumRaidMembers or GetNumGroupMembers -- api local
|
||||
local _GetUnitName = GetUnitName -- api local
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> constants
|
||||
|
||||
local atributo_custom = _detalhes.atributo_custom
|
||||
|
||||
local ToKFunctions = _detalhes.ToKFunctions
|
||||
local SelectedToKFunction = ToKFunctions [1]
|
||||
local FormatTooltipNumber = ToKFunctions [8]
|
||||
local TooltipMaximizedMethod = 1
|
||||
|
||||
function atributo_custom:UpdateDamageTakenBracket()
|
||||
SelectedToKFunction = ToKFunctions [_detalhes.ps_abbreviation]
|
||||
FormatTooltipNumber = ToKFunctions [_detalhes.tooltip.abbreviation]
|
||||
TooltipMaximizedMethod = _detalhes.tooltip.maximize_method
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> damage done tooltip
|
||||
|
||||
function atributo_custom:damagetakenTooltip (actor, target, spellid, combat, instance)
|
||||
|
||||
if (spellid) then
|
||||
|
||||
if (instance:GetCustomObject():IsSpellTarget()) then
|
||||
local targetname = actor.nome
|
||||
local this_actor = combat (1, targetname)
|
||||
|
||||
if (this_actor) then
|
||||
for name, _ in _pairs (this_actor.damage_from) do
|
||||
local aggressor = combat (1, name)
|
||||
if (aggressor) then
|
||||
local spell = aggressor.spell_tables._ActorTable [spellid]
|
||||
if (spell) then
|
||||
local on_me = spell.targets._NameIndexTable [targetname]
|
||||
if (on_me) then
|
||||
on_me = spell.targets._ActorTable [on_me]
|
||||
GameCooltip:AddLine (aggressor.nome, FormatTooltipNumber (_, on_me.total))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return
|
||||
else
|
||||
local name, _, icon = _GetSpellInfo (spellid)
|
||||
GameCooltip:AddLine (name)
|
||||
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
|
||||
|
||||
GameCooltip:AddLine (Loc ["STRING_DAMAGE"] .. ": ", spell.total)
|
||||
GameCooltip:AddLine (Loc ["STRING_HITS"] .. ": ", spell.counter)
|
||||
GameCooltip:AddLine (Loc ["STRING_CRITICAL_HITS"] .. ": ", spell.c_amt)
|
||||
end
|
||||
|
||||
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))
|
||||
_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))
|
||||
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))
|
||||
end
|
||||
else
|
||||
local spells_used = {}
|
||||
|
||||
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})
|
||||
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]))
|
||||
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
|
||||
actor:ToolTip_DamageDone (instance)
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> damage done search
|
||||
|
||||
function atributo_custom:damagetaken (actor, source, target, spellid, combat, instance_container)
|
||||
|
||||
if (spellid) then --> spell is always damage done
|
||||
local spell = actor.spell_tables._ActorTable [spellid]
|
||||
if (spell) then
|
||||
if (target) then
|
||||
if (target == "[all]") then
|
||||
for _, targetactor in _ipairs (spell.targets._ActorTable) do
|
||||
--> add amount
|
||||
instance_container:AddValue (targetactor, targetactor.total, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
|
||||
--> add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
|
||||
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
|
||||
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
|
||||
end
|
||||
end
|
||||
return 0, true
|
||||
|
||||
elseif (target == "[raid]") then
|
||||
local roster = combat.raid_roster
|
||||
for _, targetactor in _ipairs (spell.targets._ActorTable) do
|
||||
if (roster [targetactor.nome]) then
|
||||
--> add amount
|
||||
instance_container:AddValue (targetactor, targetactor.total, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
|
||||
--> add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
|
||||
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
|
||||
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
return 0, true
|
||||
|
||||
elseif (target == "[player]") then
|
||||
local targetactor = spell.targets._NameIndexTable [_detalhes.playername]
|
||||
if (targetactor) then
|
||||
targetactor = spell.targets._ActorTable [targetactor]
|
||||
--> add amount
|
||||
instance_container:AddValue (targetactor, targetactor.total, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
|
||||
--> add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
|
||||
atributo_custom._TargetActorsProcessed [targetactor.nome] = 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]
|
||||
--> add amount
|
||||
instance_container:AddValue (targetactor, targetactor.total, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
|
||||
--> add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
|
||||
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
|
||||
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
|
||||
end
|
||||
end
|
||||
return 0, true
|
||||
end
|
||||
else
|
||||
return spell.total
|
||||
end
|
||||
else
|
||||
return 0
|
||||
end
|
||||
|
||||
elseif (target) then
|
||||
|
||||
if (target == "[all]") then
|
||||
return actor.targets:GetTotal()
|
||||
|
||||
elseif (target == "[raid]") then
|
||||
return actor.targets:GetTotalOnRaid (nil, combat)
|
||||
|
||||
elseif (target == "[player]") then
|
||||
local targetactor = actor.targets._NameIndexTable [_detalhes.playername]
|
||||
if (targetactor) then
|
||||
return actor.targets._ActorTable [targetactor].total
|
||||
else
|
||||
return 0
|
||||
end
|
||||
|
||||
else
|
||||
--> custom target
|
||||
local targetactor = actor.targets._NameIndexTable [target]
|
||||
if (targetactor) then
|
||||
return actor.targets._ActorTable [targetactor].total
|
||||
else
|
||||
return 0
|
||||
end
|
||||
end
|
||||
else
|
||||
return actor.damage_taken or 0
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
@@ -0,0 +1,233 @@
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> attributes functions for customs
|
||||
--> HEALING DONE
|
||||
|
||||
--> customized display script
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
|
||||
local _cstr = string.format --lua local
|
||||
local _math_floor = math.floor --lua local
|
||||
local _table_sort = table.sort --lua local
|
||||
local _table_insert = table.insert --lua local
|
||||
local _table_size = table.getn --lua local
|
||||
local _setmetatable = setmetatable --lua local
|
||||
local _ipairs = ipairs --lua local
|
||||
local _pairs = pairs --lua local
|
||||
local _rawget= rawget --lua local
|
||||
local _math_min = math.min --lua local
|
||||
local _math_max = math.max --lua local
|
||||
local _bit_band = bit.band --lua local
|
||||
local _unpack = unpack --lua local
|
||||
local _type = type --lua local
|
||||
|
||||
local _GetSpellInfo = _detalhes.getspellinfo -- api local
|
||||
local _IsInRaid = IsInRaid -- api local
|
||||
local _IsInGroup = IsInGroup -- api local
|
||||
local _GetNumGroupMembers = GetNumGroupMembers -- api local
|
||||
local _GetNumPartyMembers = GetNumPartyMembers or GetNumSubgroupMembers -- api local
|
||||
local _GetNumRaidMembers = GetNumRaidMembers or GetNumGroupMembers -- api local
|
||||
local _GetUnitName = GetUnitName -- api local
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> constants
|
||||
|
||||
local atributo_custom = _detalhes.atributo_custom
|
||||
|
||||
local ToKFunctions = _detalhes.ToKFunctions
|
||||
local SelectedToKFunction = ToKFunctions [1]
|
||||
local FormatTooltipNumber = ToKFunctions [8]
|
||||
local TooltipMaximizedMethod = 1
|
||||
|
||||
function atributo_custom:UpdateHealingDoneBracket()
|
||||
SelectedToKFunction = ToKFunctions [_detalhes.ps_abbreviation]
|
||||
FormatTooltipNumber = ToKFunctions [_detalhes.tooltip.abbreviation]
|
||||
TooltipMaximizedMethod = _detalhes.tooltip.maximize_method
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> healing done tooltip
|
||||
|
||||
function atributo_custom:healdoneTooltip (actor, target, spellid, combat, instance)
|
||||
|
||||
if (spellid) then
|
||||
|
||||
if (instance:GetCustomObject():IsSpellTarget()) then
|
||||
local targetname = actor.nome
|
||||
local this_actor = combat (2, targetname)
|
||||
|
||||
if (this_actor) then
|
||||
for name, _ in _pairs (this_actor.healing_from) do
|
||||
local healer = combat (2, name)
|
||||
if (healer) then
|
||||
local spell = healer.spell_tables._ActorTable [spellid]
|
||||
if (spell) then
|
||||
local on_me = spell.targets._NameIndexTable [targetname]
|
||||
if (on_me) then
|
||||
on_me = spell.targets._ActorTable [on_me]
|
||||
GameCooltip:AddLine (healer.nome, FormatTooltipNumber (_, on_me.total))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return
|
||||
else
|
||||
local name, _, icon = _GetSpellInfo (spellid)
|
||||
GameCooltip:AddLine (name)
|
||||
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
|
||||
|
||||
GameCooltip:AddLine (Loc ["STRING_HEAL"] .. ": ", spell.total)
|
||||
GameCooltip:AddLine (Loc ["STRING_HITS"] .. ": ", spell.counter)
|
||||
GameCooltip:AddLine (Loc ["STRING_CRITICAL_HITS"] .. ": ", spell.c_amt)
|
||||
end
|
||||
|
||||
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))
|
||||
_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))
|
||||
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))
|
||||
end
|
||||
else
|
||||
local targetactor = actor.targets._NameIndexTable [target]
|
||||
if (targetactor) then
|
||||
targetactor = actor.targets._ActorTable [targetactor]
|
||||
GameCooltip:AddLine (target, FormatTooltipNumber (_, targetactor.total))
|
||||
end
|
||||
end
|
||||
|
||||
else
|
||||
actor:ToolTip_DamageDone (instance)
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> healing done search
|
||||
|
||||
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]
|
||||
if (spell) then
|
||||
if (target) then
|
||||
if (target == "[all]") then
|
||||
for _, targetactor in _ipairs (spell.targets._ActorTable) do
|
||||
--> add amount
|
||||
instance_container:AddValue (targetactor, targetactor.total, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
|
||||
--> add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
|
||||
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
|
||||
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
|
||||
end
|
||||
end
|
||||
return 0, true
|
||||
|
||||
elseif (target == "[raid]") then
|
||||
local roster = combat.raid_roster
|
||||
for _, targetactor in _ipairs (spell.targets._ActorTable) do
|
||||
if (roster [targetactor.nome]) then
|
||||
--> add amount
|
||||
instance_container:AddValue (targetactor, targetactor.total, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
|
||||
--> add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
|
||||
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
|
||||
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
return 0, true
|
||||
|
||||
elseif (target == "[player]") then
|
||||
local targetactor = spell.targets._NameIndexTable [_detalhes.playername]
|
||||
if (targetactor) then
|
||||
targetactor = spell.targets._ActorTable [targetactor]
|
||||
--> add amount
|
||||
instance_container:AddValue (targetactor, targetactor.total, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
|
||||
--> add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
|
||||
atributo_custom._TargetActorsProcessed [targetactor.nome] = 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]
|
||||
--> add amount
|
||||
instance_container:AddValue (targetactor, targetactor.total, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
|
||||
--> add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
|
||||
atributo_custom._TargetActorsProcessed [targetactor.nome] = true
|
||||
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
|
||||
end
|
||||
end
|
||||
return 0, true
|
||||
end
|
||||
else
|
||||
return spell.total
|
||||
end
|
||||
else
|
||||
return 0
|
||||
end
|
||||
|
||||
elseif (target) then
|
||||
|
||||
if (target == "[all]") then
|
||||
return actor.targets:GetTotal()
|
||||
|
||||
elseif (target == "[raid]") then
|
||||
return actor.targets:GetTotalOnRaid (nil, combat)
|
||||
|
||||
elseif (target == "[player]") then
|
||||
local targetactor = actor.targets._NameIndexTable [_detalhes.playername]
|
||||
if (targetactor) then
|
||||
return actor.targets._ActorTable [targetactor].total
|
||||
else
|
||||
return 0
|
||||
end
|
||||
|
||||
else
|
||||
local targetactor = actor.targets._NameIndexTable [target]
|
||||
if (targetactor) then
|
||||
return actor.targets._ActorTable [targetactor].total
|
||||
else
|
||||
return 0
|
||||
end
|
||||
end
|
||||
else
|
||||
return actor.total or 0
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user