- Mode menu now have a sub menu for raid plugins.

- Red and Green colors under comparison frame has been inverted.
- Fixed some report issues with dps and hps, also almost all reports now have guide lines.
- Fixed DPS and HPS bug involving 'Everything Mode'.
- NewAPI: ActorObject:GetBarColor() return the color in r, b, g which the actor's bar should be filled.
This commit is contained in:
tercio
2014-06-13 22:32:10 -03:00
parent 73c62f0626
commit 1bf2d2fe8c
22 changed files with 745 additions and 339 deletions
+43 -2
View File
@@ -8,7 +8,7 @@
_ = nil
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0", "LibHotCorners")
_detalhes.userversion = "v1.16.1"
_detalhes.userversion = "v1.16.3"
_detalhes.version = "Alpha 019"
_detalhes.realversion = 19
@@ -30,6 +30,7 @@ do
--> containers
--> armazenas as funções do parser - All parse functions
_detalhes.parser = {}
_detalhes.parser_functions = {}
_detalhes.parser_frame = CreateFrame ("Frame", nil, _UIParent)
_detalhes.parser_frame:Hide()
--> armazena os escudos - Shields information for absorbs
@@ -61,8 +62,27 @@ do
--> armazena os hooks das funções do parser
_detalhes.hooks = {}
--> informações sobre a luta do boss atual
_detalhes.encounter_end_table = {}
_detalhes.encounter_table = {}
--> informações sobre a arena atual
_detalhes.arena_table = {}
_detalhes.arena_info = {
[562] = {file = "LoadScreenBladesEdgeArena", coords = {0, 1, 0.29296875, 0.9375}}, -- Circle of Blood Arena
[617] = {file = "LoadScreenDalaranSewersArena", coords = {0, 1, 0.29296875, 0.857421875}}, --Dalaran Arena
[559] = {file = "LoadScreenNagrandArenaBattlegrounds", coords = {0, 1, 0.341796875, 1}}, --Ring of Trials
[980] = {file = "LoadScreenTolvirArena", coords = {0, 1, 0.29296875, 0.857421875}}, --Tol'Viron Arena
[572] = {file = "LoadScreenRuinsofLordaeronBattlegrounds", coords = {0, 1, 0.341796875, 1}}, --Ruins of Lordaeron
[1134] = {file = "LoadingScreen_Shadowpan_bg", coords = {0, 1, 0.29296875, 0.857421875}}, -- Tiger's Peak
--"LoadScreenOrgrimmarArena", --Ring of Valor
}
function _detalhes:GetArenaInfo (mapid)
local t = _detalhes.arena_info [mapid]
if (t) then
return t.file, t.coords
end
end
--> Plugins
--> raid -------------------------------------------------------------------
--> general function for raid mode plugins
@@ -147,6 +167,27 @@ do
colocacao = ". " --> dot
}
_detalhes.role_texcoord = {
DAMAGER = "72:130:69:127",
HEALER = "72:130:2:60",
TANK = "5:63:69:127",
NONE = "139:196:69:127",
}
_detalhes.player_class = {
["HUNTER"] = true,
["WARRIOR"] = true,
["PALADIN"] = true,
["SHAMAN"] = true,
["MAGE"] = true,
["ROGUE"] = true,
["PRIEST"] = true,
["WARLOCK"] = true,
["DRUID"] = true,
["MONK"] = true,
["DEATHKNIGHT"] = true,
}
local Loc = LibStub ("AceLocale-3.0"):GetLocale ("Details")
_detalhes.segmentos = {
+59 -42
View File
@@ -53,6 +53,7 @@
local TooltipMaximizedMethod = 1
local CLASS_ICON_TCOORDS = _G.CLASS_ICON_TCOORDS
local is_player_class = _detalhes.player_class
local key_overlay = {1, 1, 1, .1}
local key_overlay_press = {1, 1, 1, .2}
@@ -193,6 +194,30 @@
return table1 [4] > table2 [4]
end
--[[exported]] function _detalhes:GetBarColor (actor)
actor = actor or self
if (actor.owner) then
return _unpack (_detalhes.class_colors [actor.owner.classe])
elseif (actor.monster) then
return _unpack (_detalhes.class_colors.ENEMY)
elseif (actor.arena_enemy) then
return _unpack (_detalhes.class_colors.ARENA_ENEMY)
elseif (actor.arena_ally) then
return _unpack (_detalhes.class_colors.ARENA_ALLY)
else
if (not is_player_class [actor.classe] and _bit_band (actor.flag_original, 0x00000020) ~= 0) then --> neutral
return _unpack (_detalhes.class_colors.NEUTRAL)
else
return _unpack (_detalhes.class_colors [actor.classe])
end
end
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> internals
@@ -251,6 +276,9 @@
-- dps (calculate dps for actors)
function atributo_damage:ContainerRefreshDps (container, combat_time)
local total = 0
if (_detalhes.time_type == 2 or not _detalhes:CaptureGet ("damage")) then
for _, actor in _ipairs (container) do
if (actor.grupo) then
@@ -258,13 +286,17 @@
else
actor.last_dps = actor.total / actor:Tempo()
end
total = total + actor.last_dps
end
else
for _, actor in _ipairs (container) do
actor.last_dps = actor.total / actor:Tempo()
total = total + actor.last_dps
end
end
end
return total
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> frags
@@ -803,22 +835,20 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
--> grava o total
instancia.top = conteudo[1][keyName]
--print ("aqui", amount, total, instancia.top)
elseif (modo == modo_ALL) then --> mostrando ALL
--> faz o sort da categoria e retorna o amount corrigido
--print (keyName)
if (sub_atributo == 2) then
local combat_time = instancia.showing:GetCombatTime()
atributo_damage:ContainerRefreshDps (conteudo, combat_time)
total = atributo_damage:ContainerRefreshDps (conteudo, combat_time)
else
--> pega o total ja aplicado na tabela do combate
total = tabela_do_combate.totals [class_type]
end
amount = _detalhes:ContainerSort (conteudo, amount, keyName)
--> pega o total ja aplicado na tabela do combate
total = tabela_do_combate.totals [class_type]
--> grava o total
instancia.top = conteudo[1][keyName]
@@ -864,7 +894,6 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
_table_sort (conteudo, _detalhes.SortKeyGroup)
end
--
if (not using_cache) then
for index, player in _ipairs (conteudo) do
if (player.grupo) then --> é um player e esta em grupo
@@ -882,6 +911,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
end
end
end
end
end
@@ -891,7 +921,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
end
if (exportar) then
return total, keyName, instancia.top
return total, keyName, instancia.top, amount
end
if (amount < 1) then --> não há barras para mostrar
@@ -1242,19 +1272,7 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
forcar = true
end
if (self.owner) then
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.owner.classe])
elseif (self.monster) then
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors.ENEMY)
else
if (_bit_band (self.flag_original, 0x00000020) ~= 0) then --> neutral
actor_class_color_r, actor_class_color_g, actor_class_color_b = 1, 1, 0
else
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.classe])
end
end
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
return self:RefreshBarra2 (esta_barra, instancia, tabela_anterior, forcar, esta_porcentagem, qual_barra, barras_container)
@@ -1334,17 +1352,7 @@ end
--[[ exported]] function _detalhes:RefreshBarra (esta_barra, instancia, from_resize)
if (from_resize) then
if (self.owner) then
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.owner.classe])
elseif (self.monster) then
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors.ENEMY)
else
if (_bit_band (self.flag_original, 0x00000020) ~= 0) then --> neutral
actor_class_color_r, actor_class_color_g, actor_class_color_b = 1, 1, 0
else
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.classe])
end
end
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
end
if (instancia.row_info.texture_class_colors) then
@@ -1389,19 +1397,28 @@ end
esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe])) --very slow method
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
end
if (self.enemy) then
if (_detalhes.faction_against == "Horde") then
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA
if (self.arena_enemy) then
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao .. ".|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
else
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY
end
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (0.94117, 0, 0.01960, 1)
if (_detalhes.faction_against == "Horde") then
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA
else
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY
end
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (0.94117, 0, 0.01960, 1)
end
end
else
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". "..self.displayName) --seta o texto da esqueda
if (self.arena_ally) then
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao .. ".|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
else
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". "..self.displayName) --seta o texto da esqueda
end
end
if (instancia.row_info.textL_class_colors) then
+19 -18
View File
@@ -453,11 +453,7 @@ function atributo_energy:AtualizaBarra (instancia, barras_container, qual_barra,
gump:UpdateTooltip (qual_barra, esta_barra, instancia)
end
if (self.owner) then
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.owner.classe])
else
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.classe])
end
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
return self:RefreshBarra2 (esta_barra, instancia, tabela_anterior, forcar, esta_porcentagem, qual_barra, barras_container)
end
@@ -536,11 +532,7 @@ end
function atributo_energy:RefreshBarra (esta_barra, instancia, from_resize)
if (from_resize) then
if (self.owner) then
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.owner.classe])
else
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.classe])
end
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
end
if (instancia.row_info.texture_class_colors) then
@@ -587,17 +579,26 @@ function atributo_energy:RefreshBarra (esta_barra, instancia, from_resize)
end
if (self.enemy) then
if (_detalhes.faction_against == "Horde") then
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA
if (self.arena_enemy) then
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao .. ".|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
else
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY
end
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (240/255, 0, 5/255, 1)
if (_detalhes.faction_against == "Horde") then
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA
else
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY
end
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (0.94117, 0, 0.01960, 1)
end
end
else
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". "..self.displayName) --seta o texto da esqueda
if (self.arena_ally) then
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao .. ".|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
else
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". "..self.displayName) --seta o texto da esqueda
end
end
if (instancia.row_info.textL_class_colors) then
+32 -21
View File
@@ -160,6 +160,8 @@ end
function atributo_heal:ContainerRefreshHps (container, combat_time)
local total = 0
if (_detalhes.time_type == 2 or not _detalhes:CaptureGet ("heal")) then
for _, actor in _ipairs (container) do
if (actor.grupo) then
@@ -167,13 +169,16 @@ function atributo_heal:ContainerRefreshHps (container, combat_time)
else
actor.last_hps = actor.total / actor:Tempo()
end
total = total + actor.last_hps
end
else
for _, actor in _ipairs (container) do
actor.last_hps = actor.total / actor:Tempo()
total = total + actor.last_hps
end
end
return total
end
function atributo_heal:ReportSingleDamagePreventedLine (actor, instancia)
@@ -264,9 +269,14 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
amount = _detalhes:ContainerSortHeal (conteudo, amount, keyName)
--> pega o total ja aplicado na tabela do combate
total = tabela_do_combate.totals [class_type]
if (sub_atributo == 2) then --hps
local combat_time = instancia.showing:GetCombatTime()
total = atributo_heal:ContainerRefreshHps (conteudo, combat_time)
else
--> pega o total ja aplicado na tabela do combate
total = tabela_do_combate.totals [class_type]
end
--> grava o total
instancia.top = conteudo[1][keyName]
@@ -641,11 +651,7 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
gump:UpdateTooltip (qual_barra, esta_barra, instancia)
end
if (self.owner) then
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.owner.classe])
else
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.classe])
end
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
return self:RefreshBarra2 (esta_barra, instancia, tabela_anterior, forcar, esta_porcentagem, qual_barra, barras_container)
end
@@ -724,11 +730,7 @@ end
function atributo_heal:RefreshBarra (esta_barra, instancia, from_resize)
if (from_resize) then
if (self.owner) then
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.owner.classe])
else
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.classe])
end
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
end
if (instancia.row_info.texture_class_colors) then
@@ -775,17 +777,26 @@ function atributo_heal:RefreshBarra (esta_barra, instancia, from_resize)
end
if (self.enemy) then
if (_detalhes.faction_against == "Horde") then
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA
if (self.arena_enemy) then
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao .. ".|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
else
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY
end
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (240/255, 0, 5/255, 1)
if (_detalhes.faction_against == "Horde") then
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA
else
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY
end
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (0.94117, 0, 0.01960, 1)
end
end
else
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". "..self.displayName) --seta o texto da esqueda
if (self.arena_ally) then
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao .. ".|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
else
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". "..self.displayName) --seta o texto da esqueda
end
end
if (instancia.row_info.textL_class_colors) then
+66 -51
View File
@@ -2012,7 +2012,7 @@ function _detalhes:ChangeIcon (icon)
end
end
function _detalhes:AlteraModo (instancia, qual)
function _detalhes:AlteraModo (instancia, qual, from_mode_menu)
if (_type (instancia) == "number") then
qual = instancia
@@ -2134,16 +2134,20 @@ function _detalhes:AlteraModo (instancia, qual)
local checked
if (instancia.modo == 1) then
checked = 3
checked = 4
elseif (instancia.modo == 2) then
checked = 1
elseif (instancia.modo == 3) then
checked = 2
elseif (instancia.modo == 4) then
checked = 4
checked = 3
end
_detalhes.popup:Select (1, checked)
if (from_mode_menu) then
instancia.baseframe.cabecalho.modo_selecao:GetScript ("OnEnter")(instancia.baseframe.cabecalho.modo_selecao)
end
end
local function GetDpsHps (_thisActor, key)
@@ -2229,7 +2233,7 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
if (not is_current) then
--> assumindo que self é sempre uma instância aqui.
local total, keyName, keyNameSec, first
local total, keyName, keyNameSec, first, container_amount
local atributo = self.atributo
local container = self.showing [atributo]._ActorTable
@@ -2246,18 +2250,20 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
container = reportarFrags
keyName = "frag"
else
total, keyName, first = _detalhes.atributo_damage:RefreshWindow (self, self.showing, true, true)
total, keyName, first, container_amount = _detalhes.atributo_damage:RefreshWindow (self, self.showing, true, true)
if (self.sub_atributo == 1) then
keyNameSec = "dps"
elseif (self.sub_atributo == 2) then
end
end
elseif (atributo == 2) then --> heal
total, keyName, first = _detalhes.atributo_heal:RefreshWindow (self, self.showing, true, true)
total, keyName, first, container_amount = _detalhes.atributo_heal:RefreshWindow (self, self.showing, true, true)
if (self.sub_atributo == 1) then
keyNameSec = "hps"
end
elseif (atributo == 3) then --> energy
total, keyName, first = _detalhes.atributo_energy:RefreshWindow (self, self.showing, true, true)
total, keyName, first, container_amount = _detalhes.atributo_energy:RefreshWindow (self, self.showing, true, true)
elseif (atributo == 4) then --> misc
if (self.sub_atributo == 5) then --> mortes
local mortes = self.showing.last_events_tables
@@ -2268,52 +2274,58 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
container = reportarMortes
keyName = "dead"
else
total, keyName, first = _detalhes.atributo_misc:RefreshWindow (self, self.showing, true, true)
total, keyName, first, container_amount = _detalhes.atributo_misc:RefreshWindow (self, self.showing, true, true)
end
elseif (atributo == 5) then --> custom
if (_detalhes.custom [self.sub_atributo]) then
total, keyName, first = _detalhes.atributo_custom:RefreshWindow (self, self.showing, true, {key = "custom"})
total, keyName, first, container_amount = _detalhes.atributo_custom:RefreshWindow (self, self.showing, true, {key = "custom"})
total = self.showing.totals [self.customName]
atributo = _detalhes.custom [self.sub_atributo].attribute
container = self.showing [atributo]._ActorTable
else
total, keyName, first = _detalhes.atributo_damage:RefreshWindow (self, self.showing, true, true)
total, keyName, first, container_amount = _detalhes.atributo_damage:RefreshWindow (self, self.showing, true, true)
total = 1
atributo = 1
container = self.showing [atributo]._ActorTable
end
--print (total, keyName, first, atributo)
--print (total, keyName, first, atributo, container_amount)
end
amt = math.min (amt, container_amount)
for i = 1, amt do
local _thisActor = container [i]
if (_thisActor) then
local amount = _thisActor [keyName]
local name = _thisActor.nome.." "
if (_detalhes.remove_realm_from_name and name:find ("-")) then
name = name:gsub (("%-.*"), "")
end
_detalhes.fontstring_len:SetText (name)
local stringlen = _detalhes.fontstring_len:GetStringWidth()
while (stringlen < default_len) do
name = name .. "."
_detalhes.fontstring_len:SetText (name)
stringlen = _detalhes.fontstring_len:GetStringWidth()
end
if (_type (amount) == "number" and amount > 0) then --1236
if (keyNameSec) then
local dps = GetDpsHps (_thisActor, keyNameSec)
local name = _thisActor.nome.." "
if (_detalhes.remove_realm_from_name and name:find ("-")) then
name = name:gsub (("%-.*"), "")
end
_detalhes.fontstring_len:SetText (name)
local stringlen = _detalhes.fontstring_len:GetStringWidth()
while (stringlen < default_len) do
name = name .. "."
_detalhes.fontstring_len:SetText (name)
stringlen = _detalhes.fontstring_len:GetStringWidth()
end
report_lines [#report_lines+1] = i..". ".. name .." ".. _cstr ("%.2f", amount/total*100) .. "% (" .. _detalhes:comma_value (_math_floor (dps)) .. ", " .. _detalhes:ToK ( _math_floor (amount) ) .. ")"
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. _cstr ("%.2f", amount/total*100) .. "% (" .. _detalhes:comma_value (_math_floor (dps)) .. ", " .. _detalhes:ToK ( _math_floor (amount) ) .. ")"
else
report_lines [#report_lines+1] = i..". ".. _thisActor.nome.." " .. _detalhes:ToKReport (amount).." (".._cstr ("%.1f", amount/total*100).."%)"
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. _detalhes:ToKReport (amount).." (".._cstr ("%.1f", amount/total*100).."%)"
end
elseif (_type (amount) == "string") then
report_lines [#report_lines+1] = i..". ".. _thisActor.nome.." ".. amount
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. amount
else
break
end
@@ -2342,7 +2354,7 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
if (not is_current) then
--> assumindo que self é sempre uma instância aqui.
local total, keyName, first
local total, keyName, first, container_amount
local atributo = self.atributo
local container = self.showing [atributo]._ActorTable
@@ -2362,15 +2374,15 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
if (self.sub_atributo == 1) then
keyNameSec = "dps"
end
total, keyName, first = _detalhes.atributo_damage:RefreshWindow (self, self.showing, true, true)
total, keyName, first, container_amount = _detalhes.atributo_damage:RefreshWindow (self, self.showing, true, true)
end
elseif (atributo == 2) then --> heal
total, keyName, first = _detalhes.atributo_heal:RefreshWindow (self, self.showing, true, true)
total, keyName, first, container_amount = _detalhes.atributo_heal:RefreshWindow (self, self.showing, true, true)
if (self.sub_atributo == 1) then
keyNameSec = "hps"
end
elseif (atributo == 3) then --> energy
total, keyName, first = _detalhes.atributo_energy:RefreshWindow (self, self.showing, true, true)
total, keyName, first, container_amount = _detalhes.atributo_energy:RefreshWindow (self, self.showing, true, true)
elseif (atributo == 4) then --> misc
if (self.sub_atributo == 5) then --> mortes
local mortes = self.showing.last_events_tables
@@ -2381,46 +2393,49 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
container = reportarMortes
keyName = "dead"
else
total, keyName, first = _detalhes.atributo_misc:RefreshWindow (self, self.showing, true, true)
total, keyName, first, container_amount = _detalhes.atributo_misc:RefreshWindow (self, self.showing, true, true)
end
elseif (atributo == 5) then --> custom
total, keyName, first = _detalhes.atributo_custom:RefreshWindow (self, self.showing, true, {key = "custom"})
total, keyName, first, container_amount = _detalhes.atributo_custom:RefreshWindow (self, self.showing, true, {key = "custom"})
total = self.showing.totals [self.customName]
atributo = _detalhes.custom [self.sub_atributo].attribute
end
local this_amt = math.min (#container, container_amount, amt)
this_amt = #container - this_amt
for i = #container, 1, -1 do
for i = container_amount, this_amt, -1 do
local _thisActor = container [i]
local amount = _thisActor [keyName]
local name = _thisActor.nome.." "
_detalhes.fontstring_len:SetText (name)
local stringlen = _detalhes.fontstring_len:GetStringWidth()
while (stringlen < default_len) do
name = name .. "."
_detalhes.fontstring_len:SetText (name)
stringlen = _detalhes.fontstring_len:GetStringWidth()
end
if (_type (amount) == "number") then
if (amount > 0) then
if (keyNameSec) then
local dps = GetDpsHps (_thisActor, keyNameSec)
local name = _thisActor.nome.." "
_detalhes.fontstring_len:SetText (name)
local stringlen = _detalhes.fontstring_len:GetStringWidth()
while (stringlen < default_len) do
name = name .. "."
_detalhes.fontstring_len:SetText (name)
stringlen = _detalhes.fontstring_len:GetStringWidth()
end
report_lines [#report_lines+1] = i..". ".. name .." ".. _cstr ("%.2f", amount/total*100) .. "% (" .. _detalhes:comma_value (_math_floor (dps)) .. ", " .. _detalhes:ToK ( _math_floor (amount) ) .. ")"
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. _cstr ("%.2f", amount/total*100) .. "% (" .. _detalhes:comma_value (_math_floor (dps)) .. ", " .. _detalhes:ToK ( _math_floor (amount) ) .. ")"
else
report_lines [#report_lines+1] = i..".".. _thisActor.nome.." ".. _detalhes:comma_value ( _math_floor (amount) ).." (".._cstr ("%.1f", amount/total*100).."%)"
report_lines [#report_lines+1] = i .. "." .. name .. " " .. _detalhes:comma_value ( _math_floor (amount) ).." (".._cstr ("%.1f", amount/total*100).."%)"
end
quantidade = quantidade + 1
if (quantidade == amt) then
break
end
end
elseif (_type (amount) == "string") then
report_lines [#report_lines+1] = i..".".. _thisActor.nome.." ".. amount
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. amount
else
break
end
+19 -18
View File
@@ -683,11 +683,7 @@ function atributo_misc:AtualizaBarra (instancia, barras_container, qual_barra, l
gump:UpdateTooltip (qual_barra, esta_barra, instancia)
end
if (self.owner) then
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.owner.classe])
else
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.classe])
end
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
return self:RefreshBarra2 (esta_barra, instancia, tabela_anterior, forcar, esta_porcentagem, qual_barra, barras_container)
end
@@ -766,11 +762,7 @@ end
function atributo_misc:RefreshBarra (esta_barra, instancia, from_resize)
if (from_resize) then
if (self.owner) then
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.owner.classe])
else
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.classe])
end
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
end
if (instancia.row_info.texture_class_colors) then
@@ -817,17 +809,26 @@ function atributo_misc:RefreshBarra (esta_barra, instancia, from_resize)
end
if (self.enemy) then
if (_detalhes.faction_against == "Horde") then
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA
if (self.arena_enemy) then
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao .. ".|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
else
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY
end
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (240/255, 0, 5/255, 1)
if (_detalhes.faction_against == "Horde") then
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA
else
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY
end
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (0.94117, 0, 0.01960, 1)
end
end
else
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". "..self.displayName) --seta o texto da esqueda
if (self.arena_ally) then
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao .. ".|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
else
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". "..self.displayName) --seta o texto da esqueda
end
end
if (instancia.row_info.textL_class_colors) then
+69 -6
View File
@@ -108,12 +108,13 @@
end
--> read the actor flag
local read_actor_flag = function (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome)
local read_actor_flag = function (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome, container_type)
if (flag) then
--> é um player
if (_bit_band (flag, OBJECT_TYPE_PLAYER) ~= 0) then
novo_objeto.displayName = _detalhes:GetNickname (serial, false, true) --> serial, default, silent
if (not novo_objeto.displayName) then
if (_IsInInstance() and _detalhes.remove_realm_from_name) then
@@ -123,7 +124,7 @@
end
end
if (_bit_band (flag, IS_GROUP_OBJECT) ~= 0 and novo_objeto.classe ~= "UNGROUPPLAYER") then --> faz parte do grupo
if ( (_bit_band (flag, IS_GROUP_OBJECT) ~= 0 and novo_objeto.classe ~= "UNGROUPPLAYER")) then --> faz parte do grupo
novo_objeto.grupo = true
if (shadow_objeto) then
@@ -137,6 +138,68 @@
end
end
end
if (_detalhes.is_in_arena) then
if (novo_objeto.grupo) then --> is ally
novo_objeto.arena_ally = true
else --> is enemy
novo_objeto.arena_enemy = true
end
local arena_props = _detalhes.arena_table [nome]
if (nome == "Ditador") then
print ("Arena Cprops: ", arena_props)
end
if (arena_props) then
novo_objeto.role = arena_props.role
if (arena_props.role == "NONE") then
local role = UnitGroupRolesAssigned (nome)
if (role ~= "NONE") then
novo_objeto.role = role
end
end
print ("TEM CPROPS", novo_objeto.role)
else
local oponentes = GetNumArenaOpponentSpecs()
local found = false
for i = 1, oponentes do
local name = GetUnitName ("arena" .. i, true)
if (name == nome) then
local spec = GetArenaOpponentSpec (i)
if (spec) then
local id, name, description, icon, background, role, class = GetSpecializationInfoByID (spec)
novo_objeto.role = role
novo_objeto.classe = class
novo_objeto.enemy = true
novo_objeto.arena_enemy = true
found = true
end
end
end
local role = UnitGroupRolesAssigned (nome)
if (role ~= "NONE") then
novo_objeto.role = role
found = true
end
if (not found and nome == _detalhes.playername) then
local role = UnitGroupRolesAssigned ("player")
if (role ~= "NONE") then
novo_objeto.role = role
end
end
end
novo_objeto.grupo = true
end
--> é um pet
elseif (dono_do_pet) then
@@ -217,7 +280,7 @@
if (self.tipo == container_damage) then --> CONTAINER DAMAGE
get_actor_class (novo_objeto, nome, flag)
read_actor_flag (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome)
read_actor_flag (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome, "damage")
if (dono_do_pet) then
dono_do_pet.pets [#dono_do_pet.pets+1] = nome
@@ -249,7 +312,7 @@
elseif (self.tipo == container_heal) then --> CONTAINER HEALING
get_actor_class (novo_objeto, nome, flag)
read_actor_flag (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome)
read_actor_flag (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome, "heal")
if (dono_do_pet) then
dono_do_pet.pets [#dono_do_pet.pets+1] = nome
@@ -278,7 +341,7 @@
elseif (self.tipo == container_energy) then --> CONTAINER ENERGY
get_actor_class (novo_objeto, nome, flag)
read_actor_flag (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome)
read_actor_flag (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome, "energy")
if (dono_do_pet) then
dono_do_pet.pets [#dono_do_pet.pets+1] = nome
@@ -303,7 +366,7 @@
elseif (self.tipo == container_misc) then --> CONTAINER MISC
get_actor_class (novo_objeto, nome, flag)
read_actor_flag (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome)
read_actor_flag (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome, "misc")
--local teste_classe =
+121 -45
View File
@@ -23,6 +23,7 @@
local _GetInstanceInfo = GetInstanceInfo --wow api local
local _UnitExists = UnitExists --wow api local
local _UnitGUID = UnitGUID --wow api local
local _UnitName = UnitName --wow api local
local _IsAltKeyDown = IsAltKeyDown
local _IsShiftKeyDown = IsShiftKeyDown
@@ -117,6 +118,47 @@
_detalhes.tabela_vigente.is_boss = boss_table
if (_detalhes.in_combat and not _detalhes.leaving_combat) then
--> catch boss function if any
local bossFunction, bossFunctionType = _detalhes:GetBossFunction (ZoneMapID, BossIndex)
if (bossFunction) then
if (_bit_band (bossFunctionType, 0x1) ~= 0) then --realtime
_detalhes.bossFunction = bossFunction
_detalhes.tabela_vigente.bossFunction = _detalhes:ScheduleTimer ("bossFunction", 1)
end
end
if (_detalhes.zone_type ~= "raid") then
local endType, endData = _detalhes:GetEncounterEnd (ZoneMapID, BossIndex)
if (endType and endData) then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) setting boss end type to:", endType)
end
_detalhes.encounter_end_table.type = endType
_detalhes.encounter_end_table.killed = {}
_detalhes.encounter_end_table.data = {}
if (type (endData) == "table") then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) boss type is table:", endType)
end
if (endType == 1 or endType == 2) then
for _, npcID in ipairs (endData) do
_detalhes.encounter_end_table.data [npcID] = false
end
end
else
if (endType == 1 or endType == 2) then
_detalhes.encounter_end_table.data [endData] = false
end
end
end
end
end
_detalhes:SendEvent ("COMBAT_BOSS_FOUND", nil, index, name)
return boss_table
@@ -148,54 +190,11 @@
local BossIndex = BossIds [serial]
if (BossIndex) then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) boss found:",_detalhes:GetBossName (ZoneMapID, BossIndex))
end
if (_detalhes.in_combat) then
--> catch boss function if any
local bossFunction, bossFunctionType = _detalhes:GetBossFunction (ZoneMapID, BossIndex)
if (bossFunction) then
if (_bit_band (bossFunctionType, 0x1) ~= 0) then --realtime
_detalhes.bossFunction = bossFunction
local combat = _detalhes:GetCombat ("current")
combat.bossFunction = _detalhes:ScheduleTimer ("bossFunction", 1)
end
end
--> catch boss end if any
local endType, endData = _detalhes:GetEncounterEnd (ZoneMapID, BossIndex)
if (endType and endData) then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) setting boss end type to:", endType)
end
_detalhes.encounter.type = endType
_detalhes.encounter.killed = {}
_detalhes.encounter.data = {}
if (type (endData) == "table") then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) boss type is table:", endType)
end
if (endType == 1 or endType == 2) then
for _, npcID in ipairs (endData) do
_detalhes.encounter.data [npcID] = false
end
end
else
if (endType == 1 or endType == 2) then
_detalhes.encounter.data [endData] = false
end
end
end
end
return boss_found (BossIndex, _detalhes:GetBossName (ZoneMapID, BossIndex), ZoneName, ZoneMapID, DifficultyID)
end
end
end
@@ -249,7 +248,7 @@
_detalhes:Msg ("(debug) started a new combat.")
end
--> não tem historico, addon foi resetado, a primeira tabela é descartada -- Erase first table is does not have a firts segment history, this occour after reset or first run
--> não tem historico, addon foi resetado, a primeira tabela é descartada -- Erase first table is do es not have a firts segment history, this occour after reset or first run
if (not _detalhes.tabela_historico.tabelas[1]) then
--> precisa zerar aqui a tabela overall
_table_wipe (_detalhes.tabela_overall)
@@ -291,7 +290,7 @@
--> é o timer que ve se o jogador ta em combate ou não -- check if any party or raid members are in combat
_detalhes.tabela_vigente.verifica_combate = _detalhes:ScheduleRepeatingTimer ("EstaEmCombate", 1)
_table_wipe (_detalhes.encounter)
_table_wipe (_detalhes.encounter_end_table)
_table_wipe (_detalhes.pets_ignored)
_table_wipe (_detalhes.pets_no_owner)
@@ -359,6 +358,8 @@
_detalhes:Msg ("(debug) ended a combat.")
end
_detalhes.leaving_combat = true
if (_detalhes.schedule_remove_overall and not from_encounter_end and not InCombatLockdown()) then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) found schedule overall data deletion.")
@@ -554,6 +555,7 @@
end
_detalhes.in_combat = false --sinaliza ao addon que não há combate no momento
_detalhes.leaving_combat = false --sinaliza que não esta mais saindo do combate
_table_wipe (_detalhes.cache_damage_group)
_table_wipe (_detalhes.cache_healing_group)
@@ -576,6 +578,80 @@
_detalhes:SendEvent ("COMBAT_PLAYER_LEAVE", nil, _detalhes.tabela_vigente)
end
function _detalhes:GetPlayersInArena()
local aliados = GetNumGroupMembers (LE_PARTY_CATEGORY_HOME)
for i = 1, aliados-1 do
local role = UnitGroupRolesAssigned ("party" .. i)
if (role ~= "NONE") then
local name = GetUnitName ("party" .. i, true)
_detalhes.arena_table [name] = {role = role}
end
end
local role = UnitGroupRolesAssigned ("player")
if (role ~= "NONE") then
local name = GetUnitName ("player", true)
_detalhes.arena_table [name] = {role = role}
end
if (_detalhes.debug) then
_detalhes:Msg ("(debug) Found", oponentes, "enemies and", aliados, "allies")
end
end
function _detalhes:CreateArenaSegment()
_detalhes:GetPlayersInArena()
_detalhes.arena_begun = true
_detalhes.start_arena = nil
if (_detalhes.in_combat) then
_detalhes:SairDoCombate()
end
--> inicia um novo combate
_detalhes:EntrarEmCombate()
--> sinaliza que esse combate é arena
_detalhes.tabela_vigente.arena = true
_detalhes.tabela_vigente.is_arena = {name = _detalhes.zone_name, zone = _detalhes.zone_name, mapid = _detalhes.zone_id}
end
function _detalhes:StartArenaSegment (...)
if (_detalhes.debug) then
_detalhes:Msg ("(debug) starting a new arena segment.")
end
local timerType, timeSeconds, totalTime = select (1, ...)
if (_detalhes.start_arena) then
_detalhes:CancelTimer (_detalhes.start_arena, true)
end
_detalhes.start_arena = _detalhes:ScheduleTimer ("CreateArenaSegment", timeSeconds)
_detalhes:GetPlayersInArena()
end
function _detalhes:EnteredInArena()
if (_detalhes.debug) then
_detalhes:Msg ("(debug) arena detected.")
end
_detalhes.arena_begun = false
_detalhes:GetPlayersInArena()
end
function _detalhes:LeftArena()
_detalhes.is_in_arena = false
_detalhes.arena_begun = false
if (_detalhes.start_arena) then
_detalhes:CancelTimer (_detalhes.start_arena, true)
end
end
function _detalhes:MakeEqualizeOnActor (player, realm, receivedActor)
+48 -3
View File
@@ -2175,6 +2175,18 @@
end
_current_combat.frags_need_refresh = true
--> detect dungeon boss
--if (_detalhes.zone_type == "party") then
-- local npcID = tonumber (alvo_serial:sub (6, 10), 16)
-- local boss_ids = _detalhes:GetBossIds (_detalhes.zone_id)
-- if (boss_ids) then
-- if (_detalhes.zone_id [npcID]) then
-- end
-- end
--end
--> player death
elseif (not _UnitIsFeignDeath (alvo_name)) then
@@ -2510,8 +2522,9 @@
-- PARSER
--serach key: ~parser ~event ~start ~inicio
_detalhes.parser_functions = {}
function _detalhes.parser_functions:ZONE_CHANGED_NEW_AREA (...)
local zoneName, zoneType, _, _, _, _, _, zoneMapID = _GetInstanceInfo()
@@ -2520,6 +2533,14 @@
_detalhes.zone_id = zoneMapID
_detalhes.zone_name = zoneName
if (_detalhes.debug) then
_detalhes:Msg ("(debug) zone change:", _detalhes.zone_name, "is a", _detalhes.zone_type, "zone.")
end
if (_detalhes.is_in_arena and zoneType ~= "arena") then
_detalhes:LeftArena()
end
if (zoneType == "pvp") then
if (not _current_combat.pvp) then
@@ -2533,6 +2554,16 @@
_current_combat.is_pvp = {name = zoneName, zone = ZoneName, mapid = ZoneMapID}
_detalhes.listener:RegisterEvent ("CHAT_MSG_BG_SYSTEM_NEUTRAL")
end
elseif (zoneType == "arena") then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) zone type is arena.")
end
_detalhes.is_in_arena = true
_detalhes:EnteredInArena()
else
if (_detalhes:IsInInstance()) then
_detalhes.last_instance = zoneMapID
@@ -2715,8 +2746,22 @@
end
function _detalhes.parser_functions:START_TIMER (...)
if (_detalhes.debug) then
_detalhes:Msg ("(debug) found a timer.")
end
if (C_Scenario.IsChallengeMode() and _detalhes.overall_clear_newchallenge) then
_detalhes.historico:resetar_overall()
if (_detalhes.debug) then
_detalhes:Msg ("(debug) timer is a challenge mode start.")
end
elseif (_detalhes.is_in_arena) then
_detalhes:StartArenaSegment (...)
if (_detalhes.debug) then
_detalhes:Msg ("(debug) timer is a arena countdown.")
end
end
end
@@ -2862,7 +2907,7 @@
return _detalhes.cache_damage_group
end
function _detalhes:GetActorsOnHealingCache()
return _detalhes.cache_damage_group
return _detalhes.cache_healing_group
end
function _detalhes:ClearParserCache()
+14 -34
View File
@@ -33,35 +33,6 @@
current_plugin_object.Frame:Hide()
end
instance.current_raid_plugin = nil
--[[
if (_G.DetailsWaitForPluginFrame:IsShown()) then
_detalhes:CancelWaitForPlugin()
end
gump:Fade (instancia, 1, nil, "barras")
gump:Fade (instancia.scroll, 0)
if (instancia.need_rolagem) then
instancia:MostrarScrollBar (true)
else
--> precisa verificar se ele precisa a rolagem certo?
instancia:ReajustaGump()
end
--> calcula se existem barras, etc...
if (not instancia.rows_fit_in_window) then --> as barras não forma iniciadas ainda
instancia.rows_fit_in_window = _math_floor (instancia.baseframe.BoxBarrasAltura / instancia.row_height)
if (instancia.rows_created < instancia.rows_fit_in_window) then
for i = #instancia.barras+1, instancia.rows_fit_in_window do
local nova_barra = gump:CriaNovaBarra (instancia, i, 30) --> cria nova barra
nova_barra.texto_esquerdo:SetText (Loc ["STRING_NEWROW"])
nova_barra.statusbar:SetValue (100)
instancia.barras [i] = nova_barra
end
instancia.rows_created = #instancia.barras
end
end
--]]
end
function _detalhes:RaidPluginInstalled (plugin_name)
@@ -77,8 +48,15 @@
end
end
function _detalhes.RaidTables:EnableRaidMode (instance, plugin_name)
function _detalhes.RaidTables:EnableRaidMode (instance, plugin_name, from_cooltip, from_mode_menu)
--> check if came from cooltip
if (from_cooltip) then
self = _detalhes.RaidTables
instance = plugin_name
plugin_name = from_cooltip
end
--> set the mode
if (instance.modo == modo_alone) then
instance:SoloMode (false)
@@ -121,6 +99,11 @@
--last check if the name is okey
if (self:IsAvailable (plugin_name, instance)) then
self:switch (nil, plugin_name, instance)
if (from_mode_menu) then
--refresh
instance.baseframe.cabecalho.modo_selecao:GetScript ("OnEnter")(instance.baseframe.cabecalho.modo_selecao)
end
else
if (not instance.wait_for_plugin) then
instance:CreateWaitForPlugin()
@@ -154,8 +137,6 @@
--check if is available
local in_use = self.PluginsInUse [ plugin_name ]
-- print (instance:GetId() .. " In Use By Instance: ", in_use )
if (in_use and in_use ~= instance:GetId()) then
return false
else
@@ -168,8 +149,7 @@
self.PluginsInUse [ absolute_name ] = instance_number
end
end
----------------
function _detalhes.RaidTables:switch (_, plugin_name, instance)
+1 -1
View File
@@ -276,7 +276,7 @@
_detalhes:TimeDataTick()
_detalhes:BrokerTick()
if (_detalhes.zone_type == "pvp" or _InCombatLockdown()) then
if (_detalhes.zone_type == "pvp" or _detalhes.zone_type == "arena" or _InCombatLockdown()) then
return true
elseif (_UnitAffectingCombat("player")) then
return true
+29 -46
View File
@@ -62,7 +62,6 @@ function DetailsCreateCoolTip()
CoolTip.SelectedIndexMain = nil --> menus
CoolTip.SelectedIndexSec = {} --> menus
--options table
CoolTip.OptionsList = {
["IconSize"] = true,
@@ -104,49 +103,10 @@ function DetailsCreateCoolTip()
["HeighMod"] = true,
["IconBlendMode"] = true,
["IconBlendModeHover"] = true,
["SubFollowButton"] = true,
}
CoolTip.OptionsTable = {
["IconSize"] = nil,
["HeightAnchorMod"] = nil,
["WidthAnchorMod"] = nil,
["MinWidth"] = nil,
["FixedWidth"] = nil,
["FixedHeight"] = nil,
["FixedWidthSub"] = nil,
["FixedHeightSub"] = nil,
["IgnoreSubMenu"] = nil,
["IgnoreButtonAutoHeight"] = nil,
["TextHeightMod"] = nil,
["ButtonHeightMod"] = nil,
["ButtonHeightModSub"] = nil,
["YSpacingMod"] = nil,
["YSpacingModSub"] = nil,
["ButtonsYMod"] = nil,
["ButtonsYModSub"] = nil,
["IconHeightMod"] = nil,
["StatusBarHeightMod"] = nil,
["StatusBarTexture"] = nil,
["TextSize"] = nil,
["TextFont"] = nil,
["TextColor"] = nil,
["TextShadow"] = nil,
["LeftTextWidth"] = nil,
["RightTextWidth"] = nil,
["LeftTextHeight"] = nil,
["RightTextHeight"] = nil,
["NoFade"] = nil,
["MyAnchor"] = nil,
["Anchor"] = nil,
["RelativeAnchor"] = nil,
["NoLastSelectedBar"] = nil,
["SubMenuIsTooltip"] = nil,
["LeftBorderSize"] = nil,
["RightBorderSize"] = nil,
["HeighMod"] = nil,
["IconBlendMode"] = nil,
["IconBlendModeHover"] = nil,
}
CoolTip.OptionsTable = {}
--cprops
CoolTip.Indexes = 0 --> amount of lines current on shown
@@ -1102,6 +1062,28 @@ function DetailsCreateCoolTip()
gump:Fade (frame2, 0)
if (CoolTip.OptionsTable.SubFollowButton and not CoolTip.frame2_leftside) then
local button = frame1.Lines [index]
frame2:ClearAllPoints()
frame2:SetPoint ("left", button, "right")
elseif (CoolTip.OptionsTable.SubFollowButton and CoolTip.frame2_leftside) then
local button = frame1.Lines [index]
frame2:ClearAllPoints()
frame2:SetPoint ("right", button, "left")
elseif (CoolTip.frame2_leftside) then
frame2:ClearAllPoints()
frame2:SetPoint ("bottomright", frame1, "bottomleft")
else
frame2:ClearAllPoints()
frame2:SetPoint ("bottomleft", frame1, "bottomright")
end
end
function CoolTip:HideSub()
@@ -1285,12 +1267,10 @@ function DetailsCreateCoolTip()
frame1:EnableMouse (true)
--CoolTip.IndexesSub [CoolTip.Indexes]
if (CoolTip.HaveSubMenu) then --> zera o segundo frame
frame2.w = 0
frame2:SetHeight (6)
if (CoolTip.SelectedIndexMain) then
if (CoolTip.SelectedIndexMain and CoolTip.IndexesSub [CoolTip.SelectedIndexMain] and CoolTip.IndexesSub [CoolTip.SelectedIndexMain] > 0) then
gump:Fade (frame2, 0)
else
gump:Fade (frame2, 1)
@@ -1311,7 +1291,7 @@ function DetailsCreateCoolTip()
CoolTip:SetupMainButton (menuButton, i)
if (CoolTip.SelectedIndexMain and CoolTip.SelectedIndexMain == i) then
if (CoolTip.HaveSubMenu) then
if (CoolTip.HaveSubMenu and CoolTip.IndexesSub [i] and CoolTip.IndexesSub [i] > 0) then
CoolTip:ShowSub (i)
end
end
@@ -1503,6 +1483,7 @@ function DetailsCreateCoolTip()
frame2:ClearAllPoints()
frame2:SetPoint ("bottomright", frame1, "bottomleft")
CoolTip.frame2_leftside = true
--+ diff
return CoolTip:SetMyPoint (host, CoolTip.internal_x_mod , CoolTip.internal_y_mod)
end
@@ -1724,6 +1705,8 @@ function DetailsCreateCoolTip()
CoolTip.internal_y_mod = 0
CoolTip.overlap_checked = false
CoolTip.frame2_leftside = nil
-->
--[
+15
View File
@@ -490,6 +490,21 @@ local default_profile = {
0.12, -- [2]
0.23, -- [3]
},
["ARENA_ALLY"] = {
0.2, -- [1]
1, -- [2]
0.2, -- [3]
},
["ARENA_ENEMY"] = {
1, -- [1]
1, -- [2]
0, -- [3]
},
["NEUTRAL"] = {
1, -- [1]
1, -- [2]
0, -- [3]
},
},
--> minimap
+4
View File
@@ -2,6 +2,10 @@ do
local _detalhes = _G._detalhes
_detalhes.SpecSpellList = {
}
_detalhes.ClassSpellList = {
--death knight
+4
View File
@@ -118,6 +118,10 @@
tinsert (_detalhes.savedTimeCaptures, {name, func, matrix, author, version, icon, is_enabled, do_not_save = no_save})
if (_G.DetailsOptionsWindow and _G.DetailsOptionsWindow:IsShown()) then
_G.DetailsOptionsWindow16UserTimeCapturesFillPanel.MyObject:Refresh()
end
return true
end
+31 -28
View File
@@ -1603,6 +1603,9 @@ function gump:CriaJanelaInfo()
local target_texture = [[Interface\MINIMAP\TRACKING\Target]]
local empty_text = ""
local plus = red .. "+("
local minor = green .. "-("
local fill_compare_targets = function (self, player, other_players, target_pool)
@@ -1731,11 +1734,11 @@ function gump:CriaJanelaInfo()
if (data [2] > player_2_target_total) then
local diff = data [2] - player_2_target_total
local up = diff / data [2] * 100
bar_2 [2].righttext:SetText (_detalhes:ToK2Min (player_2_target_total) .. " |c" .. red .. "-(" .. _math_floor (up) .. "%)|r")
bar_2 [2].righttext:SetText (_detalhes:ToK2Min (player_2_target_total) .. " |c" .. minor .. _math_floor (up) .. "%)|r")
else
local diff = player_2_target_total - data [2]
local down = diff / player_2_target_total * 100
bar_2 [2].righttext:SetText (_detalhes:ToK2Min (player_2_target_total) .. " |c" .. green .. "+(" .. _math_floor (down) .. "%)|r")
bar_2 [2].righttext:SetText (_detalhes:ToK2Min (player_2_target_total) .. " |c" .. plus .. _math_floor (down) .. "%)|r")
end
bar_2 [2]:SetValue (player_2_target_total / player_2_top * 100)
@@ -1786,11 +1789,11 @@ function gump:CriaJanelaInfo()
if (data [2] > player_3_target_total) then
local diff = data [2] - player_3_target_total
local up = diff / data [2] * 100
bar_3 [2].righttext:SetText (_detalhes:ToK2Min (player_3_target_total) .. " |c" .. red .. "-(" .. _math_floor (up) .. "%)|r")
bar_3 [2].righttext:SetText (_detalhes:ToK2Min (player_3_target_total) .. " |c" .. minor .. _math_floor (up) .. "%)|r")
else
local diff = player_3_target_total - data [2]
local down = diff / player_3_target_total * 100
bar_3 [2].righttext:SetText (_detalhes:ToK2Min (player_3_target_total) .. " |c" .. green .. "+(" .. _math_floor (down) .. "%)|r")
bar_3 [2].righttext:SetText (_detalhes:ToK2Min (player_3_target_total) .. " |c" .. plus .. _math_floor (down) .. "%)|r")
end
bar_3 [2]:SetValue (player_3_target_total / player_3_top * 100)
@@ -1924,11 +1927,11 @@ function gump:CriaJanelaInfo()
elseif (data [2] > spell.total) then
local diff = data [2] - spell.total
local up = diff / data [2] * 100
bar_2 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. red .. "-(" .. _math_floor (up) .. "%)|r")
bar_2 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. minor .. _math_floor (up) .. "%)|r")
else
local diff = spell.total - data [2]
local down = diff / spell.total * 100
bar_2 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. green .. "+(" .. _math_floor (down) .. "%)|r")
bar_2 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. plus .. _math_floor (down) .. "%)|r")
end
bar_2 [2]:SetValue (spell.total / player_2_top * 100)
@@ -1961,11 +1964,11 @@ function gump:CriaJanelaInfo()
elseif (data [2] > spell.total) then
local diff = data [2] - spell.total
local up = diff / data [2] * 100
bar_3 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. red .. "-(" .. _math_floor (up) .. "%)|r")
bar_3 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. minor .. _math_floor (up) .. "%)|r")
else
local diff = spell.total - data [2]
local down = diff / spell.total * 100
bar_3 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. green .. "+(" .. _math_floor (down) .. "%)|r")
bar_3 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. plus .. _math_floor (down) .. "%)|r")
end
bar_3 [2]:SetValue (spell.total / player_3_top * 100)
@@ -2166,11 +2169,11 @@ function gump:CriaJanelaInfo()
if (spell [2] > this_spell [2]) then
local diff = spell [2] - this_spell [2]
local up = diff / spell [2] * 100
bar [2].righttext:SetText (_detalhes:ToK2Min (this_spell [2]) .. " |c" .. red .. "-(" .. _math_floor (up) .. "%)|r")
bar [2].righttext:SetText (_detalhes:ToK2Min (this_spell [2]) .. " |c" .. minor .. _math_floor (up) .. "%)|r")
else
local diff = this_spell [2] - spell [2]
local down = diff / this_spell [2] * 100
bar [2].righttext:SetText (_detalhes:ToK2Min (this_spell [2]) .. " |c" .. green .. "+(" .. _math_floor (down) .. "%)|r")
bar [2].righttext:SetText (_detalhes:ToK2Min (this_spell [2]) .. " |c" .. plus .. _math_floor (down) .. "%)|r")
end
bar [2]:SetValue (this_spell [2]/player_2_top*100)
@@ -2206,11 +2209,11 @@ function gump:CriaJanelaInfo()
if (spell [2] > this_spell [2]) then
local diff = spell [2] - this_spell [2]
local up = diff / spell [2] * 100
bar [2].righttext:SetText (_detalhes:ToK2Min (this_spell [2]) .. " |c" .. red .. "-(" .. _math_floor (up) .. "%)|r")
bar [2].righttext:SetText (_detalhes:ToK2Min (this_spell [2]) .. " |c" .. minor .. _math_floor (up) .. "%)|r")
else
local diff = this_spell [2] - spell [2]
local down = diff / this_spell [2] * 100
bar [2].righttext:SetText (_detalhes:ToK2Min (this_spell [2]) .. " |c" .. green .. "+(" .. _math_floor (down) .. "%)|r")
bar [2].righttext:SetText (_detalhes:ToK2Min (this_spell [2]) .. " |c" .. plus .. _math_floor (down) .. "%)|r")
end
bar [2]:SetValue (this_spell [2]/player_3_top*100)
@@ -2325,31 +2328,31 @@ function gump:CriaJanelaInfo()
if (hits > bar2[3][1]) then
local diff = hits - bar2[3][1]
local up = diff / hits * 100
frame2.tooltip.hits_label2:SetText (bar2[3][1] .. " |c" .. red .. "-(" .. _math_floor (up) .. "%)|r")
frame2.tooltip.hits_label2:SetText (bar2[3][1] .. " |c" .. minor .. _math_floor (up) .. "%)|r")
else
local diff = bar2[3][1] - hits
local down = diff / bar2[3][1] * 100
frame2.tooltip.hits_label2:SetText (bar2[3][1] .. " |c" .. green .. "+(" .. _math_floor (down) .. "%)|r")
frame2.tooltip.hits_label2:SetText (bar2[3][1] .. " |c" .. plus .. _math_floor (down) .. "%)|r")
end
if (average > bar2[3][2]) then
local diff = average - bar2[3][2]
local up = diff / average * 100
frame2.tooltip.average_label2:SetText (_detalhes:ToK2Min (bar2[3][2]) .. " |c" .. red .. "-(" .. _math_floor (up) .. "%)|r")
frame2.tooltip.average_label2:SetText (_detalhes:ToK2Min (bar2[3][2]) .. " |c" .. minor .. _math_floor (up) .. "%)|r")
else
local diff = bar2[3][2] - average
local down = diff / bar2[3][2] * 100
frame2.tooltip.average_label2:SetText (_detalhes:ToK2Min (bar2[3][2]) .. " |c" .. green .. "+(" .. _math_floor (down) .. "%)|r")
frame2.tooltip.average_label2:SetText (_detalhes:ToK2Min (bar2[3][2]) .. " |c" .. plus .. _math_floor (down) .. "%)|r")
end
if (critical > bar2[3][3]) then
local diff = critical - bar2[3][3]
local up = diff / critical * 100
frame2.tooltip.crit_label2:SetText (bar2[3][3] .. "%" .. " |c" .. red .. "-(" .. _math_floor (up) .. "%)|r")
frame2.tooltip.crit_label2:SetText (bar2[3][3] .. "%" .. " |c" .. minor .. _math_floor (up) .. "%)|r")
else
local diff = bar2[3][3] - critical
local down = diff / bar2[3][3] * 100
frame2.tooltip.crit_label2:SetText (bar2[3][3] .. "%" .. " |c" .. green .. "+(" .. _math_floor (down) .. "%)|r")
frame2.tooltip.crit_label2:SetText (bar2[3][3] .. "%" .. " |c" .. plus .. _math_floor (down) .. "%)|r")
end
if (player2_misc) then
@@ -2359,11 +2362,11 @@ function gump:CriaJanelaInfo()
if (player1_uptime > spell.uptime) then
local diff = player1_uptime - spell.uptime
local up = diff / player1_uptime * 100
frame2.tooltip.uptime_label2:SetText (minutos .. "m" .. segundos .. "s |c" .. red .. "-(" .. _math_floor (up) .. "%)|r")
frame2.tooltip.uptime_label2:SetText (minutos .. "m" .. segundos .. "s |c" .. minor .. _math_floor (up) .. "%)|r")
else
local diff = spell.uptime - player1_uptime
local down = diff / spell.uptime * 100
frame2.tooltip.uptime_label2:SetText (minutos .. "m" .. segundos .. "s |cFF00FF00+(" .. _math_floor (down) .. "%)|r")
frame2.tooltip.uptime_label2:SetText (minutos .. "m" .. segundos .. "s |c" .. plus .. _math_floor (down) .. "%)|r")
end
else
frame2.tooltip.uptime_label2:SetText ("--x--x--")
@@ -2382,31 +2385,31 @@ function gump:CriaJanelaInfo()
if (hits > bar3[3][1]) then
local diff = hits - bar3[3][1]
local up = diff / hits * 100
frame3.tooltip.hits_label2:SetText (bar3[3][1] .. " |c" .. red .. "-(" .. _math_floor (up) .. "%)|r")
frame3.tooltip.hits_label2:SetText (bar3[3][1] .. " |c" .. minor .. _math_floor (up) .. "%)|r")
else
local diff = bar3[3][1] - hits
local down = diff / bar3[3][1] * 100
frame3.tooltip.hits_label2:SetText (bar3[3][1] .. " |c" .. green .. "+(" .. _math_floor (down) .. "%)|r")
frame3.tooltip.hits_label2:SetText (bar3[3][1] .. " |c" .. plus .. _math_floor (down) .. "%)|r")
end
if (average > bar3[3][2]) then
local diff = average - bar3[3][2]
local up = diff / average * 100
frame3.tooltip.average_label2:SetText (_detalhes:ToK2Min (bar3[3][2]) .. " |c" .. red .. "-(" .. _math_floor (up) .. "%)|r")
frame3.tooltip.average_label2:SetText (_detalhes:ToK2Min (bar3[3][2]) .. " |c" .. minor .. _math_floor (up) .. "%)|r")
else
local diff = bar3[3][2] - average
local down = diff / bar3[3][2] * 100
frame3.tooltip.average_label2:SetText (_detalhes:ToK2Min (bar3[3][2]) .. " |c" .. green .. "+(" .. _math_floor (down) .. "%)|r")
frame3.tooltip.average_label2:SetText (_detalhes:ToK2Min (bar3[3][2]) .. " |c" .. plus .. _math_floor (down) .. "%)|r")
end
if (critical > bar3[3][3]) then
local diff = critical - bar3[3][3]
local up = diff / critical * 100
frame3.tooltip.crit_label2:SetText (bar3[3][3] .. "%" .. " |c" .. red .. "-(" .. _math_floor (up) .. "%)|r")
frame3.tooltip.crit_label2:SetText (bar3[3][3] .. "%" .. " |c" .. minor .. _math_floor (up) .. "%)|r")
else
local diff = bar3[3][3] - critical
local down = diff / bar3[3][3] * 100
frame3.tooltip.crit_label2:SetText (bar3[3][3] .. "%" .. " |c" .. green .. "+(" .. _math_floor (down) .. "%)|r")
frame3.tooltip.crit_label2:SetText (bar3[3][3] .. "%" .. " |c" .. plus .. _math_floor (down) .. "%)|r")
end
if (player3_misc) then
@@ -2416,11 +2419,11 @@ function gump:CriaJanelaInfo()
if (player1_uptime > spell.uptime) then
local diff = player1_uptime - spell.uptime
local up = diff / player1_uptime * 100
frame3.tooltip.uptime_label2:SetText (minutos .. "m" .. segundos .. "s |c" .. red .. "-(" .. _math_floor (up) .. "%)|r")
frame3.tooltip.uptime_label2:SetText (minutos .. "m" .. segundos .. "s |c" .. minor .. _math_floor (up) .. "%)|r")
else
local diff = spell.uptime - player1_uptime
local down = diff / spell.uptime * 100
frame3.tooltip.uptime_label2:SetText (minutos .. "m" .. segundos .. "s |c" .. green .. "+(" .. _math_floor (down) .. "%)|r")
frame3.tooltip.uptime_label2:SetText (minutos .. "m" .. segundos .. "s |c" .. plus .. _math_floor (down) .. "%)|r")
end
else
frame3.tooltip.uptime_label2:SetText ("--x--x--")
+3
View File
@@ -6764,6 +6764,9 @@ function window:update_all (editing_instance)
_G.DetailsOptionsWindow14AttributeSideSwitch.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow14AttributeSideSwitch.MyObject:SetValue (editing_instance.attribute_text.side)
--> window 16
_G.DetailsOptionsWindow16UserTimeCapturesFillPanel.MyObject:Refresh()
--> window 17
_G.DetailsOptionsWindow17CombatAlphaDropdown.MyObject:Select (editing_instance.hide_in_combat_type, true)
_G.DetailsOptionsWindow17HideOnCombatAlphaSlider.MyObject:SetFixedParameter (editing_instance)
+156 -22
View File
@@ -3874,23 +3874,78 @@ local build_mode_list = function (self, elapsed)
CoolTip:Reset()
CoolTip:SetType ("menu")
CoolTip:AddFromTable (parameters_table [4])
CoolTip:SetLastSelected ("main", parameters_table [3])
CoolTip:SetFixedParameter (instancia)
CoolTip:SetColor ("main", "transparent")
CoolTip:SetOption ("TextSize", _detalhes.font_sizes.menus)
CoolTip:SetOption ("ButtonHeightModSub", -5)
CoolTip:SetOption ("ButtonHeightMod", -5)
CoolTip:SetOption ("ButtonsYModSub", -5)
CoolTip:SetOption ("ButtonsYMod", -5)
CoolTip:SetOption ("YSpacingModSub", 1)
CoolTip:SetOption ("YSpacingMod", 1)
CoolTip:SetOption ("FixedHeight", 106)
CoolTip:SetOption ("FixedWidthSub", 146)
CoolTip:SetOption ("SubMenuIsTooltip", true)
if (_detalhes.tutorial.logons > 9) then
CoolTip:SetOption ("IgnoreSubMenu", true)
--CoolTip:SetOption ("SubMenuIsTooltip", true)
--if (_detalhes.tutorial.logons > 9) then
--CoolTip:SetOption ("IgnoreSubMenu", true)
--end
CoolTip:AddLine (Loc ["STRING_MODE_GROUP"])
CoolTip:AddMenu (1, instancia.AlteraModo, 2, true)
CoolTip:AddIcon ([[Interface\AddOns\Details\images\modo_icones]], 1, 1, 20, 20, 32/256, 32/256*2, 0, 1)
--CoolTip:AddLine (Loc ["STRING_HELP_MODEGROUP"], nil, 2)
--CoolTip:AddIcon ([[Interface\TUTORIALFRAME\TutorialFrame-QuestionMark]], 2, 1, 16, 16, 8/64, 1 - (8/64), 8/64, 1 - (8/64))
CoolTip:AddLine (Loc ["STRING_MODE_ALL"])
CoolTip:AddMenu (1, instancia.AlteraModo, 3, true)
CoolTip:AddIcon ([[Interface\AddOns\Details\images\modo_icones]], 1, 1, 20, 20, 32/256*2, 32/256*3, 0, 1)
--CoolTip:AddLine (Loc ["STRING_HELP_MODEALL"], nil, 2)
--CoolTip:AddIcon ([[Interface\TUTORIALFRAME\TutorialFrame-QuestionMark]], 2, 1, 16, 16, 8/64, 1 - (8/64), 8/64, 1 - (8/64))
CoolTip:AddLine (Loc ["STRING_MODE_RAID"])
CoolTip:AddMenu (1, instancia.AlteraModo, 4, true)
CoolTip:AddIcon ([[Interface\AddOns\Details\images\modo_icones]], 1, 1, 20, 20, 32/256*3, 32/256*4, 0, 1)
--CoolTip:AddLine (Loc ["STRING_HELP_MODERAID"], nil, 2)
--CoolTip:AddIcon ([[Interface\TUTORIALFRAME\TutorialFrame-QuestionMark]], 2, 1, 16, 16, 8/64, 1 - (8/64), 8/64, 1 - (8/64))
--build raid plugins list
local available_plugins = _detalhes.RaidTables:GetAvailablePlugins()
if (#available_plugins >= 0) then
local amt = 0
for index, ptable in _ipairs (available_plugins) do
if (ptable [3].__enabled) then
CoolTip:AddMenu (2, _detalhes.RaidTables.EnableRaidMode, instancia, ptable [4], true, ptable [1], ptable [2], true) --PluginName, PluginIcon, PluginObject, PluginAbsoluteName
amt = amt + 1
end
end
CoolTip:SetWallpaper (2, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
if (amt <= 3) then
CoolTip:SetOption ("SubFollowButton", true)
end
end
CoolTip:AddLine (Loc ["STRING_MODE_SELF"])
CoolTip:AddMenu (1, instancia.AlteraModo, 1, true)
CoolTip:AddIcon ([[Interface\AddOns\Details\images\modo_icones]], 1, 1, 20, 20, 0, 32/256, 0, 1)
--CoolTip:AddLine (Loc ["STRING_HELP_MODESELF"], nil, 2)
--CoolTip:AddIcon ([[Interface\TUTORIALFRAME\TutorialFrame-QuestionMark]], 2, 1, 16, 16, 8/64, 1 - (8/64), 8/64, 1 - (8/64))
--build self plugins list
CoolTip:AddLine (Loc ["STRING_OPTIONS_WINDOW"])
CoolTip:AddMenu (1, _detalhes.OpenOptionsWindow)
CoolTip:AddIcon ([[Interface\AddOns\Details\images\modo_icones]], 1, 1, 20, 20, 32/256*4, 32/256*5, 0, 1)
--CoolTip:AddFromTable (parameters_table [4])
if (instancia.consolidate) then
CoolTip:SetOwner (self, "topleft", "topright", 3)
else
@@ -3990,6 +4045,25 @@ local build_segment_list = function (self, elapsed)
CoolTip:SetWallpaper (2, bgImage, {0.09, 0.698125, 0, 0.833984375}, {1, 1, 1, 0.5})
end
end
else
CoolTip:SetWallpaper (2, [[Interface\BlackMarket\HotItemBanner]], {0.14453125, 0.9296875, 0.2625, 0.6546875}, {1, 1, 1, 0.5}, true)
end
elseif (thisCombat.is_arena) then
local file, coords = _detalhes:GetArenaInfo (thisCombat.is_arena.mapid)
enemy = thisCombat.is_arena.name
CoolTip:AddLine (thisCombat.is_arena.name, _, 1, "yellow")
--131 105 157 127
--0.255859375 0.306640625 0.205078125 0.248046875
CoolTip:AddIcon ([[Interface\AddOns\Details\images\icons]], "main", "left", 16, 12, 0.251953125, 0.306640625, 0.205078125, 0.248046875)
--CoolTip:AddIcon ([[Interface\WorldStateFrame\CombatSwords]], "main", "left", 12, 12, 0, 0.453125, 0.015625, 0.46875)
if (file) then
CoolTip:SetWallpaper (2, "Interface\\Glues\\LOADINGSCREENS\\" .. file, coords, {1, 1, 1, 0.4})
end
else
@@ -4028,6 +4102,7 @@ local build_segment_list = function (self, elapsed)
CoolTip:AddIcon ([[Interface\QUESTFRAME\UI-Quest-BulletPoint]], "main", "left", 16, 16, nil, nil, nil, nil, empty_segment_color)
CoolTip:AddLine (Loc ["STRING_SEGMENT_EMPTY"], _, 2)
CoolTip:AddIcon ([[Interface\CHARACTERFRAME\Disconnect-Icon]], 2, 1, 12, 12, 0.3125, 0.65625, 0.265625, 0.671875)
CoolTip:SetWallpaper (2, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
end
if (menuIndex) then
@@ -4193,13 +4268,6 @@ local build_segment_list = function (self, elapsed)
end
local botao_fechar_on_enter = function (self)
OnEnterMainWindow (self.instancia, self, 3)
end
local botao_fechar_on_leave = function (self)
OnLeaveMainWindow (self.instancia, self, 3)
end
-- ~skin
function _detalhes:ChangeSkin (skin_name)
@@ -5386,7 +5454,78 @@ end
end
end
--> close button functions
local close_button_onclick = function (self, _, button)
self = self or button
self:Disable()
self.instancia:DesativarInstancia()
--> não há mais instâncias abertas, então manda msg alertando
if (_detalhes.opened_windows == 0) then
_detalhes:Msg (Loc ["STRING_CLOSEALL"])
end
GameCooltip:Hide()
end
local close_button_onenter = function (self)
OnEnterMainWindow (self.instance, self, 3)
GameCooltip.buttonOver = true
self.instance.baseframe.cabecalho.button_mouse_over = true
GameCooltip:Reset()
GameCooltip:SetOption ("ButtonsYMod", -2)
GameCooltip:SetOption ("ButtonsYModSub", -2)
GameCooltip:SetOption ("YSpacingMod", 0)
GameCooltip:SetOption ("YSpacingModSub", -3)
GameCooltip:SetOption ("TextHeightMod", 0)
GameCooltip:SetOption ("TextHeightModSub", 0)
GameCooltip:SetOption ("IgnoreButtonAutoHeight", false)
GameCooltip:SetOption ("IgnoreButtonAutoHeightSub", false)
GameCooltip:SetOption ("SubMenuIsTooltip", true)
GameCooltip:SetOption ("FixedWidthSub", 180)
local font = SharedMedia:Fetch ("font", "Friz Quadrata TT")
GameCooltip:AddLine (Loc ["STRING_MENU_CLOSE_INSTANCE"], nil, 1, "white", nil, 10, font)
GameCooltip:AddIcon ([[Interface\Buttons\UI-Panel-MinimizeButton-Up]], 1, 1, 14, 14, 0.2, 0.8, 0.2, 0.8)
GameCooltip:AddMenu (1, close_button_onclick, self)
GameCooltip:AddLine (Loc ["STRING_MENU_CLOSE_INSTANCE_DESC"], nil, 2, "white", nil, 10, font)
GameCooltip:AddIcon ([[Interface\CHATFRAME\UI-ChatIcon-Minimize-Up]], 2, 1, 18, 18)
GameCooltip:AddLine (Loc ["STRING_MENU_CLOSE_INSTANCE_DESC2"], nil, 2, "white", nil, 10, font)
GameCooltip:AddIcon ([[Interface\PaperDollInfoFrame\UI-GearManager-LeaveItem-Transparent]], 2, 1, 18, 18)
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
GameCooltip:SetWallpaper (2, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
show_anti_overlap (self.instance, self, "top")
GameCooltip:ShowCooltip (self, "menu")
end
local close_button_onleave = function (self)
OnLeaveMainWindow (self.instance, self, 3)
hide_anti_overlap (self.instance.baseframe.anti_menu_overlap)
GameCooltip.buttonOver = false
self.instance.baseframe.cabecalho.button_mouse_over = false
if (GameCooltip.active) then
parameters_table [2] = 0
self:SetScript ("OnUpdate", on_leave_menu)
else
self:SetScript ("OnUpdate", nil)
end
end
------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> build upper menu bar
@@ -5405,18 +5544,13 @@ function gump:CriaCabecalho (baseframe, instancia)
baseframe.cabecalho.fechar:SetHighlightTexture ([[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]])
baseframe.cabecalho.fechar:SetPushedTexture ([[Interface\Buttons\UI-Panel-MinimizeButton-Down]])
baseframe.cabecalho.fechar:SetScript ("OnClick", function()
baseframe.cabecalho.fechar:Disable()
instancia:DesativarInstancia()
--> não há mais instâncias abertas, então manda msg alertando
if (_detalhes.opened_windows == 0) then
print (Loc ["STRING_CLOSEALL"])
end
end)
baseframe.cabecalho.fechar.instancia = instancia
baseframe.cabecalho.fechar:SetScript ("OnEnter", botao_fechar_on_enter)
baseframe.cabecalho.fechar:SetScript ("OnLeave", botao_fechar_on_leave)
baseframe.cabecalho.fechar.instance = instancia
baseframe.cabecalho.fechar:SetScript ("OnEnter", close_button_onenter)
baseframe.cabecalho.fechar:SetScript ("OnLeave", close_button_onleave)
baseframe.cabecalho.fechar:SetScript ("OnClick", close_button_onclick)
--> bola do canto esquedo superior --> primeiro criar a armação para apoiar as texturas
baseframe.cabecalho.ball_point = baseframe.cabecalho.fechar:CreateTexture (nil, "overlay")
BIN
View File
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+4
View File
@@ -223,6 +223,10 @@ function _G._detalhes:Start()
self.listener:RegisterEvent ("ENCOUNTER_START")
self.listener:RegisterEvent ("ENCOUNTER_END")
self.listener:RegisterEvent ("START_TIMER")
--self.listener:RegisterEvent ("ARENA_PREP_OPPONENT_SPECIALIZATIONS")
--self.listener:RegisterEvent ("ARENA_OPPONENT_UPDATE")
self.listener:RegisterEvent ("PET_BATTLE_OPENING_START")
self.listener:RegisterEvent ("PET_BATTLE_CLOSE")