updates
This commit is contained in:
@@ -8,9 +8,9 @@
|
||||
|
||||
_ = nil
|
||||
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")
|
||||
_detalhes.userversion = "v1.11.03"
|
||||
_detalhes.version = "Alpha 015"
|
||||
_detalhes.realversion = 15
|
||||
_detalhes.userversion = "v1.11.06"
|
||||
_detalhes.version = "Alpha 016"
|
||||
_detalhes.realversion = 16
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> initialization stuff
|
||||
|
||||
@@ -118,6 +118,20 @@ end
|
||||
t.n = 1
|
||||
return t
|
||||
end
|
||||
|
||||
--[[exported]] function _detalhes:CreateActorAvoidanceTable (no_overall)
|
||||
if (no_overall) then
|
||||
local t = {["ALL"] = 0, ["DODGE"] = 0, ["PARRY"] = 0, ["HITS"] = 0, ["ABSORB"] = 0, --quantas vezes foi dodge, parry, quandos hits tomou, quantos absorbs teve
|
||||
["FULL_HIT"] = 0, ["FULL_ABSORBED"] = 0, ["PARTIAL_ABSORBED"] = 0, --full hit full absorbed and partial absortion
|
||||
["FULL_HIT_AMT"] = 0, ["PARTIAL_ABSORB_AMT"] = 0, ["ABSORB_AMT"] = 0, ["FULL_ABSORB_AMT"] = 0} --amounts
|
||||
return t
|
||||
else
|
||||
local t = {overall = {["ALL"] = 0, ["DODGE"] = 0, ["PARRY"] = 0, ["HITS"] = 0, ["ABSORB"] = 0, --quantas vezes foi dodge, parry, quandos hits tomou, quantos absorbs teve
|
||||
["FULL_HIT"] = 0, ["FULL_ABSORBED"] = 0, ["PARTIAL_ABSORBED"] = 0, --full hit full absorbed and partial absortion
|
||||
["FULL_HIT_AMT"] = 0, ["PARTIAL_ABSORB_AMT"] = 0, ["ABSORB_AMT"] = 0, ["FULL_ABSORB_AMT"] = 0}} --amounts
|
||||
return t
|
||||
end
|
||||
end
|
||||
|
||||
--[[exported]] function _detalhes.SortGroup (container, keyName2)
|
||||
keyName = keyName2
|
||||
|
||||
@@ -946,8 +946,9 @@ end
|
||||
function _detalhes:SetBackgroundAlpha (alpha)
|
||||
if (not alpha) then
|
||||
alpha = self.bg_alpha
|
||||
else
|
||||
alpha = _detalhes:Scale (0, 1, 0.2, 1, alpha) - 0.8
|
||||
-- else
|
||||
-- print (alpha)
|
||||
-- alpha = _detalhes:Scale (0, 1, 0.2, 1, alpha) - 0.8
|
||||
end
|
||||
|
||||
self.bgdisplay:SetBackdropColor (self.bg_r or _detalhes.default_bg_color, self.bg_g or _detalhes.default_bg_color, self.bg_b or _detalhes.default_bg_color, alpha)
|
||||
@@ -1096,6 +1097,7 @@ end
|
||||
function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, iniciando_instancia, InstanceMode)
|
||||
|
||||
if (self and self.meu_id and not instancia) then --> self é uma instância
|
||||
InstanceMode = iniciando_instancia
|
||||
iniciando_instancia = sub_atributo
|
||||
sub_atributo = atributo
|
||||
atributo = segmento
|
||||
@@ -2026,6 +2028,10 @@ function _detalhes:envia_relatorio (linhas, custom)
|
||||
editbox:ClearFocus()
|
||||
end
|
||||
|
||||
if (_detalhes.report_where == "COPY") then
|
||||
return _detalhes:SendReportTextWindow (linhas)
|
||||
end
|
||||
|
||||
local to_who = _detalhes.report_where
|
||||
local channel = to_who:find ("|")
|
||||
|
||||
|
||||
@@ -143,12 +143,17 @@ local read_flag_ = function (novo_objeto, shadow_objeto, dono_do_pet, serial, fl
|
||||
if (_bit_band (flag, EM_GRUPO) ~= 0 and novo_objeto.classe ~= "UNGROUPPLAYER") then --> faz parte do grupo
|
||||
details_flag = details_flag+0x00000100
|
||||
novo_objeto.grupo = true
|
||||
--if (nome:find ("[*]")) then
|
||||
-- print ("Objeto em grupo:", nome, "flag:", flag, "classe:", novo_objeto.classe)
|
||||
--end
|
||||
|
||||
if (shadow_objeto) then
|
||||
shadow_objeto.grupo = true
|
||||
end
|
||||
|
||||
if (_detalhes:IsATank (serial)) then
|
||||
novo_objeto.isTank = true
|
||||
if (shadow_objeto) then
|
||||
shadow_objeto.isTank = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
elseif (dono_do_pet) then --> é um pet
|
||||
@@ -283,8 +288,8 @@ function container_combatentes:PegarCombatente (serial, nome, flag, criar, isOwn
|
||||
end
|
||||
end
|
||||
|
||||
if (novo_objeto.grupo) then
|
||||
novo_objeto.avoidance = {["DODGE"] = 0, ["PARRY"] = 0, ["HITS"] = 0} --> avoidance
|
||||
if (novo_objeto.isTank) then
|
||||
novo_objeto.avoidance = _detalhes:CreateActorAvoidanceTable()
|
||||
end
|
||||
|
||||
elseif (self.tipo == container_heal) then --> CONTAINER HEALING
|
||||
|
||||
@@ -239,7 +239,9 @@
|
||||
local n_combate = _detalhes:NumeroCombate (1) --aumenta o contador de combates -- combat number up
|
||||
|
||||
--> cria a nova tabela de combates -- create new table
|
||||
local ultimo_combate = _detalhes.tabela_vigente
|
||||
_detalhes.tabela_vigente = _detalhes.combate:NovaTabela (true, _detalhes.tabela_overall, n_combate, ...) --cria uma nova tabela de combate
|
||||
_detalhes.tabela_vigente.previous_combat = ultimo_combate
|
||||
|
||||
--> verifica se há alguma instância mostrando o segmento atual -- change segment
|
||||
_detalhes:InstanciaCallFunction (_detalhes.TrocaSegmentoAtual)
|
||||
@@ -295,6 +297,30 @@
|
||||
if (instancia.hide_in_combat) then
|
||||
instancia:SetWindowAlpha (instancia.hide_in_combat_alpha / 100)
|
||||
end
|
||||
|
||||
if (instancia.auto_switch_to) then
|
||||
--salva o estado atual
|
||||
instancia.auto_switch_to_old = {instancia.modo, instancia.atributo, instancia.sub_atributo, instancia.segmento, _detalhes.RaidTables.Mode, _detalhes.SoloTables.Mode}
|
||||
|
||||
--muda para um plugin de raid
|
||||
if (instancia.auto_switch_to [1] == "raid") then
|
||||
for index, ptable in _ipairs (_detalhes.RaidTables.Menu) do
|
||||
if (ptable[1] == instancia.auto_switch_to [2]) then
|
||||
if (instancia.modo ~= _detalhes._detalhes_props ["MODO_RAID"]) then
|
||||
_detalhes:AlteraModo (instancia, _detalhes._detalhes_props ["MODO_RAID"])
|
||||
end
|
||||
_detalhes.RaidTables:switch (nil, index)
|
||||
break
|
||||
end
|
||||
end
|
||||
else
|
||||
--muda para um atributo normal
|
||||
if (instancia.modo ~= _detalhes._detalhes_props["MODO_GROUP"]) then
|
||||
_detalhes:AlteraModo (instancia, _detalhes._detalhes_props["MODO_GROUP"])
|
||||
end
|
||||
_detalhes:TrocaTabela (instancia, nil, instancia.auto_switch_to [1], instancia.auto_switch_to [2])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -510,11 +536,39 @@
|
||||
if (instancia.hide_in_combat) then
|
||||
instancia:SetWindowAlpha (1, true)
|
||||
end
|
||||
if (instancia.auto_switch_to_old) then
|
||||
instancia:SwitchBack()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes:SendEvent ("COMBAT_PLAYER_LEAVE", nil, _detalhes.tabela_vigente)
|
||||
end
|
||||
|
||||
--backtable indexes: [1]: mode [2]: attribute [3]: sub attribute [4]: segment [5]: raidmode index [6]: solomode index
|
||||
|
||||
function _detalhes:SwitchBack()
|
||||
local backtable = self.auto_switch_to_old
|
||||
if (not backtable) then
|
||||
return
|
||||
end
|
||||
|
||||
if (self.modo ~= self.auto_switch_to_old [1]) then
|
||||
_detalhes:AlteraModo (self, self.auto_switch_to_old [1])
|
||||
end
|
||||
|
||||
if (self.modo == _detalhes._detalhes_props["MODO_RAID"]) then
|
||||
_detalhes.RaidTables:switch (nil, self.auto_switch_to_old [5])
|
||||
|
||||
elseif (self.modo == _detalhes._detalhes_props["MODO_ALONE"]) then
|
||||
_detalhes.SoloTables:switch (nil, self.auto_switch_to_old [6])
|
||||
|
||||
else
|
||||
_detalhes:TrocaTabela (self, self.auto_switch_to_old [4], self.auto_switch_to_old [2], self.auto_switch_to_old [3])
|
||||
end
|
||||
|
||||
self.auto_switch_to_old = nil
|
||||
end
|
||||
|
||||
function _detalhes:MakeEqualizeOnActor (player, realm, receivedActor)
|
||||
|
||||
|
||||
@@ -75,6 +75,11 @@
|
||||
for _, combat_table in _ipairs (tabelas_do_historico) do
|
||||
combat_table.__call = _detalhes.call_combate
|
||||
end
|
||||
|
||||
for i = #tabelas_do_historico-1, 1, -1 do
|
||||
local combat = tabelas_do_historico [i]
|
||||
combat.previous_combat = tabelas_do_historico [i+1]
|
||||
end
|
||||
|
||||
--> tempo padrao do overall
|
||||
combate_overall.start_time = _tempo
|
||||
@@ -198,6 +203,9 @@
|
||||
if (_detalhes.clear_graphic) then
|
||||
_combate.TimeData = {}
|
||||
end
|
||||
|
||||
--> limpa a referencia do ultimo combate
|
||||
_combate.previous_combat = nil
|
||||
|
||||
local container_dano = _combate [class_type_dano] or {}
|
||||
local container_cura = _combate [class_type_cura] or {}
|
||||
|
||||
+104
-9
@@ -21,6 +21,7 @@
|
||||
local _IsInRaid = IsInRaid --wow api local
|
||||
local _IsInGroup = IsInGroup --wow api local
|
||||
local _GetNumGroupMembers = GetNumGroupMembers --wow api local
|
||||
local _UnitGroupRolesAssigned = UnitGroupRolesAssigned
|
||||
|
||||
local _cstr = string.format --lua local
|
||||
local _table_insert = table.insert --lua local
|
||||
@@ -80,6 +81,8 @@
|
||||
local misc_cache = setmetatable ({}, _detalhes.weaktable)
|
||||
--> party & raid members
|
||||
local raid_members_cache = setmetatable ({}, _detalhes.weaktable)
|
||||
--> tanks
|
||||
local tanks_members_cache = setmetatable ({}, _detalhes.weaktable)
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> constants
|
||||
@@ -254,8 +257,45 @@
|
||||
end
|
||||
|
||||
--> record avoidance only for player actors
|
||||
if (spellid < 3) then --> autoshot melee
|
||||
jogador_alvo.avoidance ["HITS"] = jogador_alvo.avoidance ["HITS"] + 1
|
||||
|
||||
if (tanks_members_cache [alvo_serial]) then --> autoshot or melee hit
|
||||
--> avoidance
|
||||
local avoidance = jogador_alvo.avoidance
|
||||
local overall = avoidance.overall
|
||||
|
||||
local mob = avoidance [who_name]
|
||||
if (not mob) then --> if isn't in the table, build on the fly
|
||||
mob = _detalhes:CreateActorAvoidanceTable (true)
|
||||
avoidance [who_name] = mob
|
||||
end
|
||||
|
||||
overall ["ALL"] = overall ["ALL"] + 1 --> qualtipo de hit ou absorb
|
||||
mob ["ALL"] = mob ["ALL"] + 1 --> qualtipo de hit ou absorb
|
||||
|
||||
if (spellid < 3) then
|
||||
--> overall
|
||||
overall ["HITS"] = overall ["HITS"] + 1
|
||||
mob ["HITS"] = mob ["HITS"] + 1
|
||||
end
|
||||
|
||||
--> absorbs status
|
||||
if (absorbed) then
|
||||
--> aqui pode ser apenas absorb parcial
|
||||
overall ["ABSORB"] = overall ["ABSORB"] + 1
|
||||
overall ["PARTIAL_ABSORBED"] = overall ["PARTIAL_ABSORBED"] + 1
|
||||
overall ["PARTIAL_ABSORB_AMT"] = overall ["PARTIAL_ABSORB_AMT"] + absorbed
|
||||
overall ["ABSORB_AMT"] = overall ["ABSORB_AMT"] + absorbed
|
||||
mob ["ABSORB"] = mob ["ABSORB"] + 1
|
||||
mob ["PARTIAL_ABSORBED"] = mob ["PARTIAL_ABSORBED"] + 1
|
||||
mob ["PARTIAL_ABSORB_AMT"] = mob ["PARTIAL_ABSORB_AMT"] + absorbed
|
||||
mob ["ABSORB_AMT"] = mob ["ABSORB_AMT"] + absorbed
|
||||
else
|
||||
--> adicionar aos hits sem absorbs
|
||||
overall ["FULL_HIT"] = overall ["FULL_HIT"] + 1
|
||||
overall ["FULL_HIT_AMT"] = overall ["FULL_HIT_AMT"] + amount
|
||||
mob ["FULL_HIT"] = mob ["FULL_HIT"] + 1
|
||||
mob ["FULL_HIT_AMT"] = mob ["FULL_HIT_AMT"] + amount
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -417,13 +457,41 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> 'avoider'
|
||||
--> using this method means avoidance of pets will not be tracked
|
||||
local TargetActor = damage_cache [alvo_name]
|
||||
if (TargetActor and TargetActor.grupo) then
|
||||
local missTable = TargetActor.avoidance [missType]
|
||||
if (missTable) then
|
||||
TargetActor.avoidance [missType] = missTable +1
|
||||
if (tanks_members_cache [alvo_serial]) then --> only track tanks
|
||||
local TargetActor = damage_cache [alvo_name]
|
||||
if (TargetActor) then
|
||||
|
||||
local avoidance = TargetActor.avoidance
|
||||
local missTable = avoidance.overall [missType]
|
||||
|
||||
if (missTable) then
|
||||
--> overall
|
||||
local overall = avoidance.overall
|
||||
overall [missType] = missTable + 1 --> adicionado a quantidade do miss
|
||||
|
||||
--> from this mob
|
||||
local mob = avoidance [who_name]
|
||||
if (not mob) then --> if isn't in the table, build on the fly
|
||||
mob = _detalhes:CreateActorAvoidanceTable (true)
|
||||
avoidance [who_name] = mob
|
||||
end
|
||||
|
||||
mob [missType] = mob [missType] + 1
|
||||
|
||||
if (missType == "ABSORB") then --full absorb
|
||||
overall ["ALL"] = overall ["ALL"] + 1 --> qualtipo de hit ou absorb
|
||||
overall ["FULL_ABSORBED"] = overall ["FULL_ABSORBED"] + 1 --amount
|
||||
overall ["ABSORB_AMT"] = overall ["ABSORB_AMT"] + amountMissed
|
||||
overall ["FULL_ABSORB_AMT"] = overall ["FULL_ABSORB_AMT"] + amountMissed
|
||||
|
||||
mob ["ALL"] = mob ["ALL"] + 1 --> qualtipo de hit ou absorb
|
||||
mob ["FULL_ABSORBED"] = mob ["FULL_ABSORBED"] + 1 --amount
|
||||
mob ["ABSORB_AMT"] = mob ["ABSORB_AMT"] + amountMissed
|
||||
mob ["FULL_ABSORB_AMT"] = mob ["FULL_ABSORB_AMT"] + amountMissed
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2726,20 +2794,47 @@
|
||||
end
|
||||
|
||||
function _detalhes:UptadeRaidMembersCache()
|
||||
|
||||
_table_wipe (raid_members_cache)
|
||||
_table_wipe (tanks_members_cache)
|
||||
|
||||
if (_IsInRaid()) then
|
||||
for i = 1, _GetNumGroupMembers() do
|
||||
raid_members_cache [_UnitGUID ("raid"..i)] = true
|
||||
local role = _UnitGroupRolesAssigned (GetUnitName ("raid"..i, true))
|
||||
if (role == "TANK") then
|
||||
tanks_members_cache [_UnitGUID ("raid"..i)] = true
|
||||
|
||||
--print ("tank detected:", GetUnitName ("raid"..i, true))
|
||||
end
|
||||
end
|
||||
|
||||
elseif (_IsInGroup()) then
|
||||
for i = 1, _GetNumGroupMembers()-1 do
|
||||
raid_members_cache [_UnitGUID ("party"..i)] = true
|
||||
local role = _UnitGroupRolesAssigned (GetUnitName ("party"..i, true))
|
||||
if (role == "TANK") then
|
||||
tanks_members_cache [_UnitGUID ("party"..i)] = true
|
||||
end
|
||||
end
|
||||
|
||||
raid_members_cache [_UnitGUID ("player")] = true
|
||||
local role = _UnitGroupRolesAssigned (GetUnitName ("player", true))
|
||||
if (role == "TANK") then
|
||||
tanks_members_cache [_UnitGUID ("player")] = true
|
||||
end
|
||||
else
|
||||
raid_members_cache [_UnitGUID ("player")] = true
|
||||
local role = _UnitGroupRolesAssigned (GetUnitName ("player", true))
|
||||
if (role == "TANK") then
|
||||
tanks_members_cache [_UnitGUID ("player")] = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:IsATank (playerguid)
|
||||
return tanks_members_cache [playerguid]
|
||||
end
|
||||
|
||||
function _detalhes:IsInCache (playerguid)
|
||||
return raid_members_cache [playerguid]
|
||||
|
||||
+7
-1
@@ -573,10 +573,15 @@
|
||||
if (lower_instance) then
|
||||
local instance = _detalhes:GetInstance (lower_instance)
|
||||
|
||||
_detalhes.times_of_tutorial = _detalhes.times_of_tutorial + 1
|
||||
if (_detalhes.times_of_tutorial > 20) then
|
||||
return
|
||||
end
|
||||
|
||||
if (_detalhes.MicroButtonAlert:IsShown()) then
|
||||
return _detalhes:ScheduleTimer ("delay_tutorial", 2)
|
||||
end
|
||||
|
||||
|
||||
if (not _detalhes.tutorial.alert_frames [1]) then
|
||||
|
||||
_detalhes.MicroButtonAlert.Text:SetText (Loc ["STRING_MINITUTORIAL_1"])
|
||||
@@ -653,6 +658,7 @@
|
||||
return _detalhes:ScheduleTimer ("StartTutorial", 10)
|
||||
end
|
||||
--
|
||||
_detalhes.times_of_tutorial = 0
|
||||
_detalhes:ScheduleTimer ("delay_tutorial", 20)
|
||||
end
|
||||
|
||||
|
||||
+6
-5
@@ -163,13 +163,14 @@ local LabelMetaFunctions = {}
|
||||
["width"] = smember_width,
|
||||
["height"] = smember_height,
|
||||
["fontcolor"] = smember_textcolor,
|
||||
["color"] = smember_textcolor,
|
||||
["color"] = smember_textcolor,--alias
|
||||
["fontface"] = smember_textfont,
|
||||
["fontsize"] = smember_textsize,
|
||||
["textcolor"] = smember_textcolor,
|
||||
["textfont"] = smember_textfont,
|
||||
["textsize"] = smember_textsize,
|
||||
["shadow"] = smember_outline
|
||||
["textcolor"] = smember_textcolor,--alias
|
||||
["textfont"] = smember_textfont,--alias
|
||||
["textsize"] = smember_textsize,--alias
|
||||
["shadow"] = smember_outline,
|
||||
["outline"] = smember_outline,--alias
|
||||
}
|
||||
|
||||
LabelMetaFunctions.__newindex = function (_table, _key, _value)
|
||||
|
||||
+47
-27
@@ -9,6 +9,8 @@ local _unpack = unpack --> lua locals
|
||||
local _type = type --> lua locals
|
||||
local _math_floor = math.floor --> lua locals
|
||||
|
||||
local SharedMedia = LibStub:GetLibrary ("LibSharedMedia-3.0")
|
||||
|
||||
local cleanfunction = function() end
|
||||
local BarMetaFunctions = {}
|
||||
local APIBarFunctions
|
||||
@@ -81,15 +83,15 @@ local APIBarFunctions
|
||||
end
|
||||
--> left color
|
||||
local gmember_color = function (_object)
|
||||
return _object.texture.original_colors
|
||||
return _object._texture.original_colors
|
||||
end
|
||||
--> icon
|
||||
local gmember_icon = function (_object)
|
||||
return _object.icon:GetTexture()
|
||||
return _object._icon:GetTexture()
|
||||
end
|
||||
--> texture
|
||||
local gmember_texture = function (_object)
|
||||
return _object.texture:GetTexture()
|
||||
return _object._texture:GetTexture()
|
||||
end
|
||||
--> font size
|
||||
local gmember_textsize = function (_object)
|
||||
@@ -190,19 +192,19 @@ local APIBarFunctions
|
||||
local _value1, _value2, _value3, _value4 = gump:ParseColors (_value)
|
||||
|
||||
_object.statusbar:SetStatusBarColor (_value1, _value2, _value3, _value4)
|
||||
_object.texture.original_colors = {_value1, _value2, _value3, _value4}
|
||||
return _object.texture:SetVertexColor (_value1, _value2, _value3, _value4)
|
||||
_object._texture.original_colors = {_value1, _value2, _value3, _value4}
|
||||
return _object._texture:SetVertexColor (_value1, _value2, _value3, _value4)
|
||||
end
|
||||
--> icon
|
||||
local smember_icon = function (_object, _value)
|
||||
if (type (_value) == "table") then
|
||||
local _value1, _value2 = _unpack (_value)
|
||||
_object.icon:SetTexture (_value1)
|
||||
_object._icon:SetTexture (_value1)
|
||||
if (_value2) then
|
||||
_object.icon:SetTexCoord (_unpack (_value2))
|
||||
_object._icon:SetTexCoord (_unpack (_value2))
|
||||
end
|
||||
else
|
||||
_object.icon:SetTexture (_value)
|
||||
_object._icon:SetTexture (_value)
|
||||
end
|
||||
return
|
||||
end
|
||||
@@ -210,12 +212,21 @@ local APIBarFunctions
|
||||
local smember_texture = function (_object, _value)
|
||||
if (type (_value) == "table") then
|
||||
local _value1, _value2 = _unpack (_value)
|
||||
_object.texture:SetTexture (_value1)
|
||||
_object._texture:SetTexture (_value1)
|
||||
if (_value2) then
|
||||
_object.texture:SetTexCoord (_unpack (_value2))
|
||||
_object._texture:SetTexCoord (_unpack (_value2))
|
||||
end
|
||||
else
|
||||
_object.texture:SetTexture (_value)
|
||||
if (_value:find ("\\")) then
|
||||
_object._texture:SetTexture (_value)
|
||||
else
|
||||
local file = SharedMedia:Fetch ("statusbar", _value)
|
||||
if (file) then
|
||||
_object._texture:SetTexture (file)
|
||||
else
|
||||
_object._texture:SetTexture (_value)
|
||||
end
|
||||
end
|
||||
end
|
||||
return
|
||||
end
|
||||
@@ -235,6 +246,11 @@ local APIBarFunctions
|
||||
_object.textleft:SetTextColor (_value1, _value2, _value3, _value4)
|
||||
return _object.textright:SetTextColor (_value1, _value2, _value3, _value4)
|
||||
end
|
||||
--> outline (shadow)
|
||||
local smember_outline = function (_object, _value)
|
||||
_detalhes:SetFontOutline (_object.textleft, _value)
|
||||
return _detalhes:SetFontOutline (_object.textright, _value)
|
||||
end
|
||||
|
||||
local set_members_function_index = {
|
||||
["tooltip"] = smember_tooltip,
|
||||
@@ -252,10 +268,13 @@ local APIBarFunctions
|
||||
["fontcolor"] = smember_textcolor,
|
||||
["textsize"] = smember_textsize, --alias
|
||||
["textfont"] = smember_textfont, --alias
|
||||
["textcolor"] = smember_textcolor --alias
|
||||
["textcolor"] = smember_textcolor, --alias
|
||||
["shadow"] = smember_outline,
|
||||
["outline"] = smember_outline, --alias
|
||||
}
|
||||
|
||||
BarMetaFunctions.__newindex = function (_table, _key, _value)
|
||||
|
||||
local func = set_members_function_index [_key]
|
||||
if (func) then
|
||||
return func (_table, _value)
|
||||
@@ -306,7 +325,7 @@ local APIBarFunctions
|
||||
|
||||
--> set texture
|
||||
function BarMetaFunctions:SetTexture (texture)
|
||||
self.texture:SetTexture (texture)
|
||||
self._texture:SetTexture (texture)
|
||||
end
|
||||
|
||||
--> set texts
|
||||
@@ -321,17 +340,17 @@ local APIBarFunctions
|
||||
function BarMetaFunctions:SetColor (r, g, b, a)
|
||||
r, g, b, a = gump:ParseColors (r, g, b, a)
|
||||
|
||||
self.texture:SetVertexColor (r, g, b, a)
|
||||
self._texture:SetVertexColor (r, g, b, a)
|
||||
self.statusbar:SetStatusBarColor (r, g, b, a)
|
||||
self.texture.original_colors = {r, g, b, a}
|
||||
self._texture.original_colors = {r, g, b, a}
|
||||
end
|
||||
|
||||
--> set icons
|
||||
function BarMetaFunctions:SetIcon (texture, ...)
|
||||
self.icon:SetTexture (texture)
|
||||
self._icon:SetTexture (texture)
|
||||
if (...) then
|
||||
local L, R, U, D = _unpack (...)
|
||||
self.icon:SetTexCoord (L, R, U, D)
|
||||
self._icon:SetTexCoord (L, R, U, D)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -444,13 +463,13 @@ local APIBarFunctions
|
||||
end
|
||||
|
||||
if (not frame.MyObject.timer) then
|
||||
local oc = frame.MyObject.texture.original_colors --original colors
|
||||
gump:GradientEffect ( frame.MyObject.texture, "texture", oc[1], oc[2], oc[3], oc[4], oc[1]+0.2, oc[2]+0.2, oc[3]+0.2, oc[4], .2)
|
||||
local oc = frame.MyObject._texture.original_colors --original colors
|
||||
gump:GradientEffect ( frame.MyObject._texture, "texture", oc[1], oc[2], oc[3], oc[4], oc[1]+0.2, oc[2]+0.2, oc[3]+0.2, oc[4], .2)
|
||||
frame.MyObject.div:Show()
|
||||
frame.MyObject.div:SetPoint ("left", frame, "left", frame:GetValue() * (frame:GetWidth()/100) - 16, 0)
|
||||
else
|
||||
local oc = frame.MyObject.texture.original_colors --original colors
|
||||
gump:GradientEffect ( frame.MyObject.texture, "texture", oc[1], oc[2], oc[3], oc[4], oc[1]-0.2, oc[2]-0.2, oc[3]-0.2, oc[4]+.2, .2)
|
||||
local oc = frame.MyObject._texture.original_colors --original colors
|
||||
gump:GradientEffect ( frame.MyObject._texture, "texture", oc[1], oc[2], oc[3], oc[4], oc[1]-0.2, oc[2]-0.2, oc[3]-0.2, oc[4]+.2, .2)
|
||||
end
|
||||
|
||||
frame.MyObject.background:Show()
|
||||
@@ -479,11 +498,12 @@ local APIBarFunctions
|
||||
end
|
||||
|
||||
if (not frame.MyObject.timer) then
|
||||
local oc = frame.MyObject.texture.original_colors --original colors
|
||||
local r, g, b, a = frame.MyObject.texture:GetVertexColor()
|
||||
gump:GradientEffect ( frame.MyObject.texture, "texture", r, g, b, a, oc[1], oc[2], oc[3], oc[4], .2)
|
||||
local oc = frame.MyObject._texture.original_colors --original colors
|
||||
local r, g, b, a = frame.MyObject._texture:GetVertexColor()
|
||||
gump:GradientEffect ( frame.MyObject._texture, "texture", r, g, b, a, oc[1], oc[2], oc[3], oc[4], .2)
|
||||
frame.MyObject.div:Hide()
|
||||
frame.MyObject.background:Hide()
|
||||
|
||||
--frame.MyObject.background:Hide()
|
||||
else
|
||||
local oc = frame.MyObject.background.original_colors --original colors
|
||||
local r, g, b, a = frame.MyObject.background:GetVertexColor()
|
||||
@@ -679,9 +699,9 @@ function gump:NewBar (parent, container, name, member, w, h, value)
|
||||
BarObject.timer_texture:SetWidth (w)
|
||||
BarObject.timer_texture:SetHeight (h)
|
||||
|
||||
BarObject.texture = _G [name .. "_statusbarTexture"]
|
||||
BarObject._texture = _G [name .. "_statusbarTexture"]
|
||||
BarObject.background = _G [name .. "_background"]
|
||||
BarObject.icon = _G [name .. "_icon"]
|
||||
BarObject._icon = _G [name .. "_icon"]
|
||||
BarObject.textleft = _G [name .. "_TextLeft"]
|
||||
BarObject.textright = _G [name .. "_TextRight"]
|
||||
BarObject.div = _G [name .. "_sparkMouseover"]
|
||||
|
||||
@@ -416,7 +416,7 @@ function _detalhes:ApplyConfigDataOnLoad()
|
||||
self.font_sizes = self.font_sizes or {menus = 10}
|
||||
self.minimap = self.minimap or {hide = false, radius = 160, minimapPos = 220}
|
||||
|
||||
self.ps_abbreviation = self.ps_abbreviation or 1
|
||||
self.ps_abbreviation = self.ps_abbreviation or 3
|
||||
|
||||
self.plugin_database = self.plugin_database or {}
|
||||
|
||||
|
||||
+58
-2
@@ -57,6 +57,59 @@ local _
|
||||
|
||||
})
|
||||
|
||||
_detalhes:InstallSkin ("Minimalistic", {
|
||||
file = [[Interface\AddOns\Details\images\skins\classic_skin]],
|
||||
author = "Details!",
|
||||
version = "1.0",
|
||||
site = "unknown",
|
||||
desc = "classic skin",
|
||||
|
||||
micro_frames = {color = {1, 1, 1, 1}, font = "Friz Quadrata TT", size = 10},
|
||||
|
||||
can_change_alpha_head = true,
|
||||
icon_anchor_main = {-1, -5},
|
||||
icon_anchor_plugins = {-7, -13},
|
||||
icon_plugins_size = {19, 18},
|
||||
|
||||
-- the four anchors:
|
||||
icon_point_anchor = {-37, 0},
|
||||
left_corner_anchor = {-107, 0},
|
||||
close_button_anchor = {4, -3},
|
||||
right_corner_anchor = {96, 0},
|
||||
|
||||
icon_point_anchor_bottom = {-37, 12},
|
||||
left_corner_anchor_bottom = {-107, 0},
|
||||
close_button_anchor_bottom = {5, 3},
|
||||
right_corner_anchor_bottom = {96, 0},
|
||||
|
||||
close_button_size = {24, 24},
|
||||
|
||||
--reset button
|
||||
reset_button_coords = {0.01904296875, 0.0673828125, 0.50244140625, 0.51708984375},
|
||||
reset_button_small_coords = {0.11669921875, 0.13720703125, 0.50244140625, 0.51708984375},
|
||||
|
||||
--instance button
|
||||
instance_button_coords = {0.01904296875, 0.04736328125, 0.48388671875, 0.49853515625},
|
||||
|
||||
--overwrites
|
||||
instance_cprops = {
|
||||
hide_icon = true,
|
||||
menu_anchor = {-18, 1},
|
||||
instance_button_anchor = {-12, 3},
|
||||
instancebutton_info = {text_color = {.8, .6, .0, 0.8}, text_face = "Friz Quadrata TT", text_size = 10, color_overlay = {1, 1, 1, 1}},
|
||||
resetbutton_info = {text_color = {.8, .8, .8, 0.8}, text_face = "Friz Quadrata TT", text_size = 12, color_overlay = {1, 1, 1, 1}, always_small = true},
|
||||
show_sidebars = false,
|
||||
show_statusbar = false,
|
||||
color = {.3, .3, .3, 1},
|
||||
bg_alpha = 0.2,
|
||||
},
|
||||
|
||||
callback = function (skin)
|
||||
DetailsResetButton2Text2:SetText ("")
|
||||
end,
|
||||
|
||||
})
|
||||
|
||||
_detalhes:InstallSkin ("Flat Color", {
|
||||
file = [[Interface\AddOns\Details\images\skins\flat_skin]],
|
||||
author = "Details!",
|
||||
@@ -81,6 +134,9 @@ local _
|
||||
left_corner_anchor_bottom = {-107, 0},
|
||||
close_button_anchor_bottom = {5, 6},
|
||||
right_corner_anchor_bottom = {96, 0},
|
||||
|
||||
close_button_size = {32, 32},
|
||||
|
||||
})
|
||||
|
||||
-- 0.00048828125
|
||||
@@ -139,8 +195,8 @@ local _
|
||||
--[[ when a skin is selected, all customized properties of the window is reseted and then the overwrites are applied]]
|
||||
--[[ for the complete cprop list see the file classe_instancia_include.lua]]
|
||||
instance_cprops = {
|
||||
resetbutton_info = {text_color = {0.7, 0.7, 0.7, 1}, text_face = "Friz Quadrata TT", text_size = 12, color_overlay = {.5, .5, .5, 1}},
|
||||
instancebutton_info = {text_color = {.7, .7, .7, 1}, text_face = "Friz Quadrata TT", text_size = 12, color_overlay = {.5, .5, .5, 1}},
|
||||
resetbutton_info = {text_color = {0.7, 0.7, 0.7, 1}, text_face = "Friz Quadrata TT", text_size = 12, color_overlay = {1, 1, 1, 1}},
|
||||
instancebutton_info = {text_color = {.7, .7, .7, 1}, text_face = "Friz Quadrata TT", text_size = 12, color_overlay = {1, 1, 1, 1}},
|
||||
menu_anchor = {-18, 1},
|
||||
instance_button_anchor = {-27, 3},
|
||||
hide_icon = true,
|
||||
|
||||
+683
-11
@@ -42,6 +42,8 @@ function _detalhes:AbreJanelaInfo (jogador)
|
||||
if (info.jogador and info.jogador == jogador) then
|
||||
_detalhes:FechaJanelaInfo() --> se clicou na mesma barra então fecha a janela de detalhes
|
||||
return
|
||||
elseif (not jogador) then
|
||||
return
|
||||
end
|
||||
|
||||
--> vamos passar os parâmetros para dentro da tabela da janela...
|
||||
@@ -54,9 +56,13 @@ function _detalhes:AbreJanelaInfo (jogador)
|
||||
info.instancia = self --> salva a referência da instância que pediu o info
|
||||
info.mostrando = nil
|
||||
|
||||
local nome = jogador.nome --> nome do jogador
|
||||
local nome = info.jogador.nome --> nome do jogador
|
||||
local atributo_nome = sub_atributos[info.atributo].lista [info.sub_atributo] .. " " .. Loc ["STRING_ACTORFRAME_REPORTOF"] --> // nome do atributo // precisa ser o sub atributo correto???
|
||||
|
||||
--> removendo o nome da realm do jogador
|
||||
if (nome:find ("-")) then
|
||||
nome = nome:gsub (("-.*"), "")
|
||||
end
|
||||
info.nome:SetText (nome)
|
||||
|
||||
if (info.instancia.atributo == 1 and info.instancia.sub_atributo == 6) then --> enemy
|
||||
@@ -122,6 +128,7 @@ function _detalhes:AbreJanelaInfo (jogador)
|
||||
info.classe_iconePlus:SetTexture()
|
||||
end
|
||||
|
||||
info:ShowTabs()
|
||||
gump:Fade (info, 0)
|
||||
|
||||
return jogador:MontaInfo()
|
||||
@@ -679,15 +686,7 @@ function gump:CriaJanelaInfo()
|
||||
--> fehcar com o esc
|
||||
tinsert (UISpecialFrames, este_gump:GetName())
|
||||
|
||||
--> fix para dar fadein ao apertar esc
|
||||
este_gump:SetScript ("OnHide", function (self)
|
||||
--[[ avoid taint problems
|
||||
if (not este_gump.hidden) then --> significa que foi fechado com ESC
|
||||
este_gump:Show()
|
||||
end
|
||||
--]]
|
||||
_detalhes:FechaJanelaInfo()
|
||||
end)
|
||||
|
||||
|
||||
--> propriedades da janela
|
||||
este_gump:SetPoint ("CENTER", UIParent)
|
||||
@@ -817,7 +816,8 @@ function gump:CriaJanelaInfo()
|
||||
--> botão de reportar da caixa da esquerda, onde fica as barras principais
|
||||
este_gump.report_esquerda = gump:NewDetailsButton (este_gump, este_gump, nil, _detalhes.Reportar, este_gump, 1, 16, 16,
|
||||
"Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON")
|
||||
este_gump.report_esquerda:SetPoint ("BOTTOMLEFT", este_gump.container_barras, "TOPLEFT", 281, 3)
|
||||
--este_gump.report_esquerda:SetPoint ("BOTTOMLEFT", este_gump.container_barras, "TOPLEFT", 281, 3)
|
||||
este_gump.report_esquerda:SetPoint ("BOTTOMLEFT", este_gump.container_barras, "TOPLEFT", 33, 3)
|
||||
este_gump.report_esquerda:SetFrameLevel (este_gump:GetFrameLevel()+2)
|
||||
|
||||
--> botão de reportar da caixa dos alvos
|
||||
@@ -870,13 +870,685 @@ function gump:CriaJanelaInfo()
|
||||
"Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON")
|
||||
este_gump.report_direita:SetPoint ("TOPRIGHT", este_gump, "TOPRIGHT", -8, -57)
|
||||
este_gump.report_direita:Hide()
|
||||
|
||||
--> tabs:
|
||||
--> tab default
|
||||
_detalhes:CreatePlayerDetailsTab ("Summary", --[1] tab name
|
||||
function (tabOBject, playerObject) --[2] condition
|
||||
if (playerObject) then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end,
|
||||
nil, --[3] fill function
|
||||
function() --[4] onclick
|
||||
for _, tab in _ipairs (_detalhes.player_details_tabs) do
|
||||
tab.frame:Hide()
|
||||
end
|
||||
end,
|
||||
nil --[5] oncreate
|
||||
)
|
||||
|
||||
local avoidance_create = function (tab, frame)
|
||||
|
||||
--> MAIN ICON
|
||||
local mainicon = frame:CreateTexture (nil, "artwork")
|
||||
mainicon:SetPoint ("topright", frame, "topright", -12, -12)
|
||||
mainicon:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-ACHIEVEMENT-SHIELDS]])
|
||||
mainicon:SetTexCoord (0, .5, .5, 1)
|
||||
mainicon:SetSize (64, 64)
|
||||
|
||||
local tankname = frame:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
tankname:SetPoint ("right", mainicon, "left", -2, 2)
|
||||
tab.tankname = tankname
|
||||
|
||||
--> SUMMARY
|
||||
local summary_texture = frame:CreateTexture (nil, "artwork")
|
||||
summary_texture:SetPoint ("topleft", frame, "topleft", 10, -15)
|
||||
summary_texture:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]])
|
||||
summary_texture:SetSize (128, 16)
|
||||
local summary_text = frame:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
summary_text:SetText ("Summary")
|
||||
summary_text :SetPoint ("left", summary_texture, "left", 2, 0)
|
||||
|
||||
--total damage received
|
||||
local damagereceived = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
damagereceived:SetPoint ("topleft", frame, "topleft", 15, -35)
|
||||
damagereceived:SetText ("Total Damage Taken:") --> localize-me
|
||||
damagereceived:SetTextColor (.8, .8, .8, 1)
|
||||
local damagereceived_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
damagereceived_amt:SetPoint ("left", damagereceived, "right", 2, 0)
|
||||
damagereceived_amt:SetText ("0")
|
||||
tab.damagereceived = damagereceived_amt
|
||||
|
||||
--per second
|
||||
local damagepersecond = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
damagepersecond:SetPoint ("topleft", frame, "topleft", 20, -50)
|
||||
damagepersecond:SetText ("Per Second:") --> localize-me
|
||||
local damagepersecond_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
damagepersecond_amt:SetPoint ("left", damagepersecond, "right", 2, 0)
|
||||
damagepersecond_amt:SetText ("0")
|
||||
tab.damagepersecond = damagepersecond_amt
|
||||
|
||||
--total absorbs
|
||||
local absorbstotal = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
absorbstotal:SetPoint ("topleft", frame, "topleft", 15, -65)
|
||||
absorbstotal:SetText ("Total Absorbs:") --> localize-me
|
||||
absorbstotal:SetTextColor (.8, .8, .8, 1)
|
||||
local absorbstotal_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
absorbstotal_amt:SetPoint ("left", absorbstotal, "right", 2, 0)
|
||||
absorbstotal_amt:SetText ("0")
|
||||
tab.absorbstotal = absorbstotal_amt
|
||||
|
||||
--per second
|
||||
local absorbstotalpersecond = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
absorbstotalpersecond:SetPoint ("topleft", frame, "topleft", 20, -80)
|
||||
absorbstotalpersecond:SetText ("Per Second:") --> localize-me
|
||||
local absorbstotalpersecond_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
absorbstotalpersecond_amt:SetPoint ("left", absorbstotalpersecond, "right", 2, 0)
|
||||
absorbstotalpersecond_amt:SetText ("0")
|
||||
tab.absorbstotalpersecond = absorbstotalpersecond_amt
|
||||
|
||||
--> MELEE
|
||||
|
||||
local melee_texture = frame:CreateTexture (nil, "artwork")
|
||||
melee_texture:SetPoint ("topleft", frame, "topleft", 10, -100)
|
||||
melee_texture:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]])
|
||||
melee_texture:SetSize (128, 16)
|
||||
local melee_text = frame:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
melee_text:SetText ("Melee")
|
||||
melee_text :SetPoint ("left", melee_texture, "left", 2, 0)
|
||||
|
||||
--dodge
|
||||
local dodge = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
dodge:SetPoint ("topleft", frame, "topleft", 15, -120)
|
||||
dodge:SetText ("Dodge:") --> localize-me
|
||||
dodge:SetTextColor (.8, .8, .8, 1)
|
||||
local dodge_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
dodge_amt:SetPoint ("left", dodge, "right", 2, 0)
|
||||
dodge_amt:SetText ("0")
|
||||
tab.dodge = dodge_amt
|
||||
|
||||
local dodgepersecond = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
dodgepersecond:SetPoint ("topleft", frame, "topleft", 20, -135)
|
||||
dodgepersecond:SetText ("Per Second:") --> localize-me
|
||||
local dodgepersecond_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
dodgepersecond_amt:SetPoint ("left", dodgepersecond, "right", 2, 0)
|
||||
dodgepersecond_amt:SetText ("0")
|
||||
tab.dodgepersecond = dodgepersecond_amt
|
||||
|
||||
-- parry
|
||||
local parry = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
parry:SetPoint ("topleft", frame, "topleft", 15, -150)
|
||||
parry:SetText ("Parry:") --> localize-me
|
||||
parry:SetTextColor (.8, .8, .8, 1)
|
||||
local parry_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
parry_amt:SetPoint ("left", parry, "right", 2, 0)
|
||||
parry_amt:SetText ("0")
|
||||
tab.parry = parry_amt
|
||||
|
||||
local parrypersecond = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
parrypersecond:SetPoint ("topleft", frame, "topleft", 20, -165)
|
||||
parrypersecond:SetText ("Per Second:") --> localize-me
|
||||
local parrypersecond_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
parrypersecond_amt:SetPoint ("left", parrypersecond, "right", 2, 0)
|
||||
parrypersecond_amt:SetText ("0")
|
||||
tab.parrypersecond = parrypersecond_amt
|
||||
|
||||
--> ABSORBS
|
||||
|
||||
local absorb_texture = frame:CreateTexture (nil, "artwork")
|
||||
absorb_texture:SetPoint ("topleft", frame, "topleft", 200, -15)
|
||||
absorb_texture:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]])
|
||||
absorb_texture:SetSize (128, 16)
|
||||
local absorb_text = frame:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
absorb_text:SetText ("Absorb")
|
||||
absorb_text :SetPoint ("left", absorb_texture, "left", 2, 0)
|
||||
|
||||
--full absorbs
|
||||
local fullsbsorbed = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
fullsbsorbed:SetPoint ("topleft", frame, "topleft", 205, -35)
|
||||
fullsbsorbed:SetText ("Full Absorbs:") --> localize-me
|
||||
fullsbsorbed:SetTextColor (.8, .8, .8, 1)
|
||||
local fullsbsorbed_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
fullsbsorbed_amt:SetPoint ("left", fullsbsorbed, "right", 2, 0)
|
||||
fullsbsorbed_amt:SetText ("0")
|
||||
tab.fullsbsorbed = fullsbsorbed_amt
|
||||
|
||||
--partially absorbs
|
||||
local partiallyabsorbed = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
partiallyabsorbed:SetPoint ("topleft", frame, "topleft", 205, -50)
|
||||
partiallyabsorbed:SetText ("Partially Absorbed:") --> localize-me
|
||||
partiallyabsorbed:SetTextColor (.8, .8, .8, 1)
|
||||
local partiallyabsorbed_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
partiallyabsorbed_amt:SetPoint ("left", partiallyabsorbed, "right", 2, 0)
|
||||
partiallyabsorbed_amt:SetText ("0")
|
||||
tab.partiallyabsorbed = partiallyabsorbed_amt
|
||||
|
||||
--partially absorbs per second
|
||||
local partiallyabsorbedpersecond = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
partiallyabsorbedpersecond:SetPoint ("topleft", frame, "topleft", 210, -65)
|
||||
partiallyabsorbedpersecond:SetText ("Average:") --> localize-me
|
||||
local partiallyabsorbedpersecond_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
partiallyabsorbedpersecond_amt:SetPoint ("left", partiallyabsorbedpersecond, "right", 2, 0)
|
||||
partiallyabsorbedpersecond_amt:SetText ("0")
|
||||
tab.partiallyabsorbedpersecond = partiallyabsorbedpersecond_amt
|
||||
|
||||
--no absorbs
|
||||
local noabsorbs = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
noabsorbs:SetPoint ("topleft", frame, "topleft", 205, -80)
|
||||
noabsorbs:SetText ("No Absorption:") --> localize-me
|
||||
noabsorbs:SetTextColor (.8, .8, .8, 1)
|
||||
local noabsorbs_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
noabsorbs_amt:SetPoint ("left", noabsorbs, "right", 2, 0)
|
||||
noabsorbs_amt:SetText ("0")
|
||||
tab.noabsorbs = noabsorbs_amt
|
||||
|
||||
--> HEALING
|
||||
|
||||
local healing_texture = frame:CreateTexture (nil, "artwork")
|
||||
healing_texture:SetPoint ("topleft", frame, "topleft", 200, -100)
|
||||
healing_texture:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]])
|
||||
healing_texture:SetSize (128, 16)
|
||||
local healing_text = frame:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
healing_text:SetText ("Healing")
|
||||
healing_text :SetPoint ("left", healing_texture, "left", 2, 0)
|
||||
|
||||
--self healing
|
||||
local selfhealing = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
selfhealing:SetPoint ("topleft", frame, "topleft", 205, -120)
|
||||
selfhealing:SetText ("Self Healing:") --> localize-me
|
||||
selfhealing:SetTextColor (.8, .8, .8, 1)
|
||||
local selfhealing_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
selfhealing_amt:SetPoint ("left", selfhealing, "right", 2, 0)
|
||||
selfhealing_amt:SetText ("0")
|
||||
tab.selfhealing = selfhealing_amt
|
||||
|
||||
--self healing per second
|
||||
local selfhealingpersecond = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
selfhealingpersecond:SetPoint ("topleft", frame, "topleft", 210, -135)
|
||||
selfhealingpersecond:SetText ("Per Second:") --> localize-me
|
||||
local selfhealingpersecond_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
selfhealingpersecond_amt:SetPoint ("left", selfhealingpersecond, "right", 2, 0)
|
||||
selfhealingpersecond_amt:SetText ("0")
|
||||
tab.selfhealingpersecond = selfhealingpersecond_amt
|
||||
|
||||
for i = 1, 5 do
|
||||
local healer = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
healer:SetPoint ("topleft", frame, "topleft", 205, -160 + ((i-1)*15)*-1)
|
||||
healer:SetText ("healer name:") --> localize-me
|
||||
healer:SetTextColor (.8, .8, .8, 1)
|
||||
local healer_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
healer_amt:SetPoint ("left", healer, "right", 2, 0)
|
||||
healer_amt:SetText ("0")
|
||||
tab ["healer" .. i] = {healer, healer_amt}
|
||||
end
|
||||
|
||||
--SPELLS
|
||||
local spells_texture = frame:CreateTexture (nil, "artwork")
|
||||
spells_texture:SetPoint ("topleft", frame, "topleft", 400, -100)
|
||||
spells_texture:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]])
|
||||
spells_texture:SetSize (128, 16)
|
||||
local spells_text = frame:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
spells_text:SetText ("Spells")
|
||||
spells_text :SetPoint ("left", spells_texture, "left", 2, 0)
|
||||
|
||||
for i = 1, 9 do
|
||||
local icon = frame:CreateTexture (nil, "artwork")
|
||||
icon:SetSize (14, 14)
|
||||
icon:SetPoint ("topleft", frame, "topleft", 405, -120 + ((i-1)*15)*-1)
|
||||
local spell = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
spell:SetPoint ("left", icon, "right", 2, 0)
|
||||
spell:SetText ("spell name:") --> localize-me
|
||||
spell:SetTextColor (.8, .8, .8, 1)
|
||||
local spell_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
spell_amt:SetPoint ("left", spell, "right", 2, 0)
|
||||
spell_amt:SetText ("0")
|
||||
tab ["spell" .. i] = {spell, spell_amt, icon}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
local getpercent = function (value, lastvalue, elapsed_time, inverse)
|
||||
local ps = value / elapsed_time
|
||||
local diff
|
||||
|
||||
if (lastvalue == 0) then
|
||||
diff = "+0%"
|
||||
else
|
||||
if (ps >= lastvalue) then
|
||||
local d = ps - lastvalue
|
||||
d = d / ps * 100
|
||||
if (inverse) then
|
||||
diff = "|cFF00FF00+" .. _math_floor (math.abs (d)) .. "%|r"
|
||||
else
|
||||
diff = "|cFFFF0000+" .. _math_floor (math.abs (d)) .. "%|r"
|
||||
end
|
||||
else
|
||||
local d = lastvalue - ps
|
||||
d = d / lastvalue * 100
|
||||
if (inverse) then
|
||||
diff = "|cFFFF0000-" .. _math_floor (math.abs (d)) .. "%|r"
|
||||
else
|
||||
diff = "|cFF00FF00-" .. _math_floor (math.abs (d)) .. "%|r"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return ps, diff
|
||||
end
|
||||
|
||||
local spells_by_class = {
|
||||
["DRUID"] = {
|
||||
[132402] = true, --savage defense
|
||||
[135286] = true, -- tooth and claw
|
||||
},
|
||||
["DEATHKNIGHT"] = {
|
||||
[145676] = true, --riposte
|
||||
[77535] = true, --blood shield
|
||||
},
|
||||
["MONK"] = {
|
||||
[118604] = true, --guard
|
||||
[115307] = true, --shuffle
|
||||
[115308] = true, --elusive brew
|
||||
},
|
||||
["PALADIN"] = {
|
||||
[132403] = true, --shield of the righteous
|
||||
[114163] = true, --eternal-flame
|
||||
[20925] = true, --sacred shield
|
||||
},
|
||||
["WARRIOR"] = {
|
||||
[145672] = true, --riposte
|
||||
},
|
||||
}
|
||||
|
||||
local avoidance_fill = function (tab, player, combat)
|
||||
|
||||
local elapsed_time = combat:GetCombatTime()
|
||||
|
||||
local last_combat = combat.previous_combat
|
||||
if (not last_combat or not last_combat [1]) then
|
||||
last_combat = combat
|
||||
end
|
||||
local last_actor = last_combat (1, player.nome)
|
||||
local n = player.nome
|
||||
if (n:find ("-")) then
|
||||
n = n:gsub (("-.*"), "")
|
||||
end
|
||||
tab.tankname:SetText ("Avoidance of\n" .. n) --> localize-me
|
||||
|
||||
--> damage taken
|
||||
local damagetaken = player.damage_taken
|
||||
local last_damage_received = 0
|
||||
if (last_actor) then
|
||||
last_damage_received = last_actor.damage_taken / last_combat:GetCombatTime()
|
||||
end
|
||||
|
||||
tab.damagereceived:SetText (_detalhes:ToK2 (damagetaken))
|
||||
|
||||
local ps, diff = getpercent (damagetaken, last_damage_received, elapsed_time)
|
||||
tab.damagepersecond:SetText (_detalhes:comma_value (_math_floor (ps)) .. " (" .. diff .. ")")
|
||||
|
||||
--> absorbs
|
||||
local totalabsorbs = player.avoidance.overall.ABSORB_AMT
|
||||
local incomingtotal = damagetaken + totalabsorbs
|
||||
|
||||
local last_total_absorbs = 0
|
||||
if (last_actor) then
|
||||
last_total_absorbs = last_actor.avoidance.overall.ABSORB_AMT / last_combat:GetCombatTime()
|
||||
end
|
||||
|
||||
tab.absorbstotal:SetText (_detalhes:ToK2 (totalabsorbs) .. " (" .. _math_floor (totalabsorbs / incomingtotal * 100) .. "%)")
|
||||
|
||||
local ps, diff = getpercent (totalabsorbs, last_total_absorbs, elapsed_time, true)
|
||||
tab.absorbstotalpersecond:SetText (_detalhes:comma_value (_math_floor (ps)) .. " (" .. diff .. ")")
|
||||
|
||||
--> dodge
|
||||
local totaldodge = player.avoidance.overall.DODGE
|
||||
tab.dodge:SetText (totaldodge)
|
||||
|
||||
local last_total_dodge = 0
|
||||
if (last_actor) then
|
||||
last_total_dodge = last_actor.avoidance.overall.DODGE / last_combat:GetCombatTime()
|
||||
end
|
||||
local ps, diff = getpercent (totaldodge, last_total_dodge, elapsed_time, true)
|
||||
tab.dodgepersecond:SetText ( string.format ("%.2f", ps) .. " (" .. diff .. ")")
|
||||
|
||||
--> parry
|
||||
local totalparry = player.avoidance.overall.PARRY
|
||||
tab.parry:SetText (totalparry)
|
||||
|
||||
local last_total_parry = 0
|
||||
if (last_actor) then
|
||||
last_total_parry = last_actor.avoidance.overall.PARRY / last_combat:GetCombatTime()
|
||||
end
|
||||
local ps, diff = getpercent (totalparry, last_total_parry, elapsed_time, true)
|
||||
tab.parrypersecond:SetText (string.format ("%.2f", ps) .. " (" .. diff .. ")")
|
||||
|
||||
--> absorb
|
||||
local fullabsorb = player.avoidance.overall.FULL_ABSORBED
|
||||
local halfabsorb = player.avoidance.overall.PARTIAL_ABSORBED
|
||||
local halfabsorb_amt = player.avoidance.overall.PARTIAL_ABSORB_AMT
|
||||
local noabsorb = player.avoidance.overall.FULL_HIT
|
||||
|
||||
tab.fullsbsorbed:SetText (fullabsorb)
|
||||
tab.partiallyabsorbed:SetText (halfabsorb)
|
||||
tab.noabsorbs:SetText (noabsorb)
|
||||
|
||||
if (halfabsorb_amt > 0) then
|
||||
local average = halfabsorb_amt / halfabsorb --tenho o average
|
||||
local last_average = 0
|
||||
if (last_actor) then
|
||||
last_average = last_actor.avoidance.overall.PARTIAL_ABSORB_AMT / last_actor.avoidance.overall.PARTIAL_ABSORBED
|
||||
end
|
||||
|
||||
local ps, diff = getpercent (halfabsorb_amt, last_average, halfabsorb, true)
|
||||
tab.partiallyabsorbedpersecond:SetText (_detalhes:comma_value (_math_floor (ps)) .. " (" .. diff .. ")")
|
||||
else
|
||||
tab.partiallyabsorbedpersecond:SetText ("0.00 (0%)")
|
||||
end
|
||||
|
||||
|
||||
|
||||
--> healing
|
||||
|
||||
local actor_heal = combat (2, player.nome)
|
||||
if (not actor_heal) then
|
||||
tab.selfhealing:SetText ("0")
|
||||
tab.selfhealingpersecond:SetText ("0 (0%)")
|
||||
else
|
||||
local last_actor_heal = last_combat (2, player.nome)
|
||||
local este_alvo = actor_heal.targets._NameIndexTable [player.nome]
|
||||
if (este_alvo) then
|
||||
este_alvo = actor_heal.targets._ActorTable [este_alvo]
|
||||
local heal_total = este_alvo.total
|
||||
tab.selfhealing:SetText (_detalhes:ToK2 (heal_total))
|
||||
|
||||
if (last_actor_heal) then
|
||||
local este_alvo = last_actor_heal.targets._NameIndexTable [player.nome]
|
||||
if (este_alvo) then
|
||||
|
||||
este_alvo = actor_heal.targets._ActorTable [este_alvo]
|
||||
|
||||
local last_heal = este_alvo.total / last_combat:GetCombatTime()
|
||||
|
||||
local ps, diff = getpercent (heal_total, last_heal, elapsed_time, true)
|
||||
tab.selfhealingpersecond:SetText (_detalhes:comma_value (_math_floor (ps)) .. " (" .. diff .. ")")
|
||||
|
||||
else
|
||||
tab.selfhealingpersecond:SetText ("0 (0%)")
|
||||
end
|
||||
else
|
||||
tab.selfhealingpersecond:SetText ("0 (0%)")
|
||||
end
|
||||
|
||||
else
|
||||
tab.selfhealing:SetText ("0")
|
||||
tab.selfhealingpersecond:SetText ("0 (0%)")
|
||||
end
|
||||
|
||||
|
||||
-- taken from healer
|
||||
local heal_from = actor_heal.healing_from
|
||||
local myReceivedHeal = {}
|
||||
|
||||
for actorName, _ in pairs (heal_from) do
|
||||
local thisActor = combat (2, actorName)
|
||||
local targets = thisActor.targets --> targets is a container with target classes
|
||||
local amount = targets:GetAmount (player.nome, "total")
|
||||
myReceivedHeal [#myReceivedHeal+1] = {actorName, amount, thisActor.classe}
|
||||
end
|
||||
|
||||
table.sort (myReceivedHeal, _detalhes.Sort2) --> Sort2 sort by second index
|
||||
|
||||
for i = 1, 5 do
|
||||
local label1, label2 = unpack (tab ["healer" .. i])
|
||||
if (myReceivedHeal [i]) then
|
||||
local name = myReceivedHeal [i][1]
|
||||
if (name:find ("-")) then
|
||||
name = name:gsub (("-.*"), "")
|
||||
end
|
||||
label1:SetText (name .. ":")
|
||||
local class = myReceivedHeal [i][3]
|
||||
if (class) then
|
||||
local c = RAID_CLASS_COLORS [class]
|
||||
if (c) then
|
||||
label1:SetTextColor (c.r, c.g, c.b)
|
||||
end
|
||||
else
|
||||
label1:SetTextColor (.8, .8, .8, 1)
|
||||
end
|
||||
|
||||
local last_actor = last_combat (2, myReceivedHeal [i][1])
|
||||
if (last_actor) then
|
||||
local targets = last_actor.targets
|
||||
local amount = targets:GetAmount (player.nome, "total")
|
||||
if (amount) then
|
||||
|
||||
local last_heal = amount
|
||||
|
||||
local ps, diff = getpercent (myReceivedHeal[i][2], last_heal, 1, true)
|
||||
label2:SetText ( _detalhes:ToK2 (myReceivedHeal[i][2] or 0) .. " (" .. diff .. ")")
|
||||
|
||||
else
|
||||
label2:SetText ( _detalhes:ToK2 (myReceivedHeal[i][2] or 0))
|
||||
end
|
||||
else
|
||||
label2:SetText ( _detalhes:ToK2 (myReceivedHeal[i][2] or 0))
|
||||
end
|
||||
|
||||
|
||||
else
|
||||
label1:SetText ("-- -- -- --")
|
||||
label1:SetTextColor (.8, .8, .8, 1)
|
||||
label2:SetText ("")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> Spells
|
||||
--> cooldowns
|
||||
|
||||
local index_used = 1
|
||||
|
||||
local misc_player = combat (4, player.nome)
|
||||
|
||||
if (misc_player) then
|
||||
if (misc_player.cooldowns_defensive_spell_tables) then
|
||||
local minha_tabela = misc_player.cooldowns_defensive_spell_tables._ActorTable
|
||||
local cooldowns_usados = {}
|
||||
|
||||
for _spellid, _tabela in pairs (minha_tabela) do
|
||||
cooldowns_usados [#cooldowns_usados+1] = {_spellid, _tabela.counter}
|
||||
end
|
||||
table.sort (cooldowns_usados, function (t1, t2) return t1[2] > t2[2] end)
|
||||
|
||||
if (#cooldowns_usados > 1) then
|
||||
for i = 1, #cooldowns_usados do
|
||||
local esta_habilidade = cooldowns_usados[i]
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
|
||||
|
||||
local label1, label2, icon1 = unpack (tab ["spell" .. i])
|
||||
|
||||
label1:SetText (nome_magia .. ":")
|
||||
label2:SetText (esta_habilidade[2])
|
||||
icon1:SetTexture (icone_magia)
|
||||
icon1:SetTexCoord (0.0625, 0.953125, 0.0625, 0.953125)
|
||||
|
||||
index_used = index_used + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
--> buffs de druida
|
||||
if (index_used < 9) then
|
||||
if (misc_player.buff_uptime_spell_tables) then
|
||||
local minha_tabela = misc_player.buff_uptime_spell_tables._ActorTable
|
||||
for _spellid, _tabela in pairs (minha_tabela) do
|
||||
if (spells_by_class [player.classe] [_spellid] and index_used < 9) then
|
||||
local nome_magia, _, icone_magia = GetSpellInfo (_spellid)
|
||||
local label1, label2, icon1 = unpack (tab ["spell" .. index_used])
|
||||
|
||||
label1:SetText (nome_magia .. ":")
|
||||
local minutos, segundos = _math_floor (_tabela.uptime / 60), _math_floor (_tabela.uptime % 60)
|
||||
label2:SetText (minutos .. "m " .. segundos .. "s")
|
||||
icon1:SetTexture (icone_magia)
|
||||
icon1:SetTexCoord (0.0625, 0.953125, 0.0625, 0.953125)
|
||||
|
||||
index_used = index_used + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for i = index_used, 9 do
|
||||
local label1, label2, icon1 = unpack (tab ["spell" .. i])
|
||||
label1:SetText ("-- -- -- --")
|
||||
label2:SetText ("")
|
||||
icon1:SetTexture (nil)
|
||||
end
|
||||
|
||||
--> habilidade usada para interromper
|
||||
|
||||
|
||||
|
||||
|
||||
--[[
|
||||
|
||||
--]]
|
||||
end
|
||||
|
||||
_detalhes:CreatePlayerDetailsTab ("Avoidance", --[1] tab name
|
||||
function (tabOBject, playerObject) --[2] condition
|
||||
if (playerObject.isTank) then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end,
|
||||
|
||||
avoidance_fill, --[3] fill function
|
||||
|
||||
nil, --[4] onclick
|
||||
|
||||
avoidance_create --[5] oncreate
|
||||
)
|
||||
|
||||
function este_gump:ShowTabs()
|
||||
local amt_positive = 0
|
||||
|
||||
for index = #_detalhes.player_details_tabs, 1, -1 do
|
||||
|
||||
local tab = _detalhes.player_details_tabs [index]
|
||||
|
||||
if (tab:condition (info.jogador, info.atributo, info.sub_atributo)) then
|
||||
tab:Show()
|
||||
amt_positive = amt_positive + 1
|
||||
tab:SetPoint ("BOTTOMLEFT", info.container_barras, "TOPLEFT", 390 - (67 * (amt_positive-1)), 1)
|
||||
else
|
||||
tab.frame:Hide()
|
||||
tab:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
if (amt_positive < 2) then
|
||||
_detalhes.player_details_tabs[1]:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
este_gump:SetScript ("OnHide", function (self)
|
||||
_detalhes:FechaJanelaInfo()
|
||||
for _, tab in _ipairs (_detalhes.player_details_tabs) do
|
||||
tab:Hide()
|
||||
tab.frame:Hide()
|
||||
end
|
||||
end)
|
||||
|
||||
--DetailsInfoWindowTab1Text:SetText ("Avoidance")
|
||||
este_gump.tipo = 1 --> tipo da janela // 1 = janela normal
|
||||
|
||||
return este_gump
|
||||
|
||||
end
|
||||
|
||||
_detalhes.player_details_tabs = {}
|
||||
|
||||
function _detalhes:CreatePlayerDetailsTab (tabname, condition, fillfunction, onclick, oncreate)
|
||||
if (not tabname) then
|
||||
tabname = "unnamed"
|
||||
end
|
||||
|
||||
local index = #_detalhes.player_details_tabs
|
||||
|
||||
local newtab = CreateFrame ("button", "DetailsInfoWindowTab" .. index, info, "ChatTabTemplate")
|
||||
newtab:SetText (tabname)
|
||||
newtab:SetFrameStrata ("HIGH")
|
||||
newtab:Hide()
|
||||
|
||||
newtab.condition = condition
|
||||
newtab.tabname = tabname
|
||||
newtab.onclick = onclick
|
||||
newtab.fillfunction = fillfunction
|
||||
newtab.last_actor = {}
|
||||
|
||||
--> frame
|
||||
newtab.frame = CreateFrame ("frame", nil, UIParent)
|
||||
newtab.frame:SetFrameStrata ("HIGH")
|
||||
newtab.frame:EnableMouse (true)
|
||||
|
||||
if (newtab.fillfunction) then
|
||||
newtab.frame:SetScript ("OnShow", function()
|
||||
if (newtab.last_actor == info.jogador) then
|
||||
return
|
||||
end
|
||||
newtab.last_actor = info.jogador
|
||||
newtab:fillfunction (info.jogador, info.instancia.showing)
|
||||
end)
|
||||
end
|
||||
|
||||
if (oncreate) then
|
||||
oncreate (newtab, newtab.frame)
|
||||
end
|
||||
|
||||
newtab.frame:SetBackdrop({
|
||||
bgFile = [[Interface\ACHIEVEMENTFRAME\UI-GuildAchievement-Parchment-Horizontal-Desaturated]], tile = true, tileSize = 512,
|
||||
edgeFile = [[Interface\ACHIEVEMENTFRAME\UI-Achievement-WoodBorder]], edgeSize = 32,
|
||||
insets = {left = 0, right = 0, top = 0, bottom = 0}})
|
||||
newtab.frame:SetBackdropColor (.5, .50, .50, 1)
|
||||
|
||||
newtab.frame:SetPoint ("TOPLEFT", info, "TOPLEFT", 19, -76)
|
||||
newtab.frame:SetSize (569, 274)
|
||||
|
||||
newtab.frame:Hide()
|
||||
|
||||
--> adicionar ao container
|
||||
_detalhes.player_details_tabs [#_detalhes.player_details_tabs+1] = newtab
|
||||
|
||||
if (not onclick) then
|
||||
--> hide all tabs
|
||||
newtab:SetScript ("OnClick", function()
|
||||
for _, tab in _ipairs (_detalhes.player_details_tabs) do
|
||||
tab.frame:Hide()
|
||||
end
|
||||
newtab.frame:Show()
|
||||
end)
|
||||
else
|
||||
--> custom
|
||||
newtab:SetScript ("OnClick", onclick)
|
||||
end
|
||||
|
||||
--> remove os scripts padroes
|
||||
newtab:SetScript ("OnDoubleClick", nil)
|
||||
newtab:SetScript ("OnEnter", nil)
|
||||
newtab:SetScript ("OnLeave", nil)
|
||||
newtab:SetScript ("OnDragStart", nil)
|
||||
|
||||
end
|
||||
|
||||
function _detalhes.janela_info:monta_relatorio (botao)
|
||||
|
||||
local atributo = info.atributo
|
||||
|
||||
@@ -186,7 +186,7 @@ function _detalhes:OpenOptionsWindow (instance)
|
||||
-- ~altura
|
||||
|
||||
if (options_type == 1) then
|
||||
window.options [1][1].slider:SetMinMaxValues (0, 200)
|
||||
window.options [1][1].slider:SetMinMaxValues (0, 320)
|
||||
elseif (options_type == 2) then
|
||||
window.options [2][1].slider:SetMinMaxValues (0, 1300)
|
||||
window.options [2][1].slider.scrollMax = 1300
|
||||
@@ -616,6 +616,69 @@ function _detalhes:OpenOptionsWindow (instance)
|
||||
local buildAbbreviationMenu = function()
|
||||
return abbreviationOptions
|
||||
end
|
||||
|
||||
--------------- auto switch
|
||||
g:NewLabel (frame1, _, "$parentAutoSwitchLabel", "autoSwitchLabel", Loc ["STRING_OPTIONS_AUTO_SWITCH"])
|
||||
frame1.autoSwitchLabel:SetPoint (10, -450)
|
||||
--
|
||||
|
||||
local onSelectAutoSwitch = function (_, _, switch_to)
|
||||
if (switch_to == 0) then
|
||||
window.instance.auto_switch_to = nil
|
||||
return
|
||||
end
|
||||
|
||||
local selected = window.lastSwitchList [switch_to]
|
||||
|
||||
if (selected [1] == "raid") then
|
||||
local name = _detalhes.RaidTables.Menu [selected [2]] [1]
|
||||
selected [2] = name
|
||||
window.instance.auto_switch_to = selected
|
||||
else
|
||||
window.instance.auto_switch_to = selected
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
local buildSwitchMenu = function()
|
||||
|
||||
window.lastSwitchList = {}
|
||||
local t = {{value = 0, label = "NONE", onclick = onSelectAutoSwitch, icon = [[Interface\COMMON\VOICECHAT-MUTED]]}}
|
||||
|
||||
local attributes = _detalhes.sub_atributos
|
||||
local i = 1
|
||||
|
||||
for atributo, sub_atributo in ipairs (attributes) do
|
||||
local icones = sub_atributo.icones
|
||||
for index, att_name in ipairs (sub_atributo.lista) do
|
||||
local texture, texcoord = unpack (icones [index])
|
||||
tinsert (t, {value = i, label = att_name, onclick = onSelectAutoSwitch, icon = texture, texcoord = texcoord})
|
||||
window.lastSwitchList [i] = {atributo, index, i}
|
||||
i = i + 1
|
||||
end
|
||||
end
|
||||
|
||||
for index, ptable in ipairs (_detalhes.RaidTables.Menu) do
|
||||
tinsert (t, {value = i, label = ptable [1], onclick = onSelectAutoSwitch, icon = ptable [2]})
|
||||
window.lastSwitchList [i] = {"raid", index, i}
|
||||
i = i + 1
|
||||
end
|
||||
|
||||
return t
|
||||
end
|
||||
|
||||
g:NewDropDown (frame1, _, "$parentAutoSwitchDropdown", "autoSwitchDropdown", 160, 20, buildSwitchMenu, 1) -- func, default
|
||||
frame1.autoSwitchDropdown:SetPoint ("left", frame1.autoSwitchLabel, "right", 2, 0)
|
||||
frame1.autoSwitchDropdown:SetFrameStrata ("DIALOG")
|
||||
|
||||
frame1.autoSwitchDropdown.info = Loc ["STRING_OPTIONS_AUTO_SWITCH_DESC"]
|
||||
|
||||
window:create_line_background (frame1, frame1.autoSwitchLabel, frame1.autoSwitchDropdown)
|
||||
frame1.autoSwitchDropdown:SetHook ("OnEnter", background_on_enter)
|
||||
frame1.autoSwitchDropdown:SetHook ("OnLeave", background_on_leave)
|
||||
|
||||
|
||||
--abbreviation
|
||||
g:NewDropDown (frame1, _, "$parentAbbreviateDropdown", "dpsAbbreviateDropdown", 160, 20, buildAbbreviationMenu, _detalhes.ps_abbreviation) -- func, default
|
||||
frame1.dpsAbbreviateDropdown:SetPoint ("left", frame1.dpsAbbreviateLabel, "right", 2, 0)
|
||||
frame1.dpsAbbreviateDropdown:SetFrameStrata ("DIALOG")
|
||||
@@ -626,7 +689,6 @@ function _detalhes:OpenOptionsWindow (instance)
|
||||
frame1.dpsAbbreviateDropdown:SetHook ("OnEnter", background_on_enter)
|
||||
frame1.dpsAbbreviateDropdown:SetHook ("OnLeave", background_on_leave)
|
||||
|
||||
|
||||
---------------- appearance
|
||||
local frame2 = window.options [2][1].gump
|
||||
|
||||
@@ -791,7 +853,8 @@ function _detalhes:OpenOptionsWindow (instance)
|
||||
local r, g, b = ColorPickerFrame:GetColorRGB()
|
||||
local a = OpacitySliderFrame:GetValue()
|
||||
|
||||
a = _detalhes:Scale (0, 1, 0.5, 1, a) - 0.5
|
||||
--a = _detalhes:Scale (0, 1, 0.5, 1, a) - 0.5
|
||||
--print (a)
|
||||
|
||||
frame2.instancecolortexture:SetTexture (r, g, b)
|
||||
frame2.instancecolortexture:SetAlpha (a)
|
||||
@@ -1580,7 +1643,7 @@ function _detalhes:OpenOptionsWindow (instance)
|
||||
-- Color and Alpha
|
||||
g:NewLabel (frame2, _, "$parentAlphaLabel", "alphaLabel", Loc ["STRING_OPTIONS_INSTANCE_ALPHA"])
|
||||
g:NewLabel (frame2, _, "$parentBackgroundColorLabel", "backgroundColorLabel", Loc ["STRING_OPTIONS_INSTANCE_ALPHA2"])
|
||||
--
|
||||
-- alpha background
|
||||
frame2.alphaSlider:SetPoint ("left", frame2.alphaLabel, "right", 2, 0)
|
||||
frame2.alphaSlider.useDecimals = true
|
||||
frame2.alphaSlider:SetHook ("OnValueChange", function (self, instance, amount) --> slider, fixedValue, sliderValue
|
||||
@@ -1589,15 +1652,11 @@ function _detalhes:OpenOptionsWindow (instance)
|
||||
return true
|
||||
end)
|
||||
frame2.alphaSlider.thumb:SetSize (30+(120*0.2)+2, 20*1.2)
|
||||
|
||||
frame2.backgroundColorTexture:SetPoint ("left", frame2.backgroundColorLabel, "right", 2)
|
||||
frame2.backgroundColorTexture:SetTexture (1, 1, 1)
|
||||
|
||||
frame2.backgroundColorButton:SetPoint ("left", frame2.backgroundColorLabel, "right", 2)
|
||||
frame2.backgroundColorButton:InstallCustomTexture()
|
||||
|
||||
-- alpha background COLOR????
|
||||
|
||||
|
||||
frame2.alphaSlider.info = Loc ["STRING_OPTIONS_INSTANCE_ALPHA_DESC"]
|
||||
window:create_line_background (frame2, frame2.alphaLabel, frame2.alphaSlider)
|
||||
frame2.alphaSlider:SetHook ("OnEnter", background_on_enter)
|
||||
@@ -2737,6 +2796,28 @@ end
|
||||
_G.DetailsOptionsWindow2InstanceButtonAnchorYSlider.MyObject:SetValue (instance.instance_button_anchor[2])
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
--auto switch
|
||||
local autoswitch = instance.auto_switch_to
|
||||
if (autoswitch) then
|
||||
if (autoswitch [1] == "raid") then
|
||||
_G.DetailsOptionsWindow1AutoSwitchDropdown.MyObject:Select (autoswitch[2])
|
||||
--print (autoswitch[2])
|
||||
--[[
|
||||
for index, ptable in _ipairs (_detalhes.RaidTables.Menu) do
|
||||
GameCooltip:AddMenu (1, _detalhes.RaidTables.switch, index, nil, nil, ptable [1], ptable [2], true)
|
||||
if (ptable[1] == autoswitch [2]) then
|
||||
|
||||
break
|
||||
end
|
||||
end
|
||||
--]]
|
||||
else
|
||||
_G.DetailsOptionsWindow1AutoSwitchDropdown.MyObject:Select (autoswitch[3]+1, true)
|
||||
end
|
||||
else
|
||||
_G.DetailsOptionsWindow1AutoSwitchDropdown.MyObject:Select (1, true)
|
||||
end
|
||||
|
||||
--resetTextColor
|
||||
_G.DetailsOptionsWindow2ResetTextFontDropdown.MyObject:SetFixedParameter (instance)
|
||||
|
||||
+63
-17
@@ -64,10 +64,19 @@ end
|
||||
local COORDS_LEFT_CONNECTOR_NO_ICON = {0.58837890625, 0.59423828125, 0.08251953125, 0.20556640625} -- 602 84 609 211 (updated)
|
||||
local COORDS_TOP_BACKGROUND = {0.15673828125, 0.65478515625, 0.22314453125, 0.34619140625} -- 160 228 671 355 (updated)
|
||||
local COORDS_RIGHT_BALL = {0.31591796875, 0.43994140625, 0.08251953125, 0.20556640625} --324 84 451 211 (updated)
|
||||
local COORDS_LEFT_BALL_NO_ICON = {0.44970703125, 0.57275390625, 0.08251953125, 0.20556640625} --460 84 587 211 (updated)
|
||||
|
||||
--local COORDS_LEFT_BALL_NO_ICON = {0.44970703125, 0.57275390625, 0.08251953125, 0.20556640625} --460 84 587 211 (updated)
|
||||
local COORDS_LEFT_BALL_NO_ICON = {0.44970703125, 0.57275390625, 0.08251953125, 0.20556640625} --460 84 587 211 (updated) 588 212
|
||||
|
||||
local COORDS_LEFT_SIDE_BAR = {0.76611328125, 0.82763671875, 0.00244140625, 0.50146484375} -- 784 2 848 514 (updated)
|
||||
local COORDS_RIGHT_SIDE_BAR = {0.70068359375, 0.76220703125, 0.00244140625, 0.50146484375} -- 717 2 781 514 (updated)
|
||||
--local COORDS_LEFT_SIDE_BAR = {0.76611328125, 0.82666015625, 0.00244140625, 0.50048828125} -- 784 2 848 514 (updated)
|
||||
--local COORDS_LEFT_SIDE_BAR = {0.765625, 0.8291015625, 0.00244140625, 0.5029296875} -- 784 2 848 514 (updated)
|
||||
--784 2 847 513
|
||||
|
||||
--local COORDS_RIGHT_SIDE_BAR = {0.70068359375, 0.76220703125, 0.00244140625, 0.50146484375} -- 717 2 781 514 (updated)
|
||||
local COORDS_RIGHT_SIDE_BAR = {0.7001953125, 0.763671875, 0.00244140625, 0.50146484375} -- 717 2 781 514 (updated)
|
||||
--717 2 782 515
|
||||
|
||||
local COORDS_BOTTOM_SIDE_BAR = {0.32861328125, 0.82666015625, 0.50537109375, 0.56494140625} -- 336 517 847 579 (updated)
|
||||
|
||||
local COORDS_SLIDER_TOP = {0.00146484375, 0.03076171875, 0.00244140625, 0.03173828125} -- 1 2 32 33 -ok
|
||||
@@ -2071,7 +2080,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
gump:CriaRodape (baseframe, instancia)
|
||||
|
||||
-- left and right side bars ------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
-- ~barra
|
||||
--> left
|
||||
baseframe.barra_esquerda = baseframe.cabecalho.fechar:CreateTexture (nil, "artwork")
|
||||
baseframe.barra_esquerda:SetTexture (DEFAULT_SKIN)
|
||||
@@ -2221,6 +2230,7 @@ function _detalhes:SetBarGrowDirection (direction)
|
||||
y = y * -1
|
||||
row:ClearAllPoints()
|
||||
row:SetPoint ("topleft", self.baseframe, "topleft", x, y)
|
||||
|
||||
end
|
||||
|
||||
elseif (direction == 2) then --> bottom to top
|
||||
@@ -2231,6 +2241,17 @@ function _detalhes:SetBarGrowDirection (direction)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--> update all row width
|
||||
if (self.bar_mod and self.bar_mod ~= 0) then
|
||||
for index = 1, #self.barras do
|
||||
self.barras [index]:SetWidth (self.baseframe:GetWidth() + self.bar_mod)
|
||||
end
|
||||
else
|
||||
for index = 1, #self.barras do
|
||||
self.barras [index]:SetWidth (self.baseframe:GetWidth()+self.row_info.space.right)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> Alias
|
||||
@@ -3529,7 +3550,8 @@ function _detalhes:ChangeSkin (skin_name)
|
||||
local this_skin = _detalhes.skins [skin_name]
|
||||
|
||||
if (not this_skin) then
|
||||
return false --> throw a msg
|
||||
skin_name = "Default Skin"
|
||||
this_skin = _detalhes.skins [skin_name]
|
||||
end
|
||||
|
||||
local just_updating = false
|
||||
@@ -3548,17 +3570,6 @@ function _detalhes:ChangeSkin (skin_name)
|
||||
--> reset all config
|
||||
self:ResetInstanceConfig()
|
||||
|
||||
--> overwrites
|
||||
local overwrite_cprops = this_skin.instance_cprops
|
||||
if (overwrite_cprops) then
|
||||
for cprop, value in _pairs (overwrite_cprops) do
|
||||
self [cprop] = value
|
||||
end
|
||||
end
|
||||
|
||||
--> reset micro frames
|
||||
_detalhes.StatusBar:Reset (self)
|
||||
|
||||
--> reset instance button
|
||||
self:SetInstanceButtonSettings ("reset")
|
||||
|
||||
@@ -3569,7 +3580,28 @@ function _detalhes:ChangeSkin (skin_name)
|
||||
|
||||
--> reset close button
|
||||
self:SetCloseButtonSettings ("reset")
|
||||
|
||||
DetailsResetButton2Text2:SetText ("-")
|
||||
|
||||
--> overwrites
|
||||
local overwrite_cprops = this_skin.instance_cprops
|
||||
if (overwrite_cprops) then
|
||||
for cprop, value in _pairs (overwrite_cprops) do
|
||||
self [cprop] = value
|
||||
end
|
||||
end
|
||||
|
||||
--> reset instance button
|
||||
self:SetInstanceButtonSettings()
|
||||
--> reset delete button
|
||||
if (_detalhes.ResetButtonInstance == self.meu_id) then
|
||||
self:SetDeleteButtonSettings()
|
||||
end
|
||||
--> reset close button
|
||||
self:SetCloseButtonSettings ()
|
||||
|
||||
--> reset micro frames
|
||||
_detalhes.StatusBar:Reset (self)
|
||||
|
||||
end
|
||||
|
||||
self.skin = skin_name
|
||||
@@ -3689,7 +3721,11 @@ function _detalhes:ChangeSkin (skin_name)
|
||||
self.baseframe.cabecalho.fechar:SetScript ("OnMouseDown", nil)
|
||||
self.baseframe.cabecalho.fechar:SetScript ("OnMouseUp", nil)
|
||||
|
||||
self.baseframe.cabecalho.fechar:SetSize (32, 32)
|
||||
if (this_skin.close_button_size) then
|
||||
self.baseframe.cabecalho.fechar:SetSize (unpack (this_skin.close_button_size))
|
||||
else
|
||||
self.baseframe.cabecalho.fechar:SetSize (32, 32)
|
||||
end
|
||||
end
|
||||
|
||||
----------> customize micro frames
|
||||
@@ -4102,6 +4138,10 @@ function _detalhes:ShowSideBars (instancia)
|
||||
self.baseframe.barra_esquerda:Show()
|
||||
self.baseframe.barra_direita:Show()
|
||||
|
||||
--> set default spacings
|
||||
self.row_info.space.left = 3
|
||||
self.row_info.space.right = -5
|
||||
|
||||
if (self.show_statusbar) then
|
||||
self.baseframe.barra_esquerda:SetPoint ("bottomleft", self.baseframe, "bottomleft", -56, -14)
|
||||
self.baseframe.barra_direita:SetPoint ("bottomright", self.baseframe, "bottomright", 56, -14)
|
||||
@@ -4136,6 +4176,8 @@ function _detalhes:ShowSideBars (instancia)
|
||||
end
|
||||
end
|
||||
|
||||
self:SetBarGrowDirection()
|
||||
|
||||
end
|
||||
|
||||
function _detalhes:HideSideBars (instancia)
|
||||
@@ -4145,10 +4187,14 @@ function _detalhes:HideSideBars (instancia)
|
||||
|
||||
self.show_sidebars = false
|
||||
|
||||
self.row_info.space.left = 0
|
||||
self.row_info.space.right = 0
|
||||
|
||||
self.baseframe.barra_esquerda:Hide()
|
||||
self.baseframe.barra_direita:Hide()
|
||||
self.baseframe.barra_fundo:Hide()
|
||||
|
||||
self:SetBarGrowDirection()
|
||||
end
|
||||
|
||||
function _detalhes:HideStatusBar (instancia)
|
||||
|
||||
+49
-2
@@ -87,6 +87,52 @@ local _UISpecialFrames = UISpecialFrames --> wow api locals
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function _detalhes:SendReportTextWindow (lines)
|
||||
|
||||
if (not _detalhes.copypasteframe) then
|
||||
_detalhes.copypasteframe = CreateFrame ("editbox", "DetailsCopyPasteFrame2", UIParent)
|
||||
_detalhes.copypasteframe:SetFrameStrata ("TOOLTIP")
|
||||
_detalhes.copypasteframe:SetPoint ("CENTER", UIParent, "CENTER", 0, 50)
|
||||
tinsert (UISpecialFrames, "DetailsCopyPasteFrame2")
|
||||
_detalhes.copypasteframe:SetSize (400, 400)
|
||||
_detalhes.copypasteframe:SetBackdrop ({bgFile = "Interface\\ACHIEVEMENTFRAME\\UI-Achievement-Parchment-Horizontal-Desaturated",
|
||||
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
|
||||
tile = true, tileSize = 16, edgeSize = 8,
|
||||
insets = {left = 0, right = 0, top = 0, bottom = 0},})
|
||||
_detalhes.copypasteframe:SetBackdropColor (0, 0, 0, 0.9)
|
||||
_detalhes.copypasteframe:SetAutoFocus (false)
|
||||
_detalhes.copypasteframe:SetMultiLine (true)
|
||||
_detalhes.copypasteframe:SetFontObject ("GameFontHighlightSmall")
|
||||
_detalhes.copypasteframe:Hide()
|
||||
|
||||
local title = _detalhes.copypasteframe:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
title:SetPoint ("bottomleft", _detalhes.copypasteframe, "topleft", 2, 2)
|
||||
title:SetText ("Press Ctrl + C and paste wherever you want, press any key to close.")
|
||||
title:SetJustifyH ("left")
|
||||
|
||||
local texture = _detalhes.copypasteframe:CreateTexture (nil, "overlay")
|
||||
texture:SetTexture (0, 0, 0, 1)
|
||||
texture:SetSize (400, 25)
|
||||
texture:SetPoint ("bottomleft", _detalhes.copypasteframe, "topleft")
|
||||
|
||||
_detalhes.copypasteframe:SetScript ("OnEditFocusGained", function() _detalhes.copypasteframe:HighlightText() end)
|
||||
_detalhes.copypasteframe:SetScript ("OnEditFocusLost", function() _detalhes.copypasteframe:Hide() end)
|
||||
_detalhes.copypasteframe:SetScript ("OnEscapePressed", function() _detalhes.copypasteframe:SetFocus (false); _detalhes.copypasteframe:Hide() end)
|
||||
_detalhes.copypasteframe:SetScript ("OnChar", function() _detalhes.copypasteframe:SetFocus (false); _detalhes.copypasteframe:Hide() end)
|
||||
end
|
||||
|
||||
local s = ""
|
||||
for _, line in ipairs (lines) do
|
||||
s = s .. line .. "\n"
|
||||
end
|
||||
|
||||
_detalhes.copypasteframe:Show()
|
||||
_detalhes.copypasteframe:SetText (s)
|
||||
_detalhes.copypasteframe:HighlightText()
|
||||
_detalhes.copypasteframe:SetFocus (true)
|
||||
|
||||
end
|
||||
|
||||
|
||||
--> internal details report functions -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -175,13 +221,14 @@ local _UISpecialFrames = UISpecialFrames --> wow api locals
|
||||
{Loc ["STRING_REPORTFRAME_OFFICERS"], "OFFICER", _IsInGuild},
|
||||
{Loc ["STRING_REPORTFRAME_WHISPER"], "WHISPER"},
|
||||
{Loc ["STRING_REPORTFRAME_WHISPERTARGET"], "WHISPER2"},
|
||||
{Loc ["STRING_REPORTFRAME_SAY"], "SAY"}
|
||||
{Loc ["STRING_REPORTFRAME_SAY"], "SAY"},
|
||||
{Loc ["STRING_REPORTFRAME_COPY"], "COPY"},
|
||||
}
|
||||
|
||||
local function initialize (self, level)
|
||||
local info = _UIDropDownMenu_CreateInfo()
|
||||
|
||||
for i = 8, #lista do
|
||||
for i = 9, #lista do
|
||||
lista [i] = nil
|
||||
end
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2,7 +2,8 @@ local Loc = LibStub("AceLocale-3.0"):NewLocale("Details", "enUS", true)
|
||||
if not Loc then return end
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.11.3|r\n\n|cFFFFFF00-|r Fixed more known issues with skins.\n\n|cFFFFFF00-|r Fixed an issue where plugin icons wasn't hiding after close all windows.\n\n|cFFFFFF00v1.11.2|r\n\n|cFFFFFF00-|r Fixed bugs where Details! stop working if no plugin is actived on Wow addon panel.\n\n|cFFFFFF00v1.11.0|r\n\n|cFFFFFF00-|r Added an option for abbreviate Dps and Hps.\n\n|cFFFFFF00-|r Fixed issue where the window icon fade away when reopening the window.\n\n|cFFFFFF00-|r Improvements in class recognition.\n\n|cFFFFFF00-|r Added follow spells as defensive cooldowns:\nHealing Tide Totem, Spirit Link Totem, Demoralizing Banner, Mass Spell Reflection and Shield Block.\n\n|cFFFFFF00-|r More improvements done in Encounter Details plugin.\n\n|cFFFFFF00-|r Improvements made in the downloadable plugins: Timeline and Advanced Death Logs.\n\n|cFFFFFF00v1.10.0|r\n\n|cFFFFFF00-|r Fixed a issue with overall data Dps when have only one segment.\n\n|cFFFFFF00-|r Changed colors and added some backgrounds for menus.\n\n|cFFFFFF00-|r Options panel has his height size increased.\n\n|cFFFFFF00-|r Added options for hide the window or change the transparency when in combat.\n\n|cFFFFFF00-|r Added a control panel for plugins, where you can enable or disable then.\n\n|cFFFFFF00v1.9.5|r\n\n|cFFFFFF00-|r More fixes on Skins support and new tools for plugins.|r\n\n|cFFFFFF00v1.9.4|r\n\n|cFFFFFF00-|r Minor bug fixes and improvements on Welcome Screen.\n\n|cFFFFFF00v1.9.3|r\n\n|cFFFFFF00-|r The bar now starts after the icon instead of left window border.\n\n|cFFFFFF00-|r Welcome window now is localizated to others languages\n\n|cFFFFFF00-|r Fixed issue with Damage Rank Plugin.\n\n|cFFFFFF00v1.9.1|r\n\n|cFFFFFF00-|r fixed issue with main window icon when no plugin installed. \n\n|cFFFFFF00-|r fixed issue with some options button text which where out of positioning.\n\n|cFFFFFF00-|r fixed sub menu overlap when near right screen edge.\n\n|cFFFFFF00-|r fixed close button position for default skin.\n\n|cFFFFFF00-|r fixed skin error when selecting solo or right plugins.|cFFFFFF00v1.9.0|r\n\n|cFFFFFF00-|r Fixed minimap icon stuck problem.\n\n|cFFFFFF00-|r Skin support has been rewrite and now is more flexibe.\n\n|cFFFFFF00-|r Added up to 20 new customization options over options panel.\n\n|cFFFFFF00v1.8.4|r\n\n|cFFFFFF00-|r Added slash command 'details reinstall' which cleans Details! config in case of erros.\n\n|cFFFFFF00v1.8.3|r\n\n|cFFFFFF00-|r Added new skin: Simple Gray.\n\n|cFFFFFF00-|r Added minimap and interface addon panel buttons.\n\n|cFFFFFF00-|r Added new tutorials bubbles for basic aspects of Details! window.\n\n|cFFFFFF00-|r Fixed a issue with Panic Mode where sometimes his isnt triggered."
|
||||
|
||||
Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.11.6|r\n\n|cFFFFFF00-|r Added new skin: Minimalistic, a very clean one.\n\n|cFFFFFF00-|r Added a new tab called avoidance on Player Details window for tanks.\n\n|cFFFFFF00-|r Added Copy & Paste option on report window. Now you can share your dps on twitter and facebook!\n\n|cFFFFFF00-|r Added a new option for auto switch what a window shows when you enter in a combat.\n\n|cFFFFFF00-|r Fixed issue with window background alpha which was changing the value everytime the options window is opened.\n\n|cFFFFFF00-|r Fixed the gap between the bar and the window background when disabling borders.\n\n|cFFFFFF00-|r Make some improvements on Tiny Threat plugin.\n\n|cFFFFFF00v1.11.3|r\n\n|cFFFFFF00-|r Fixed more known issues with skins.\n\n|cFFFFFF00-|r Fixed an issue where plugin icons wasn't hiding after close all windows.\n\n|cFFFFFF00v1.11.2|r\n\n|cFFFFFF00-|r Fixed bugs where Details! stop working if no plugin is actived on Wow addon panel.\n\n|cFFFFFF00v1.11.0|r\n\n|cFFFFFF00-|r Added an option for abbreviate Dps and Hps.\n\n|cFFFFFF00-|r Fixed issue where the window icon fade away when reopening the window.\n\n|cFFFFFF00-|r Improvements in class recognition.\n\n|cFFFFFF00-|r Added follow spells as defensive cooldowns:\nHealing Tide Totem, Spirit Link Totem, Demoralizing Banner, Mass Spell Reflection and Shield Block.\n\n|cFFFFFF00-|r More improvements done in Encounter Details plugin.\n\n|cFFFFFF00-|r Improvements made in the downloadable plugins: Timeline and Advanced Death Logs.\n\n|cFFFFFF00v1.10.0|r\n\n|cFFFFFF00-|r Fixed a issue with overall data Dps when have only one segment.\n\n|cFFFFFF00-|r Changed colors and added some backgrounds for menus.\n\n|cFFFFFF00-|r Options panel has his height size increased.\n\n|cFFFFFF00-|r Added options for hide the window or change the transparency when in combat.\n\n|cFFFFFF00-|r Added a control panel for plugins, where you can enable or disable then.\n\n|cFFFFFF00v1.9.5|r\n\n|cFFFFFF00-|r More fixes on Skins support and new tools for plugins.|r\n\n|cFFFFFF00v1.9.4|r\n\n|cFFFFFF00-|r Minor bug fixes and improvements on Welcome Screen.\n\n|cFFFFFF00v1.9.3|r\n\n|cFFFFFF00-|r The bar now starts after the icon instead of left window border.\n\n|cFFFFFF00-|r Welcome window now is localizated to others languages\n\n|cFFFFFF00-|r Fixed issue with Damage Rank Plugin.\n\n|cFFFFFF00v1.9.1|r\n\n|cFFFFFF00-|r fixed issue with main window icon when no plugin installed. \n\n|cFFFFFF00-|r fixed issue with some options button text which where out of positioning.\n\n|cFFFFFF00-|r fixed sub menu overlap when near right screen edge.\n\n|cFFFFFF00-|r fixed close button position for default skin.\n\n|cFFFFFF00-|r fixed skin error when selecting solo or right plugins.|cFFFFFF00v1.9.0|r\n\n|cFFFFFF00-|r Fixed minimap icon stuck problem.\n\n|cFFFFFF00-|r Skin support has been rewrite and now is more flexibe.\n\n|cFFFFFF00-|r Added up to 20 new customization options over options panel.\n\n|cFFFFFF00v1.8.4|r\n\n|cFFFFFF00-|r Added slash command 'details reinstall' which cleans Details! config in case of erros.\n\n|cFFFFFF00v1.8.3|r\n\n|cFFFFFF00-|r Added new skin: Simple Gray.\n\n|cFFFFFF00-|r Added minimap and interface addon panel buttons.\n\n|cFFFFFF00-|r Added new tutorials bubbles for basic aspects of Details! window.\n\n|cFFFFFF00-|r Fixed a issue with Panic Mode where sometimes his isnt triggered."
|
||||
|
||||
Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails:|r " --> color and details name
|
||||
|
||||
@@ -218,7 +219,7 @@ if not Loc then return end
|
||||
Loc ["STRING_PETS"] = "Pets"
|
||||
Loc ["STRING_DPS"] = "Dps"
|
||||
Loc ["STRING_SEE_BELOW"] = "see below"
|
||||
Loc ["STRING_GERAL"] = "Geral"
|
||||
Loc ["STRING_GERAL"] = "General"
|
||||
Loc ["STRING_PERCENTAGE"] = "Percentage"
|
||||
Loc ["STRING_MEDIA"] = "Media"
|
||||
Loc ["STRING_HITS"] = "Hits"
|
||||
@@ -318,6 +319,7 @@ if not Loc then return end
|
||||
Loc ["STRING_REPORTFRAME_OFFICERS"] = "Officer Channel"
|
||||
Loc ["STRING_REPORTFRAME_WHISPER"] = "Whisper"
|
||||
Loc ["STRING_REPORTFRAME_WHISPERTARGET"] = "Whisper Target"
|
||||
Loc ["STRING_REPORTFRAME_COPY"] = "Copy & Paste"
|
||||
Loc ["STRING_REPORTFRAME_SAY"] = "Say"
|
||||
Loc ["STRING_REPORTFRAME_LINES"] = "Lines"
|
||||
Loc ["STRING_REPORTFRAME_INSERTNAME"] = "insert player name"
|
||||
@@ -423,6 +425,8 @@ if not Loc then return end
|
||||
Loc ["STRING_OPTIONS_HIDECOMBAT_DESC"] = "If enabled, this instance window is hidden when you enter in combat."
|
||||
Loc ["STRING_OPTIONS_HIDECOMBATALPHA"] = "Transparency"
|
||||
Loc ["STRING_OPTIONS_HIDECOMBATALPHA_DESC"] = "The window can be completely hidden or just be more transparent."
|
||||
Loc ["STRING_OPTIONS_AUTO_SWITCH"] = "Auto Switch"
|
||||
Loc ["STRING_OPTIONS_AUTO_SWITCH_DESC"] = "When you enter in combat, this window change for the selected attribute or plugin.\n\nLeaving the combat, it switch back."
|
||||
Loc ["STRING_OPTIONS_PS_ABBREVIATE"] = "PS Abbreviation"
|
||||
Loc ["STRING_OPTIONS_PS_ABBREVIATE_DESC"] = "Choose the abbreviation method for Dps and Hps.\n\n|cFFFFFFFFNone|r: no abbreviation, the raw number is shown.\n\n|cFFFFFFFFHundreds I|r: the number is reduced with a letter representing his value.\n\n59874 = 59.8K\n100.000 = 100.0K\n19.530.000 = 19.53M\n\n|cFFFFFFFFHundreds II|r: the number is reduced with a letter representing his value.\n\n59874 = 59.8K\n100.000 = 100K\n19.530.000 = 19.53M"
|
||||
Loc ["STRING_OPTIONS_PS_ABBREVIATE_NONE"] = "None"
|
||||
|
||||
@@ -3,7 +3,7 @@ if not Loc then return end
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.11.3|r\n\n|cFFFFFF00-|r Corrigido mais problemas conhecidos com as Skins.\n\n|cFFFFFF00-|r Corrigido problema onde os icones dos plugins nao eram escondidos apos fechar todas as janelas.\n\n|cFFFFFF00v1.11.2|r\n\n|cFFFFFF00-|r Corrigido problemas onde o Details! parava de funcionar se nenhum plugin estiver ligado no painel de addons do Wow.|cFFFFFF00v1.11.0|r\n\n|cFFFFFF00-|r Adicionado opcao para abreviar o Dps e o Hps.\n\n|cFFFFFF00-|r Corrigido um problema onde o icone da janela desaparecia ao reabri-la.\n\n|cFFFFFF00-|r Melhorias no reconhecimento das classes.\n\n|cFFFFFF00-|r As seguintes magias foram adicionadas como cooldowns: Healing Tide Totem, Spirit Link Totem, Demoralizing Banner, Mass Spell Reflection and Shield Block.\n\n|cFFFFFF00-|r Mais melhorias feitas no plugin Encounter Details.\n\n|cFFFFFF00-|r Melhorias feitas nos plugins disponiveis para download: Timeline e Advanced Death Logs.\n\n|cFFFFFF00v1.10.0|r\n\n|cFFFFFF00-|r Corrigido um problema no Dps no segmento total quando existia apenas 1 segmento.\n\n|cFFFFFF00-|r Cores e imagem de fundo dos menus foram alterados.\n\n|cFFFFFF00-|r A altura do painel de opcoes foi aumentada.\n\n|cFFFFFF00-|r Adicionada opcao para esconder ou alterar a transparencia da janela quando estiver em combate.\n\n|cFFFFFF00-|r Adicionado um painel de controle de plugins para ativar ou desativa-los.\n\n|cFFFFFF00v1.9.5|r\n\n|cFFFFFF00-|rMais correcoes para as Skins e suporte a novos plugins.|r\n\n|cFFFFFF00v1.9.4|r\n\n|cFFFFFF00-|r Pequenas correcoes e melhorias na tela de boas vindas.\n\n|cFFFFFF00v1.9.3|r\n\n|cFFFFFF00-|r A barra agora comeca apos o icone e nao mais na borda esquerda da janela.\n\n|cFFFFFF00-|r Janela de boas vindas agora esta traduzida para outros idiomas.\n\n|cFFFFFF00-|r Corrigido o problema que estava afetando o plugin de Rank de Dano.\n\n|cFFFFFF00v1.9.1|r\n\n|cFFFFFF00-|r corrigido problema do icone na janela principal quando nao havia nenhum plugin instalado. \n\n|cFFFFFF00-|r corrigido problema com alguns botoes no painel de opcoes onde o texto estava fora do lugar.\n\n|cFFFFFF00-|r corrigido a posicao dos sub menus quando proximos a borda direita do monitor.\n\n|cFFFFFF00-|r corrigida a posicao do botao de fechar do skin padrao.\n\n|cFFFFFF00-|r corrigido um erro nas skins ao selecionar um plugin de raide ou solo.|cFFFFFF00v1.9.0|r\n\n|cFFFFFF00-|r Corrigido o problema de nao movimentar o botao no minimapa.\n\n|cFFFFFF00-|r Suporte a skins foi reescrito e agora ficou mais flexivel.\n\n|cFFFFFF00-|r Adicionadas mais de 20 opcoes de customizacao no painel de opcoes.\n\n|cFFFFFF00v1.8.4|r\n\n|cFFFFFF00-|r Adicionado comando 'details reinstalar' no qual limpa a configuracao do Details! em caso de erros.\n\n|cFFFFFF00v1.8.3|r\n\n|cFFFFFF00-|r Adicionada nova skin: Simple Gray.\n\n|cFFFFFF00-|r Adicionado botoes para o Details! no minimapa e menu de addons no painel de intercace.\n\n|cFFFFFF00-|r Adicionados novas bolhas de tutoriais para aspectos basicos das janelas do Details!.\n\n|cFFFFFF00-|r Corrigido o Modo Panico aonde as vezes ele nao era disparado."
|
||||
Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.11.6|r\n\n|cFFFFFF00-|r Adicionado nova skin: Minimalistic.\n\n|cFFFFFF00-|r Adicionado nova aba chamada avoidance no painel de detalhes do jogador apenas para tanques.\n\n|cFFFFFF00-|r Adicionado opcao de Copiar e Coloar na janela de criar relatorios. Agora voce pode dizer seu dps aos seus amigos no twitter e facebook!\n\n|cFFFFFF00-|r Adicionada nova opcao de troca o que uma janela esta mostrando quando voce entrar em combate.\n\n|cFFFFFF00-|r Corrigido problema com a transparencia da janela onde ela mudava sozinha sempre que a janela de opcoes eta aberta.\n\n|cFFFFFF00-|r Corrigido o vao em branco que ficava entre o inicio de uma barra e o fundo da janela quando as bordas eram desligadas.\n\n|cFFFFFF00-|r Feito algumas melhorias no plugin Tiny Threat.\n\n|cFFFFFF00v1.11.3|r\n\n|cFFFFFF00-|r Corrigido mais problemas conhecidos com as Skins.\n\n|cFFFFFF00-|r Corrigido problema onde os icones dos plugins nao eram escondidos apos fechar todas as janelas.\n\n|cFFFFFF00v1.11.2|r\n\n|cFFFFFF00-|r Corrigido problemas onde o Details! parava de funcionar se nenhum plugin estiver ligado no painel de addons do Wow.|cFFFFFF00v1.11.0|r\n\n|cFFFFFF00-|r Adicionado opcao para abreviar o Dps e o Hps.\n\n|cFFFFFF00-|r Corrigido um problema onde o icone da janela desaparecia ao reabri-la.\n\n|cFFFFFF00-|r Melhorias no reconhecimento das classes.\n\n|cFFFFFF00-|r As seguintes magias foram adicionadas como cooldowns: Healing Tide Totem, Spirit Link Totem, Demoralizing Banner, Mass Spell Reflection and Shield Block.\n\n|cFFFFFF00-|r Mais melhorias feitas no plugin Encounter Details.\n\n|cFFFFFF00-|r Melhorias feitas nos plugins disponiveis para download: Timeline e Advanced Death Logs.\n\n|cFFFFFF00v1.10.0|r\n\n|cFFFFFF00-|r Corrigido um problema no Dps no segmento total quando existia apenas 1 segmento.\n\n|cFFFFFF00-|r Cores e imagem de fundo dos menus foram alterados.\n\n|cFFFFFF00-|r A altura do painel de opcoes foi aumentada.\n\n|cFFFFFF00-|r Adicionada opcao para esconder ou alterar a transparencia da janela quando estiver em combate.\n\n|cFFFFFF00-|r Adicionado um painel de controle de plugins para ativar ou desativa-los.\n\n|cFFFFFF00v1.9.5|r\n\n|cFFFFFF00-|rMais correcoes para as Skins e suporte a novos plugins.|r\n\n|cFFFFFF00v1.9.4|r\n\n|cFFFFFF00-|r Pequenas correcoes e melhorias na tela de boas vindas.\n\n|cFFFFFF00v1.9.3|r\n\n|cFFFFFF00-|r A barra agora comeca apos o icone e nao mais na borda esquerda da janela.\n\n|cFFFFFF00-|r Janela de boas vindas agora esta traduzida para outros idiomas.\n\n|cFFFFFF00-|r Corrigido o problema que estava afetando o plugin de Rank de Dano.\n\n|cFFFFFF00v1.9.1|r\n\n|cFFFFFF00-|r corrigido problema do icone na janela principal quando nao havia nenhum plugin instalado. \n\n|cFFFFFF00-|r corrigido problema com alguns botoes no painel de opcoes onde o texto estava fora do lugar.\n\n|cFFFFFF00-|r corrigido a posicao dos sub menus quando proximos a borda direita do monitor.\n\n|cFFFFFF00-|r corrigida a posicao do botao de fechar do skin padrao.\n\n|cFFFFFF00-|r corrigido um erro nas skins ao selecionar um plugin de raide ou solo.|cFFFFFF00v1.9.0|r\n\n|cFFFFFF00-|r Corrigido o problema de nao movimentar o botao no minimapa.\n\n|cFFFFFF00-|r Suporte a skins foi reescrito e agora ficou mais flexivel.\n\n|cFFFFFF00-|r Adicionadas mais de 20 opcoes de customizacao no painel de opcoes.\n\n|cFFFFFF00v1.8.4|r\n\n|cFFFFFF00-|r Adicionado comando 'details reinstalar' no qual limpa a configuracao do Details! em caso de erros.\n\n|cFFFFFF00v1.8.3|r\n\n|cFFFFFF00-|r Adicionada nova skin: Simple Gray.\n\n|cFFFFFF00-|r Adicionado botoes para o Details! no minimapa e menu de addons no painel de intercace.\n\n|cFFFFFF00-|r Adicionados novas bolhas de tutoriais para aspectos basicos das janelas do Details!.\n\n|cFFFFFF00-|r Corrigido o Modo Panico aonde as vezes ele nao era disparado."
|
||||
|
||||
Loc ["STRING_DETAILS1"] = "|cffffaeaeDetalhes:|r " --> color and details name
|
||||
|
||||
@@ -317,6 +317,7 @@ if not Loc then return end
|
||||
Loc ["STRING_REPORTFRAME_WHISPER"] = "Sussurrar"
|
||||
Loc ["STRING_REPORTFRAME_WHISPERTARGET"] = "Sussurar o Alvo"
|
||||
Loc ["STRING_REPORTFRAME_SAY"] = "Dizer"
|
||||
Loc ["STRING_REPORTFRAME_COPY"] = "Copiar e Colar"
|
||||
Loc ["STRING_REPORTFRAME_LINES"] = "Linhas"
|
||||
Loc ["STRING_REPORTFRAME_INSERTNAME"] = "entre com um nome"
|
||||
Loc ["STRING_REPORTFRAME_CURRENT"] = "Mostrando"
|
||||
@@ -421,6 +422,8 @@ if not Loc then return end
|
||||
Loc ["STRING_OPTIONS_HIDECOMBATALPHA_DESC"] = "A janela pode ser completamente escondida ou apenas ficar mais transparente."
|
||||
Loc ["STRING_OPTIONS_PS_ABBREVIATE"] = "PS Abreviacao"
|
||||
Loc ["STRING_OPTIONS_PS_ABBREVIATE_DESC"] = "Escolha o metodo de abreviacao para o Dps e Hps.\n\n|cFFFFFFFFNenhuma|r: sem abreviacao, o numero inteiro e mostrado.\n\n|cFFFFFFFFCem I|r: o numero e reduzido e uma letra indica o valor.\n\n59874 = 59.8K\n100.000 = 100.0K\n19.530.000 = 19.53M\n\n|cFFFFFFFFHundreds II|r: o numero e reduzido e uma letra indica o valor.\n\n59874 = 59.8K\n100.000 = 100K\n19.530.000 = 19.53M"
|
||||
Loc ["STRING_OPTIONS_AUTO_SWITCH"] = "Troca Automatica"
|
||||
Loc ["STRING_OPTIONS_AUTO_SWITCH_DESC"] = "Quando voce entra em combate, esta janela mudara o atributo mostrado para outro atributo ou plugin.\n\nSaindo do combate o atributo antigo volta a ser mostrado."
|
||||
Loc ["STRING_OPTIONS_PS_ABBREVIATE_NONE"] = "Nenhuma"
|
||||
Loc ["STRING_OPTIONS_PS_ABBREVIATE_TOK"] = "Cem I"
|
||||
Loc ["STRING_OPTIONS_PS_ABBREVIATE_TOK2"] = "Cem II"
|
||||
|
||||
@@ -14,6 +14,7 @@ local _ipairs = ipairs --> lua api
|
||||
local _table_sort = table.sort --> lua api
|
||||
local _cstr = string.format --> lua api
|
||||
local _unpack = unpack
|
||||
local RAID_CLASS_COLORS = RAID_CLASS_COLORS
|
||||
|
||||
--> Create the plugin Object
|
||||
local ThreatMeter = _detalhes:NewPluginObject ("Details_Threat")
|
||||
@@ -45,17 +46,10 @@ local function CreatePluginFrames (data)
|
||||
local instance
|
||||
local player
|
||||
|
||||
function _detalhes:FadeOnShow()
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleIcon, "ALPHAANIM", 0.05)
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleText, "ALPHAANIM", 0.05)
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleText2, "IN", 0.5)
|
||||
end
|
||||
|
||||
--> OnEvent Table
|
||||
function ThreatMeter:OnDetailsEvent (event)
|
||||
|
||||
if (event == "HIDE") then --> plugin hidded, disabled
|
||||
ThreatMeterFrame:SetScript ("OnUpdate", nil)
|
||||
ThreatMeter.Actived = false
|
||||
ThreatMeter:Cancel()
|
||||
|
||||
@@ -69,42 +63,24 @@ local function CreatePluginFrames (data)
|
||||
|
||||
ThreatMeter:SizeChanged()
|
||||
|
||||
player = UnitName ("player")
|
||||
ThreatMeterFrame:RegisterEvent ("PLAYER_TARGET_CHANGED")
|
||||
player = GetUnitName ("player", true)
|
||||
|
||||
ThreatMeter.Actived = false
|
||||
_detalhes:ScheduleTimer ("FadeOnShow", 3)
|
||||
|
||||
if (ThreatMeter:IsInCombat()) then
|
||||
if (ThreatMeter:IsInCombat() or UnitAffectingCombat ("player")) then
|
||||
ThreatMeter.Actived = true
|
||||
ThreatMeter:Start()
|
||||
else
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleIcon, 0)
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleText, 0)
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleText2, 0)
|
||||
end
|
||||
|
||||
elseif (event == "REFRESH") then --> requested a refresh window
|
||||
-->
|
||||
|
||||
elseif (event == "COMBAT_PLAYER_ENTER") then --> combat started
|
||||
--print ("ENTER COMBAT - nova tabela")
|
||||
if (IsInGroup() or IsInRaid()) then
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleIcon, 1)
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleText, 1)
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleText2, 1)
|
||||
|
||||
elseif (event == "COMBAT_PLAYER_ENTER") then
|
||||
if (not ThreatMeter.Actived) then
|
||||
ThreatMeter.Actived = true
|
||||
ThreatMeter:Start()
|
||||
end
|
||||
ThreatMeter.Actived = true
|
||||
ThreatMeter:Start()
|
||||
|
||||
elseif (event == "COMBAT_PLAYER_LEAVE") then --> combat ended
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleIcon, "alpha", 0.05)
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleText, "alpha", 0.05)
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleText2, 1)
|
||||
ThreatMeter:End()
|
||||
ThreatMeter.Actived = false
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_ENDRESIZE" or event == "DETAILS_INSTANCE_SIZECHANGED") then
|
||||
ThreatMeter:SizeChanged()
|
||||
ThreatMeter:RefreshRows()
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_STARTSTRETCH") then
|
||||
ThreatMeterFrame:SetFrameStrata ("TOOLTIP")
|
||||
@@ -114,9 +90,14 @@ local function CreatePluginFrames (data)
|
||||
ThreatMeterFrame:SetFrameStrata ("MEDIUM")
|
||||
|
||||
elseif (event == "PLUGIN_DISABLED") then
|
||||
|
||||
ThreatMeterFrame:UnregisterEvent ("PLAYER_TARGET_CHANGED")
|
||||
ThreatMeterFrame:UnregisterEvent ("PLAYER_REGEN_DISABLED")
|
||||
ThreatMeterFrame:UnregisterEvent ("PLAYER_REGEN_ENABLED")
|
||||
|
||||
elseif (event == "PLUGIN_ENABLED") then
|
||||
|
||||
ThreatMeterFrame:RegisterEvent ("PLAYER_TARGET_CHANGED")
|
||||
ThreatMeterFrame:RegisterEvent ("PLAYER_REGEN_DISABLED")
|
||||
ThreatMeterFrame:RegisterEvent ("PLAYER_REGEN_ENABLED")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -129,9 +110,8 @@ local function CreatePluginFrames (data)
|
||||
tile = true, tileSize = 16,
|
||||
insets = {left = 1, right = 1, top = 0, bottom = 1},})
|
||||
ThreatMeterFrame:SetBackdropColor (.3, .3, .3, .3)
|
||||
--]]
|
||||
|
||||
local icon1 = DetailsFrameWork:NewImage (ThreatMeterFrame, nil, nil, "titleIcon", 64, 64, [[Interface\HELPFRAME\HelpIcon-ItemRestoration]])
|
||||
local icon1 = DetailsFrameWork:NewImage (ThreatMeterFrame, nil, nil, "titleIcon", 64, 64, "Interface\\HELPFRAME\\HelpIcon-ItemRestoration")
|
||||
icon1:SetPoint (10, -10)
|
||||
local title = DetailsFrameWork:NewLabel (ThreatMeterFrame, nil, nil, "titleText", "Tiny Threat", "CoreAbilityFont", 26)
|
||||
title:SetPoint ("left", icon1, "right", 2)
|
||||
@@ -140,6 +120,7 @@ local function CreatePluginFrames (data)
|
||||
DetailsFrameWork:Fade (title, 1)
|
||||
local title2 = DetailsFrameWork:NewLabel (ThreatMeterFrame, nil, nil, "titleText2", "A (very) small threat meter.", "GameFontHighlightSmall", 9)
|
||||
title2:SetPoint ("bottomright", title, "bottomright", 0, -10)
|
||||
--]]
|
||||
|
||||
function ThreatMeter:UpdateContainers()
|
||||
for _, row in _ipairs (ThreatMeter.Rows) do
|
||||
@@ -166,7 +147,8 @@ local function CreatePluginFrames (data)
|
||||
local RoleIconCoord = {
|
||||
["TANK"] = {0, 0.28125, 0.328125, 0.625},
|
||||
["HEALER"] = {0.3125, 0.59375, 0, 0.296875},
|
||||
["DAMAGER"] = {0.3125, 0.59375, 0.328125, 0.625}
|
||||
["DAMAGER"] = {0.3125, 0.59375, 0.328125, 0.625},
|
||||
["NONE"] = {0.3125, 0.59375, 0.328125, 0.625}
|
||||
}
|
||||
|
||||
function ThreatMeter:SizeChanged()
|
||||
@@ -197,6 +179,19 @@ local function CreatePluginFrames (data)
|
||||
|
||||
end
|
||||
|
||||
function ThreatMeter:RefreshRow (row)
|
||||
row.textsize = instance.row_info.font_size
|
||||
row.textfont = instance.row_info.font_face
|
||||
row.texture = instance.row_info.texture
|
||||
row.shadow = instance.row_info.textL_outline
|
||||
end
|
||||
|
||||
function ThreatMeter:RefreshRows()
|
||||
for i = 1, #ThreatMeter.Rows do
|
||||
ThreatMeter:RefreshRow (ThreatMeter.Rows [i])
|
||||
end
|
||||
end
|
||||
|
||||
function ThreatMeter:NewRow (i)
|
||||
local newrow = DetailsFrameWork:NewBar (ThreatMeterFrame, _, "DetailsThreatRow"..i, _, 300, 14)
|
||||
newrow:SetPoint (3, -((i-1)*15))
|
||||
@@ -206,7 +201,11 @@ local function CreatePluginFrames (data)
|
||||
newrow.fontface = "GameFontHighlightSmall"
|
||||
newrow:SetIcon ("Interface\\LFGFRAME\\UI-LFG-ICON-PORTRAITROLES", RoleIconCoord ["DAMAGER"])
|
||||
ThreatMeter.Rows [#ThreatMeter.Rows+1] = newrow
|
||||
|
||||
ThreatMeter:RefreshRow (newrow)
|
||||
|
||||
newrow:Hide()
|
||||
|
||||
return newrow
|
||||
end
|
||||
|
||||
@@ -225,52 +224,129 @@ local function CreatePluginFrames (data)
|
||||
thisRow:SetColor ( 1, percent/100, 0, 1)
|
||||
end
|
||||
--]]
|
||||
|
||||
local Threater = function()
|
||||
|
||||
local threat_table = {}
|
||||
|
||||
if (target) then
|
||||
|
||||
if (ThreatMeter.Actived and UnitExists ("target") and not _UnitIsFriend ("player", "target")) then
|
||||
if (_IsInRaid()) then
|
||||
for i = 1, _GetNumGroupMembers(), 1 do
|
||||
|
||||
local thisplayer_name = GetUnitName ("raid"..i, true)
|
||||
local threat_table_index = ThreatMeter.player_list_hash [thisplayer_name]
|
||||
local threat_table = ThreatMeter.player_list_indexes [threat_table_index]
|
||||
|
||||
if (not threat_table) then
|
||||
--> some one joined the group while the player are in combat
|
||||
ThreatMeter:Start()
|
||||
return
|
||||
end
|
||||
|
||||
local isTanking, status, threatpct, rawthreatpct, threatvalue = _UnitDetailedThreatSituation ("raid"..i, "target")
|
||||
if (status) then
|
||||
threat_table [#threat_table+1] = {_UnitName ("raid"..i), threatpct, isTanking}
|
||||
threat_table [2] = threatpct
|
||||
threat_table [3] = isTanking
|
||||
else
|
||||
threat_table [2] = 0
|
||||
threat_table [3] = false
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
elseif (_IsInGroup()) then
|
||||
for i = 1, _GetNumGroupMembers()-1, 1 do
|
||||
local thisplayer_name = GetUnitName ("party"..i, true)
|
||||
local threat_table_index = ThreatMeter.player_list_hash [thisplayer_name]
|
||||
local threat_table = ThreatMeter.player_list_indexes [threat_table_index]
|
||||
|
||||
if (not threat_table) then
|
||||
--> some one joined the group while the player are in combat
|
||||
ThreatMeter:Start()
|
||||
return
|
||||
end
|
||||
|
||||
local isTanking, status, threatpct, rawthreatpct, threatvalue = _UnitDetailedThreatSituation ("party"..i, "target")
|
||||
if (status) then
|
||||
threat_table [#threat_table+1] = {_UnitName ("party"..i), threatpct, isTanking}
|
||||
threat_table [2] = threatpct
|
||||
threat_table [3] = isTanking
|
||||
else
|
||||
threat_table [2] = 0
|
||||
threat_table [3] = false
|
||||
end
|
||||
end
|
||||
|
||||
local thisplayer_name = GetUnitName ("player", true)
|
||||
local threat_table_index = ThreatMeter.player_list_hash [thisplayer_name]
|
||||
local threat_table = ThreatMeter.player_list_indexes [threat_table_index]
|
||||
|
||||
local isTanking, status, threatpct, rawthreatpct, threatvalue = _UnitDetailedThreatSituation ("player", "target")
|
||||
if (status) then
|
||||
threat_table [2] = threatpct
|
||||
threat_table [3] = isTanking
|
||||
else
|
||||
threat_table [2] = 0
|
||||
threat_table [3] = false
|
||||
end
|
||||
|
||||
else
|
||||
local thisplayer_name = GetUnitName ("player", true)
|
||||
local threat_table_index = ThreatMeter.player_list_hash [thisplayer_name]
|
||||
local threat_table = ThreatMeter.player_list_indexes [threat_table_index]
|
||||
|
||||
local isTanking, status, threatpct, rawthreatpct, threatvalue = _UnitDetailedThreatSituation ("player", "target")
|
||||
if (status) then
|
||||
threat_table [2] = threatpct
|
||||
threat_table [3] = isTanking
|
||||
else
|
||||
threat_table [2] = 0
|
||||
threat_table [3] = false
|
||||
end
|
||||
end
|
||||
|
||||
_table_sort (threat_table, sort)
|
||||
--> sort
|
||||
_table_sort (ThreatMeter.player_list_indexes, sort)
|
||||
for index, t in _ipairs (ThreatMeter.player_list_indexes) do
|
||||
ThreatMeter.player_list_hash [t[1]] = index
|
||||
end
|
||||
|
||||
--> no threat on this enemy
|
||||
if (ThreatMeter.player_list_indexes [1] [2] < 1) then
|
||||
ThreatMeter:HideBars()
|
||||
return
|
||||
end
|
||||
|
||||
--and ThreatMeter.player_list_indexes [1] [2] > 0
|
||||
-- ThreatMeter.player_list_indexes = {}
|
||||
-- ThreatMeter.player_list_hash = {}
|
||||
|
||||
local lastIndex = 0
|
||||
local shownMe = false
|
||||
|
||||
for index = 1, #ThreatMeter.ShownRows do
|
||||
local thisRow = ThreatMeter.ShownRows [index]
|
||||
local threat_actor = threat_table [index]
|
||||
local threat_actor = ThreatMeter.player_list_indexes [index]
|
||||
|
||||
if (threat_actor) then
|
||||
local role = _UnitGroupRolesAssigned (threat_actor [1])
|
||||
thisRow.icon:SetTexCoord (_unpack (RoleIconCoord [role]))
|
||||
local role = threat_actor [4]
|
||||
thisRow._icon:SetTexCoord (_unpack (RoleIconCoord [role]))
|
||||
|
||||
--local color = RAID_CLASS_COLORS [threat_actor [5]]
|
||||
--thisRow.textleft:SetTextColor (color.r, color.g, color.b)
|
||||
|
||||
thisRow:SetLeftText (threat_actor [1])
|
||||
thisRow:SetRightText (_cstr ("%.1f", threat_actor [2]).."%")
|
||||
thisRow:SetValue (threat_actor [2])
|
||||
|
||||
local pct = threat_actor [2]
|
||||
|
||||
thisRow:SetRightText (_cstr ("%.1f", pct).."%")
|
||||
thisRow:SetValue (pct)
|
||||
|
||||
if (index == 1) then
|
||||
thisRow:SetColor (threat_actor [2]*0.01, math.abs (threat_actor [2]-100)*0.01, 0, 1)
|
||||
thisRow:SetColor (pct*0.01, math.abs (pct-100)*0.01, 0, 1)
|
||||
else
|
||||
thisRow:SetColor (threat_actor [2]*0.01, math.abs (threat_actor [2]-100)*0.01, 0, .3)
|
||||
local percent = threat_actor [2]
|
||||
if (percent >= 50) then
|
||||
thisRow:SetColor ( 1, math.abs (percent - 100)/100, 0, 1)
|
||||
thisRow:SetColor (pct*0.01, math.abs (pct-100)*0.01, 0, .3)
|
||||
if (pct >= 50) then
|
||||
thisRow:SetColor ( 1, math.abs (pct - 100)/100, 0, 1)
|
||||
else
|
||||
thisRow:SetColor ( percent/100, 1, 0, 1)
|
||||
thisRow:SetColor (pct/100, 1, 0, 1)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -287,15 +363,18 @@ local function CreatePluginFrames (data)
|
||||
|
||||
if (not shownMe) then
|
||||
--> show my self into last bar
|
||||
local isTanking, status, threatpct, rawthreatpct, threatvalue = _UnitDetailedThreatSituation ("player", "target")
|
||||
if (threatpct and threatpct > 0.1) then
|
||||
local thisRow = ThreatMeter.ShownRows [#ThreatMeter.ShownRows]
|
||||
thisRow:SetLeftText (player)
|
||||
local role = _UnitGroupRolesAssigned (player)
|
||||
thisRow.icon:SetTexCoord (_unpack (RoleIconCoord [role]))
|
||||
thisRow:SetRightText (_cstr ("%.1f", threatpct).."%")
|
||||
thisRow:SetValue (threatpct)
|
||||
thisRow:SetColor (threatpct*0.01, math.abs (threatpct-100)*0.01, 0, .3)
|
||||
local threat_actor = ThreatMeter.player_list_indexes [ ThreatMeter.player_list_hash [player] ]
|
||||
if (threat_actor) then
|
||||
if (threat_actor [2] and threat_actor [2] > 0.1) then
|
||||
local thisRow = ThreatMeter.ShownRows [#ThreatMeter.ShownRows]
|
||||
thisRow:SetLeftText (player)
|
||||
--thisRow.textleft:SetTextColor (unpack (RAID_CLASS_COLORS [threat_actor [5]]))
|
||||
local role = threat_actor [4]
|
||||
thisRow._icon:SetTexCoord (_unpack (RoleIconCoord [role]))
|
||||
thisRow:SetRightText (_cstr ("%.1f", threat_actor [2]).."%")
|
||||
thisRow:SetValue (threat_actor [2])
|
||||
thisRow:SetColor (threat_actor [2]*0.01, math.abs (threat_actor [2]-100)*0.01, 0, .3)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -318,35 +397,78 @@ local function CreatePluginFrames (data)
|
||||
end
|
||||
end
|
||||
|
||||
local OnUpdate = function (self, elapsed)
|
||||
timer = timer + elapsed
|
||||
if (timer > interval) then
|
||||
timer = 0
|
||||
--if (_IsInRaid() or _IsInGroup()) then
|
||||
--print ("aqui")
|
||||
Threater()
|
||||
--end
|
||||
end
|
||||
function ThreatMeter:Tick()
|
||||
Threater()
|
||||
end
|
||||
|
||||
function ThreatMeter:Start()
|
||||
ThreatMeter:HideBars()
|
||||
if (ThreatMeter.Actived) then
|
||||
if (_IsInRaid() or _IsInGroup()) then
|
||||
--print ("Iniciando analizador de Threat")
|
||||
ThreatMeterFrame:SetScript ("OnUpdate", OnUpdate)
|
||||
if (ThreatMeter.job_thread) then
|
||||
ThreatMeter:CancelTimer (ThreatMeter.job_thread)
|
||||
ThreatMeter.job_thread = nil
|
||||
end
|
||||
|
||||
ThreatMeter.player_list_indexes = {}
|
||||
ThreatMeter.player_list_hash = {}
|
||||
|
||||
--> pre build player list
|
||||
if (_IsInRaid()) then
|
||||
for i = 1, _GetNumGroupMembers(), 1 do
|
||||
local thisplayer_name = GetUnitName ("raid"..i, true)
|
||||
local role = _UnitGroupRolesAssigned (thisplayer_name)
|
||||
local _, class = UnitClass (thisplayer_name)
|
||||
local t = {thisplayer_name, 0, false, role, class}
|
||||
ThreatMeter.player_list_indexes [#ThreatMeter.player_list_indexes+1] = t
|
||||
ThreatMeter.player_list_hash [thisplayer_name] = #ThreatMeter.player_list_indexes
|
||||
end
|
||||
|
||||
elseif (_IsInGroup()) then
|
||||
for i = 1, _GetNumGroupMembers()-1, 1 do
|
||||
local thisplayer_name = GetUnitName ("party"..i, true)
|
||||
local role = _UnitGroupRolesAssigned (thisplayer_name)
|
||||
local _, class = UnitClass (thisplayer_name)
|
||||
local t = {thisplayer_name, 0, false, role, class}
|
||||
ThreatMeter.player_list_indexes [#ThreatMeter.player_list_indexes+1] = t
|
||||
ThreatMeter.player_list_hash [thisplayer_name] = #ThreatMeter.player_list_indexes
|
||||
end
|
||||
local thisplayer_name = GetUnitName ("player", true)
|
||||
local role = _UnitGroupRolesAssigned (thisplayer_name)
|
||||
local _, class = UnitClass (thisplayer_name)
|
||||
local t = {thisplayer_name, 0, false, role, class}
|
||||
ThreatMeter.player_list_indexes [#ThreatMeter.player_list_indexes+1] = t
|
||||
ThreatMeter.player_list_hash [thisplayer_name] = #ThreatMeter.player_list_indexes
|
||||
|
||||
else
|
||||
local thisplayer_name = GetUnitName ("player", true)
|
||||
local role = _UnitGroupRolesAssigned (thisplayer_name)
|
||||
local _, class = UnitClass (thisplayer_name)
|
||||
local t = {thisplayer_name, 0, false, role, class}
|
||||
ThreatMeter.player_list_indexes [#ThreatMeter.player_list_indexes+1] = t
|
||||
ThreatMeter.player_list_hash [thisplayer_name] = #ThreatMeter.player_list_indexes
|
||||
|
||||
end
|
||||
|
||||
local job_thread = ThreatMeter:ScheduleRepeatingTimer ("Tick", 1)
|
||||
ThreatMeter.job_thread = job_thread
|
||||
end
|
||||
end
|
||||
|
||||
function ThreatMeter:End()
|
||||
--print ("=== COMBAT LEAVE ===")
|
||||
ThreatMeter:HideBars()
|
||||
ThreatMeterFrame:SetScript ("OnEvent", nil)
|
||||
if (ThreatMeter.job_thread) then
|
||||
ThreatMeter:CancelTimer (ThreatMeter.job_thread)
|
||||
ThreatMeter.job_thread = nil
|
||||
end
|
||||
end
|
||||
|
||||
function ThreatMeter:Cancel()
|
||||
ThreatMeter:HideBars()
|
||||
if (ThreatMeter.job_thread) then
|
||||
ThreatMeter:CancelTimer (ThreatMeter.job_thread)
|
||||
ThreatMeter.job_thread = nil
|
||||
end
|
||||
ThreatMeter.Actived = false
|
||||
end
|
||||
|
||||
end
|
||||
@@ -355,7 +477,17 @@ function ThreatMeter:OnEvent (_, event, ...)
|
||||
|
||||
if (event == "PLAYER_TARGET_CHANGED") then
|
||||
ThreatMeter:TargetChanged()
|
||||
|
||||
elseif (event == "PLAYER_REGEN_DISABLED") then
|
||||
ThreatMeter.Actived = true
|
||||
ThreatMeter:Start()
|
||||
--print ("tiny theat: regen disabled")
|
||||
|
||||
elseif (event == "PLAYER_REGEN_ENABLED") then
|
||||
ThreatMeter:End()
|
||||
ThreatMeter.Actived = false
|
||||
--print ("tiny theat: regen enabled")
|
||||
|
||||
elseif (event == "ADDON_LOADED") then
|
||||
local AddonName = select (1, ...)
|
||||
if (AddonName == "Details_TinyThreat") then
|
||||
@@ -382,6 +514,8 @@ function ThreatMeter:OnEvent (_, event, ...)
|
||||
_G._detalhes:RegisterEvent (ThreatMeter, "DETAILS_INSTANCE_ENDSTRETCH")
|
||||
|
||||
ThreatMeterFrame:RegisterEvent ("PLAYER_TARGET_CHANGED")
|
||||
ThreatMeterFrame:RegisterEvent ("PLAYER_REGEN_DISABLED")
|
||||
ThreatMeterFrame:RegisterEvent ("PLAYER_REGEN_ENABLED")
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -486,13 +486,13 @@ local function CreatePluginFrames (data)
|
||||
--> members can be found at details/classes/classe_damage line 75
|
||||
local avoidance = actorDamage.avoidance --> table with DODGE, PARRY, HITS members
|
||||
|
||||
local totalAvoid = avoidance.DODGE + avoidance.PARRY
|
||||
local totalOver = totalAvoid + avoidance.HITS
|
||||
local totalAvoid = avoidance.overall.DODGE + avoidance.overall.PARRY
|
||||
local totalOver = totalAvoid + avoidance.overall.HITS
|
||||
|
||||
if (totalOver > 0) then
|
||||
hitsReceivedAmount.text = avoidance.HITS .. " (" .. _math_floor (avoidance.HITS / totalOver * 100) .. "%)"
|
||||
dodgeAmount.text = avoidance.DODGE .. " (" .. _math_floor (avoidance.DODGE / totalOver * 100) .. "%)"
|
||||
parryAmount.text = avoidance.PARRY .. " (" .. _math_floor (avoidance.PARRY / totalOver * 100) .. "%)"
|
||||
hitsReceivedAmount.text = avoidance.overall.HITS .. " (" .. _math_floor (avoidance.overall.HITS / totalOver * 100) .. "%)"
|
||||
dodgeAmount.text = avoidance.overall.DODGE .. " (" .. _math_floor (avoidance.overall.DODGE / totalOver * 100) .. "%)"
|
||||
parryAmount.text = avoidance.overall.PARRY .. " (" .. _math_floor (avoidance.overall.PARRY / totalOver * 100) .. "%)"
|
||||
else
|
||||
hitsReceivedAmount.text = "0 (0%)"
|
||||
dodgeAmount.text = "0 (0%)"
|
||||
@@ -1003,21 +1003,21 @@ local function CreatePluginFrames (data)
|
||||
|
||||
--> capture the amount of hits and avoids
|
||||
|
||||
_table_insert (hits_taken, 1, _track_player_object.avoidance.HITS - hits_last)
|
||||
hits_now = hits_now + (_track_player_object.avoidance.HITS - hits_last)
|
||||
_table_insert (hits_taken, 1, _track_player_object.avoidance.overall.HITS - hits_last)
|
||||
hits_now = hits_now + (_track_player_object.avoidance.overall.HITS - hits_last)
|
||||
if (#hits_taken > 10) then
|
||||
hits_now = hits_now - hits_taken [11]
|
||||
_table_remove (hits_taken, 11)
|
||||
end
|
||||
hits_last = _track_player_object.avoidance.HITS
|
||||
hits_last = _track_player_object.avoidance.overall.HITS
|
||||
|
||||
_table_insert (avoid_taken, 1, _track_player_object.avoidance.DODGE + _track_player_object.avoidance.PARRY - avoid_last)
|
||||
avoid_now = avoid_now + (_track_player_object.avoidance.DODGE + _track_player_object.avoidance.PARRY - avoid_last)
|
||||
_table_insert (avoid_taken, 1, _track_player_object.avoidance.overall.DODGE + _track_player_object.avoidance.overall.PARRY - avoid_last)
|
||||
avoid_now = avoid_now + (_track_player_object.avoidance.overall.DODGE + _track_player_object.avoidance.overall.PARRY - avoid_last)
|
||||
if (#avoid_taken > 10) then
|
||||
avoid_now = avoid_now - avoid_taken [11]
|
||||
_table_remove (avoid_taken, 11)
|
||||
end
|
||||
avoid_last = _track_player_object.avoidance.DODGE + _track_player_object.avoidance.PARRY
|
||||
avoid_last = _track_player_object.avoidance.overall.DODGE + _track_player_object.avoidance.overall.PARRY
|
||||
|
||||
--> compute the hits vs avoid
|
||||
|
||||
@@ -1155,6 +1155,12 @@ local function CreatePluginFrames (data)
|
||||
|
||||
_track_player_name = MyTarget
|
||||
|
||||
local role = UnitGroupRolesAssigned (_track_player_name)
|
||||
if (role ~= "TANK") then
|
||||
_detalhes:ScheduleTimer ("VanguardWait", 1)
|
||||
return
|
||||
end
|
||||
|
||||
if (VanguardFrame.InfoShown) then
|
||||
Vanguard:VanguardRefreshInfoFrame()
|
||||
end
|
||||
@@ -1168,6 +1174,12 @@ local function CreatePluginFrames (data)
|
||||
|
||||
_track_player_name = MyName
|
||||
|
||||
local role = UnitGroupRolesAssigned (_track_player_name)
|
||||
if (role ~= "TANK") then
|
||||
_detalhes:ScheduleTimer ("VanguardWait", 1)
|
||||
return
|
||||
end
|
||||
|
||||
if (VanguardFrame.InfoShown) then
|
||||
Vanguard:VanguardRefreshInfoFrame()
|
||||
end
|
||||
|
||||
@@ -171,7 +171,7 @@ local function CreatePluginFrames()
|
||||
if (data[3] and type (data [1]) == "boolean") then --> is a real damage, not a battle ress and its not a last cooldown line
|
||||
bar.statusbar.textleft:SetText (string.format ("%.1f", data [4] - time_of_death) .. "s " .. spellname .. " (" .. data [6] .. ")")
|
||||
bar.statusbar.textright:SetText ("-" .. YouAreNotPrepared:ToK (data [3]) .. " (" .. hp .. "%)")
|
||||
bar.statusbar.icon:SetTexture (icon)
|
||||
bar.statusbar._icon:SetTexture (icon)
|
||||
bar.statusbar.color = "red"
|
||||
bar.statusbar.background:SetVertexColor (1, 0, 0, .2)
|
||||
bar.statusbar.textleft:SetWidth (250 - bar.statusbar.textright:GetStringWidth() - 20)
|
||||
@@ -181,7 +181,7 @@ local function CreatePluginFrames()
|
||||
else
|
||||
bar.statusbar.textleft:SetText (string.format ("%.1f", data [4] - time_of_death) .. "s " .. spellname .. " (" .. data [6] .. ")")
|
||||
bar.statusbar.textright:SetText ("+" .. YouAreNotPrepared:ToK (data [3]) .. " (" .. hp .. "%)")
|
||||
bar.statusbar.icon:SetTexture (icon)
|
||||
bar.statusbar._icon:SetTexture (icon)
|
||||
bar.statusbar.color = "green"
|
||||
bar.statusbar.background:SetVertexColor (0, 1, 0, .2)
|
||||
bar.statusbar.textleft:SetWidth (250 - bar.statusbar.textright:GetStringWidth() - 20)
|
||||
|
||||
+103
-4
@@ -7,9 +7,10 @@
|
||||
|
||||
function _G._detalhes:Start()
|
||||
|
||||
-- slider de scale nas opções
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> details defaults
|
||||
|
||||
_detalhes.debug = false
|
||||
local _
|
||||
--> who is
|
||||
@@ -177,7 +178,7 @@ function _G._detalhes:Start()
|
||||
self.garbagecollect = self:ScheduleRepeatingTimer ("IniciarColetaDeLixo", self.intervalo_coleta)
|
||||
self.memorycleanup = self:ScheduleRepeatingTimer ("CheckMemoryPeriodically", self.intervalo_memoria)
|
||||
self.next_memory_check = time()+self.intervalo_memoria
|
||||
|
||||
|
||||
--> start parser
|
||||
|
||||
--> load parser capture options
|
||||
@@ -242,7 +243,7 @@ function _G._detalhes:Start()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if (self.tutorial.version_announce < 4) then
|
||||
self:ScheduleTimer ("AnnounceVersion", 20)
|
||||
self.tutorial.version_announce = self.tutorial.version_announce + 1
|
||||
@@ -253,6 +254,10 @@ function _G._detalhes:Start()
|
||||
instancia._version:SetText ("Details! Alpha " .. _detalhes.userversion .. " (core: " .. self.realversion .. ")")
|
||||
instancia._version:SetPoint ("bottomleft", instancia.baseframe, "bottomleft", 0, 1)
|
||||
self.gump:Fade (instancia._version, "in", 10)
|
||||
|
||||
if (instancia.auto_switch_to_old) then
|
||||
instancia:SwitchBack()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -288,10 +293,102 @@ function _G._detalhes:Start()
|
||||
|
||||
--_detalhes:OpenWelcomeWindow()
|
||||
|
||||
if (self.tutorial.logons < 5) then
|
||||
if (self.tutorial.logons < 2) then
|
||||
self:StartTutorial()
|
||||
end
|
||||
|
||||
--> feedback trhead
|
||||
if (self.tutorial.logons > 100 and self.tutorial.logons < 104) then
|
||||
|
||||
if (not self.tutorial.feedback_window1) then
|
||||
self.tutorial.feedback_window1 = true
|
||||
|
||||
local feedback_frame = CreateFrame ("FRAME", "DetailsFeedbackWindow", UIParent, "ButtonFrameTemplate")
|
||||
tinsert (UISpecialFrames, "DetailsFeedbackWindow")
|
||||
feedback_frame:SetPoint ("center", UIParent, "center")
|
||||
feedback_frame:SetSize (512, 200)
|
||||
feedback_frame.portrait:SetTexture ([[Interface\CHARACTERFRAME\TEMPORARYPORTRAIT-FEMALE-GNOME]])
|
||||
|
||||
feedback_frame.TitleText:SetText ("Details! Need Your Help!")
|
||||
|
||||
feedback_frame.uppertext = feedback_frame:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
feedback_frame.uppertext:SetText ("Tell us about your experience using Details!, what you liked most, where we could improve, what things you want to see in the future?")
|
||||
feedback_frame.uppertext:SetPoint ("topleft", feedback_frame, "topleft", 60, -32)
|
||||
local font, _, flags = feedback_frame.uppertext:GetFont()
|
||||
feedback_frame.uppertext:SetFont (font, 10, flags)
|
||||
feedback_frame.uppertext:SetTextColor (1, 1, 1, .8)
|
||||
feedback_frame.uppertext:SetWidth (440)
|
||||
|
||||
|
||||
local editbox = _detalhes.gump:NewTextEntry (feedback_frame, nil, "$parentTextEntry", "text", 387, 14)
|
||||
editbox:SetPoint (20, -106)
|
||||
editbox:SetAutoFocus (false)
|
||||
editbox:SetHook ("OnEditFocusGained", function()
|
||||
editbox.text = "http://www.mmo-champion.com/threads/1480721-New-damage-meter-%28Details!%29-need-help-with-tests-and-feedbacks"
|
||||
editbox:HighlightText()
|
||||
end)
|
||||
editbox:SetHook ("OnEditFocusLost", function()
|
||||
editbox.text = "http://www.mmo-champion.com/threads/1480721-New-damage-meter-%28Details!%29-need-help-with-tests-and-feedbacks"
|
||||
editbox:HighlightText()
|
||||
end)
|
||||
editbox:SetHook ("OnChar", function()
|
||||
editbox.text = "http://www.mmo-champion.com/threads/1480721-New-damage-meter-%28Details!%29-need-help-with-tests-and-feedbacks"
|
||||
editbox:HighlightText()
|
||||
end)
|
||||
editbox.text = "http://www.mmo-champion.com/threads/1480721-New-damage-meter-%28Details!%29-need-help-with-tests-and-feedbacks"
|
||||
|
||||
|
||||
feedback_frame.midtext = feedback_frame:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
feedback_frame.midtext:SetText ("visit the link above and let's make Details! stronger!")
|
||||
feedback_frame.midtext:SetPoint ("center", editbox.widget, "center")
|
||||
feedback_frame.midtext:SetPoint ("top", editbox.widget, "bottom", 0, -2)
|
||||
feedback_frame.midtext:SetJustifyH ("center")
|
||||
local font, _, flags = feedback_frame.midtext:GetFont()
|
||||
feedback_frame.midtext:SetFont (font, 10, flags)
|
||||
--feedback_frame.midtext:SetTextColor (1, 1, 1, 1)
|
||||
feedback_frame.midtext:SetWidth (440)
|
||||
|
||||
|
||||
feedback_frame.gnoma = feedback_frame:CreateTexture (nil, "artwork")
|
||||
feedback_frame.gnoma:SetPoint ("topright", feedback_frame, "topright", -1, -59)
|
||||
feedback_frame.gnoma:SetTexture ("Interface\\AddOns\\Details\\images\\icons2")
|
||||
feedback_frame.gnoma:SetSize (105*1.05, 107*1.05)
|
||||
feedback_frame.gnoma:SetTexCoord (0.2021484375, 0, 0.7919921875, 1)
|
||||
|
||||
feedback_frame.close = CreateFrame ("Button", "DetailsFeedbackWindowCloseButton", feedback_frame, "OptionsButtonTemplate")
|
||||
feedback_frame.close:SetPoint ("bottomleft", feedback_frame, "bottomleft", 8, 4)
|
||||
feedback_frame.close:SetText ("Close")
|
||||
feedback_frame.close:SetScript ("OnClick", function (self)
|
||||
editbox:ClearFocus()
|
||||
feedback_frame:Hide()
|
||||
end)
|
||||
|
||||
feedback_frame.postpone = CreateFrame ("Button", "DetailsFeedbackWindowPostPoneButton", feedback_frame, "OptionsButtonTemplate")
|
||||
feedback_frame.postpone:SetPoint ("bottomright", feedback_frame, "bottomright", -10, 4)
|
||||
feedback_frame.postpone:SetText ("Remind-me Later")
|
||||
feedback_frame.postpone:SetScript ("OnClick", function (self)
|
||||
editbox:ClearFocus()
|
||||
feedback_frame:Hide()
|
||||
_detalhes.tutorial.feedback_window1 = false
|
||||
end)
|
||||
feedback_frame.postpone:SetWidth (130)
|
||||
|
||||
feedback_frame:SetScript ("OnHide", function()
|
||||
editbox:ClearFocus()
|
||||
end)
|
||||
|
||||
--0.0009765625 512
|
||||
function _detalhes:FeedbackSetFocus()
|
||||
DetailsFeedbackWindow:Show()
|
||||
DetailsFeedbackWindowTextEntry.MyObject:SetFocus()
|
||||
DetailsFeedbackWindowTextEntry.MyObject:HighlightText()
|
||||
end
|
||||
_detalhes:ScheduleTimer ("FeedbackSetFocus", 5)
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
if (self.is_version_first_run) then
|
||||
local lower_instance = _detalhes:GetLowerInstanceNumber()
|
||||
if (lower_instance) then
|
||||
@@ -569,5 +666,7 @@ function _G._detalhes:Start()
|
||||
|
||||
f:Hide()
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user