8.3.0 > 9.0.1

This commit is contained in:
Tercio Jose
2020-10-16 19:51:44 -03:00
parent 530a825358
commit c42a35657d
223 changed files with 93840 additions and 94757 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,27 +1,27 @@
do
local _detalhes = _G._detalhes
local _error = {
["error"] = true,
["errortext"] = ""
}
_error.__index = _error
_error.__newindex = function()
assert (false, "Attempt to modify an read-only object.\nUse object() or object.errortext\n"..debugstack (2, 1 , 0))
return
end
_error.__tostring = function()
return _error.errortext
end
_error.__call = function (_this)
print (_this.errortext)
end
function _detalhes:NewError (_msg)
local this_error = {}
this_error.errortext = _msg
setmetatable (this_error, _error)
return this_error
end
end
do
local _detalhes = _G._detalhes
local _error = {
["error"] = true,
["errortext"] = ""
}
_error.__index = _error
_error.__newindex = function()
assert (false, "Attempt to modify an read-only object.\nUse object() or object.errortext\n"..debugstack (2, 1 , 0))
return
end
_error.__tostring = function()
return _error.errortext
end
_error.__call = function (_this)
print (_this.errortext)
end
function _detalhes:NewError (_msg)
local this_error = {}
this_error.errortext = _msg
setmetatable (this_error, _error)
return this_error
end
end
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,212 +1,212 @@
-- damage ability file
local _detalhes = _G._detalhes
local _
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> local pointers
local _ipairs = ipairs--lua local
local _pairs = pairs--lua local
local _UnitAura = UnitAura--api local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
local alvo_da_habilidade = _detalhes.alvo_da_habilidade
local habilidade_dano = _detalhes.habilidade_dano
local container_combatentes = _detalhes.container_combatentes
local container_damage_target = _detalhes.container_type.CONTAINER_DAMAGETARGET_CLASS
local container_playernpc = _detalhes.container_type.CONTAINER_PLAYERNPC
local _recording_ability_with_buffs = false
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> internals
function habilidade_dano:NovaTabela (id, link, token)
local _newDamageSpell = {
total = 0, --total damage
counter = 0, --counter
id = id, --spellid
successful_casted = 0, --successful casted times (only for enemies)
--> multistrike (deprecated)
m_amt = 0,
m_dmg = 0,
m_crit = 0,
--off_amt = 0,
--off_dmg = 0,
--main_amt = 0,
--> normal hits
n_min = 0,
n_max = 0,
n_amt = 0,
n_dmg = 0,
--> critical hits
c_min = 0,
c_max = 0,
c_amt = 0,
c_dmg = 0,
--> glacing hits
g_amt = 0,
g_dmg = 0,
--> resisted
r_amt = 0,
r_dmg = 0,
--> blocked
b_amt = 0,
b_dmg = 0,
--> obsorved
a_amt = 0,
a_dmg = 0,
targets = {},
extra = {}
}
if (token == "SPELL_PERIODIC_DAMAGE") then
_detalhes:SpellIsDot (id)
end
return _newDamageSpell
end
function habilidade_dano:AddMiss (serial, nome, flags, who_nome, missType)
self.counter = self.counter + 1
self [missType] = (self [missType] or 0) + 1
self.targets [nome] = self.targets [nome] or 0
end
function habilidade_dano:Add (serial, nome, flag, amount, who_nome, resisted, blocked, absorbed, critical, glacing, token, isoffhand, isreflected)
self.total = self.total + amount
--if is reflected add the spellId into the extra table
--this is too show which spells has been reflected
if (isreflected) then
self.extra [isreflected] = (self.extra [isreflected] or 0) + amount
end
self.targets [nome] = (self.targets [nome] or 0) + amount
self.counter = self.counter + 1
if (resisted and resisted > 0) then
self.r_dmg = self.r_dmg+amount --> tabela.total o total de dano
self.r_amt = self.r_amt+1 --> tabela.total o total de dano
end
if (blocked and blocked > 0) then
self.b_dmg = self.b_dmg+amount --> amount o total de dano
self.b_amt = self.b_amt+1 --> amount o total de dano
end
if (absorbed and absorbed > 0) then
self.a_dmg = self.a_dmg+amount --> amount o total de dano
self.a_amt = self.a_amt+1 --> amount o total de dano
end
if (glacing) then
self.g_dmg = self.g_dmg+amount --> amount o total de dano
self.g_amt = self.g_amt+1 --> amount o total de dano
elseif (critical) then
self.c_dmg = self.c_dmg+amount --> amount o total de dano
self.c_amt = self.c_amt+1 --> amount o total de dano
if (amount > self.c_max) then
self.c_max = amount
end
if (self.c_min > amount or self.c_min == 0) then
self.c_min = amount
end
else
self.n_dmg = self.n_dmg+amount
self.n_amt = self.n_amt+1
if (amount > self.n_max) then
self.n_max = amount
end
if (self.n_min > amount or self.n_min == 0) then
self.n_min = amount
end
end
if (_recording_ability_with_buffs) then
if (who_nome == _detalhes.playername) then --aqui ele vai detalhar tudo sobre a magia usada
local buffsNames = _detalhes.SoloTables.BuffsTableNameCache
local SpellBuffDetails = self.BuffTable
if (not SpellBuffDetails) then
self.BuffTable = {}
SpellBuffDetails = self.BuffTable
end
if (token == "SPELL_PERIODIC_DAMAGE") then
--> precisa ver se ele tinha na hora que aplicou
local SoloDebuffPower = _detalhes.tabela_vigente.SoloDebuffPower
if (SoloDebuffPower) then
local ThisDebuff = SoloDebuffPower [self.id]
if (ThisDebuff) then
local ThisDebuffOnTarget = ThisDebuff [serial]
if (ThisDebuffOnTarget) then
for index, buff_name in _ipairs (ThisDebuffOnTarget.buffs) do
local buff_info = SpellBuffDetails [buff_name] or {["counter"] = 0, ["total"] = 0, ["critico"] = 0, ["critico_dano"] = 0}
buff_info.counter = buff_info.counter+1
buff_info.total = buff_info.total+amount
if (critical ~= nil) then
buff_info.critico = buff_info.critico+1
buff_info.critico_dano = buff_info.critico_dano+amount
end
SpellBuffDetails [buff_name] = buff_info
end
end
end
end
else
for BuffName, _ in _pairs (_detalhes.Buffs.BuffsTable) do
local name = _UnitAura ("player", BuffName)
if (name ~= nil) then
local buff_info = SpellBuffDetails [name] or {["counter"] = 0, ["total"] = 0, ["critico"] = 0, ["critico_dano"] = 0}
buff_info.counter = buff_info.counter+1
buff_info.total = buff_info.total+amount
if (critical ~= nil) then
buff_info.critico = buff_info.critico+1
buff_info.critico_dano = buff_info.critico_dano+amount
end
SpellBuffDetails [name] = buff_info
end
end
end
end
end
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> core
function _detalhes:UpdateDamageAbilityGears()
_recording_ability_with_buffs = _detalhes.RecordPlayerAbilityWithBuffs
end
--[[
if (isoffhand) then
self.off_amt = self.off_amt + 1
self.off_dmg = self.off_dmg + amount
else
self.main_amt = self.main_amt + 1
end
--]]
-- damage ability file
local _detalhes = _G._detalhes
local _
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> local pointers
local _ipairs = ipairs--lua local
local _pairs = pairs--lua local
local _UnitAura = UnitAura--api local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
local alvo_da_habilidade = _detalhes.alvo_da_habilidade
local habilidade_dano = _detalhes.habilidade_dano
local container_combatentes = _detalhes.container_combatentes
local container_damage_target = _detalhes.container_type.CONTAINER_DAMAGETARGET_CLASS
local container_playernpc = _detalhes.container_type.CONTAINER_PLAYERNPC
local _recording_ability_with_buffs = false
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> internals
function habilidade_dano:NovaTabela (id, link, token)
local _newDamageSpell = {
total = 0, --total damage
counter = 0, --counter
id = id, --spellid
successful_casted = 0, --successful casted times (only for enemies)
--> multistrike (deprecated)
m_amt = 0,
m_dmg = 0,
m_crit = 0,
--off_amt = 0,
--off_dmg = 0,
--main_amt = 0,
--> normal hits
n_min = 0,
n_max = 0,
n_amt = 0,
n_dmg = 0,
--> critical hits
c_min = 0,
c_max = 0,
c_amt = 0,
c_dmg = 0,
--> glacing hits
g_amt = 0,
g_dmg = 0,
--> resisted
r_amt = 0,
r_dmg = 0,
--> blocked
b_amt = 0,
b_dmg = 0,
--> obsorved
a_amt = 0,
a_dmg = 0,
targets = {},
extra = {}
}
if (token == "SPELL_PERIODIC_DAMAGE") then
_detalhes:SpellIsDot (id)
end
return _newDamageSpell
end
function habilidade_dano:AddMiss (serial, nome, flags, who_nome, missType)
self.counter = self.counter + 1
self [missType] = (self [missType] or 0) + 1
self.targets [nome] = self.targets [nome] or 0
end
function habilidade_dano:Add (serial, nome, flag, amount, who_nome, resisted, blocked, absorbed, critical, glacing, token, isoffhand, isreflected)
self.total = self.total + amount
--if is reflected add the spellId into the extra table
--this is too show which spells has been reflected
if (isreflected) then
self.extra [isreflected] = (self.extra [isreflected] or 0) + amount
end
self.targets [nome] = (self.targets [nome] or 0) + amount
self.counter = self.counter + 1
if (resisted and resisted > 0) then
self.r_dmg = self.r_dmg+amount --> tabela.total o total de dano
self.r_amt = self.r_amt+1 --> tabela.total o total de dano
end
if (blocked and blocked > 0) then
self.b_dmg = self.b_dmg+amount --> amount o total de dano
self.b_amt = self.b_amt+1 --> amount o total de dano
end
if (absorbed and absorbed > 0) then
self.a_dmg = self.a_dmg+amount --> amount o total de dano
self.a_amt = self.a_amt+1 --> amount o total de dano
end
if (glacing) then
self.g_dmg = self.g_dmg+amount --> amount o total de dano
self.g_amt = self.g_amt+1 --> amount o total de dano
elseif (critical) then
self.c_dmg = self.c_dmg+amount --> amount o total de dano
self.c_amt = self.c_amt+1 --> amount o total de dano
if (amount > self.c_max) then
self.c_max = amount
end
if (self.c_min > amount or self.c_min == 0) then
self.c_min = amount
end
else
self.n_dmg = self.n_dmg+amount
self.n_amt = self.n_amt+1
if (amount > self.n_max) then
self.n_max = amount
end
if (self.n_min > amount or self.n_min == 0) then
self.n_min = amount
end
end
if (_recording_ability_with_buffs) then
if (who_nome == _detalhes.playername) then --aqui ele vai detalhar tudo sobre a magia usada
local buffsNames = _detalhes.SoloTables.BuffsTableNameCache
local SpellBuffDetails = self.BuffTable
if (not SpellBuffDetails) then
self.BuffTable = {}
SpellBuffDetails = self.BuffTable
end
if (token == "SPELL_PERIODIC_DAMAGE") then
--> precisa ver se ele tinha na hora que aplicou
local SoloDebuffPower = _detalhes.tabela_vigente.SoloDebuffPower
if (SoloDebuffPower) then
local ThisDebuff = SoloDebuffPower [self.id]
if (ThisDebuff) then
local ThisDebuffOnTarget = ThisDebuff [serial]
if (ThisDebuffOnTarget) then
for index, buff_name in _ipairs (ThisDebuffOnTarget.buffs) do
local buff_info = SpellBuffDetails [buff_name] or {["counter"] = 0, ["total"] = 0, ["critico"] = 0, ["critico_dano"] = 0}
buff_info.counter = buff_info.counter+1
buff_info.total = buff_info.total+amount
if (critical ~= nil) then
buff_info.critico = buff_info.critico+1
buff_info.critico_dano = buff_info.critico_dano+amount
end
SpellBuffDetails [buff_name] = buff_info
end
end
end
end
else
for BuffName, _ in _pairs (_detalhes.Buffs.BuffsTable) do
local name = _UnitAura ("player", BuffName)
if (name ~= nil) then
local buff_info = SpellBuffDetails [name] or {["counter"] = 0, ["total"] = 0, ["critico"] = 0, ["critico_dano"] = 0}
buff_info.counter = buff_info.counter+1
buff_info.total = buff_info.total+amount
if (critical ~= nil) then
buff_info.critico = buff_info.critico+1
buff_info.critico_dano = buff_info.critico_dano+amount
end
SpellBuffDetails [name] = buff_info
end
end
end
end
end
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> core
function _detalhes:UpdateDamageAbilityGears()
_recording_ability_with_buffs = _detalhes.RecordPlayerAbilityWithBuffs
end
--[[
if (isoffhand) then
self.off_amt = self.off_amt + 1
self.off_dmg = self.off_dmg + amount
else
self.main_amt = self.main_amt + 1
end
--]]
@@ -1,119 +1,119 @@
-- heal ability file
local _detalhes = _G._detalhes
local _
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
local alvo_da_habilidade = _detalhes.alvo_da_habilidade
local habilidade_cura = _detalhes.habilidade_cura
local container_combatentes = _detalhes.container_combatentes
local container_heal_target = _detalhes.container_type.CONTAINER_HEALTARGET_CLASS
local container_playernpc = _detalhes.container_type.CONTAINER_PLAYERNPC
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> internals
function habilidade_cura:NovaTabela (id, link)
local _newHealSpell = {
id = id,
counter = 0,
--> totals
total = 0,
totalabsorb = 0,
absorbed = 0,
overheal = 0,
totaldenied = 0,
--> multistrike
m_amt = 0,
m_healed = 0,
m_crit = 0,
--> normal hits
n_min = 0,
n_max = 0,
n_amt = 0,
n_curado = 0,
--> critical hits
c_min = 0,
c_max = 0,
c_amt = 0,
c_curado = 0,
--> targets containers
targets = {},
targets_overheal = {},
targets_absorbs = {}
}
return _newHealSpell
end
function habilidade_cura:Add (serial, nome, flag, amount, extraSpellID, absorbed, critical, overhealing, is_shield)
amount = amount or 0
self.targets [nome] = (self.targets [nome] or 0) + amount
if (absorbed == "SPELL_HEAL_ABSORBED") then
self.counter = self.counter + 1
self.totaldenied = self.totaldenied + amount
local healerName = critical
--create the denied table spells, on the fly
if (not self.heal_denied) then
self.heal_denied = {}
self.heal_denied_healers = {}
end
self.heal_denied [extraSpellID] = (self.heal_denied [extraSpellID] or 0) + amount
self.heal_denied_healers [healerName] = (self.heal_denied_healers [healerName] or 0) + amount
else
self.total = self.total + amount
self.counter = self.counter + 1
if (absorbed and absorbed > 0) then
self.absorbed = self.absorbed + absorbed
end
if (overhealing and overhealing > 0) then
self.overheal = self.overheal + overhealing
self.targets_overheal [nome] = (self.targets_overheal [nome] or 0) + overhealing
end
if (is_shield) then
self.totalabsorb = self.totalabsorb + amount
self.targets_absorbs [nome] = (self.targets_absorbs [nome] or 0) + amount
end
if (critical) then
self.c_curado = self.c_curado+amount --> amount o total de dano
self.c_amt = self.c_amt+1 --> amount o total de dano
if (amount > self.c_max) then
self.c_max = amount
end
if (self.c_min > amount or self.c_min == 0) then
self.c_min = amount
end
else
self.n_curado = self.n_curado+amount
self.n_amt = self.n_amt+1
if (amount > self.n_max) then
self.n_max = amount
end
if (self.n_min > amount or self.n_min == 0) then
self.n_min = amount
end
end
end
end
-- heal ability file
local _detalhes = _G._detalhes
local _
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
local alvo_da_habilidade = _detalhes.alvo_da_habilidade
local habilidade_cura = _detalhes.habilidade_cura
local container_combatentes = _detalhes.container_combatentes
local container_heal_target = _detalhes.container_type.CONTAINER_HEALTARGET_CLASS
local container_playernpc = _detalhes.container_type.CONTAINER_PLAYERNPC
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> internals
function habilidade_cura:NovaTabela (id, link)
local _newHealSpell = {
id = id,
counter = 0,
--> totals
total = 0,
totalabsorb = 0,
absorbed = 0,
overheal = 0,
totaldenied = 0,
--> multistrike
m_amt = 0,
m_healed = 0,
m_crit = 0,
--> normal hits
n_min = 0,
n_max = 0,
n_amt = 0,
n_curado = 0,
--> critical hits
c_min = 0,
c_max = 0,
c_amt = 0,
c_curado = 0,
--> targets containers
targets = {},
targets_overheal = {},
targets_absorbs = {}
}
return _newHealSpell
end
function habilidade_cura:Add (serial, nome, flag, amount, extraSpellID, absorbed, critical, overhealing, is_shield)
amount = amount or 0
self.targets [nome] = (self.targets [nome] or 0) + amount
if (absorbed == "SPELL_HEAL_ABSORBED") then
self.counter = self.counter + 1
self.totaldenied = self.totaldenied + amount
local healerName = critical
--create the denied table spells, on the fly
if (not self.heal_denied) then
self.heal_denied = {}
self.heal_denied_healers = {}
end
self.heal_denied [extraSpellID] = (self.heal_denied [extraSpellID] or 0) + amount
self.heal_denied_healers [healerName] = (self.heal_denied_healers [healerName] or 0) + amount
else
self.total = self.total + amount
self.counter = self.counter + 1
if (absorbed and absorbed > 0) then
self.absorbed = self.absorbed + absorbed
end
if (overhealing and overhealing > 0) then
self.overheal = self.overheal + overhealing
self.targets_overheal [nome] = (self.targets_overheal [nome] or 0) + overhealing
end
if (is_shield) then
self.totalabsorb = self.totalabsorb + amount
self.targets_absorbs [nome] = (self.targets_absorbs [nome] or 0) + amount
end
if (critical) then
self.c_curado = self.c_curado+amount --> amount o total de dano
self.c_amt = self.c_amt+1 --> amount o total de dano
if (amount > self.c_max) then
self.c_max = amount
end
if (self.c_min > amount or self.c_min == 0) then
self.c_min = amount
end
else
self.n_curado = self.n_curado+amount
self.n_amt = self.n_amt+1
if (amount > self.n_max) then
self.n_max = amount
end
if (self.n_min > amount or self.n_min == 0) then
self.n_min = amount
end
end
end
end
@@ -1,45 +1,45 @@
-- energy ability file
local _detalhes = _G._detalhes
local _
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> local pointers
local _setmetatable = setmetatable --lua local
local _ipairs = ipairs --lua local
local _UnitAura = UnitAura --api local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
local alvo_da_habilidade = _detalhes.alvo_da_habilidade
local habilidade_energy = _detalhes.habilidade_e_energy
local container_combatentes = _detalhes.container_combatentes
local container_energy_target = _detalhes.container_type.CONTAINER_ENERGYTARGET_CLASS
local container_playernpc = _detalhes.container_type.CONTAINER_PLAYERNPC
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> internals
function habilidade_energy:NovaTabela (id, link, token)
local _newEnergySpell = {
id = id,
counter = 0,
total = 0,
totalover = 0,
targets = {}
}
return _newEnergySpell
end
function habilidade_energy:Add (serial, nome, flag, amount, who_nome, powertype, overpower)
self.counter = self.counter + 1
self.total = self.total + amount
self.totalover = self.totalover + overpower
self.targets [nome] = (self.targets [nome] or 0) + amount
end
-- energy ability file
local _detalhes = _G._detalhes
local _
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> local pointers
local _setmetatable = setmetatable --lua local
local _ipairs = ipairs --lua local
local _UnitAura = UnitAura --api local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
local alvo_da_habilidade = _detalhes.alvo_da_habilidade
local habilidade_energy = _detalhes.habilidade_e_energy
local container_combatentes = _detalhes.container_combatentes
local container_energy_target = _detalhes.container_type.CONTAINER_ENERGYTARGET_CLASS
local container_playernpc = _detalhes.container_type.CONTAINER_PLAYERNPC
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> internals
function habilidade_energy:NovaTabela (id, link, token)
local _newEnergySpell = {
id = id,
counter = 0,
total = 0,
totalover = 0,
targets = {}
}
return _newEnergySpell
end
function habilidade_energy:Add (serial, nome, flag, amount, who_nome, powertype, overpower)
self.counter = self.counter + 1
self.total = self.total + amount
self.totalover = self.totalover + overpower
self.targets [nome] = (self.targets [nome] or 0) + amount
end
@@ -1,162 +1,162 @@
-- misc ability file
local _detalhes = _G._detalhes
local _
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> local pointers
local _setmetatable = setmetatable --lua local
local _ipairs = ipairs --lua local
local _UnitAura = UnitAura --api local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
local alvo_da_habilidade = _detalhes.alvo_da_habilidade
local habilidade_misc = _detalhes.habilidade_misc
local container_combatentes = _detalhes.container_combatentes
local container_misc_target = _detalhes.container_type.CONTAINER_MISCTARGET_CLASS
local container_playernpc = _detalhes.container_type.CONTAINER_PLAYERNPC
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> internals
function habilidade_misc:NovaTabela (id, link, token)
local _newMiscSpell = {
id = id,
counter = 0,
targets = {}
}
if (token == "BUFF_UPTIME" or token == "DEBUFF_UPTIME") then
_newMiscSpell.uptime = 0
_newMiscSpell.actived = false
_newMiscSpell.activedamt = 0 --so quantos estao ativados no momento
_newMiscSpell.refreshamt = 0
_newMiscSpell.appliedamt = 0
elseif (token == "SPELL_INTERRUPT") then
_newMiscSpell.interrompeu_oque = {}
elseif (token == "SPELL_DISPEL" or token == "SPELL_STOLEN") then
_newMiscSpell.dispell_oque = {}
elseif (token == "SPELL_AURA_BROKEN" or token == "SPELL_AURA_BROKEN_SPELL") then
_newMiscSpell.cc_break_oque = {}
end
return _newMiscSpell
end
function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spellName)
--print (self.id, GetSpellInfo (self.id))
if (spellID == "BUFF_OR_DEBUFF") then
if (spellName == "COOLDOWN") then
self.counter = self.counter + 1
--> target
self.targets [nome] = (self.targets [nome] or 0) + 1
elseif (spellName == "BUFF_UPTIME_REFRESH") then
if (self.actived_at and self.actived) then
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
self.refreshamt = self.refreshamt + 1
token.buff_uptime = token.buff_uptime + _detalhes._tempo - self.actived_at --> token = actor misc object
end
self.actived_at = _detalhes._tempo
self.actived = true
elseif (spellName == "BUFF_UPTIME_OUT") then
if (self.actived_at and self.actived) then
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
token.buff_uptime = token.buff_uptime + _detalhes._tempo - self.actived_at --> token = actor misc object
end
self.actived = false
self.actived_at = nil
elseif (spellName == "BUFF_UPTIME_IN" or spellName == "DEBUFF_UPTIME_IN") then
self.actived = true
self.activedamt = self.activedamt + 1
self.appliedamt = self.appliedamt + 1
if (self.actived_at and self.actived and spellName == "DEBUFF_UPTIME_IN") then
--> ja esta ativo em outro mob e jogou num novo
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
token.debuff_uptime = token.debuff_uptime + _detalhes._tempo - self.actived_at
end
self.actived_at = _detalhes._tempo
elseif (spellName == "DEBUFF_UPTIME_REFRESH") then
if (self.actived_at and self.actived) then
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
self.refreshamt = self.refreshamt + 1
token.debuff_uptime = token.debuff_uptime + _detalhes._tempo - self.actived_at
end
self.actived_at = _detalhes._tempo
self.actived = true
elseif (spellName == "DEBUFF_UPTIME_OUT") then
if (self.actived_at and self.actived) then
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
token.debuff_uptime = token.debuff_uptime + _detalhes._tempo - self.actived_at --> token = actor misc object
end
self.activedamt = self.activedamt - 1
if (self.activedamt == 0) then
self.actived = false
self.actived_at = nil
else
self.actived_at = _detalhes._tempo
end
end
elseif (token == "SPELL_INTERRUPT") then
self.counter = self.counter + 1
if (not self.interrompeu_oque [spellID]) then
self.interrompeu_oque [spellID] = 1
else
self.interrompeu_oque [spellID] = self.interrompeu_oque [spellID] + 1
end
--> target
self.targets [nome] = (self.targets [nome] or 0) + 1
elseif (token == "SPELL_RESURRECT") then
self.ress = (self.ress or 0) + 1
--> target
self.targets [nome] = (self.targets [nome] or 0) + 1
elseif (token == "SPELL_DISPEL" or token == "SPELL_STOLEN") then
self.dispell = (self.dispell or 0) + 1
if (not self.dispell_oque [spellID]) then
self.dispell_oque [spellID] = 1
else
self.dispell_oque [spellID] = self.dispell_oque [spellID] + 1
end
--> target
self.targets [nome] = (self.targets [nome] or 0) + 1
elseif (token == "SPELL_AURA_BROKEN_SPELL" or token == "SPELL_AURA_BROKEN") then
self.cc_break = (self.cc_break or 0) + 1
if (not self.cc_break_oque [spellID]) then
self.cc_break_oque [spellID] = 1
else
self.cc_break_oque [spellID] = self.cc_break_oque [spellID] + 1
end
--> target
self.targets [nome] = (self.targets [nome] or 0) + 1
end
end
-- misc ability file
local _detalhes = _G._detalhes
local _
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> local pointers
local _setmetatable = setmetatable --lua local
local _ipairs = ipairs --lua local
local _UnitAura = UnitAura --api local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
local alvo_da_habilidade = _detalhes.alvo_da_habilidade
local habilidade_misc = _detalhes.habilidade_misc
local container_combatentes = _detalhes.container_combatentes
local container_misc_target = _detalhes.container_type.CONTAINER_MISCTARGET_CLASS
local container_playernpc = _detalhes.container_type.CONTAINER_PLAYERNPC
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> internals
function habilidade_misc:NovaTabela (id, link, token)
local _newMiscSpell = {
id = id,
counter = 0,
targets = {}
}
if (token == "BUFF_UPTIME" or token == "DEBUFF_UPTIME") then
_newMiscSpell.uptime = 0
_newMiscSpell.actived = false
_newMiscSpell.activedamt = 0 --so quantos estao ativados no momento
_newMiscSpell.refreshamt = 0
_newMiscSpell.appliedamt = 0
elseif (token == "SPELL_INTERRUPT") then
_newMiscSpell.interrompeu_oque = {}
elseif (token == "SPELL_DISPEL" or token == "SPELL_STOLEN") then
_newMiscSpell.dispell_oque = {}
elseif (token == "SPELL_AURA_BROKEN" or token == "SPELL_AURA_BROKEN_SPELL") then
_newMiscSpell.cc_break_oque = {}
end
return _newMiscSpell
end
function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spellName)
--print (self.id, GetSpellInfo (self.id))
if (spellID == "BUFF_OR_DEBUFF") then
if (spellName == "COOLDOWN") then
self.counter = self.counter + 1
--> target
self.targets [nome] = (self.targets [nome] or 0) + 1
elseif (spellName == "BUFF_UPTIME_REFRESH") then
if (self.actived_at and self.actived) then
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
self.refreshamt = self.refreshamt + 1
token.buff_uptime = token.buff_uptime + _detalhes._tempo - self.actived_at --> token = actor misc object
end
self.actived_at = _detalhes._tempo
self.actived = true
elseif (spellName == "BUFF_UPTIME_OUT") then
if (self.actived_at and self.actived) then
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
token.buff_uptime = token.buff_uptime + _detalhes._tempo - self.actived_at --> token = actor misc object
end
self.actived = false
self.actived_at = nil
elseif (spellName == "BUFF_UPTIME_IN" or spellName == "DEBUFF_UPTIME_IN") then
self.actived = true
self.activedamt = self.activedamt + 1
self.appliedamt = self.appliedamt + 1
if (self.actived_at and self.actived and spellName == "DEBUFF_UPTIME_IN") then
--> ja esta ativo em outro mob e jogou num novo
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
token.debuff_uptime = token.debuff_uptime + _detalhes._tempo - self.actived_at
end
self.actived_at = _detalhes._tempo
elseif (spellName == "DEBUFF_UPTIME_REFRESH") then
if (self.actived_at and self.actived) then
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
self.refreshamt = self.refreshamt + 1
token.debuff_uptime = token.debuff_uptime + _detalhes._tempo - self.actived_at
end
self.actived_at = _detalhes._tempo
self.actived = true
elseif (spellName == "DEBUFF_UPTIME_OUT") then
if (self.actived_at and self.actived) then
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
token.debuff_uptime = token.debuff_uptime + _detalhes._tempo - self.actived_at --> token = actor misc object
end
self.activedamt = self.activedamt - 1
if (self.activedamt == 0) then
self.actived = false
self.actived_at = nil
else
self.actived_at = _detalhes._tempo
end
end
elseif (token == "SPELL_INTERRUPT") then
self.counter = self.counter + 1
if (not self.interrompeu_oque [spellID]) then
self.interrompeu_oque [spellID] = 1
else
self.interrompeu_oque [spellID] = self.interrompeu_oque [spellID] + 1
end
--> target
self.targets [nome] = (self.targets [nome] or 0) + 1
elseif (token == "SPELL_RESURRECT") then
self.ress = (self.ress or 0) + 1
--> target
self.targets [nome] = (self.targets [nome] or 0) + 1
elseif (token == "SPELL_DISPEL" or token == "SPELL_STOLEN") then
self.dispell = (self.dispell or 0) + 1
if (not self.dispell_oque [spellID]) then
self.dispell_oque [spellID] = 1
else
self.dispell_oque [spellID] = self.dispell_oque [spellID] + 1
end
--> target
self.targets [nome] = (self.targets [nome] or 0) + 1
elseif (token == "SPELL_AURA_BROKEN_SPELL" or token == "SPELL_AURA_BROKEN") then
self.cc_break = (self.cc_break or 0) + 1
if (not self.cc_break_oque [spellID]) then
self.cc_break_oque [spellID] = 1
else
self.cc_break_oque [spellID] = self.cc_break_oque [spellID] + 1
end
--> target
self.targets [nome] = (self.targets [nome] or 0) + 1
end
end
File diff suppressed because it is too large Load Diff
-51
View File
@@ -1,51 +0,0 @@
-- class target file
local _detalhes = _G._detalhes
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> local pointers
local _setmetatable = setmetatable --lua local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
local alvo_da_habilidade = _detalhes.alvo_da_habilidade
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> internals
function alvo_da_habilidade:NovaTabela (link)
local esta_tabela = {total = 0}
_setmetatable (esta_tabela, alvo_da_habilidade)
return esta_tabela
end
function alvo_da_habilidade:AddQuantidade (amt)
self.total = self.total + amt
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> core
function _detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow)
_setmetatable (este_alvo, alvo_da_habilidade)
este_alvo.__index = alvo_da_habilidade
este_alvo.shadow = shadow._ActorTable [shadow._NameIndexTable [este_alvo.nome]]
end
function _detalhes.clear:c_alvo_da_habilidade (este_alvo)
este_alvo.shadow = nil
--este_alvo.__index = {}
este_alvo.__index = nil
end
alvo_da_habilidade.__sub = function (tabela1, tabela2)
tabela1.total = tabela1.total - tabela2.total
if (tabela1.overheal) then
tabela1.overheal = tabela1.overheal - tabela2.overheal
tabela1.absorbed = tabela1.absorbed - tabela2.absorbed
end
end
File diff suppressed because it is too large Load Diff
+23 -38
View File
@@ -1,15 +1,14 @@
local _detalhes = _G._detalhes
local gump = _detalhes.gump
local container_pets = _detalhes.container_pets
-- api locals
local _UnitGUID = UnitGUID
local _UnitName = UnitName
local _GetUnitName = GetUnitName
local _IsInRaid = IsInRaid
local _IsInGroup = IsInGroup
local _GetNumGroupMembers = GetNumGroupMembers
local _UnitGUID = _G.UnitGUID
local _UnitName = _G.UnitName
local _GetUnitName = _G.GetUnitName
local _IsInRaid = _G.IsInRaid
local _IsInGroup = _G.IsInGroup
local _GetNumGroupMembers = _G.GetNumGroupMembers
-- lua locals
local _setmetatable = setmetatable
@@ -43,19 +42,17 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
--> buscar pelo pet no container de pets
local busca = self.pets [pet_serial]
if (busca) then
--in merging operations, make sure to not add the owner name a second time in the name
--in merging operations, make sure to not add the owner name a second time in the name
--check if the pet name already has the owner name in, if not, add it
if (not pet_nome:find ("<")) then
--get the owner name
local ownerName = busca[1]
--add the owner name to the pet name
pet_nome = pet_nome .. " <".. ownerName ..">"
end
--check if the pet name already has the owner name in, if not, add it
if (not pet_nome:find ("<")) then
--get the owner name
local ownerName = busca[1]
--add the owner name to the pet name
pet_nome = pet_nome .. " <".. ownerName ..">"
end
return pet_nome, busca[1], busca[2], busca[3] --> [1] dono nome [2] dono serial [3] dono flag
return pet_nome, busca[1], busca[2], busca[3] --> [1] dono nome [2] dono serial [3] dono flag
end
--> buscar pelo pet na raide
@@ -122,9 +119,6 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
is_ignored [pet_serial] = true
end
end
--> no pode encontrar o dono do pet, coloca-lo na ignore
return
end
@@ -220,19 +214,11 @@ function container_pets:Remover (pet_serial)
end
function container_pets:Adicionar (pet_serial, pet_nome, pet_flags, dono_serial, dono_nome, dono_flags)
if (pet_flags and _bit_band (pet_flags, OBJECT_TYPE_PET) ~= 0 and _bit_band (pet_flags, EM_GRUPO) ~= 0) then
self.pets [pet_serial] = {dono_nome, dono_serial, dono_flags, _detalhes._tempo, true, pet_nome, pet_serial}
--if (pet_nome == "Guardian of Ancient Kings") then --remover
-- print ("SUMMON", "Adicionou ao container")
--end
else
self.pets [pet_serial] = {dono_nome, dono_serial, dono_flags, _detalhes._tempo, false, pet_nome, pet_serial}
--if (pet_nome == "Guardian of Ancient Kings") then --remover
-- print ("SUMMON", "Adicionou ao container")
--end
end
end
function _detalhes:WipePets()
@@ -240,17 +226,15 @@ function _detalhes:WipePets()
end
function _detalhes:LimparPets()
--> elimina pets antigos
local _new_PetTable = {}
--> erase old pet table by creating a new one
local newPetTable = {}
--> minimum of 90 minutes to clean a pet from the pet table data
for PetSerial, PetTable in _pairs (_detalhes.tabela_pets.pets) do
if ( (PetTable[4] + 5400 > _detalhes._tempo + 1) or (PetTable[5] and PetTable[4] + 43200 > _detalhes._tempo) ) then
_new_PetTable [PetSerial] = PetTable
newPetTable [PetSerial] = PetTable
end
end
--a tabela antiga ser descartada pelo garbage collector.
--_table_wipe (_detalhes.tabela_pets.pets)
_detalhes.tabela_pets.pets = _new_PetTable
_detalhes.tabela_pets.pets = newPetTable
_detalhes:UpdateContainerCombatentes()
end
@@ -265,11 +249,12 @@ function _detalhes:SchedulePetUpdate (seconds)
return
end
have_schedule = true
_detalhes:ScheduleTimer ("UpdatePets", seconds or 5)
--_detalhes:ScheduleTimer ("UpdatePets", seconds or 5)
Details.Schedules.NewTimer(seconds or 5, Details.UpdatePets, Details)
end
function _detalhes.refresh:r_container_pets (container)
_setmetatable (container, container_pets)
--container.__index = container_pets
end
File diff suppressed because it is too large Load Diff
@@ -1,111 +1,111 @@
-- spells container file
local _detalhes = _G._detalhes
local _
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> local pointers
local _setmetatable = setmetatable --lua local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
local container_playernpc = _detalhes.container_type.CONTAINER_PLAYERNPC
local container_damage = _detalhes.container_type.CONTAINER_DAMAGE_CLASS
local container_heal = _detalhes.container_type.CONTAINER_HEAL_CLASS
local container_heal_target = _detalhes.container_type.CONTAINER_HEALTARGET_CLASS
local container_friendlyfire = _detalhes.container_type.CONTAINER_FRIENDLYFIRE
local container_damage_target = _detalhes.container_type.CONTAINER_DAMAGETARGET_CLASS
local container_energy = _detalhes.container_type.CONTAINER_ENERGY_CLASS
local container_energy_target = _detalhes.container_type.CONTAINER_ENERGYTARGET_CLASS
local container_misc = _detalhes.container_type.CONTAINER_MISC_CLASS
local container_misc_target = _detalhes.container_type.CONTAINER_MISCTARGET_CLASS
local habilidade_dano = _detalhes.habilidade_dano
local habilidade_cura = _detalhes.habilidade_cura
local habilidade_e_energy = _detalhes.habilidade_e_energy
local habilidade_misc = _detalhes.habilidade_misc
local container_habilidades = _detalhes.container_habilidades
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> internals
function container_habilidades:NovoContainer (tipo_do_container)
local _newContainer = {
funcao_de_criacao = container_habilidades:FuncaoDeCriacao (tipo_do_container),
tipo = tipo_do_container,
_ActorTable = {}
}
_setmetatable (_newContainer, container_habilidades)
return _newContainer
end
function container_habilidades:GetSpell (id)
return self._ActorTable [id]
end
function container_habilidades:GetAmount (id, key)
local spell = self._ActorTable [id]
if (spell) then
return spell [key]
end
end
function container_habilidades:ListActors()
return pairs (self._ActorTable)
end
function container_habilidades:PegaHabilidade (id, criar, token, cria_shadow)
local esta_habilidade = self._ActorTable [id]
if (esta_habilidade) then
return esta_habilidade
else
if (criar) then
local novo_objeto = self.funcao_de_criacao (nil, id, shadow_objeto, token)
self._ActorTable [id] = novo_objeto
return novo_objeto
else
return nil
end
end
end
function container_habilidades:FuncaoDeCriacao (tipo)
if (tipo == container_damage) then
return habilidade_dano.NovaTabela
elseif (tipo == container_heal) then
return habilidade_cura.NovaTabela
elseif (tipo == container_energy) then
return habilidade_e_energy.NovaTabela
elseif (tipo == container_misc) then
return habilidade_misc.NovaTabela
end
end
function _detalhes.refresh:r_container_habilidades (container, shadow)
--> reconstri meta e indexes
_setmetatable (container, _detalhes.container_habilidades)
container.__index = _detalhes.container_habilidades
local func_criacao = container_habilidades:FuncaoDeCriacao (container.tipo)
container.funcao_de_criacao = func_criacao
end
function _detalhes.clear:c_container_habilidades (container)
--container.__index = {}
container.__index = nil
container.shadow = nil
container.funcao_de_criacao = nil
end
-- spells container file
local _detalhes = _G._detalhes
local _
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> local pointers
local _setmetatable = setmetatable --lua local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
local container_playernpc = _detalhes.container_type.CONTAINER_PLAYERNPC
local container_damage = _detalhes.container_type.CONTAINER_DAMAGE_CLASS
local container_heal = _detalhes.container_type.CONTAINER_HEAL_CLASS
local container_heal_target = _detalhes.container_type.CONTAINER_HEALTARGET_CLASS
local container_friendlyfire = _detalhes.container_type.CONTAINER_FRIENDLYFIRE
local container_damage_target = _detalhes.container_type.CONTAINER_DAMAGETARGET_CLASS
local container_energy = _detalhes.container_type.CONTAINER_ENERGY_CLASS
local container_energy_target = _detalhes.container_type.CONTAINER_ENERGYTARGET_CLASS
local container_misc = _detalhes.container_type.CONTAINER_MISC_CLASS
local container_misc_target = _detalhes.container_type.CONTAINER_MISCTARGET_CLASS
local habilidade_dano = _detalhes.habilidade_dano
local habilidade_cura = _detalhes.habilidade_cura
local habilidade_e_energy = _detalhes.habilidade_e_energy
local habilidade_misc = _detalhes.habilidade_misc
local container_habilidades = _detalhes.container_habilidades
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> internals
function container_habilidades:NovoContainer (tipo_do_container)
local _newContainer = {
funcao_de_criacao = container_habilidades:FuncaoDeCriacao (tipo_do_container),
tipo = tipo_do_container,
_ActorTable = {}
}
_setmetatable (_newContainer, container_habilidades)
return _newContainer
end
function container_habilidades:GetSpell (id)
return self._ActorTable [id]
end
function container_habilidades:GetAmount (id, key)
local spell = self._ActorTable [id]
if (spell) then
return spell [key]
end
end
function container_habilidades:ListActors()
return pairs (self._ActorTable)
end
function container_habilidades:PegaHabilidade (id, criar, token, cria_shadow)
local esta_habilidade = self._ActorTable [id]
if (esta_habilidade) then
return esta_habilidade
else
if (criar) then
local novo_objeto = self.funcao_de_criacao (nil, id, shadow_objeto, token)
self._ActorTable [id] = novo_objeto
return novo_objeto
else
return nil
end
end
end
function container_habilidades:FuncaoDeCriacao (tipo)
if (tipo == container_damage) then
return habilidade_dano.NovaTabela
elseif (tipo == container_heal) then
return habilidade_cura.NovaTabela
elseif (tipo == container_energy) then
return habilidade_e_energy.NovaTabela
elseif (tipo == container_misc) then
return habilidade_misc.NovaTabela
end
end
function _detalhes.refresh:r_container_habilidades (container, shadow)
--> reconstri meta e indexes
_setmetatable (container, _detalhes.container_habilidades)
container.__index = _detalhes.container_habilidades
local func_criacao = container_habilidades:FuncaoDeCriacao (container.tipo)
container.funcao_de_criacao = func_criacao
end
function _detalhes.clear:c_container_habilidades (container)
--container.__index = {}
container.__index = nil
container.shadow = nil
container.funcao_de_criacao = nil
end
-312
View File
@@ -1,312 +0,0 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> attributes functions for customs
--> DAMAGEDONE
--> 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
local temp_table = {}
local target_func = function (main_table)
local i = 1
for name, amount in _pairs (main_table) do
local t = temp_table [i]
if (not t) then
t = {"", 0}
temp_table [i] = t
end
t[1] = name
t[2] = amount
i = i + 1
end
end
local spells_used_func = function (main_table, target)
local i = 1
for spellid, spell_table in _pairs (main_table) do
local target_amount = spell_table.targets [target]
if (target_amount) then
local t = temp_table [i]
if (not t) then
t = {"", 0}
temp_table [i] = t
end
t[1] = spellid
t[2] = target_amount
i = i + 1
end
end
end
local function SortOrder (main_table, func, ...)
for i = 1, #temp_table do
temp_table [i][1] = ""
temp_table [i][2] = 0
end
func (main_table, ...)
_table_sort (temp_table, _detalhes.Sort2)
return temp_table
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> damagedone tooltip
function atributo_custom:damagedoneTooltip (actor, target, spellid, combat, instance)
if (spellid) then
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.spells._ActorTable [spellid]
if (spell) then
local on_me = spell.targets [targetname]
if (on_me) then
GameCooltip:AddLine (aggressor.nome, FormatTooltipNumber (_, on_me))
_detalhes:AddTooltipBackgroundStatusbar()
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
SortOrder (actor.targets, target_func)
for i = 1, #temp_table do
local t = temp_table [i]
if (t[2] < 1) then
break
end
GameCooltip:AddLine (t[1], FormatTooltipNumber (_, t[2]))
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon ([[Interface\FriendsFrame\StatusIcon-Offline]], 1, 1, 14, 14)
end
elseif (target == "[raid]") then
local roster = combat.raid_roster
SortOrder (actor.targets, target_func)
for i = 1, #temp_table do
local t = temp_table [i]
if (t[2] < 1) then
break
end
if (roster [t[1]]) then
GameCooltip:AddLine (t[1], FormatTooltipNumber (_, t[2]))
_detalhes:AddTooltipBackgroundStatusbar()
end
end
elseif (target == "[player]") then
local target_amount = actor.targets [_detalhes.playername]
if (target_amount) then
GameCooltip:AddLine (targetactor.nome, FormatTooltipNumber (_, target_amount))
_detalhes:AddTooltipBackgroundStatusbar()
end
else
SortOrder (actor.spells._ActorTable, spells_used_func, target)
for i = 1, #temp_table do
local t = temp_table [i]
if (t[2] < 1) then
break
end
local name, _, icon = _GetSpellInfo (t[1])
GameCooltip:AddLine (name, FormatTooltipNumber (_, t[2]))
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
end
--for index, pet_name in ipairs (actor.pets) do
--end
end
else
actor:ToolTip_DamageDone (instance)
end
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> damagedone search
function atributo_custom:damagedone (actor, source, target, spellid, combat, instance_container)
if (spellid) then --> spell is always damagedone
local spell = actor.spells._ActorTable [spellid]
if (spell) then
if (target) then
if (target == "[all]") then
for target_name, amount in _pairs (spell.targets) do
--> add amount
--> we need to pass a object here in order to get name and class, so we just get the main damage actor from the combat
instance_container:AddValue (combat (1, target_name), amount, true)
--
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + amount
--> add to processed container
if (not atributo_custom._TargetActorsProcessed [target_name]) then
atributo_custom._TargetActorsProcessed [target_name] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
end
end
return 0, true
elseif (target == "[raid]") then
local roster = combat.raid_roster
for target_name, amount in _pairs (spell.targets) do
if (roster [target_name]) then
--> add amount
instance_container:AddValue (combat (1, target_name), amount, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + amount
--> add to processed container
if (not atributo_custom._TargetActorsProcessed [target_name]) then
atributo_custom._TargetActorsProcessed [target_name] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
end
end
end
return 0, true
elseif (target == "[player]") then
local target_amount = spell.targets [_detalhes.playername]
if (target_amount) then
--> add amount
instance_container:AddValue (combat (1, _detalhes.playername), target_amount, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + target_amount
--> add to processed container
if (not atributo_custom._TargetActorsProcessed [_detalhes.playername]) then
atributo_custom._TargetActorsProcessed [_detalhes.playername] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
end
end
return 0, true
else
local target_amount = actor.targets [target]
if (target_amount) then
--> add amount
instance_container:AddValue (combat (1, target), target_amount, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + target_amount
--> add to processed container
if (not atributo_custom._TargetActorsProcessed [target]) then
atributo_custom._TargetActorsProcessed [target] = 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
local total = 0
for target_name, amount in _pairs (actor.targets) do
total = total + amount
end
return total
elseif (target == "[raid]") then
local total = 0
for target_name, amount in _pairs (actor.targets) do
if (combat.raid_roster [target_name]) then
total = total + amount
end
end
return total
elseif (target == "[player]") then
return actor.targets [_detalhes.playername] or 0
else
return actor.targets [target] or 0
end
else
return actor.total or 0
end
end
-251
View File
@@ -1,251 +0,0 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> 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
+18
View File
@@ -0,0 +1,18 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> attributes functions for customs
--> DAMAGEDONE
--> customized display script
local _detalhes = _G._detalhes
local _
local atributo_custom = _detalhes.atributo_custom
local ToKFunctions = _detalhes.ToKFunctions
function atributo_custom:UpdateDamageDoneBracket()
SelectedToKFunction = ToKFunctions [_detalhes.ps_abbreviation]
FormatTooltipNumber = ToKFunctions [_detalhes.tooltip.abbreviation]
TooltipMaximizedMethod = _detalhes.tooltip.maximize_method
end
-307
View File
@@ -1,307 +0,0 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> 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
local temp_table = {}
local target_func = function (main_table)
local i = 1
for name, amount in _pairs (main_table) do
local t = temp_table [i]
if (not t) then
t = {"", 0}
temp_table [i] = t
end
t[1] = name
t[2] = amount
i = i + 1
end
end
local spells_used_func = function (main_table, target)
local i = 1
for spellid, spell_table in _pairs (main_table) do
local target_amount = spell_table.targets [target]
if (target_amount) then
local t = temp_table [i]
if (not t) then
t = {"", 0}
temp_table [i] = t
end
t[1] = spellid
t[2] = target_amount
i = i + 1
end
end
end
local function SortOrder (main_table, func, ...)
for i = 1, #temp_table do
temp_table [i][1] = ""
temp_table [i][2] = 0
end
func (main_table, ...)
_table_sort (temp_table, _detalhes.Sort2)
return temp_table
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> healing done tooltip
function atributo_custom:healdoneTooltip (actor, target, spellid, combat, instance)
if (spellid) then
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.spells._ActorTable [spellid]
if (spell) then
local on_me = spell.targets [targetname]
if (on_me) then
GameCooltip:AddLine (healer.nome, FormatTooltipNumber (_, on_me))
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
SortOrder (actor.targets, target_func)
for i = 1, #temp_table do
local t = temp_table [i]
if (t[2] < 1) then
break
end
GameCooltip:AddLine (t[1], FormatTooltipNumber (_, t[2]))
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon ([[Interface\FriendsFrame\StatusIcon-Offline]], 1, 1, 14, 14)
end
elseif (target == "[raid]") then
local roster = combat.raid_roster
SortOrder (actor.targets, target_func)
for i = 1, #temp_table do
local t = temp_table [i]
if (t[2] < 1) then
break
end
if (roster [t[1]]) then
GameCooltip:AddLine (t[1], FormatTooltipNumber (_, t[2]))
end
end
elseif (target == "[player]") then
local target_amount = actor.targets [_detalhes.playername]
if (target_amount) then
GameCooltip:AddLine (targetactor.nome, FormatTooltipNumber (_, target_amount))
end
else
SortOrder (actor.spells._ActorTable, spells_used_func, target)
for i = 1, #temp_table do
local t = temp_table [i]
if (t[2] < 1) then
break
end
local name, _, icon = _GetSpellInfo (t[1])
GameCooltip:AddLine (name, FormatTooltipNumber (_, t[2]))
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
end
end
else
actor:ToolTip_HealingDone (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.spells._ActorTable [spellid]
local melee = actor.spells._ActorTable [1]
if (spell) then
if (target) then
if (target == "[all]") then
for target_name, amount in _pairs (spell.targets) do
--> add amount
--> we need to pass a object here in order to get name and class, so we just get the main heal actor from the combat
instance_container:AddValue (combat (1, target_name), amount, true)
--
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + amount
--> add to processed container
if (not atributo_custom._TargetActorsProcessed [target_name]) then
atributo_custom._TargetActorsProcessed [target_name] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
end
end
return 0, true
elseif (target == "[raid]") then
local roster = combat.raid_roster
for target_name, amount in _pairs (spell.targets) do
if (roster [target_name]) then
--> add amount
instance_container:AddValue (combat (1, target_name), amount, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + amount
--> add to processed container
if (not atributo_custom._TargetActorsProcessed [target_name]) then
atributo_custom._TargetActorsProcessed [target_name] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
end
end
end
return 0, true
elseif (target == "[player]") then
local target_amount = spell.targets [_detalhes.playername]
if (target_amount) then
--> add amount
instance_container:AddValue (combat (1, _detalhes.playername), target_amount, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + target_amount
--> add to processed container
if (not atributo_custom._TargetActorsProcessed [_detalhes.playername]) then
atributo_custom._TargetActorsProcessed [_detalhes.playername] = true
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
end
end
return 0, true
else
local target_amount = actor.targets [target]
if (target_amount) then
--> add amount
instance_container:AddValue (combat (1, target), target_amount, true)
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + target_amount
--> add to processed container
if (not atributo_custom._TargetActorsProcessed [target]) then
atributo_custom._TargetActorsProcessed [target] = 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
local total = 0
for target_name, amount in _pairs (actor.targets) do
total = total + amount
end
return total
elseif (target == "[raid]") then
local total = 0
for target_name, amount in _pairs (actor.targets) do
if (combat.raid_roster [target_name]) then
total = total + amount
end
end
return total
elseif (target == "[player]") then
return actor.targets [_detalhes.playername] or 0
else
return actor.targets [targetactor] or 0
end
else
return actor.total or 0
end
end
+11
View File
@@ -0,0 +1,11 @@
local _detalhes = _G._detalhes
local _
local atributo_custom = _detalhes.atributo_custom
local ToKFunctions = _detalhes.ToKFunctions
function atributo_custom:UpdateHealingDoneBracket()
SelectedToKFunction = ToKFunctions [_detalhes.ps_abbreviation]
FormatTooltipNumber = ToKFunctions [_detalhes.tooltip.abbreviation]
TooltipMaximizedMethod = _detalhes.tooltip.maximize_method
end
@@ -1,389 +1,400 @@
--default values for instances (windows)
--if a new value is added here and it does not exists (nil) in the instance, it'll be copied into it
--the value added can be overwritten in the skins.lua file or /run Details:GetWindow(1).<value> =
--or thought a new option in the options panel
--values added into 'instance_skin_ignored_values' won't be passed when the user exports the profile or exports the skin individually.
local _detalhes = _G._detalhes
local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
function _detalhes:ResetInstanceConfig (maintainsnap)
for key, value in pairs (_detalhes.instance_defaults) do
if (type (value) == "table") then
self [key] = table_deepcopy (value)
else
self [key] = value
end
end
if (not maintainsnap) then
self.snap = {}
self.horizontalSnap = nil
self.verticalSnap = nil
self:LockInstance (false)
end
end
_detalhes.instance_skin_ignored_values = {
["menu_icons"] = true,
["auto_hide"] = true,
["scale"] = true,
["following"] = true,
["auto_current"] = true,
["bars_grow_direction"] = true,
["bars_sort_direction"] = true,
["auto_hide_menu"] = true,
["menu_alpha"] = true,
["total_bar"] = true,
["hide_in_combat"] = true,
["hide_out_of_combat"] = true,
["hide_in_combat_type"] = true,
["hide_in_combat_alpha"] = true,
["switch_all_roles_in_combat"] = true,
["switch_all_roles_after_wipe"] = true,
["switch_damager"] = true,
["switch_damager_in_combat"] = true,
["switch_healer"] = true,
["switch_healer_in_combat"] = true,
["switch_tank"] = true,
["switch_tank_in_combat"] = true,
["strata"] = true,
["grab_on_top"] = true,
["libwindow"] = true,
["ignore_mass_showhide"] = true,
["window_scale"] = true,
}
function _detalhes:ResetInstanceConfigKeepingValues (maintainsnap)
for key, value in pairs (_detalhes.instance_defaults) do
if (not _detalhes.instance_skin_ignored_values [key]) then
if (type (value) == "table") then
self [key] = table_deepcopy (value)
else
self [key] = value
end
end
end
if (not maintainsnap) then
self.snap = {}
self.horizontalSnap = nil
self.verticalSnap = nil
self:LockInstance (false)
end
end
function _detalhes:LoadInstanceConfig()
for key, value in pairs (_detalhes.instance_defaults) do
if (self [key] == nil) then
if (type (value) == "table") then
self [key] = table_deepcopy (_detalhes.instance_defaults [key])
else
self [key] = value
end
elseif (type (value) == "table") then
for key2, value2 in pairs (value) do
if (self [key] [key2] == nil) then
if (type (value2) == "table") then
self [key] [key2] = table_deepcopy (_detalhes.instance_defaults [key] [key2])
else
self [key] [key2] = value2
end
end
end
end
end
end
_detalhes.instance_defaults = {
--> click through settings
clickthrough_toolbaricons = false,
clickthrough_rows = false,
clickthrough_window = false,
clickthrough_incombatonly = true,
--> window settings
ignore_mass_showhide = false,
--skin
skin = _detalhes.default_skin_to_use,
skin_custom = "",
--scale
window_scale = 1.0,
libwindow = {},
--following
following = {enabled = false, bar_color = {1, 1, 1}, text_color = {1, 1, 1}},
--baseframe backdrop
bg_alpha = 0.7,
bg_r = 0.0941,
bg_g = 0.0941,
bg_b = 0.0941,
backdrop_texture = "Details Ground",
--auto current
auto_current = true,
--show sidebars
show_sidebars = true,
--show bottom statusbar
show_statusbar = true,
statusbar_info = {alpha = 1, overlay = {1, 1, 1}},
--hide main window attribute icon
hide_icon = false,
--anchor side of main window toolbar (1 = top 2 = bottom)
toolbar_side = 1,
--micro displays side
micro_displays_side = 2,
micro_displays_locked = true,
--stretch button anchor side (1 = top 2 = bottom)
stretch_button_side = 1,
--where plugins icon will be placed on main window toolbar (1 = left 2 = right)
plugins_grow_direction = 2,
--grow direction of main window bars (1 = top to bottom 2 = bottom to top)
bars_grow_direction = 1,
--sort direction is the direction of results on bars (1 = top to bottom 2 = bottom to top)
bars_sort_direction = 1,
--left to right or right to left bars
bars_inverted = false,
--toolbar icons file
--toolbar_icon_file = [[Interface\AddOns\Details\images\toolbar_icons_grayscale]],
toolbar_icon_file = [[Interface\AddOns\Details\images\toolbar_icons]],
--menus:
--anchor store the anchor point of main menu
menu_anchor = {5, 1, side = 1}, --mode segment attribute report on top position
menu_anchor_down = {5, 1}, --mode segment attribute report on bottom position
--blackwhiite icons
desaturated_menu = false, --mode segment attribute report
--icons on menu
menu_icons = {true, true, true, true, true, false, space = -2, shadow = false}, --mode segment attribute report reset close
--menu icons size multiplicator factor
menu_icons_size = 1.0, --mode segment attribute report
--auto hide menu buttons
auto_hide_menu = {left = false, right = false},
--attribute text
attribute_text = {
enabled = false,
anchor = {5, 1},
text_face = "Friz Quadrata TT",
text_size = 12,
text_color = {1, 1, 1, 1},
side = 1,
shadow = false,
enable_custom_text = false,
custom_text = "{name}",
show_timer = {true, true, true}, --raid encounter, battleground, arena
},
--auto hide window borders statusbar main menu
menu_alpha = {enabled = false, iconstoo = true, onenter = 1, onleave = 1, ignorebars = false},
--instance button anchor store the anchor point of instance and delete button
instance_button_anchor = {-27, 1},
--total bar
total_bar = {enabled = false, color = {1, 1, 1}, only_in_group = true, icon = [[Interface\ICONS\INV_Sigil_Thorim]]},
--row animation when show
row_show_animation = {anim = "Fade", options = {}},
--row info
row_info = {
--if true the texture of the bars will have the color of his actor class
texture_class_colors = true,
--if texture class color are false, this color will be used
fixed_texture_color = {0, 0, 0},
--row alpha
alpha = 1,
--left text class color
textL_class_colors = false,
--right text class color
textR_class_colors = false,
--left text customization
textL_enable_custom_text = false,
textL_custom_text = "{data1}. {data3}{data2}",
--right text customization
textR_enable_custom_text = false,
textR_custom_text = "{data1} ({data2}, {data3}%)",
--right text show which infos
textR_show_data = {true, true, true},
textR_bracket = "(",
textR_separator = ",",
--left text bar number
textL_show_number = true,
--translit text by Vardex (https://github.com/Vardex May 22, 2019)
textL_translit_text = false,
--if text class color are false, this color will be used
fixed_text_color = {1, 1, 1},
--left text outline effect
textL_outline = true,
textL_outline_small = true,
textL_outline_small_color = {0, 0, 0, 1},
--right text outline effect
textR_outline = false,
textR_outline_small = true,
textR_outline_small_color = {0, 0, 0, 1},
--bar height
height = 14,
--font size
font_size = 10,
--font face (name)
font_face = "Arial Narrow",
--font face (file)
font_face_file = SharedMedia:Fetch ("font", "Arial Narrow"),
--bar texture
texture = "Details D'ictum",
texture_custom = "",
--bar texture name
texture_file = [[Interface\AddOns\Details\images\bar4]],
texture_custom_file = "Interface\\",
--bar texture on mouse over
texture_highlight = [[Interface\FriendsFrame\UI-FriendsList-Highlight]],
--bar background texture
texture_background = "Details D'ictum",
--bar background file
texture_background_file = [[Interface\AddOns\Details\images\bar4]],
--bar background class color
texture_background_class_color = true,
--fixed texture color for background texture
fixed_texture_background_color = {0, 0, 0, 0},
--space between bars
space = {left = 3, right = -5, between = 1},
--icon file
icon_file = [[Interface\AddOns\Details\images\classes_small]],
no_icon = false,
start_after_icon = true,
icon_grayscale = false,
--icon offset
icon_offset = {0, 0}, --x y
--percent type
percent_type = 1,
--backdrop
backdrop = {enabled = false, size = 12, color = {1, 1, 1, 1}, texture = "Details BarBorder 2"},
--model
models = {
upper_enabled = false,
upper_model = [[Spells\AcidBreath_SuperGreen.M2]],
upper_alpha = 0.50,
lower_enabled = false,
lower_model = [[World\EXPANSION02\DOODADS\Coldarra\COLDARRALOCUS.m2]],
lower_alpha = 0.10,
},
--fast hps/dps updates
fast_ps_update = false,
--show spec icons
use_spec_icons = false,
spec_file = [[Interface\AddOns\Details\images\spec_icons_normal]],
},
--instance window color
color = {1, 1, 1, 1},
color_buttons = {1, 1, 1, 1},
--hide in combat
hide_in_combat = false,
hide_out_of_combat = false,
hide_in_combat_type = 1, --deprecated
hide_in_combat_alpha = 0, --deprecated
--hide or show the window by context
hide_on_context = {
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
},
--switches
switch_all_roles_in_combat = false,
switch_all_roles_after_wipe = false,
switch_damager = false,
switch_damager_in_combat = false,
switch_healer = false,
switch_healer_in_combat = false,
switch_tank = false,
switch_tank_in_combat = false,
--strata
strata = "LOW",
grab_on_top = false,
--wallpaper
wallpaper = {
enabled = false,
texture = nil,
anchor = "all",
alpha = 0.5,
texcoord = {0, 1, 0, 1},
width = 0,
height = 0,
overlay = {1, 1, 1, 1}
},
--tooltip amounts
tooltip = {
["n_abilities"] = 3,
["n_enemies"] = 3
}
}
--default values for instances (windows)
--if a new value is added here and it does not exists (nil) in the instance, it'll be copied into it
--the value added can be overwritten in the skins.lua file or /run Details:GetWindow(1).<value> =
--or thought a new option in the options panel
--values added into 'instance_skin_ignored_values' won't be passed when the user exports the profile or exports the skin individually.
local _detalhes = _G._detalhes
local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
function _detalhes:ResetInstanceConfig (maintainsnap)
for key, value in pairs (_detalhes.instance_defaults) do
if (type (value) == "table") then
self [key] = table_deepcopy (value)
else
self [key] = value
end
end
if (not maintainsnap) then
self.snap = {}
self.horizontalSnap = nil
self.verticalSnap = nil
self:LockInstance (false)
end
end
_detalhes.instance_skin_ignored_values = {
["menu_icons"] = true,
["auto_hide"] = true,
["scale"] = true,
["following"] = true,
["auto_current"] = true,
["bars_grow_direction"] = true,
["bars_sort_direction"] = true,
["auto_hide_menu"] = true,
["menu_alpha"] = true,
["total_bar"] = true,
["hide_in_combat"] = true,
["hide_out_of_combat"] = true,
["hide_in_combat_type"] = true,
["hide_in_combat_alpha"] = true,
["switch_all_roles_in_combat"] = true,
["switch_all_roles_after_wipe"] = true,
["switch_damager"] = true,
["switch_damager_in_combat"] = true,
["switch_healer"] = true,
["switch_healer_in_combat"] = true,
["switch_tank"] = true,
["switch_tank_in_combat"] = true,
["strata"] = true,
["grab_on_top"] = true,
["libwindow"] = true,
["ignore_mass_showhide"] = true,
["window_scale"] = true,
}
function _detalhes:ResetInstanceConfigKeepingValues (maintainsnap)
for key, value in pairs (_detalhes.instance_defaults) do
if (not _detalhes.instance_skin_ignored_values [key]) then
if (type (value) == "table") then
self [key] = table_deepcopy (value)
else
self [key] = value
end
end
end
if (not maintainsnap) then
self.snap = {}
self.horizontalSnap = nil
self.verticalSnap = nil
self:LockInstance (false)
end
end
function _detalhes:LoadInstanceConfig()
for key, value in pairs (_detalhes.instance_defaults) do
if (self [key] == nil) then
if (type (value) == "table") then
self [key] = table_deepcopy (_detalhes.instance_defaults [key])
else
self [key] = value
end
elseif (type (value) == "table") then
for key2, value2 in pairs (value) do
if (self [key] [key2] == nil) then
if (type (value2) == "table") then
self [key] [key2] = table_deepcopy (_detalhes.instance_defaults [key] [key2])
else
self [key] [key2] = value2
end
end
end
end
end
end
_detalhes.instance_defaults = {
--> click through settings
clickthrough_toolbaricons = false,
clickthrough_rows = false,
clickthrough_window = false,
clickthrough_incombatonly = true,
--> window settings
ignore_mass_showhide = false,
--skin
skin = _detalhes.default_skin_to_use,
skin_custom = "",
--scale
window_scale = 1.0,
libwindow = {},
--following
following = {enabled = false, bar_color = {1, 1, 1}, text_color = {1, 1, 1}},
--baseframe backdrop
bg_alpha = 0.7,
bg_r = 0.0941,
bg_g = 0.0941,
bg_b = 0.0941,
backdrop_texture = "Details Ground",
--auto current
auto_current = true,
--show sidebars
show_sidebars = true,
--show bottom statusbar
show_statusbar = true,
statusbar_info = {alpha = 1, overlay = {1, 1, 1}},
--hide main window attribute icon
hide_icon = false,
--attribute icon is desaturated
icon_desaturated = false,
--anchor side of main window toolbar (1 = top 2 = bottom)
toolbar_side = 1,
--micro displays side
micro_displays_side = 2,
micro_displays_locked = true,
--stretch button anchor side (1 = top 2 = bottom)
stretch_button_side = 1,
--where plugins icon will be placed on main window toolbar (1 = left 2 = right)
plugins_grow_direction = 2,
--grow direction of main window bars (1 = top to bottom 2 = bottom to top)
bars_grow_direction = 1,
--sort direction is the direction of results on bars (1 = top to bottom 2 = bottom to top)
bars_sort_direction = 1,
--left to right or right to left bars
bars_inverted = false,
--toolbar icons file
--toolbar_icon_file = [[Interface\AddOns\Details\images\toolbar_icons_grayscale]],
toolbar_icon_file = [[Interface\AddOns\Details\images\toolbar_icons]],
--menus:
--anchor store the anchor point of main menu
menu_anchor = {5, 1, side = 1}, --mode segment attribute report on top position
menu_anchor_down = {5, 1}, --mode segment attribute report on bottom position
menu_icons_alpha = 0.5,
--blackwhiite icons
desaturated_menu = false, --mode segment attribute report
--icons on menu
menu_icons = {true, true, true, true, true, false, space = -2, shadow = false}, --mode segment attribute report reset close
--menu icons size multiplicator factor
menu_icons_size = 1.0, --mode segment attribute report
--auto hide menu buttons
auto_hide_menu = {left = false, right = false},
--attribute text
attribute_text = {
enabled = false,
anchor = {5, 1},
text_face = "Friz Quadrata TT",
text_size = 12,
text_color = {1, 1, 1, 1},
side = 1,
shadow = false,
enable_custom_text = false,
custom_text = "{name}",
show_timer = true,
},
--auto hide window borders statusbar main menu
menu_alpha = {enabled = false, iconstoo = true, onenter = 1, onleave = 1, ignorebars = false},
--instance button anchor store the anchor point of instance and delete button
instance_button_anchor = {-27, 1},
--total bar
total_bar = {enabled = false, color = {1, 1, 1}, only_in_group = true, icon = [[Interface\ICONS\INV_Sigil_Thorim]]},
--row animation when show
row_show_animation = {anim = "Fade", options = {}},
--use one fontstring for each value in the lines, e.g. one fontstring to damage done, another fontstring to dps and another to percent amount
use_multi_fontstrings = false,
fontstrings_width = 35, --not in use
fontstrings_text4_anchor = 0,
fontstrings_text3_anchor = 35,
fontstrings_text2_anchor = 70,
--row info
row_info = {
--if true the texture of the bars will have the color of his actor class
texture_class_colors = true,
--if texture class color are false, this color will be used
fixed_texture_color = {0, 0, 0},
--row alpha
alpha = 1,
--left text class color
textL_class_colors = false,
--right text class color
textR_class_colors = false,
--left text customization
textL_enable_custom_text = false,
textL_custom_text = "{data1}. {data3}{data2}",
--right text customization
textR_enable_custom_text = false,
textR_custom_text = "{data1} ({data2}, {data3}%)",
--right text show which infos
textR_show_data = {true, true, true},
textR_bracket = "(",
textR_separator = ",",
--left text bar number
textL_show_number = true,
--translit text by Vardex (https://github.com/Vardex May 22, 2019)
textL_translit_text = false,
--if text class color are false, this color will be used
fixed_text_color = {1, 1, 1},
--left text outline effect
textL_outline = true,
textL_outline_small = true,
textL_outline_small_color = {0, 0, 0, 1},
--right text outline effect
textR_outline = false,
textR_outline_small = true,
textR_outline_small_color = {0, 0, 0, 1},
--bar height
height = 14,
--font size
font_size = 10,
--font face (name)
font_face = "Arial Narrow",
--font face (file)
font_face_file = SharedMedia:Fetch ("font", "Arial Narrow"),
--bar texture
texture = "Details D'ictum",
texture_custom = "",
--bar texture name
texture_file = [[Interface\AddOns\Details\images\bar4]],
texture_custom_file = "Interface\\",
--bar texture on mouse over
texture_highlight = [[Interface\FriendsFrame\UI-FriendsList-Highlight]],
--bar background texture
texture_background = "Details D'ictum",
--bar background file
texture_background_file = [[Interface\AddOns\Details\images\bar4]],
--bar background class color
texture_background_class_color = true,
--fixed texture color for background texture
fixed_texture_background_color = {0, 0, 0, 0},
--space between bars
space = {left = 3, right = -5, between = 1},
--icon file
icon_file = [[Interface\AddOns\Details\images\classes_small]],
no_icon = false,
start_after_icon = true,
icon_grayscale = false,
--icon offset
icon_offset = {0, 0}, --x y
--percent type
percent_type = 1,
--backdrop
backdrop = {enabled = false, size = 12, color = {1, 1, 1, 1}, texture = "Details BarBorder 2"}, --texture is deprecated
--model
models = {
upper_enabled = false,
upper_model = [[Spells\AcidBreath_SuperGreen.M2]],
upper_alpha = 0.50,
lower_enabled = false,
lower_model = [[World\EXPANSION02\DOODADS\Coldarra\COLDARRALOCUS.m2]],
lower_alpha = 0.10,
},
--fast hps/dps updates
fast_ps_update = false,
--show spec icons
use_spec_icons = false,
spec_file = [[Interface\AddOns\Details\images\spec_icons_normal]],
},
--instance window color
color = {1, 1, 1, 1},
color_buttons = {1, 1, 1, 1},
--hide in combat
hide_in_combat = false,
hide_out_of_combat = false,
hide_in_combat_type = 1, --deprecated
hide_in_combat_alpha = 0, --deprecated
--hide or show the window by context
hide_on_context = {
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
{
enabled = false,
inverse = false,
value = 100,
},
},
--switches
switch_all_roles_in_combat = false,
switch_all_roles_after_wipe = false,
switch_damager = false,
switch_damager_in_combat = false,
switch_healer = false,
switch_healer_in_combat = false,
switch_tank = false,
switch_tank_in_combat = false,
--strata
strata = "LOW",
grab_on_top = false,
--wallpaper
wallpaper = {
enabled = false,
texture = nil,
anchor = "all",
alpha = 0.5,
texcoord = {0, 1, 0, 1},
width = 0,
height = 0,
overlay = {1, 1, 1, 1}
},
--tooltip amounts
tooltip = {
["n_abilities"] = 3,
["n_enemies"] = 3
}
}