- 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:
@@ -78,7 +78,11 @@ classes\classe_others_habilidade.lua
|
||||
classes\classe_instancia_include.lua
|
||||
classes\classe_instancia.lua
|
||||
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
|
||||
|
||||
|
||||
@@ -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
|
||||
+18
-12
@@ -762,9 +762,9 @@
|
||||
|
||||
--> not yet well know about unnamed buff casters
|
||||
if (not alvo_name) then
|
||||
alvo_name = "[*] Unknow shield target"
|
||||
alvo_name = "[*] Unknown shield target"
|
||||
elseif (not who_name) then
|
||||
who_name = "[*] Unknow shield caster"
|
||||
who_name = "[*] " .. spellname
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
@@ -1225,6 +1225,7 @@
|
||||
end
|
||||
end
|
||||
|
||||
-- ~debuff
|
||||
function parser:add_debuff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, in_out)
|
||||
------------------------------------------------------------------------------------------------
|
||||
--> early checks and fixes
|
||||
@@ -1472,12 +1473,12 @@
|
||||
--> build containers on the fly
|
||||
|
||||
if (not este_jogador.cooldowns_defensive) then
|
||||
este_jogador.cooldowns_defensive = _detalhes:GetAlphabeticalOrderNumber (who_name)
|
||||
este_jogador.cooldowns_defensive = _detalhes:GetOrderNumber (who_name)
|
||||
este_jogador.cooldowns_defensive_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
|
||||
este_jogador.cooldowns_defensive_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades
|
||||
|
||||
if (not este_jogador.shadow.cooldowns_defensive_targets) then
|
||||
este_jogador.shadow.cooldowns_defensive = _detalhes:GetAlphabeticalOrderNumber (who_name)
|
||||
este_jogador.shadow.cooldowns_defensive = _detalhes:GetOrderNumber (who_name)
|
||||
este_jogador.shadow.cooldowns_defensive_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
|
||||
este_jogador.shadow.cooldowns_defensive_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades usadas
|
||||
end
|
||||
@@ -1598,13 +1599,13 @@
|
||||
--> build containers on the fly
|
||||
|
||||
if (not este_jogador.interrupt) then
|
||||
este_jogador.interrupt = 0
|
||||
este_jogador.interrupt = _detalhes:GetOrderNumber (who_name)
|
||||
este_jogador.interrupt_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
|
||||
este_jogador.interrupt_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades usadas para interromper
|
||||
este_jogador.interrompeu_oque = {}
|
||||
|
||||
if (not este_jogador.shadow.interrupt_targets) then
|
||||
este_jogador.shadow.interrupt = 0
|
||||
este_jogador.shadow.interrupt = _detalhes:GetOrderNumber (who_name)
|
||||
este_jogador.shadow.interrupt_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
|
||||
este_jogador.shadow.interrupt_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades usadas para interromper
|
||||
este_jogador.shadow.interrompeu_oque = {}
|
||||
@@ -1847,13 +1848,13 @@
|
||||
|
||||
if (not este_jogador.dispell) then
|
||||
--> constrói aqui a tabela dele
|
||||
este_jogador.dispell = 0
|
||||
este_jogador.dispell = _detalhes:GetOrderNumber (who_name)
|
||||
este_jogador.dispell_targets = container_combatentes:NovoContainer (container_damage_target)
|
||||
este_jogador.dispell_spell_tables = container_habilidades:NovoContainer (container_misc)
|
||||
este_jogador.dispell_oque = {}
|
||||
|
||||
if (not este_jogador.shadow.dispell_targets) then
|
||||
este_jogador.shadow.dispell = 0
|
||||
este_jogador.shadow.dispell = _detalhes:GetOrderNumber (who_name)
|
||||
este_jogador.shadow.dispell_targets = container_combatentes:NovoContainer (container_damage_target)
|
||||
este_jogador.shadow.dispell_spell_tables = container_habilidades:NovoContainer (container_misc)
|
||||
este_jogador.shadow.dispell_oque = {}
|
||||
@@ -1980,12 +1981,12 @@
|
||||
|
||||
if (not este_jogador.ress) then
|
||||
--> constrói aqui a tabela dele
|
||||
este_jogador.ress = 0
|
||||
este_jogador.ress = _detalhes:GetOrderNumber (who_name)
|
||||
este_jogador.ress_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
|
||||
este_jogador.ress_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades usadas para interromper
|
||||
|
||||
if (not este_jogador.shadow.ress_targets) then
|
||||
este_jogador.shadow.ress = 0
|
||||
este_jogador.shadow.ress = _detalhes:GetOrderNumber (who_name)
|
||||
este_jogador.shadow.ress_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
|
||||
este_jogador.shadow.ress_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades usadas para interromper
|
||||
end
|
||||
@@ -2106,13 +2107,13 @@
|
||||
|
||||
if (not este_jogador.cc_break) then
|
||||
--> constrói aqui a tabela dele
|
||||
este_jogador.cc_break = 0
|
||||
este_jogador.cc_break = _detalhes:GetOrderNumber (who_name)
|
||||
este_jogador.cc_break_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
|
||||
este_jogador.cc_break_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades usadas para interromper
|
||||
este_jogador.cc_break_oque = {}
|
||||
|
||||
if (not este_jogador.shadow.cc_break) then
|
||||
este_jogador.shadow.cc_break = 0
|
||||
este_jogador.shadow.cc_break = _detalhes:GetOrderNumber (who_name)
|
||||
este_jogador.shadow.cc_break_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
|
||||
este_jogador.shadow.cc_break_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades usadas para interromper
|
||||
este_jogador.shadow.cc_break_oque = {}
|
||||
@@ -2896,6 +2897,11 @@
|
||||
_detalhes:ApplyBasicKeys()
|
||||
--> check if is first run
|
||||
_detalhes:LoadGlobalAndCharacterData()
|
||||
|
||||
if (_detalhes.FILEBROKEN) then
|
||||
return
|
||||
end
|
||||
|
||||
--> load all the saved combats
|
||||
_detalhes:LoadCombatTables()
|
||||
--> load the profiles
|
||||
|
||||
@@ -44,6 +44,10 @@
|
||||
return _detalhes:NewError ("Details version is out of date.")
|
||||
end
|
||||
|
||||
if (_detalhes.FILEBROKEN) then
|
||||
return _detalhes:NewError ("Game client needs to be restarted in order to finish Details! update.")
|
||||
end
|
||||
|
||||
if (PluginType == "TANK") then
|
||||
PluginType = "RAID"
|
||||
end
|
||||
|
||||
+6
-4
@@ -18,6 +18,7 @@
|
||||
local _math_floor = math.floor --lua local
|
||||
local _math_max = math.max --lua local
|
||||
local _math_abs = math.abs --lua local
|
||||
local _math_random = math.random --lua local
|
||||
local _type = type --lua local
|
||||
local _string_match = string.match --lua local
|
||||
local _string_byte = string.byte --lua local
|
||||
@@ -41,10 +42,11 @@
|
||||
--> details api functions
|
||||
|
||||
--> get the fractional number representing the alphabetical letter
|
||||
function _detalhes:GetAlphabeticalOrderNumber (who_name)
|
||||
local name = _upper (who_name .. "zz")
|
||||
local byte1 = _math_abs (_string_byte (name, 2)-91)/1000000
|
||||
return byte1 + _math_abs (_string_byte (name, 1)-91)/10000
|
||||
function _detalhes:GetOrderNumber (who_name)
|
||||
--local name = _upper (who_name .. "zz")
|
||||
--local byte1 = _math_abs (_string_byte (name, 2)-91)/1000000
|
||||
--return byte1 + _math_abs (_string_byte (name, 1)-91)/10000
|
||||
return _math_random (1000, 9000) / 1000000
|
||||
end
|
||||
|
||||
--/script print (tonumber (4/1000000)) - 4e-006
|
||||
|
||||
@@ -598,7 +598,7 @@ local default_profile = {
|
||||
fontsize = 10,
|
||||
fontcolor = {1, 1, 1, 1},
|
||||
fontshadow = false,
|
||||
background = {.1, .1, .1, .3},
|
||||
background = {.45, .45, .45, .28},
|
||||
abbreviation = 8,
|
||||
maximize_method = 1,
|
||||
show_amount = false,
|
||||
|
||||
+5
-2
@@ -651,12 +651,15 @@ function gump:NewScrollBar (master, slave, x, y)
|
||||
|
||||
local current = slider_gump:GetValue()
|
||||
if (delta < 0) then
|
||||
if (current < slider_gump.scrollMax + (master.wheel_jump or 20)) then
|
||||
--baixo
|
||||
local minValue, maxValue = slider_gump:GetMinMaxValues()
|
||||
if (current + (master.wheel_jump or 20) < maxValue) then
|
||||
slider_gump:SetValue (current + (master.wheel_jump or 20))
|
||||
else
|
||||
slider_gump:SetValue (slider_gump.scrollMax)
|
||||
slider_gump:SetValue (maxValue)
|
||||
end
|
||||
elseif (delta > 0) then
|
||||
--cima
|
||||
if (current + (master.wheel_jump or 20) > 0) then
|
||||
slider_gump:SetValue (current - (master.wheel_jump or 20))
|
||||
else
|
||||
|
||||
+27
-7
@@ -1008,7 +1008,9 @@ function gump:CriaJanelaInfo()
|
||||
end,
|
||||
nil --[5] oncreate
|
||||
)
|
||||
|
||||
|
||||
--> search key: ~avoidance
|
||||
|
||||
local avoidance_create = function (tab, frame)
|
||||
|
||||
--> MAIN ICON
|
||||
@@ -1022,6 +1024,12 @@ function gump:CriaJanelaInfo()
|
||||
tankname:SetPoint ("right", mainicon, "left", -2, 2)
|
||||
tab.tankname = tankname
|
||||
|
||||
--> Percent Desc
|
||||
local percent_desc = frame:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
percent_desc:SetText ("Percent values are comparisons with the previous try.")
|
||||
percent_desc:SetPoint ("bottomleft", frame, "bottomleft", 13, 13)
|
||||
percent_desc:SetTextColor (.5, .5, .5, 1)
|
||||
|
||||
--> SUMMARY
|
||||
local summary_texture = frame:CreateTexture (nil, "artwork")
|
||||
summary_texture:SetPoint ("topleft", frame, "topleft", 10, -15)
|
||||
@@ -1263,19 +1271,31 @@ function gump:CriaJanelaInfo()
|
||||
else
|
||||
if (ps >= lastvalue) then
|
||||
local d = ps - lastvalue
|
||||
d = d / ps * 100
|
||||
d = d / lastvalue * 100
|
||||
d = _math_floor (math.abs (d))
|
||||
|
||||
if (d > 999) then
|
||||
d = "> 999"
|
||||
end
|
||||
|
||||
if (inverse) then
|
||||
diff = "|c" .. green .. "+" .. _math_floor (math.abs (d)) .. "%|r"
|
||||
diff = "|c" .. green .. "+" .. d .. "%|r"
|
||||
else
|
||||
diff = "|c" .. red .. "+" .. _math_floor (math.abs (d)) .. "%|r"
|
||||
diff = "|c" .. red .. "+" .. d .. "%|r"
|
||||
end
|
||||
else
|
||||
local d = lastvalue - ps
|
||||
d = d / lastvalue * 100
|
||||
d = d / ps * 100
|
||||
d = _math_floor (math.abs (d))
|
||||
|
||||
if (d > 999) then
|
||||
d = "> 999"
|
||||
end
|
||||
|
||||
if (inverse) then
|
||||
diff = "|c" .. red .. "-" .. _math_floor (math.abs (d)) .. "%|r"
|
||||
diff = "|c" .. red .. "-" .. d .. "%|r"
|
||||
else
|
||||
diff = "|c" .. green .. "-" .. _math_floor (math.abs (d)) .. "%|r"
|
||||
diff = "|c" .. green .. "-" .. d .. "%|r"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1374,6 +1374,11 @@ local shift_monitor = function (self)
|
||||
end
|
||||
end
|
||||
|
||||
local on_switch_show = function (instance)
|
||||
instance:TrocaTabela (instance, true, 1, 6)
|
||||
return true
|
||||
end
|
||||
|
||||
local function barra_scripts (esta_barra, instancia, i)
|
||||
|
||||
esta_barra:SetScript ("OnEnter", function (self)
|
||||
@@ -1430,6 +1435,10 @@ local function barra_scripts (esta_barra, instancia, i)
|
||||
--> procura se já tem um custom:
|
||||
for index, CustomObject in _ipairs (_detalhes.custom) do
|
||||
if (CustomObject:GetName() == custom_name) then
|
||||
--> fix for not saving funcs on logout
|
||||
if (not CustomObject.OnSwitchShow) then
|
||||
CustomObject.OnSwitchShow = on_switch_show
|
||||
end
|
||||
return instancia:TrocaTabela (instancia.segmento, 5, index)
|
||||
end
|
||||
end
|
||||
@@ -1445,7 +1454,8 @@ local function barra_scripts (esta_barra, instancia, i)
|
||||
target = inimigo,
|
||||
script = false,
|
||||
tooltip = false,
|
||||
temp = true
|
||||
temp = true,
|
||||
OnSwitchShow = on_switch_show,
|
||||
}
|
||||
|
||||
tinsert (_detalhes.custom, new_custom_object)
|
||||
|
||||
@@ -99,6 +99,17 @@ local right_click_texture = {[[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 14,
|
||||
|
||||
function _detalhes.switch:ShowMe (instancia)
|
||||
|
||||
--> check if there is some custom contidional
|
||||
if (instancia.atributo == 5) then
|
||||
local custom_object = instancia:GetCustomObject()
|
||||
if (custom_object and custom_object.OnSwitchShow) then
|
||||
local interrupt = custom_object.OnSwitchShow (instancia)
|
||||
if (interrupt) then
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (_detalhes.switch.current_instancia) then
|
||||
_detalhes.switch.current_instancia:StatusBarAlert (nil)
|
||||
end
|
||||
|
||||
+3
-1310
File diff suppressed because it is too large
Load Diff
+1
-1227
File diff suppressed because it is too large
Load Diff
@@ -1494,7 +1494,7 @@ function EncounterDetails:OnEvent (_, event, ...)
|
||||
local AddonName = select (1, ...)
|
||||
if (AddonName == "Details_EncounterDetails") then
|
||||
|
||||
if (_G._detalhes) then
|
||||
if (_G._detalhes and _G._detalhes:InstallOkey()) then
|
||||
|
||||
--> create widgets
|
||||
CreatePluginFrames (data)
|
||||
|
||||
@@ -114,7 +114,7 @@ local function CreatePluginFrames (data)
|
||||
local TimeAmount = DetailsFrameWork:NewSlider (TimeAttackFrame, nil, "DetailsTimeAttackTimeSelect", "TimeSelect", 270, 20, 30, 330, 10, TimeAttack.data.time)
|
||||
--local TimeAmount = DetailsFrameWork:NewSlider2 (TimeAttackFrame, "DetailsTimeAttackTimeSelect", "TimeSelect", 270, 20, 30, 330, 10, TimeAttack.data.time)
|
||||
TimeAmount:SetPoint ("topleft", TimeAttackFrame, 15, -270)
|
||||
TimeAmount.OnChangeHook = function() TimeAttack.data.time = TimeAmount.value end
|
||||
TimeAmount.OnChangeHook = function (_, _, value) TimeAttack.data.time = value end
|
||||
|
||||
--> main time/damage/dps texts
|
||||
local clock = DetailsFrameWork:NewLabel (TimeAttackFrame, TimeAttackFrame, nil, "TIMER", "00:00:00", "GameFontHighlightLarge")
|
||||
|
||||
+43
@@ -1,4 +1,47 @@
|
||||
|
||||
--> check unloaded files:
|
||||
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
|
||||
|
||||
local f = CreateFrame ("frame", "DetaisCorruptInstall", UIParent)
|
||||
f:SetSize (370, 70)
|
||||
f:SetPoint ("center", UIParent, "center", 0, 0)
|
||||
f:SetPoint ("top", UIParent, "top", 0, -20)
|
||||
local bg = f:CreateTexture (nil, "background")
|
||||
bg:SetAllPoints (f)
|
||||
bg:SetTexture ([[Interface\AddOns\Details\images\welcome]])
|
||||
|
||||
local image = f:CreateTexture (nil, "overlay")
|
||||
image:SetTexture ([[Interface\DialogFrame\UI-Dialog-Icon-AlertNew]])
|
||||
image:SetSize (32, 32)
|
||||
|
||||
local label = f:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
label:SetText ("Restart game client in order to finish addons updates.")
|
||||
label:SetWidth (300)
|
||||
label:SetJustifyH ("left")
|
||||
|
||||
local close = CreateFrame ("button", "DetaisCorruptInstall", f, "UIPanelCloseButton")
|
||||
close:SetSize (32, 32)
|
||||
close:SetPoint ("topright", f, "topright", 0, 0)
|
||||
|
||||
image:SetPoint ("topleft", f, "topleft", 10, -20)
|
||||
label:SetPoint ("left", image, "right", 4, 0)
|
||||
|
||||
_G._detalhes.FILEBROKEN = true
|
||||
end
|
||||
|
||||
function _G._detalhes:InstallOkey()
|
||||
if (_G._detalhes.FILEBROKEN) then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
--> start funtion
|
||||
function _G._detalhes:Start()
|
||||
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
|
||||
Reference in New Issue
Block a user