- memory usage decreased in approximately 20%.
- small parser speed improvement, approximately 4%. - fixed some memory leaks. - fixed issues were details doesn't open with /details new. - added feedback options for details report.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
-- NickTag:SetNickname (name) -> set the player nick name, after set nicktag will broadcast the nick over addon guild channel.
|
||||
--
|
||||
|
||||
local major, minor = "NickTag-1.0", 3
|
||||
local major, minor = "NickTag-1.0", 4
|
||||
local NickTag, oldminor = LibStub:NewLibrary (major, minor)
|
||||
|
||||
if (not NickTag) then
|
||||
@@ -445,6 +445,12 @@ end
|
||||
return
|
||||
end
|
||||
|
||||
--> auto change nickname if we have a invalid nickname
|
||||
if (NickTag:GetNickname (UnitGUID ("player")) == LibStub ("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_INVALID_NAME"]) then
|
||||
local nick_table = NickTag:GetNicknameTable (UnitGUID ("player"))
|
||||
nick_table [CONST_INDEX_NICKNAME] = UnitName ("player")
|
||||
end
|
||||
|
||||
if (target) then
|
||||
--> was requested
|
||||
NickTag:SendCommMessage ("NickTag", NickTag:Serialize (CONST_COMM_FULLPERSONA, battlegroup_serial, NickTag:GetNicknameTable (battlegroup_serial), minor), "WHISPER", target)
|
||||
|
||||
@@ -5,9 +5,10 @@
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> global name declaration
|
||||
|
||||
|
||||
_ = nil
|
||||
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")
|
||||
_detalhes.userversion = "v1.4.17"
|
||||
_detalhes.userversion = "v1.4.18"
|
||||
_detalhes.version = "Alpha 007"
|
||||
_detalhes.realversion = 7
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ local _date = date --> lua api
|
||||
|
||||
--time hold
|
||||
local _tempo = time()
|
||||
local _
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ local _GetNumRaidMembers = GetNumRaidMembers or GetNumGroupMembers
|
||||
local _GetUnitName = GetUnitName
|
||||
|
||||
local gump = _detalhes.gump
|
||||
local _
|
||||
|
||||
local atributo_custom = _detalhes.atributo_custom
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ local AceLocale = LibStub ("AceLocale-3.0")
|
||||
local Loc = AceLocale:GetLocale ( "Details" )
|
||||
|
||||
local gump = _detalhes.gump
|
||||
local _
|
||||
|
||||
local alvo_da_habilidade = _detalhes.alvo_da_habilidade
|
||||
local container_habilidades = _detalhes.container_habilidades
|
||||
@@ -1057,7 +1058,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra)
|
||||
if (not quantidade [nome]) then
|
||||
quantidade [nome] = 1
|
||||
|
||||
local my_self = instancia.showing[class_type]:PegarCombatente (_, nome)
|
||||
local my_self = instancia.showing[class_type]:PegarCombatente (nil, nome)
|
||||
if (my_self) then
|
||||
local meu_total = my_self.total_without_pet
|
||||
local tabela = my_self.spell_tables._ActorTable
|
||||
@@ -2223,7 +2224,7 @@ function _detalhes.refresh:r_atributo_damage (este_jogador, shadow)
|
||||
|
||||
_setmetatable (friendlyfire, _detalhes)
|
||||
|
||||
local friendlyfire_shadow = shadow.friendlyfire:PegarCombatente (_, friendlyfire.nome) --> corrigido erro aqui, estava este_jogador.nome
|
||||
local friendlyfire_shadow = shadow.friendlyfire:PegarCombatente (nil, friendlyfire.nome) --> corrigido erro aqui, estava este_jogador.nome
|
||||
_detalhes.refresh:r_container_habilidades (friendlyfire.spell_tables, friendlyfire_shadow.spell_tables) -- acho que corrigi mais um bug, estava apenas 'friendlyfire_shadow'
|
||||
|
||||
end
|
||||
@@ -2293,7 +2294,7 @@ atributo_damage.__add = function (shadow, tabela2)
|
||||
|
||||
--> copia o container de alvos
|
||||
for index, alvo in _ipairs (tabela2.targets._ActorTable) do
|
||||
local alvo_shadow = shadow.targets:PegarCombatente (alvo.serial, alvo.nome, _, true)
|
||||
local alvo_shadow = shadow.targets:PegarCombatente (alvo.serial, alvo.nome, nil, true)
|
||||
alvo_shadow.total = alvo_shadow.total + alvo.total
|
||||
end
|
||||
--> copia o container de friendly fire
|
||||
|
||||
@@ -20,6 +20,7 @@ local container_damage_target = _detalhes.container_type.CONTAINER_DAMAGETARGET_
|
||||
local _setmetatable = setmetatable
|
||||
local _ipairs = ipairs
|
||||
local _pairs = pairs
|
||||
local _
|
||||
--api locals
|
||||
local _UnitAura = UnitAura
|
||||
--local _GetSpellInfo = _detalhes.getspellinfo
|
||||
@@ -36,7 +37,7 @@ function habilidade_dano:NovaTabela (id, link, token) --aqui eu n
|
||||
total = 0, --total de dano aplicado por esta habilidade
|
||||
counter = 0, --conta quantas vezes a habilidade foi chamada
|
||||
id = id,
|
||||
school = 0,
|
||||
--school = 0,
|
||||
|
||||
--> normal
|
||||
n_min = 0,
|
||||
@@ -51,30 +52,30 @@ function habilidade_dano:NovaTabela (id, link, token) --aqui eu n
|
||||
c_dmg = 0,
|
||||
|
||||
--> glacing
|
||||
g_min = 0, --not sure but, glancing min and max shouldn't be necessary
|
||||
g_max = 0, --
|
||||
--g_min = 0, --not sure but, glancing min and max shouldn't be necessary
|
||||
--g_max = 0, --
|
||||
g_amt = 0,
|
||||
g_dmg = 0,
|
||||
|
||||
--> resisted
|
||||
r_min = 0, --not sure but, resisted min and max shouldn't be necessary
|
||||
r_max = 0, --
|
||||
--r_min = 0, --not sure but, resisted min and max shouldn't be necessary
|
||||
--r_max = 0, --
|
||||
r_amt = 0,
|
||||
r_dmg = 0,
|
||||
|
||||
--> blocked
|
||||
b_min = 0, --not sure but, block min and max shouldn't be necessary
|
||||
b_max = 0, --
|
||||
--b_min = 0, --not sure but, block min and max shouldn't be necessary
|
||||
--b_max = 0, --
|
||||
b_amt = 0,
|
||||
b_dmg = 0,
|
||||
|
||||
--> obsorved
|
||||
a_min = 0, --not sure but, absorbed min and max shouldn't be necessary
|
||||
a_max = 0, --
|
||||
--a_min = 0, --not sure but, absorbed min and max shouldn't be necessary
|
||||
--a_max = 0, --
|
||||
a_amt = 0,
|
||||
a_dmg = 0,
|
||||
|
||||
crushing = 0, --> this still exists?
|
||||
--crushing = 0, --> this still exists?
|
||||
|
||||
targets = container_combatentes:NovoContainer (container_damage_target)
|
||||
}
|
||||
@@ -127,37 +128,38 @@ function habilidade_dano:Add (serial, nome, flag, amount, who_nome, resisted, bl
|
||||
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
|
||||
if (amount > self.r_max) then
|
||||
self.r_max = amount
|
||||
end
|
||||
if (self.r_min > amount or self.r_min == 0) then
|
||||
self.r_min = amount
|
||||
end
|
||||
--if (amount > self.r_max) then
|
||||
-- self.r_max = amount
|
||||
--end
|
||||
--if (self.r_min > amount or self.r_min == 0) then
|
||||
-- self.r_min = amount
|
||||
--end
|
||||
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
|
||||
if (amount > self.b_max) then
|
||||
self.b_max = amount
|
||||
end
|
||||
if (self.b_min > amount or self.b_min == 0) then
|
||||
self.b_min = amount
|
||||
end
|
||||
--if (amount > self.b_max) then
|
||||
-- self.b_max = amount
|
||||
--end
|
||||
--if (self.b_min > amount or self.b_min == 0) then
|
||||
-- self.b_min = amount
|
||||
--end
|
||||
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
|
||||
if (amount > self.a_max) then
|
||||
self.a_max = amount
|
||||
end
|
||||
if (self.a_min > amount or self.a_min == 0) then
|
||||
self.a_min = amount
|
||||
end
|
||||
--if (amount > self.a_max) then
|
||||
-- self.a_max = amount
|
||||
--end
|
||||
--if (self.a_min > amount or self.a_min == 0) then
|
||||
-- self.a_min = amount
|
||||
--end
|
||||
end
|
||||
|
||||
if (amount and amount > 0) then
|
||||
--if (amount and amount > 0) then
|
||||
--if (amount and amount > 0) then
|
||||
|
||||
self.total = self.total + amount
|
||||
|
||||
@@ -168,12 +170,12 @@ function habilidade_dano:Add (serial, nome, flag, amount, who_nome, resisted, bl
|
||||
-- esta_tabela.glacing = {["mim"] = 0, ["max"] = 0, ["total"] = 0, ["dmg"] = 0}
|
||||
self.g_dmg = self.g_dmg+amount --> amount é o total de dano
|
||||
self.g_amt = self.g_amt+1 --> amount é o total de dano
|
||||
if (amount > self.g_max) then
|
||||
self.g_max = amount
|
||||
end
|
||||
if (self.g_min > amount or self.g_min == 0) then
|
||||
self.g_min = amount
|
||||
end
|
||||
--if (amount > self.g_max) then
|
||||
-- self.g_max = amount
|
||||
--end
|
||||
--if (self.g_min > amount or self.g_min == 0) then
|
||||
-- self.g_min = amount
|
||||
--end
|
||||
elseif (critical) then
|
||||
--esta_tabela.critico = {["mim"] = 0, ["max"] = 0, ["total"] = 0, ["dmg"] = 0}
|
||||
self.c_dmg = self.c_dmg+amount --> amount é o total de dano
|
||||
@@ -195,7 +197,7 @@ function habilidade_dano:Add (serial, nome, flag, amount, who_nome, resisted, bl
|
||||
self.n_min = amount
|
||||
end
|
||||
end
|
||||
end
|
||||
--end
|
||||
|
||||
if (self.shadow) then
|
||||
|
||||
@@ -288,27 +290,27 @@ habilidade_dano.__add = function (tabela1, tabela2)
|
||||
tabela1.c_amt = tabela1.c_amt + tabela2.c_amt
|
||||
tabela1.c_dmg = tabela1.c_dmg + tabela2.c_dmg
|
||||
|
||||
tabela1.g_min = tabela1.g_min + tabela2.g_min
|
||||
tabela1.g_max = tabela1.g_max + tabela2.g_max
|
||||
--tabela1.g_min = tabela1.g_min + tabela2.g_min
|
||||
--tabela1.g_max = tabela1.g_max + tabela2.g_max
|
||||
tabela1.g_amt = tabela1.g_amt + tabela2.g_amt
|
||||
tabela1.g_dmg = tabela1.g_dmg + tabela2.g_dmg
|
||||
|
||||
tabela1.r_min = tabela1.r_min + tabela2.r_min
|
||||
tabela1.r_max = tabela1.r_max + tabela2.r_max
|
||||
--tabela1.r_min = tabela1.r_min + tabela2.r_min
|
||||
--tabela1.r_max = tabela1.r_max + tabela2.r_max
|
||||
tabela1.r_amt = tabela1.r_amt + tabela2.r_amt
|
||||
tabela1.r_dmg = tabela1.r_dmg + tabela2.r_dmg
|
||||
|
||||
tabela1.b_min = tabela1.b_min + tabela2.b_min
|
||||
tabela1.b_max = tabela1.b_max + tabela2.b_max
|
||||
--tabela1.b_min = tabela1.b_min + tabela2.b_min
|
||||
--tabela1.b_max = tabela1.b_max + tabela2.b_max
|
||||
tabela1.b_amt = tabela1.b_amt + tabela2.b_amt
|
||||
tabela1.b_dmg = tabela1.b_dmg + tabela2.b_dmg
|
||||
|
||||
tabela1.a_min = tabela1.a_min + tabela2.a_min
|
||||
tabela1.a_max = tabela1.a_max + tabela2.a_max
|
||||
--tabela1.a_min = tabela1.a_min + tabela2.a_min
|
||||
--tabela1.a_max = tabela1.a_max + tabela2.a_max
|
||||
tabela1.a_amt = tabela1.a_amt + tabela2.a_amt
|
||||
tabela1.a_dmg = tabela1.a_dmg + tabela2.a_dmg
|
||||
|
||||
tabela1.crushing = tabela1.crushing + tabela2.crushing
|
||||
--tabela1.crushing = tabela1.crushing + tabela2.crushing
|
||||
|
||||
return tabela1
|
||||
end
|
||||
@@ -327,27 +329,27 @@ habilidade_dano.__sub = function (tabela1, tabela2)
|
||||
tabela1.c_amt = tabela1.c_amt - tabela2.c_amt
|
||||
tabela1.c_dmg = tabela1.c_dmg - tabela2.c_dmg
|
||||
|
||||
tabela1.g_min = tabela1.g_min - tabela2.g_min
|
||||
tabela1.g_max = tabela1.g_max - tabela2.g_max
|
||||
--tabela1.g_min = tabela1.g_min - tabela2.g_min
|
||||
--tabela1.g_max = tabela1.g_max - tabela2.g_max
|
||||
tabela1.g_amt = tabela1.g_amt - tabela2.g_amt
|
||||
tabela1.g_dmg = tabela1.g_dmg - tabela2.g_dmg
|
||||
|
||||
tabela1.r_min = tabela1.r_min - tabela2.r_min
|
||||
tabela1.r_max = tabela1.r_max - tabela2.r_max
|
||||
--tabela1.r_min = tabela1.r_min - tabela2.r_min
|
||||
--tabela1.r_max = tabela1.r_max - tabela2.r_max
|
||||
tabela1.r_amt = tabela1.r_amt - tabela2.r_amt
|
||||
tabela1.r_dmg = tabela1.r_dmg - tabela2.r_dmg
|
||||
|
||||
tabela1.b_min = tabela1.b_min - tabela2.b_min
|
||||
tabela1.b_max = tabela1.b_max - tabela2.b_max
|
||||
--tabela1.b_min = tabela1.b_min - tabela2.b_min
|
||||
--tabela1.b_max = tabela1.b_max - tabela2.b_max
|
||||
tabela1.b_amt = tabela1.b_amt - tabela2.b_amt
|
||||
tabela1.b_dmg = tabela1.b_dmg - tabela2.b_dmg
|
||||
|
||||
tabela1.a_min = tabela1.a_min - tabela2.a_min
|
||||
tabela1.a_max = tabela1.a_max - tabela2.a_max
|
||||
--tabela1.a_min = tabela1.a_min - tabela2.a_min
|
||||
--tabela1.a_max = tabela1.a_max - tabela2.a_max
|
||||
tabela1.a_amt = tabela1.a_amt - tabela2.a_amt
|
||||
tabela1.a_dmg = tabela1.a_dmg - tabela2.a_dmg
|
||||
|
||||
tabela1.crushing = tabela1.crushing - tabela2.crushing
|
||||
--tabela1.crushing = tabela1.crushing - tabela2.crushing
|
||||
|
||||
return tabela1
|
||||
end
|
||||
|
||||
@@ -25,6 +25,7 @@ local GameTooltip = GameTooltip
|
||||
local _detalhes = _G._detalhes
|
||||
local AceLocale = LibStub ("AceLocale-3.0")
|
||||
local Loc = AceLocale:GetLocale ( "Details" )
|
||||
local _
|
||||
|
||||
local gump = _detalhes.gump
|
||||
|
||||
@@ -918,7 +919,7 @@ atributo_energy.__add = function (shadow, tabela2)
|
||||
shadow.holypower_r = shadow.holypower_r + tabela2.holypower_r
|
||||
|
||||
for index, alvo in _ipairs (tabela2.targets._ActorTable) do
|
||||
local alvo_shadow = shadow.targets:PegarCombatente (alvo.serial, alvo.nome, _, true)
|
||||
local alvo_shadow = shadow.targets:PegarCombatente (alvo.serial, alvo.nome, nil, true)
|
||||
alvo_shadow.total = alvo_shadow.total + alvo.total
|
||||
end
|
||||
|
||||
@@ -927,7 +928,7 @@ atributo_energy.__add = function (shadow, tabela2)
|
||||
local habilidade_shadow = shadow.spell_tables:PegaHabilidade (spellid, true, nil, true)
|
||||
|
||||
for index, alvo in _ipairs (habilidade.targets._ActorTable) do
|
||||
local alvo_shadow = habilidade_shadow.targets:PegarCombatente (alvo.serial, alvo.nome, _, true)
|
||||
local alvo_shadow = habilidade_shadow.targets:PegarCombatente (alvo.serial, alvo.nome, nil, true)
|
||||
alvo_shadow.total = alvo_shadow.total + alvo.total
|
||||
end
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ local _setmetatable = setmetatable
|
||||
local _ipairs = ipairs
|
||||
--api locals
|
||||
local _UnitAura = UnitAura
|
||||
local _
|
||||
--local _GetSpellInfo = _detalhes.getspellinfo
|
||||
|
||||
local container_playernpc = _detalhes.container_type.CONTAINER_PLAYERNPC
|
||||
|
||||
@@ -22,6 +22,7 @@ local _GetSpellInfo = _detalhes.getspellinfo
|
||||
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _
|
||||
|
||||
local AceLocale = LibStub ("AceLocale-3.0")
|
||||
local Loc = AceLocale:GetLocale ( "Details" )
|
||||
@@ -790,7 +791,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
|
||||
GameCooltip:AddLine (ActorHealingTargets[i][1]..": ", _detalhes:comma_value (ActorHealingTargets[i][2]) .." (".._cstr ("%.1f", ActorHealingTargets[i][3]).."%)")
|
||||
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
|
||||
|
||||
local targetActor = container:PegarCombatente (_, ActorHealingTargets[i][1])
|
||||
local targetActor = container:PegarCombatente (nil, ActorHealingTargets[i][1])
|
||||
|
||||
if (targetActor) then
|
||||
local classe = targetActor.classe
|
||||
@@ -820,7 +821,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
|
||||
if (not quantidade [nome]) then
|
||||
quantidade [nome] = 1
|
||||
|
||||
local my_self = instancia.showing [class_type]:PegarCombatente (_, nome)
|
||||
local my_self = instancia.showing [class_type]:PegarCombatente (nil, nome)
|
||||
if (my_self) then
|
||||
|
||||
local meu_total = my_self.total_without_pet
|
||||
|
||||
@@ -29,6 +29,8 @@ local modo_alone = _detalhes._detalhes_props["MODO_ALONE"]
|
||||
local modo_grupo = _detalhes._detalhes_props["MODO_GROUP"]
|
||||
local modo_all = _detalhes._detalhes_props["MODO_ALL"]
|
||||
|
||||
local _
|
||||
|
||||
local atributos = _detalhes.atributos
|
||||
local sub_atributos = _detalhes.sub_atributos
|
||||
local segmentos = _detalhes.segmentos
|
||||
@@ -44,7 +46,7 @@ local segmentos = _detalhes.segmentos
|
||||
if (instancia:IsAtiva()) then --> só reabre se ela estiver ativa
|
||||
instancia:RestauraJanela (index)
|
||||
if (not _detalhes.initializing) then
|
||||
_detalhes:SendEvent ("DETAILS_INSTANCE_OPEN", _, instancia)
|
||||
_detalhes:SendEvent ("DETAILS_INSTANCE_OPEN", nil, instancia)
|
||||
end
|
||||
else
|
||||
instancia.iniciada = false
|
||||
@@ -179,7 +181,7 @@ end
|
||||
|
||||
--print ("Abertas: " .. _detalhes.opened_windows)
|
||||
if (not _detalhes.initializing) then
|
||||
_detalhes:SendEvent ("DETAILS_INSTANCE_CLOSE", _, self)
|
||||
_detalhes:SendEvent ("DETAILS_INSTANCE_CLOSE", nil, self)
|
||||
end
|
||||
|
||||
end
|
||||
@@ -1285,7 +1287,7 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
|
||||
_detalhes.popup:Select (1, _detalhes.SoloTables.Mode+1)
|
||||
end
|
||||
end
|
||||
return _detalhes.SoloTables.switch (_, _, -1)
|
||||
return _detalhes.SoloTables.switch (nil, nil, -1)
|
||||
|
||||
elseif ( (instancia.modo == modo_raid) and not (_detalhes.initializing or iniciando_instancia) ) then --> raid
|
||||
if (_detalhes.RaidTables.Mode == #_detalhes.RaidTables.Plugins) then
|
||||
@@ -1296,7 +1298,7 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
|
||||
end
|
||||
|
||||
end
|
||||
return _detalhes.RaidTables.switch (_, _, -1)
|
||||
return _detalhes.RaidTables.switch (nil, nil, -1)
|
||||
end
|
||||
|
||||
atributo_changed = true
|
||||
@@ -1439,18 +1441,18 @@ function _detalhes:MontaAtributosOption (instancia, func)
|
||||
local p = 0.125 --> 32/256
|
||||
|
||||
for i = 1, atributos[0] do --> [0] armazena quantos atributos existem
|
||||
CoolTip:AddMenu (1, func, nil, i, nil, atributos.lista[i], _, true)
|
||||
CoolTip:AddMenu (1, func, nil, i, nil, atributos.lista[i], nil, true)
|
||||
CoolTip:AddIcon ("Interface\\AddOns\\Details\\images\\atributos_icones", 1, 1, 20, 20, p*(i-1), p*(i), 0, 1)
|
||||
local options = sub_atributos [i].lista
|
||||
for o = 1, atributos [i] do
|
||||
CoolTip:AddMenu (2, func, nil, i, o, options[o], _, true)
|
||||
CoolTip:AddMenu (2, func, nil, i, o, options[o], nil, true)
|
||||
CoolTip:AddIcon (icones[i], 2, 1, 20, 20, p*(o-1), p*(o), 0, 1)
|
||||
end
|
||||
CoolTip:SetLastSelected (2, i, instancia.m2_last [i])
|
||||
end
|
||||
|
||||
--> custom
|
||||
CoolTip:AddMenu (1, func, nil, 5, nil, atributos.lista[5], _, true)
|
||||
CoolTip:AddMenu (1, func, nil, 5, nil, atributos.lista[5], nil, true)
|
||||
CoolTip:AddIcon ("Interface\\AddOns\\Details\\images\\atributos_icones", 1, 1, 20, 20, p*(5-1), p*(5), 0, 1)
|
||||
CoolTip:AddMenu (2, _detalhes.OpenCustomWindow, nil, nil, nil, Loc ["STRING_CUSTOM_NEW"], "Interface\\PaperDollInfoFrame\\Character-Plus", true)
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ local AceLocale = LibStub ("AceLocale-3.0")
|
||||
local Loc = AceLocale:GetLocale ( "Details" )
|
||||
|
||||
local gump = _detalhes.gump
|
||||
|
||||
local _
|
||||
local alvo_da_habilidade = _detalhes.alvo_da_habilidade
|
||||
local container_habilidades = _detalhes.container_habilidades
|
||||
local container_combatentes = _detalhes.container_combatentes
|
||||
|
||||
@@ -7,6 +7,7 @@ local container_combatentes = _detalhes.container_combatentes
|
||||
local container_misc_target = _detalhes.container_type.CONTAINER_MISCTARGET_CLASS
|
||||
|
||||
--lua locals
|
||||
local _
|
||||
local _setmetatable = setmetatable
|
||||
local _ipairs = ipairs
|
||||
--api locals
|
||||
|
||||
@@ -30,6 +30,8 @@ local _bit_band = bit.band
|
||||
local _ipairs = ipairs
|
||||
local _pairs = pairs
|
||||
|
||||
local _
|
||||
|
||||
--local table_insert = table.insert
|
||||
|
||||
--> FLAGS <== qual o tipo do objeto
|
||||
@@ -113,19 +115,78 @@ function container_combatentes:GetAmount (actorName, key)
|
||||
end
|
||||
end
|
||||
|
||||
function container_combatentes:PegarCombatente (serial, nome, flag, criar, isOwner)
|
||||
local read_flag_ = function (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome)
|
||||
-- converte a flag do wow em flag do details
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
--> pega afiliação
|
||||
local details_flag = 0x00000000
|
||||
|
||||
--[[
|
||||
if (self.tipo == container_damage) then
|
||||
if (nome:find ("Lyl")) then
|
||||
if (nome:find ("-")) then
|
||||
print ("nome com -", isOwner)
|
||||
if (flag) then
|
||||
--print ("tem flag")
|
||||
|
||||
if (_bit_band (flag, 0x00000400) ~= 0) then --> é um player
|
||||
details_flag = details_flag+0x00000001
|
||||
|
||||
novo_objeto.displayName = _detalhes:GetNickname (serial, false, true) --> serial, default, silent
|
||||
if (not novo_objeto.displayName) then
|
||||
if (_IsInInstance() and _detalhes.remove_realm_from_name) then
|
||||
novo_objeto.displayName = nome:gsub (("%-.*"), "")
|
||||
--print (novo_objeto.displayName)
|
||||
else
|
||||
novo_objeto.displayName = nome
|
||||
end
|
||||
end
|
||||
|
||||
if (_bit_band (flag, EM_GRUPO) ~= 0) then --> faz parte do grupo
|
||||
details_flag = details_flag+0x00000100
|
||||
novo_objeto.grupo = true
|
||||
if (shadow_objeto) then
|
||||
shadow_objeto.grupo = true
|
||||
end
|
||||
end
|
||||
|
||||
elseif (dono_do_pet) then --> é um pet
|
||||
|
||||
details_flag = details_flag+0x00000002
|
||||
novo_objeto.owner = dono_do_pet
|
||||
novo_objeto.ownerName = dono_do_pet.nome
|
||||
|
||||
if (_IsInInstance() and _detalhes.remove_realm_from_name) then
|
||||
novo_objeto.displayName = nome:gsub (("%-.*"), ">")
|
||||
else
|
||||
novo_objeto.displayName = nome
|
||||
end
|
||||
|
||||
--if (not novo_objeto.displayName:find (">")) then
|
||||
-- novo_objeto.displayName = novo_objeto.displayName .. ">"
|
||||
--end
|
||||
|
||||
--print ("pet -> " .. nome)
|
||||
else
|
||||
--print ("nome okey", isOwner)
|
||||
novo_objeto.displayName = nome
|
||||
end
|
||||
|
||||
-- 0x00000060 --> inimigo neutro
|
||||
if (_bit_band (flag, 0x00000010) ~= 0) then --> é amigo
|
||||
details_flag = details_flag+0x00000010
|
||||
elseif (_bit_band (flag, 0x00000020) ~= 0) then --> é neutro
|
||||
details_flag = details_flag+0x00000020
|
||||
--print ("neutro -> " .. nome)
|
||||
elseif (_bit_band (flag, 0x00000040) ~= 0) then --> é inimigo
|
||||
details_flag = details_flag+0x00000040
|
||||
--print ("inimigos -> " .. nome)
|
||||
end
|
||||
else
|
||||
--print (flag)
|
||||
end
|
||||
|
||||
novo_objeto.flag = details_flag
|
||||
novo_objeto.flag_original = flag
|
||||
novo_objeto.serial = serial
|
||||
end
|
||||
--]]
|
||||
|
||||
function container_combatentes:PegarCombatente (serial, nome, flag, criar, isOwner)
|
||||
|
||||
--> antes de mais nada, vamos verificar se é um pet
|
||||
local dono_do_pet
|
||||
@@ -161,7 +222,7 @@ end
|
||||
-- rotinas de criação do objeto shadow
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
local shadow = self.shadow --> espelho do container no overall
|
||||
local shadow_objeto = nil
|
||||
local shadow_objeto
|
||||
|
||||
if (shadow) then --> se tiver o espelho (não for a tabela overall já)
|
||||
shadow_objeto = shadow:PegarCombatente (_, nome) --> apenas verifica se ele existe ou não
|
||||
@@ -176,76 +237,6 @@ end
|
||||
novo_objeto.nome = nome
|
||||
--print (nome)
|
||||
|
||||
-- converte a flag do wow em flag do details
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
--> pega afiliação
|
||||
local details_flag = 0x00000000
|
||||
|
||||
if (flag) then
|
||||
--print ("tem flag")
|
||||
|
||||
if (_bit_band (flag, 0x00000400) ~= 0) then --> é um player
|
||||
details_flag = details_flag+0x00000001
|
||||
|
||||
novo_objeto.displayName = _detalhes:GetNickname (serial, false, true) --> serial, default, silent
|
||||
if (not novo_objeto.displayName) then
|
||||
if (_IsInInstance() and _detalhes.remove_realm_from_name) then
|
||||
novo_objeto.displayName = nome:gsub (("%-.*"), "")
|
||||
--print (novo_objeto.displayName)
|
||||
else
|
||||
novo_objeto.displayName = nome
|
||||
end
|
||||
end
|
||||
|
||||
if (_bit_band (flag, EM_GRUPO) ~= 0) then --> faz parte do grupo
|
||||
details_flag = details_flag+0x00000100
|
||||
novo_objeto.grupo = true
|
||||
if (shadow_objeto) then
|
||||
shadow_objeto.grupo = true
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
elseif (dono_do_pet) then --> é um pet
|
||||
|
||||
details_flag = details_flag+0x00000002
|
||||
novo_objeto.owner = dono_do_pet
|
||||
novo_objeto.ownerName = dono_do_pet.nome
|
||||
|
||||
if (_IsInInstance() and _detalhes.remove_realm_from_name) then
|
||||
novo_objeto.displayName = nome:gsub (("%-.*"), ">")
|
||||
else
|
||||
novo_objeto.displayName = nome
|
||||
end
|
||||
|
||||
--if (not novo_objeto.displayName:find (">")) then
|
||||
-- novo_objeto.displayName = novo_objeto.displayName .. ">"
|
||||
--end
|
||||
|
||||
--print ("pet -> " .. nome)
|
||||
else
|
||||
novo_objeto.displayName = nome
|
||||
end
|
||||
|
||||
-- 0x00000060 --> inimigo neutro
|
||||
if (_bit_band (flag, 0x00000010) ~= 0) then --> é amigo
|
||||
details_flag = details_flag+0x00000010
|
||||
elseif (_bit_band (flag, 0x00000020) ~= 0) then --> é neutro
|
||||
details_flag = details_flag+0x00000020
|
||||
--print ("neutro -> " .. nome)
|
||||
elseif (_bit_band (flag, 0x00000040) ~= 0) then --> é inimigo
|
||||
details_flag = details_flag+0x00000040
|
||||
--print ("inimigos -> " .. nome)
|
||||
end
|
||||
else
|
||||
--print (flag)
|
||||
end
|
||||
|
||||
novo_objeto.flag = details_flag
|
||||
novo_objeto.flag_original = flag
|
||||
novo_objeto.serial = serial
|
||||
|
||||
-- tipo do container
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -254,6 +245,7 @@ end
|
||||
if (self.tipo == container_damage) then --> CONTAINER DAMAGE
|
||||
|
||||
get_class_ (novo_objeto, nome, flag)
|
||||
read_flag_ (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome)
|
||||
|
||||
if (dono_do_pet) then
|
||||
dono_do_pet.pets [#dono_do_pet.pets+1] = nome
|
||||
@@ -283,6 +275,7 @@ end
|
||||
elseif (self.tipo == container_heal) then --> CONTAINER HEALING
|
||||
|
||||
get_class_ (novo_objeto, nome, flag)
|
||||
read_flag_ (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome)
|
||||
|
||||
if (dono_do_pet) then
|
||||
dono_do_pet.pets [#dono_do_pet.pets+1] = nome
|
||||
@@ -312,6 +305,7 @@ end
|
||||
elseif (self.tipo == container_energy) then --> CONTAINER ENERGY
|
||||
|
||||
get_class_ (novo_objeto, nome, flag)
|
||||
read_flag_ (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome)
|
||||
|
||||
if (dono_do_pet) then
|
||||
dono_do_pet.pets [#dono_do_pet.pets+1] = nome
|
||||
@@ -337,6 +331,7 @@ end
|
||||
elseif (self.tipo == container_misc) then --> CONTAINER MISC
|
||||
|
||||
get_class_ (novo_objeto, nome, flag)
|
||||
read_flag_ (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome)
|
||||
|
||||
--local teste_classe =
|
||||
|
||||
@@ -364,7 +359,7 @@ end
|
||||
elseif (self.tipo == container_damage_target) then --> CONTAINER ALVO DO DAMAGE
|
||||
if (shadow_objeto) then
|
||||
novo_objeto.shadow = shadow_objeto
|
||||
shadow_objeto.flag = details_flag
|
||||
--shadow_objeto.flag = details_flag
|
||||
end
|
||||
|
||||
elseif (self.tipo == container_heal_target) then --> CONTAINER ALVOS DO HEALING
|
||||
@@ -372,7 +367,7 @@ end
|
||||
novo_objeto.absorbed = 0
|
||||
if (shadow_objeto) then
|
||||
novo_objeto.shadow = shadow_objeto
|
||||
shadow_objeto.flag = details_flag
|
||||
--shadow_objeto.flag = details_flag
|
||||
end
|
||||
|
||||
elseif (self.tipo == container_energy_target) then --> CONTAINER ALVOS DO ENERGY
|
||||
@@ -384,14 +379,14 @@ end
|
||||
|
||||
if (shadow_objeto) then
|
||||
novo_objeto.shadow = shadow_objeto
|
||||
shadow_objeto.flag = details_flag
|
||||
--shadow_objeto.flag = details_flag
|
||||
end
|
||||
|
||||
elseif (self.tipo == container_misc_target) then --> CONTAINER ALVOS DO MISC
|
||||
|
||||
if (shadow_objeto) then
|
||||
novo_objeto.shadow = shadow_objeto
|
||||
shadow_objeto.flag = details_flag
|
||||
--shadow_objeto.flag = details_flag
|
||||
end
|
||||
|
||||
elseif (self.tipo == container_friendlyfire) then --> CONTAINER FRIENDLY FIRE
|
||||
|
||||
@@ -5,6 +5,7 @@ local _detalhes = _G._detalhes
|
||||
local gump = _detalhes.gump
|
||||
|
||||
local _setmetatable = setmetatable
|
||||
local _
|
||||
|
||||
local container_playernpc = _detalhes.container_type.CONTAINER_PLAYERNPC
|
||||
local container_damage = _detalhes.container_type.CONTAINER_DAMAGE_CLASS
|
||||
@@ -62,7 +63,7 @@ function container_habilidades:PegaHabilidade (id, criar, token, cria_shadow)
|
||||
if (criar) then
|
||||
|
||||
if (cria_shadow) then
|
||||
local novo_objeto = self.funcao_de_criacao (_, id, nil, "")
|
||||
local novo_objeto = self.funcao_de_criacao (nil, id, nil, "")
|
||||
self._ActorTable [id] = novo_objeto
|
||||
return novo_objeto
|
||||
end
|
||||
@@ -78,7 +79,7 @@ function container_habilidades:PegaHabilidade (id, criar, token, cria_shadow)
|
||||
end
|
||||
|
||||
--local novo_objeto = habilidade_dano:NovaTabela (id, shadow_objeto)
|
||||
local novo_objeto = self.funcao_de_criacao (_, id, shadow_objeto, token)
|
||||
local novo_objeto = self.funcao_de_criacao (nil, id, shadow_objeto, token)
|
||||
|
||||
if (shadow_objeto) then --> link é esta mesma tabela mas no container do overall
|
||||
novo_objeto.shadow = shadow_objeto --> diz ao objeto qual a shadow dele na tabela overall
|
||||
|
||||
@@ -150,6 +150,14 @@ function historico:resetar()
|
||||
--> fecha a janela de informações do jogador
|
||||
_detalhes:FechaJanelaInfo()
|
||||
|
||||
for _, combate in ipairs (_detalhes.tabela_historico.tabelas) do
|
||||
_table_wipe (combate)
|
||||
end
|
||||
_table_wipe (_detalhes.tabela_vigente)
|
||||
_table_wipe (_detalhes.tabela_overall)
|
||||
_table_wipe (_detalhes.tabela_pets.pets)
|
||||
_table_wipe (_detalhes.spellcache)
|
||||
|
||||
-- novo container de historico
|
||||
_detalhes.tabela_historico = historico:NovoHistorico() --joga fora a tabela antiga e cria uma nova
|
||||
--novo container para armazenar pets
|
||||
@@ -158,7 +166,7 @@ function historico:resetar()
|
||||
-- nova tabela do overall e current
|
||||
_detalhes.tabela_overall = combate:NovaTabela() --joga fora a tabela antiga e cria uma nova
|
||||
-- cria nova tabela do combate atual
|
||||
_detalhes.tabela_vigente = combate:NovaTabela (_, _detalhes.tabela_overall)
|
||||
_detalhes.tabela_vigente = combate:NovaTabela (nil, _detalhes.tabela_overall)
|
||||
|
||||
--marca o addon como fora de combate
|
||||
_detalhes.in_combat = false
|
||||
@@ -178,6 +186,8 @@ function historico:resetar()
|
||||
_table_wipe (_detalhes.cache_healing_group)
|
||||
_detalhes:UpdateParserGears()
|
||||
|
||||
collectgarbage()
|
||||
|
||||
_detalhes:InstanciaCallFunction (_detalhes.AtualizaSegmentos) -- atualiza o instancia.showing para as novas tabelas criadas
|
||||
_detalhes:InstanciaCallFunction (_detalhes.AtualizaSoloMode_AfertReset) -- verifica se precisa zerar as tabela da janela solo mode
|
||||
_detalhes:InstanciaCallFunction (_detalhes.ResetaGump) --_detalhes:ResetaGump ("de todas as instancias")
|
||||
|
||||
+2
-2
@@ -9,7 +9,7 @@
|
||||
local _detalhes = _G._detalhes
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _tempo = time()
|
||||
|
||||
local _
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
--> aqui ele perdeu o self.showing das instâncias, precisa fazer com que elas atualizem
|
||||
_detalhes.tabela_overall = _detalhes.combate:NovaTabela()
|
||||
|
||||
_detalhes:InstanciaCallFunction (_detalhes.ResetaGump, _, -1) --> reseta scrollbar, iterators, rodapé, etc
|
||||
_detalhes:InstanciaCallFunction (_detalhes.ResetaGump, nil, -1) --> reseta scrollbar, iterators, rodapé, etc
|
||||
_detalhes:InstanciaCallFunction (_detalhes.InstanciaFadeBarras, -1) --> esconde todas as barras
|
||||
_detalhes:InstanciaCallFunction (_detalhes.AtualizaSegmentos) --> atualiza o showing
|
||||
end
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
|
||||
local _
|
||||
local _pairs = pairs --lua local
|
||||
local _ipairs = ipairs --lua local
|
||||
local _rawget = rawget --lua local
|
||||
|
||||
+7
-7
@@ -13,7 +13,7 @@
|
||||
local _table_wipe = table.wipe
|
||||
local _math_min = math.min
|
||||
local _string_gmatch = string.gmatch
|
||||
|
||||
local _
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
if (not _detalhes.tabela_pets.pets [serial]) then
|
||||
_detalhes.tabela_pets.pets [serial] = owner_table
|
||||
local petActor = _detalhes.tabela_vigente[1]:PegarCombatente (_, nome)
|
||||
local petActor = _detalhes.tabela_vigente[1]:PegarCombatente (nil, nome)
|
||||
if (petActor) then
|
||||
|
||||
local ownerActor = _detalhes.tabela_vigente[1]:PegarCombatente (owner_table[2], owner_table[1], owner_table[3], true)
|
||||
@@ -145,7 +145,7 @@
|
||||
local _this = data [i]
|
||||
|
||||
local name = _this [1]
|
||||
local actor = container:PegarCombatente (_, name)
|
||||
local actor = container:PegarCombatente (nil, name)
|
||||
|
||||
if (not actor) then
|
||||
if (IsInRaid()) then
|
||||
@@ -212,13 +212,13 @@
|
||||
local atributo_name = _detalhes:GetInternalSubAttributeName (atributo, subatributo)
|
||||
|
||||
if (atributo == 1) then
|
||||
data = _detalhes.atributo_damage:RefreshWindow ({}, _detalhes.tabela_vigente, _, { key = atributo_name, modo = _detalhes.modos.group })
|
||||
data = _detalhes.atributo_damage:RefreshWindow ({}, _detalhes.tabela_vigente, nil, { key = atributo_name, modo = _detalhes.modos.group })
|
||||
elseif (atributo == 2) then
|
||||
data = _detalhes.atributo_heal:RefreshWindow ({}, _detalhes.tabela_vigente, _, { key = atributo_name, modo = _detalhes.modos.group })
|
||||
data = _detalhes.atributo_heal:RefreshWindow ({}, _detalhes.tabela_vigente, nil, { key = atributo_name, modo = _detalhes.modos.group })
|
||||
elseif (atributo == 3) then
|
||||
data = _detalhes.atributo_energy:RefreshWindow ({}, _detalhes.tabela_vigente, _, { key = atributo_name, modo = _detalhes.modos.group })
|
||||
data = _detalhes.atributo_energy:RefreshWindow ({}, _detalhes.tabela_vigente, nil, { key = atributo_name, modo = _detalhes.modos.group })
|
||||
elseif (atributo == 4) then
|
||||
data = _detalhes.atributo_misc:RefreshWindow ({}, _detalhes.tabela_vigente, _, { key = atributo_name, modo = _detalhes.modos.group })
|
||||
data = _detalhes.atributo_misc:RefreshWindow ({}, _detalhes.tabela_vigente, nil, { key = atributo_name, modo = _detalhes.modos.group })
|
||||
else
|
||||
return
|
||||
end
|
||||
|
||||
+14
-10
@@ -8,7 +8,7 @@
|
||||
local _detalhes = _G._detalhes
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _tempo = time()
|
||||
|
||||
local _
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
|
||||
@@ -116,6 +116,10 @@
|
||||
------------------------------------------------------------------------------------------------
|
||||
--> early checks and fixes
|
||||
|
||||
--if (alvo_name == "Ditador") then
|
||||
--print ("resisted",resisted, "blocked",blocked, "absorbed",absorbed, "critical",critical, "glacing",glacing, "crushing",crushing)
|
||||
--end
|
||||
|
||||
if (who_serial == "0x0000000000000000") then
|
||||
if (who_flags and _bit_band (who_flags, OBJECT_TYPE_PETS) ~= 0) then --> é um pet
|
||||
--> pets must have an serial
|
||||
@@ -405,7 +409,7 @@
|
||||
--> 'misser'
|
||||
local este_jogador = damage_cache [who_name]
|
||||
if (not este_jogador) then
|
||||
este_jogador, meu_dono, who_name = _current_damage_container:PegarCombatente (_, who_name)
|
||||
este_jogador, meu_dono, who_name = _current_damage_container:PegarCombatente (nil, who_name)
|
||||
if (not este_jogador) then
|
||||
return --> just return if actor doen't exist yet
|
||||
end
|
||||
@@ -809,7 +813,7 @@
|
||||
escudo [alvo_name][spellid][who_name] = amount
|
||||
|
||||
--if (absorb > 0) then
|
||||
return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, _, _math_ceil (absorb), _math_ceil (overheal), 0, 0, true)
|
||||
return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, nil, _math_ceil (absorb), _math_ceil (overheal), 0, 0, true)
|
||||
--end
|
||||
else
|
||||
--> should apply aura if not found in already applied buff list?
|
||||
@@ -906,7 +910,7 @@
|
||||
|
||||
escudo [alvo_name][spellid][who_name] = nil
|
||||
|
||||
return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, _, _math_ceil (absorb), _math_ceil (overheal), 0, 0, true) --> último parametro IS_SHIELD
|
||||
return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, nil, _math_ceil (absorb), _math_ceil (overheal), 0, 0, true) --> último parametro IS_SHIELD
|
||||
|
||||
--end
|
||||
end
|
||||
@@ -2101,11 +2105,11 @@
|
||||
--print (token)
|
||||
|
||||
-- DEBUG
|
||||
--[[
|
||||
if (who_name == "Trcioo") then
|
||||
local a, b, c, d, e, f, g, h, i, j, k = select (1, ...)
|
||||
print (token, who_name, a, b, c, d, e, f, g, h, i, j, k)
|
||||
end
|
||||
--[
|
||||
--if (alvo_name == "Ditador") then
|
||||
-- local a, b, c, d, e, f, g, h, i, j, k = select (1, ...)
|
||||
-- print (token, who_name, a, b, c, d, e, f, g, h, i, j, k)
|
||||
--end
|
||||
--]]
|
||||
--[[
|
||||
if (who_name == "Ditador") then
|
||||
@@ -2134,7 +2138,7 @@
|
||||
|
||||
local funcao = token_list [token]
|
||||
if (funcao) then
|
||||
return funcao (_, token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, ... )
|
||||
return funcao (nil, token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, ... )
|
||||
else
|
||||
return
|
||||
end
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
if (not _detalhes.RaidTables.Plugins [_detalhes.RaidTables.Mode]) then
|
||||
_detalhes.RaidTables.Mode = 1
|
||||
end
|
||||
_detalhes.RaidTables:switch (_, _detalhes.RaidTables.Mode)
|
||||
_detalhes.RaidTables:switch (nil, _detalhes.RaidTables.Mode)
|
||||
end
|
||||
|
||||
else
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
--> details can call a refresh for an plugin window
|
||||
function _detalhes:RefreshSolo()
|
||||
if (_detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Refresh) then
|
||||
_detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Refresh (_, SoloInstance)
|
||||
_detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Refresh (nil, SoloInstance)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
if (not _detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode]) then
|
||||
_detalhes.SoloTables.Mode = 1
|
||||
end
|
||||
_detalhes.SoloTables:switch (_, _detalhes.SoloTables.Mode)
|
||||
_detalhes.SoloTables:switch (nil, _detalhes.SoloTables.Mode)
|
||||
end
|
||||
|
||||
else
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
local DEFAULT_CHILD_FONTFACE = "Friz Quadrata TT"
|
||||
local DEFAULT_CHILD_FONTCOLOR = {1, 0.733333, 0, 1}
|
||||
local DEFAULT_CHILD_FONTSIZE = 10
|
||||
local _
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
@@ -255,7 +256,7 @@
|
||||
local frame = _detalhes.gump:NewPanel (instance.baseframe.cabecalho.fechar, nil, name..instance:GetInstanceId(), nil, w or DEFAULT_CHILD_WIDTH, h or DEFAULT_CHILD_HEIGHT, false)
|
||||
|
||||
--create widgets
|
||||
local text = _detalhes.gump:NewLabel (frame, _, "$parentText", "text", "0")
|
||||
local text = _detalhes.gump:NewLabel (frame, nil, "$parentText", "text", "0")
|
||||
text:SetPoint ("right", frame, "right", 0, 0)
|
||||
text:SetJustifyH ("right")
|
||||
_detalhes:SetFontSize (text, 9.8)
|
||||
@@ -342,7 +343,7 @@
|
||||
child.options.isHidden = value
|
||||
else
|
||||
if (child [option] and type (child [option]) == "function") then
|
||||
child [option] (_, child, value)
|
||||
child [option] (nil, child, value)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -651,7 +652,7 @@ do
|
||||
local window = _G.DetailsStatusBarOptions2.MyObject
|
||||
|
||||
--> build all your widgets -----------------------------------------------------------------------------------------------------------------------------
|
||||
_detalhes.gump:NewLabel (window, _, "$parentClockTypeLabel", "ClockTypeLabel", Loc ["STRING_PLUGIN_CLOCKTYPE"])
|
||||
_detalhes.gump:NewLabel (window, nil, "$parentClockTypeLabel", "ClockTypeLabel", Loc ["STRING_PLUGIN_CLOCKTYPE"])
|
||||
window.ClockTypeLabel:SetPoint (10, -15)
|
||||
|
||||
local onSelectClockType = function (_, child, thistype)
|
||||
@@ -663,7 +664,7 @@ do
|
||||
{value = 2, label = Loc ["STRING_PLUGIN_SECONLY"], onclick = onSelectClockType},
|
||||
{value = 3, label = Loc ["STRING_PLUGIN_TIMEDIFF"], onclick = onSelectClockType}}
|
||||
|
||||
_detalhes.gump:NewDropDown (window, _, "$parentClockTypeDropdown", "ClockTypeDropdown", 200, 20, function() return clockTypes end, 1) -- func, default
|
||||
_detalhes.gump:NewDropDown (window, nil, "$parentClockTypeDropdown", "ClockTypeDropdown", 200, 20, function() return clockTypes end, 1) -- func, default
|
||||
window.ClockTypeDropdown:SetPoint ("left", window.ClockTypeLabel, "right", 2)
|
||||
-----------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -78,6 +78,8 @@
|
||||
end
|
||||
|
||||
function timeMachine:Reiniciar()
|
||||
table.wipe (self.tabelas[1])
|
||||
table.wipe (self.tabelas[2])
|
||||
self.tabelas = {{}, {}} --> 1 dano 2 cura
|
||||
end
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
|
||||
local _
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
|
||||
|
||||
+2
-2
@@ -562,9 +562,9 @@
|
||||
label:Hide()
|
||||
bgpanel:Hide()
|
||||
if (instancia.meu_id == _detalhes.solo) then
|
||||
_detalhes.SoloTables:switch (_, _detalhes.SoloTables.Mode)
|
||||
_detalhes.SoloTables:switch (nil, _detalhes.SoloTables.Mode)
|
||||
elseif (instancia.meu_id == _detalhes.raid) then
|
||||
_detalhes.RaidTables:switch (_, _detalhes.RaidTables.Mode)
|
||||
_detalhes.RaidTables:switch (nil, _detalhes.RaidTables.Mode)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -9,7 +9,7 @@ local _unpack = unpack --> lua local
|
||||
local _type = type --> lua local
|
||||
local _math_floor = math.floor --> lua local
|
||||
local loadstring = loadstring --> lua local
|
||||
|
||||
local _
|
||||
local cleanfunction = function() end
|
||||
local APIButtonFunctions = false
|
||||
local ButtonMetaFunctions = {}
|
||||
|
||||
@@ -4,7 +4,7 @@ local AceLocale = LibStub ("AceLocale-3.0")
|
||||
local Loc = AceLocale:GetLocale ( "Details" )
|
||||
|
||||
local gump = _detalhes.gump
|
||||
|
||||
local _
|
||||
--lua locals
|
||||
local _math_floor= math.floor
|
||||
local _type = type
|
||||
|
||||
@@ -10,7 +10,7 @@ local _type = type --> lua local
|
||||
local _math_floor = math.floor --> lua local
|
||||
local loadstring = loadstring --> lua local
|
||||
local _string_len = string.len --> lua local
|
||||
|
||||
local _
|
||||
local cleanfunction = function() end
|
||||
local APIDropDownFunctions = false
|
||||
local DropDownMetaFunctions = {}
|
||||
|
||||
@@ -4,7 +4,7 @@ local gump = _detalhes.gump
|
||||
|
||||
local _type = type
|
||||
local _unpack = unpack
|
||||
|
||||
local _
|
||||
gump.LabelNameCounter = 1
|
||||
gump.PictureNameCounter = 1
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
local _detalhes = _G._detalhes
|
||||
local gump = _detalhes.gump
|
||||
|
||||
local _
|
||||
local _rawset = rawset --> lua local
|
||||
local _rawget = rawget --> lua local
|
||||
local APIHelpFunctions = false
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
--> details main objects
|
||||
local _detalhes = _G._detalhes
|
||||
local gump = _detalhes.gump
|
||||
|
||||
local _
|
||||
local _rawset = rawset --> lua local
|
||||
local _rawget = rawget --> lua local
|
||||
local _setmetatable = setmetatable --> lua local
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--> details main objects
|
||||
local _detalhes = _G._detalhes
|
||||
local gump = _detalhes.gump
|
||||
|
||||
local _
|
||||
local _rawset = rawset --> lua locals
|
||||
local _rawget = rawget --> lua locals
|
||||
local _setmetatable = setmetatable --> lua locals
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
local _detalhes = _G._detalhes
|
||||
local gump = _detalhes.gump
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
|
||||
local _
|
||||
--> lua locals
|
||||
local _rawset = rawset --> lua local
|
||||
local _rawget = rawget --> lua local
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--> details main objects
|
||||
local _detalhes = _G._detalhes
|
||||
local gump = _detalhes.gump
|
||||
|
||||
local _
|
||||
local _rawset = rawset --> lua local
|
||||
local _rawget = rawget --> lua local
|
||||
local _setmetatable = setmetatable --> lua local
|
||||
|
||||
+25
-25
@@ -1,8 +1,8 @@
|
||||
local _detalhes = _G._detalhes
|
||||
local g = _detalhes.gump
|
||||
local _
|
||||
|
||||
|
||||
local window = g:NewPanel (UIParent, _, "DetailsImageEdit", _, 100, 100, false)
|
||||
local window = g:NewPanel (UIParent, nil, "DetailsImageEdit", nil, 100, 100, false)
|
||||
window:SetPoint ("center", UIParent, "center")
|
||||
window:SetResizable (true)
|
||||
window:SetMovable (true)
|
||||
@@ -10,11 +10,11 @@ local g = _detalhes.gump
|
||||
|
||||
window.hooks = {}
|
||||
|
||||
local background = g:NewImage (window, _, "$parentBackground", _, _, _, nil, "background")
|
||||
local background = g:NewImage (window, nil, "$parentBackground", nil, nil, nil, nil, "background")
|
||||
background:SetAllPoints()
|
||||
background:SetTexture (0, 0, 0, .8)
|
||||
|
||||
local edit_texture = g:NewImage (window, _, "$parentImage", _, 300, 250, nil, "artwork")
|
||||
local edit_texture = g:NewImage (window, nil, "$parentImage", nil, 300, 250, nil, "artwork")
|
||||
edit_texture:SetPoint ("center", window, "center")
|
||||
|
||||
local haveHFlip = false
|
||||
@@ -22,14 +22,14 @@ local g = _detalhes.gump
|
||||
|
||||
--> Top Slider
|
||||
|
||||
local topCoordTexture = g:NewImage (window, _, "$parentImageTopCoord", _, _, _, _, "overlay")
|
||||
local topCoordTexture = g:NewImage (window, nil, "$parentImageTopCoord", nil, nil, nil, nil, "overlay")
|
||||
topCoordTexture:SetPoint ("topleft", window, "topleft")
|
||||
topCoordTexture:SetPoint ("topright", window, "topright")
|
||||
topCoordTexture.color = "red"
|
||||
topCoordTexture.height = 1
|
||||
topCoordTexture.alpha = .2
|
||||
|
||||
local topSlider = g:NewSlider (window, _, "$parentTopSlider", "topSlider", 100, 100, 0.1, 100, 0.1, 0)
|
||||
local topSlider = g:NewSlider (window, nil, "$parentTopSlider", "topSlider", 100, 100, 0.1, 100, 0.1, 0)
|
||||
topSlider:SetAllPoints (window.widget)
|
||||
topSlider:SetOrientation ("VERTICAL")
|
||||
topSlider.backdrop = nil
|
||||
@@ -54,14 +54,14 @@ local g = _detalhes.gump
|
||||
|
||||
--> Bottom Slider
|
||||
|
||||
local bottomCoordTexture = g:NewImage (window, _, "$parentImageBottomCoord", _, _, _, _, "overlay")
|
||||
local bottomCoordTexture = g:NewImage (window, nil, "$parentImageBottomCoord", nil, nil, nil, nil, "overlay")
|
||||
bottomCoordTexture:SetPoint ("bottomleft", window, "bottomleft", 0, 0)
|
||||
bottomCoordTexture:SetPoint ("bottomright", window, "bottomright", 0, 0)
|
||||
bottomCoordTexture.color = "red"
|
||||
bottomCoordTexture.height = 1
|
||||
bottomCoordTexture.alpha = .2
|
||||
|
||||
local bottomSlider= g:NewSlider (window, _, "$parentBottomSlider", "bottomSlider", 100, 100, 0.1, 100, 0.1, 100)
|
||||
local bottomSlider= g:NewSlider (window, nil, "$parentBottomSlider", "bottomSlider", 100, 100, 0.1, 100, 0.1, 100)
|
||||
bottomSlider:SetAllPoints (window.widget)
|
||||
bottomSlider:SetOrientation ("VERTICAL")
|
||||
bottomSlider.backdrop = nil
|
||||
@@ -87,14 +87,14 @@ local g = _detalhes.gump
|
||||
|
||||
--> Left Slider
|
||||
|
||||
local leftCoordTexture = g:NewImage (window, _, "$parentImageLeftCoord", _, _, _, _, "overlay")
|
||||
local leftCoordTexture = g:NewImage (window, nil, "$parentImageLeftCoord", nil, nil, nil, nil, "overlay")
|
||||
leftCoordTexture:SetPoint ("topleft", window, "topleft", 0, 0)
|
||||
leftCoordTexture:SetPoint ("bottomleft", window, "bottomleft", 0, 0)
|
||||
leftCoordTexture.color = "red"
|
||||
leftCoordTexture.width = 1
|
||||
leftCoordTexture.alpha = .2
|
||||
|
||||
local leftSlider = g:NewSlider (window, _, "$parentLeftSlider", "leftSlider", 100, 100, 0.1, 100, 0.1, 0.1)
|
||||
local leftSlider = g:NewSlider (window, nil, "$parentLeftSlider", "leftSlider", 100, 100, 0.1, 100, 0.1, 0.1)
|
||||
leftSlider:SetAllPoints (window.widget)
|
||||
leftSlider.backdrop = nil
|
||||
leftSlider.fractional = true
|
||||
@@ -118,14 +118,14 @@ local g = _detalhes.gump
|
||||
|
||||
--> Right Slider
|
||||
|
||||
local rightCoordTexture = g:NewImage (window, _, "$parentImageRightCoord", _, _, _, _, "overlay")
|
||||
local rightCoordTexture = g:NewImage (window, nil, "$parentImageRightCoord", nil, nil, nil, nil, "overlay")
|
||||
rightCoordTexture:SetPoint ("topright", window, "topright", 0, 0)
|
||||
rightCoordTexture:SetPoint ("bottomright", window, "bottomright", 0, 0)
|
||||
rightCoordTexture.color = "red"
|
||||
rightCoordTexture.width = 1
|
||||
rightCoordTexture.alpha = .2
|
||||
|
||||
local rightSlider = g:NewSlider (window, _, "$parentRightSlider", "rightSlider", 100, 100, 0.1, 100, 0.1, 100)
|
||||
local rightSlider = g:NewSlider (window, nil, "$parentRightSlider", "rightSlider", 100, 100, 0.1, 100, 0.1, 100)
|
||||
rightSlider:SetAllPoints (window.widget)
|
||||
rightSlider.backdrop = nil
|
||||
rightSlider.fractional = true
|
||||
@@ -150,7 +150,7 @@ local g = _detalhes.gump
|
||||
|
||||
--> Edit Buttons
|
||||
|
||||
local buttonsBackground = g:NewPanel (UIParent, _, "DetailsImageEditButtonsBg", _, 115, 225)
|
||||
local buttonsBackground = g:NewPanel (UIParent, nil, "DetailsImageEditButtonsBg", nil, 115, 225)
|
||||
buttonsBackground:SetPoint ("topleft", window, "topright", 2, 0)
|
||||
buttonsBackground:Hide()
|
||||
--buttonsBackground:SetMovable (true)
|
||||
@@ -195,20 +195,20 @@ local g = _detalhes.gump
|
||||
window [side.."Slider"]:Show()
|
||||
end
|
||||
|
||||
local leftTexCoordButton = g:NewButton (buttonsBackground, _, "$parentLeftTexButton", _, 100, 20, enableTexEdit, "left", _, _, "Crop Left")
|
||||
local leftTexCoordButton = g:NewButton (buttonsBackground, nil, "$parentLeftTexButton", nil, 100, 20, enableTexEdit, "left", nil, nil, "Crop Left")
|
||||
leftTexCoordButton:SetPoint ("topleft", window, "topright", 10, -10)
|
||||
local rightTexCoordButton = g:NewButton (buttonsBackground, _, "$parentRightTexButton", _, 100, 20, enableTexEdit, "right", _, _, "Crop Right")
|
||||
local rightTexCoordButton = g:NewButton (buttonsBackground, nil, "$parentRightTexButton", nil, 100, 20, enableTexEdit, "right", nil, nil, "Crop Right")
|
||||
rightTexCoordButton:SetPoint ("topleft", window, "topright", 10, -30)
|
||||
local topTexCoordButton = g:NewButton (buttonsBackground, _, "$parentTopTexButton", _, 100, 20, enableTexEdit, "top", _, _, "Crop Top")
|
||||
local topTexCoordButton = g:NewButton (buttonsBackground, nil, "$parentTopTexButton", nil, 100, 20, enableTexEdit, "top", nil, nil, "Crop Top")
|
||||
topTexCoordButton:SetPoint ("topleft", window, "topright", 10, -50)
|
||||
local bottomTexCoordButton = g:NewButton (buttonsBackground, _, "$parentBottomTexButton", _, 100, 20, enableTexEdit, "bottom", _, _, "Crop Bottom")
|
||||
local bottomTexCoordButton = g:NewButton (buttonsBackground, nil, "$parentBottomTexButton", nil, 100, 20, enableTexEdit, "bottom", nil, nil, "Crop Bottom")
|
||||
bottomTexCoordButton:SetPoint ("topleft", window, "topright", 10, -70)
|
||||
leftTexCoordButton:InstallCustomTexture()
|
||||
rightTexCoordButton:InstallCustomTexture()
|
||||
topTexCoordButton:InstallCustomTexture()
|
||||
bottomTexCoordButton:InstallCustomTexture()
|
||||
|
||||
local Alpha = g:NewButton (buttonsBackground, _, "$parentBottomAlphaButton", _, 100, 20, alpha, _, _, _, "Transparency")
|
||||
local Alpha = g:NewButton (buttonsBackground, nil, "$parentBottomAlphaButton", nil, 100, 20, alpha, nil, nil, nil, "Transparency")
|
||||
Alpha:SetPoint ("topleft", window, "topright", 10, -110)
|
||||
Alpha:InstallCustomTexture()
|
||||
|
||||
@@ -259,14 +259,14 @@ local g = _detalhes.gump
|
||||
end
|
||||
end
|
||||
|
||||
local changeColorButton = g:NewButton (buttonsBackground, _, "$parentOverlayColorButton", _, 100, 20, changeColor, _, _, _, "Overlay Color")
|
||||
local changeColorButton = g:NewButton (buttonsBackground, nil, "$parentOverlayColorButton", nil, 100, 20, changeColor, nil, nil, nil, "Overlay Color")
|
||||
changeColorButton:SetPoint ("topleft", window, "topright", 10, -90)
|
||||
changeColorButton:InstallCustomTexture()
|
||||
|
||||
alphaFrame = g:NewPanel (buttonsBackground, _, "DetailsImageEditAlphaBg", _, 40, 225)
|
||||
alphaFrame = g:NewPanel (buttonsBackground, nil, "DetailsImageEditAlphaBg", nil, 40, 225)
|
||||
alphaFrame:SetPoint ("topleft", buttonsBackground, "topright", 2, 0)
|
||||
alphaFrame:Hide()
|
||||
local alphaSlider = g:NewSlider (alphaFrame, _, "$parentAlphaSlider", "alphaSlider", 30, 220, 1, 100, 1, edit_texture:GetAlpha()*100)
|
||||
local alphaSlider = g:NewSlider (alphaFrame, nil, "$parentAlphaSlider", "alphaSlider", 30, 220, 1, 100, 1, edit_texture:GetAlpha()*100)
|
||||
alphaSlider:SetPoint ("top", alphaFrame, "top", 0, -5)
|
||||
alphaSlider:SetOrientation ("VERTICAL")
|
||||
alphaSlider.thumb:SetSize (40, 30)
|
||||
@@ -350,7 +350,7 @@ local g = _detalhes.gump
|
||||
end)
|
||||
|
||||
--> change size
|
||||
local resizeLabel = g:NewLabel (window, _, "$parentResizerIndicator", _, "RESIZE", _, 9)
|
||||
local resizeLabel = g:NewLabel (window, nil, "$parentResizerIndicator", nil, "RESIZE", nil, 9)
|
||||
resizeLabel:SetPoint ("right", resizer, "left", -2, 0)
|
||||
|
||||
--> flip
|
||||
@@ -416,11 +416,11 @@ local g = _detalhes.gump
|
||||
end
|
||||
end
|
||||
|
||||
local flipButtonH = g:NewButton (buttonsBackground, _, "$parentFlipButton", _, 100, 20, flip, 1, _, _, "Flip Horizontal")
|
||||
local flipButtonH = g:NewButton (buttonsBackground, nil, "$parentFlipButton", nil, 100, 20, flip, 1, nil, nil, "Flip Horizontal")
|
||||
flipButtonH:SetPoint ("topleft", window, "topright", 10, -140)
|
||||
flipButtonH:InstallCustomTexture()
|
||||
--
|
||||
local flipButtonV = g:NewButton (buttonsBackground, _, "$parentFlipButton2", _, 100, 20, flip, 2, _, _, "Flip Vertical")
|
||||
local flipButtonV = g:NewButton (buttonsBackground, nil, "$parentFlipButton2", nil, 100, 20, flip, 2, nil, nil, "Flip Vertical")
|
||||
flipButtonV:SetPoint ("topleft", window, "topright", 10, -160)
|
||||
flipButtonV:InstallCustomTexture()
|
||||
|
||||
@@ -454,7 +454,7 @@ local g = _detalhes.gump
|
||||
return window.callback_func (edit_texture.width, edit_texture.height, {edit_texture:GetVertexColor()}, edit_texture:GetAlpha(), coords, window.extra_param)
|
||||
end
|
||||
|
||||
local acceptButton = g:NewButton (buttonsBackground, _, "$parentAcceptButton", _, 100, 20, window.accept, _, _, _, "DONE")
|
||||
local acceptButton = g:NewButton (buttonsBackground, nil, "$parentAcceptButton", nil, 100, 20, window.accept, nil, nil, nil, "DONE")
|
||||
acceptButton:SetPoint ("topleft", window, "topright", 10, -200)
|
||||
acceptButton:InstallCustomTexture()
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--> details main objects
|
||||
local _detalhes = _G._detalhes
|
||||
local gump = _detalhes.gump
|
||||
|
||||
local _
|
||||
local _rawset = rawset --> lua local
|
||||
local _rawget = rawget --> lua local
|
||||
local _setmetatable = setmetatable --> lua local
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--> details main objects
|
||||
local _detalhes = _G._detalhes
|
||||
local gump = _detalhes.gump
|
||||
|
||||
local _
|
||||
local _rawset = rawset --> lua local
|
||||
local _rawget = rawget --> lua local
|
||||
local _setmetatable = setmetatable --> lua local
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--> details main objects
|
||||
local _detalhes = _G._detalhes
|
||||
local gump = _detalhes.gump
|
||||
|
||||
local _
|
||||
local _rawset = rawset --> lua local
|
||||
local _rawget = rawget --> lua local
|
||||
local _setmetatable = setmetatable --> lua local
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
|
||||
local _
|
||||
--> initialize buffs name container
|
||||
_detalhes.Buffs.BuffsTable = {} -- armazenara o [nome do buff] = { tabela do buff }
|
||||
_detalhes.Buffs.__index = _detalhes.Buffs
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
|
||||
local _
|
||||
--> Event types:
|
||||
_detalhes.RegistredEvents = {
|
||||
--> details self events
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
do
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
|
||||
local _
|
||||
local _pairs = pairs
|
||||
local _ipairs = ipairs
|
||||
local _UnitClass = UnitClass
|
||||
|
||||
@@ -24,6 +24,18 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
|
||||
if (_detalhes.opened_windows == 0) then
|
||||
_detalhes:CriarInstancia()
|
||||
else
|
||||
-- ter certeza que não bugou a contagem
|
||||
local have_opened = false
|
||||
for _, instance in ipairs (_detalhes.tabela_instancias) do
|
||||
if (instance.baseframe:IsShown()) then
|
||||
have_opened = true
|
||||
break
|
||||
end
|
||||
end
|
||||
if (not have_opened) then
|
||||
_detalhes:CriarInstancia()
|
||||
end
|
||||
end
|
||||
|
||||
elseif (command == Loc ["STRING_SLASH_DISABLE"]) then
|
||||
|
||||
@@ -7,7 +7,7 @@ do
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
|
||||
local _
|
||||
local _rawget = rawget
|
||||
local _rawset = rawset
|
||||
local _setmetatable = setmetatable
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
|
||||
local _
|
||||
_detalhes.timeContainer = {
|
||||
damage_recording = 0,
|
||||
healing_recording = 0,
|
||||
|
||||
@@ -2,7 +2,7 @@ do
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local DetailsFrameWork = _detalhes.gump
|
||||
|
||||
local _
|
||||
--> panel
|
||||
|
||||
function _detalhes:CreateCopyPasteWindow()
|
||||
|
||||
@@ -6,7 +6,7 @@ local AceSerializer = LibStub ("AceSerializer-3.0")
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
|
||||
local gump = _detalhes.gump
|
||||
|
||||
local _
|
||||
local atributos = _detalhes.atributos
|
||||
local sub_atributos = _detalhes.sub_atributos
|
||||
--lua locals
|
||||
|
||||
@@ -2,7 +2,7 @@ local _detalhes = _G._detalhes
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
|
||||
local gump = _detalhes.gump
|
||||
|
||||
local _
|
||||
--lua locals
|
||||
--local _string_len = string.len
|
||||
local _math_floor = math.floor
|
||||
|
||||
@@ -3,7 +3,7 @@ local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
|
||||
|
||||
local g = _detalhes.gump
|
||||
|
||||
local _
|
||||
function _detalhes:OpenOptionsWindow (instance)
|
||||
|
||||
GameCooltip:Close()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
|
||||
local _
|
||||
local gump = _detalhes.gump
|
||||
|
||||
local atributos = _detalhes.atributos
|
||||
|
||||
@@ -2,7 +2,7 @@ local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local gump = _detalhes.gump
|
||||
|
||||
local _
|
||||
--lua locals
|
||||
local _cstr = tostring --> lua local
|
||||
local _math_ceil = math.ceil --> lua local
|
||||
|
||||
@@ -2,7 +2,7 @@ local _detalhes = _G._detalhes
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
|
||||
local g = _detalhes.gump
|
||||
|
||||
local _
|
||||
function _detalhes:OpenWelcomeWindow ()
|
||||
|
||||
GameCooltip:Close()
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ local AceLocale = LibStub ("AceLocale-3.0")
|
||||
local Loc = AceLocale:GetLocale ( "Details" )
|
||||
|
||||
local gump = _detalhes.gump
|
||||
|
||||
local _
|
||||
--lua locals
|
||||
local _unpack = unpack
|
||||
local _math_floor = math.floor
|
||||
|
||||
@@ -1,54 +1,67 @@
|
||||
--localization
|
||||
--> english
|
||||
do
|
||||
local Loc = LibStub("AceLocale-3.0"):NewLocale("DetailsErrorReport", "enUS", true)
|
||||
Loc ["STRING_PLUGIN_NAME"] = "Error Report"
|
||||
Loc ["STRING_TOOLTIP"] = "Did you found a bug? Report here!"
|
||||
Loc ["STRING_REPORT"] = "Details Report"
|
||||
Loc ["STRING_PROBLEM"] = "problem"
|
||||
Loc ["STRING_SUGESTION"] = "sugestion"
|
||||
Loc ["STRING_LUAERROR_DESC"] = "send a report about occurrence of lua errors"
|
||||
Loc ["STRING_ACCURACY_DESC"] = "you found something which isn't the amount that should be\nfor instance, some healing or damage spell doesn't have the correct amount calculated."
|
||||
Loc ["STRING_NOTWORK_DESC"] = "anything which should be doing something and actually isn't"
|
||||
Loc ["STRING_OTHER_DESC"] = "any other problem or perhaps a suggesting not involving the subjects above, can be reported here"
|
||||
Loc ["STRING_LUA_ERROR"] = "Lua Error"
|
||||
Loc ["STRING_ACCURACY_ERROR"] = "Instable Accuracy"
|
||||
Loc ["STRING_NOTWORK_ERROR"] = "Isn't Working"
|
||||
Loc ["STRING_OTHER_ERROR"] = "Other"
|
||||
|
||||
Loc ["STRING_DEFAULT_TEXT_LUA"] = "You can copy and paste here the first 20 lines from the lua error window, also, is important a small description about the error, when it occurs and with what frequency it occurs."
|
||||
Loc ["STRING_DEFAULT_TEXT_ACCURACY"] = "A miss accuracy is normal and happen all the time, but when the problem happen with frequency it's important tell to us. A good way to report is analyzing when the instability occurs, if is caused by a spell or if is a untracked pet."
|
||||
Loc ["STRING_DEFAULT_TEXT_NOTWORK"] = "When you click in something and the result isn't the expected, could be a bug. If thing like this occurs more then once, report the problem to us, dont forget to mention which button is and the frequency."
|
||||
Loc ["STRING_DEFAULT_TEXT_OTHER"] = "Any other problem not mentioned in the other 3 options should be reported here."
|
||||
local Loc = LibStub("AceLocale-3.0"):NewLocale ("DetailsErrorReport", "enUS", true)
|
||||
if (Loc) then
|
||||
Loc ["STRING_PLUGIN_NAME"] = "Error Report"
|
||||
Loc ["STRING_TOOLTIP"] = "Did you found a bug? Report here!"
|
||||
Loc ["STRING_REPORT"] = "Details Report"
|
||||
Loc ["STRING_PROBLEM"] = "problem"
|
||||
Loc ["STRING_SUGESTION"] = "sugestion"
|
||||
Loc ["STRING_LUAERROR_DESC"] = "send a report about occurrence of lua errors"
|
||||
Loc ["STRING_ACCURACY_DESC"] = "you found something which isn't the amount that should be\nfor instance, some healing or damage spell doesn't have the correct amount calculated."
|
||||
Loc ["STRING_NOTWORK_DESC"] = "anything which should be doing something and actually isn't"
|
||||
Loc ["STRING_OTHER_DESC"] = "any other problem or perhaps a suggesting not involving the subjects above, can be reported here"
|
||||
Loc ["STRING_LUA_ERROR"] = "Lua Error"
|
||||
Loc ["STRING_ACCURACY_ERROR"] = "Instable Accuracy"
|
||||
Loc ["STRING_NOTWORK_ERROR"] = "Isn't Working"
|
||||
Loc ["STRING_OTHER_ERROR"] = "Other"
|
||||
|
||||
Loc ["STRING_DEFAULT_TEXT_LUA"] = "You can copy and paste here the first 20 lines from the lua error window, also, is important a small description about the error, when it occurs and with what frequency it occurs."
|
||||
Loc ["STRING_DEFAULT_TEXT_ACCURACY"] = "A miss accuracy is normal and happen all the time, but when the problem happen with frequency it's important tell to us. A good way to report is analyzing when the instability occurs, if is caused by a spell or if is a untracked pet."
|
||||
Loc ["STRING_DEFAULT_TEXT_NOTWORK"] = "When you click in something and the result isn't the expected, could be a bug. If thing like this occurs more then once, report the problem to us, dont forget to mention which button is and the frequency."
|
||||
Loc ["STRING_DEFAULT_TEXT_OTHER"] = "Any other problem not mentioned in the other 3 options should be reported here."
|
||||
|
||||
Loc ["STRING_WELCOME_TEXT"] = "Details are in early alpha stages and many errors can occur,\nto try make this report process faster, we'll use this small plug in,\nat least on alpha stage."
|
||||
Loc ["STRING_SEND"] = "Send"
|
||||
Loc ["STRING_CANCELLED"] = "Cancelled."
|
||||
Loc ["STRING_EMPTY"] = "Text field is empty"
|
||||
Loc ["STRING_TOOBIG"] = "1024 Text characters limit reached"
|
||||
Loc ["STRING_WELCOME_TEXT"] = "Details are in early alpha stages and many errors can occur,\nto try make this report process faster, we'll use this small plug in,\nat least on alpha stage."
|
||||
Loc ["STRING_SEND"] = "Send"
|
||||
Loc ["STRING_CANCELLED"] = "Cancelled."
|
||||
Loc ["STRING_EMPTY"] = "Text field is empty"
|
||||
Loc ["STRING_TOOBIG"] = "1024 Text characters limit reached"
|
||||
|
||||
Loc ["STRING_FEEDBACK_DESC"] = "Give your opinion about Details!"
|
||||
Loc ["STRING_FEEDBACK"] = "Feedback"
|
||||
Loc ["STRING_DEFAULT_TEXT_FEEDBACK"] = "Talk about your experience using details, tell us what could be improved or what new features should be implemented."
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
--> português
|
||||
do
|
||||
--[[
|
||||
local Loc = LibStub("AceLocale-3.0"):NewLocale("DetailsErrorReport", "ptBR")
|
||||
Loc ["STRING_PLUGIN_NAME"] = "Relatorio de Erros"
|
||||
Loc ["STRING_TOOLTIP"] = "Encontrou um bug? reporte aqui"
|
||||
Loc ["STRING_REPORT"] = "Details Relatorio de Erros"
|
||||
Loc ["STRING_PROBLEM"] = "problema"
|
||||
Loc ["STRING_SUGESTION"] = "sugestao"
|
||||
Loc ["STRING_LUAERROR_DESC"] = "envia um relatorio sobre erros de lua que estao ocorrendo"
|
||||
Loc ["STRING_ACCURACY_DESC"] = "caso voce encontre problemas na quantidade de dano ou healing que esta mais baixo do que deveria ser"
|
||||
Loc ["STRING_NOTWORK_DESC"] = "qualquer coisa que voce clique e deveria efetuar uma funcao mas que nao esta"
|
||||
Loc ["STRING_OTHER_DESC"] = "outros problemas e por que nao, sugestoes, podem ser enviadas usando este assunto"
|
||||
Loc ["STRING_LUA_ERROR"] = "Erro de Lua"
|
||||
Loc ["STRING_ACCURACY_ERROR"] = "Precisao dos Dados"
|
||||
Loc ["STRING_NOTWORK_ERROR"] = "Algo Nao Funciona"
|
||||
Loc ["STRING_OTHER_ERROR"] = "Outro"
|
||||
Loc ["STRING_WELCOME_TEXT"] = "Detalhes esta apenas comecando a caminhar e muitos erros podem surgir, para que o erros chegem a nos mais rapidamente estaremos usando este plugin pelo menos na etapa Alfa do projeto."
|
||||
Loc ["STRING_SEND"] = "Enviar"
|
||||
--[
|
||||
local Loc = LibStub("AceLocale-3.0"):NewLocale ("DetailsErrorReport", "ptBR")
|
||||
if (Loc) then
|
||||
Loc ["STRING_PLUGIN_NAME"] = "Relatorio de Erros"
|
||||
Loc ["STRING_TOOLTIP"] = "Encontrou um bug? reporte aqui"
|
||||
Loc ["STRING_REPORT"] = "Details Relatorio de Erros"
|
||||
Loc ["STRING_PROBLEM"] = "problema"
|
||||
Loc ["STRING_SUGESTION"] = "sugestao"
|
||||
Loc ["STRING_LUAERROR_DESC"] = "envia um relatorio sobre erros de lua que estao ocorrendo"
|
||||
Loc ["STRING_ACCURACY_DESC"] = "caso voce encontre problemas na quantidade de dano ou healing que esta mais baixo do que deveria ser"
|
||||
Loc ["STRING_NOTWORK_DESC"] = "qualquer coisa que voce clique e deveria efetuar uma funcao mas que nao esta"
|
||||
Loc ["STRING_OTHER_DESC"] = "outros problemas e por que nao, sugestoes, podem ser enviadas usando este assunto"
|
||||
Loc ["STRING_LUA_ERROR"] = "Erro de Lua"
|
||||
Loc ["STRING_ACCURACY_ERROR"] = "Precisao dos Dados"
|
||||
Loc ["STRING_NOTWORK_ERROR"] = "Algo Nao Funciona"
|
||||
Loc ["STRING_OTHER_ERROR"] = "Outro"
|
||||
Loc ["STRING_WELCOME_TEXT"] = "Detalhes esta apenas comecando a caminhar e muitos erros podem surgir, para que o erros chegem a nos mais rapidamente estaremos usando este plugin pelo menos na etapa Alfa do projeto."
|
||||
Loc ["STRING_SEND"] = "Enviar"
|
||||
Loc ["STRING_CANCELLED"] = "Cancelado."
|
||||
Loc ["STRING_EMPTY"] = "O campo do texto esta em branco."
|
||||
Loc ["STRING_TOOBIG"] = "Limite de 1024 caracteres alcancado."
|
||||
|
||||
Loc ["STRING_FEEDBACK_DESC"] = "De sua opiniao sobre o Details!"
|
||||
Loc ["STRING_FEEDBACK"] = "Feedback"
|
||||
Loc ["STRING_DEFAULT_TEXT_FEEDBACK"] = ""
|
||||
end
|
||||
--]]
|
||||
end
|
||||
|
||||
@@ -114,7 +127,7 @@
|
||||
DetailsFrameWork:NewLabel (bg, _, _, "welcomelabel", Loc ["STRING_WELCOME_TEXT"], "GameFontHighlightSmall", 9)
|
||||
bg.welcomelabel:SetPoint (10, -25)
|
||||
|
||||
local textArray = {Loc ["STRING_DEFAULT_TEXT_LUA"], Loc ["STRING_DEFAULT_TEXT_ACCURACY"], Loc ["STRING_DEFAULT_TEXT_NOTWORK"], Loc ["STRING_DEFAULT_TEXT_OTHER"]}
|
||||
local textArray = {Loc ["STRING_DEFAULT_TEXT_FEEDBACK"], Loc ["STRING_DEFAULT_TEXT_LUA"], Loc ["STRING_DEFAULT_TEXT_ACCURACY"], Loc ["STRING_DEFAULT_TEXT_NOTWORK"], Loc ["STRING_DEFAULT_TEXT_OTHER"]}
|
||||
|
||||
--text field background
|
||||
DetailsFrameWork:NewPanel (bg, _, "DetailsErrorReportTextFieldBackground", "textfieldBackground", 390, 260)
|
||||
@@ -127,7 +140,7 @@
|
||||
bg.textfield:SetBackdrop (nil)
|
||||
bg.textfield:SetPoint (10, -90) -- topleft anchor and parent will be use in this case
|
||||
bg.textfield:SetFrameLevel (1, bg.textfieldBackground) -- +1 relative to other frame
|
||||
bg.textfield.text = Loc ["STRING_DEFAULT_TEXT_LUA"]
|
||||
bg.textfield.text = Loc ["STRING_DEFAULT_TEXT_FEEDBACK"]
|
||||
bg.textfield.multiline = true
|
||||
bg.textfield.align = "left"
|
||||
|
||||
@@ -153,10 +166,11 @@
|
||||
end
|
||||
|
||||
local options = {
|
||||
{onclick = selected, desc = Loc ["STRING_LUAERROR_DESC"], value = 1, icon = "Interface\\ICONS\\INV_Pet_Cockroach", label = Loc ["STRING_LUA_ERROR"], color = "yellow", selected = true },
|
||||
{onclick = selected, desc = Loc ["STRING_ACCURACY_DESC"], value = 2, icon = "Interface\\ICONS\\Ability_Hunter_FocusedAim", label = Loc ["STRING_ACCURACY_ERROR"], color = "skyblue" },
|
||||
{onclick = selected, desc = Loc ["STRING_NOTWORK_DESC"], value = 3, icon = "Interface\\ICONS\\INV_Misc_ScrewDriver_01", label = Loc ["STRING_NOTWORK_ERROR"], color = "pink" },
|
||||
{onclick = selected, desc = Loc ["STRING_OTHER_DESC"], value = 4, icon = "Interface\\ICONS\\Achievement_Reputation_01", label = Loc ["STRING_OTHER_ERROR"], color = "white" },
|
||||
{onclick = selected, desc = Loc ["STRING_FEEDBACK_DESC"], value = 1, icon = "Interface\\ICONS\\INV_Misc_Note_05", label = Loc ["STRING_FEEDBACK"], color = "white", selected = true },
|
||||
{onclick = selected, desc = Loc ["STRING_LUAERROR_DESC"], value = 2, icon = "Interface\\ICONS\\INV_Pet_Cockroach", label = Loc ["STRING_LUA_ERROR"], color = "white" },
|
||||
{onclick = selected, desc = Loc ["STRING_ACCURACY_DESC"], value = 3, icon = "Interface\\ICONS\\Ability_Hunter_FocusedAim", label = Loc ["STRING_ACCURACY_ERROR"], color = "white" },
|
||||
{onclick = selected, desc = Loc ["STRING_NOTWORK_DESC"], value = 4, icon = "Interface\\ICONS\\INV_Misc_ScrewDriver_01", label = Loc ["STRING_NOTWORK_ERROR"], color = "white" },
|
||||
{onclick = selected, desc = Loc ["STRING_OTHER_DESC"], value = 5, icon = "Interface\\ICONS\\Achievement_Reputation_01", label = Loc ["STRING_OTHER_ERROR"], color = "white" },
|
||||
}
|
||||
local buildMenu = function()
|
||||
return options
|
||||
@@ -189,10 +203,10 @@
|
||||
end
|
||||
|
||||
local subject = {
|
||||
"LuaError", "InstableAccuracy", "IsntWorking", "Other"
|
||||
"Feedback", "LuaError", "InstableAccuracy", "IsntWorking", "Other"
|
||||
}
|
||||
|
||||
local url = "http://reporttodevs.hol.es/sendtodev.php?dev=detailsaddon&subject=" .. subject [bg.type.value] .. "&text=" .. bg.textfield.text:gsub (" ", "%%20")
|
||||
local url = "http://reporttodevs.hol.es/sendtodev.php?dev=detailsaddon&subject=" .. subject [bg.type.value] .. "&text=v" .. _detalhes.userversion .. "-" .. bg.textfield.text:gsub (" ", "%%20")
|
||||
|
||||
ErrorReport:CopyPaste (url)
|
||||
mainFrame:Hide()
|
||||
|
||||
@@ -292,7 +292,7 @@ local function CreatePluginFrames (data)
|
||||
g.max_damage = 0
|
||||
g.BuffLines = {}
|
||||
g.LinesContainer = {}
|
||||
g.CustomLine = "smallline"
|
||||
g.CustomLine = "Interface\\AddOns\\Details\\Libs\\LibGraph-2.0\\smallline"
|
||||
--g.LockOnXMax = true
|
||||
|
||||
for i = 1, 8, 1 do
|
||||
|
||||
+8
-2
@@ -9,7 +9,7 @@ function _G._detalhes:Start()
|
||||
--> details defaults
|
||||
|
||||
_detalhes.debug = false
|
||||
|
||||
local _
|
||||
--> who is
|
||||
self.playername = UnitName ("player")
|
||||
self.playerserial = UnitGUID ("player")
|
||||
@@ -30,7 +30,7 @@ function _G._detalhes:Start()
|
||||
self.in_combat = false
|
||||
self.combat_id = self.combat_id or 0
|
||||
self.instances_amount = self.instances_amount or 12
|
||||
self.segments_amount = self.segments_amount or 25
|
||||
self.segments_amount = self.segments_amount or 12
|
||||
self.segments_amount_to_save = self.segments_amount_to_save or 5
|
||||
self.memory_threshold = self.memory_threshold or 3
|
||||
self.memory_ram = self.memory_ram or 64
|
||||
@@ -186,6 +186,10 @@ function _G._detalhes:Start()
|
||||
self.yesNo:Hide()
|
||||
|
||||
--> start instances
|
||||
|
||||
--_detalhes.custom = {}
|
||||
--_detalhes.tabela_instancias = {}
|
||||
|
||||
if (self:QuantasInstancias() == 0) then
|
||||
self:CriarInstancia()
|
||||
else
|
||||
@@ -313,4 +317,6 @@ function _G._detalhes:Start()
|
||||
_detalhes:OpenWelcomeWindow()
|
||||
end
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user