- Fixed the click to switch segment through segment button: left click changes up, right click changes down, middle mouse switch back to current segment.

- Advanced Damage Taken now also makes the damage Taken by tanks always be post-mitigated by shields.
This commit is contained in:
Tercioo
2016-01-25 12:48:03 -02:00
parent bec0adfabf
commit cc7552a07f
4 changed files with 87 additions and 4 deletions
+5 -3
View File
File diff suppressed because one or more lines are too long
+17
View File
@@ -4769,6 +4769,11 @@ end
shadow.targets [target_name] = (shadow.targets [target_name] or 0) + amount
end
--> copiar o container de raid targets
for flag, amount in _pairs (actor.raid_targets) do
shadow.raid_targets [flag] = (shadow.raid_targets [flag] or 0) + amount
end
--> copia o container de habilidades (captura de dados)
for spellid, habilidade in _pairs (actor.spells._ActorTable) do
--> cria e soma o valor
@@ -4846,6 +4851,11 @@ atributo_damage.__add = function (tabela1, tabela2)
tabela1.targets [target_name] = (tabela1.targets [target_name] or 0) + amount
end
--> soma o container de raid targets
for flag, amount in _pairs (tabela2.raid_targets) do
tabela1.raid_targets [flag] = (tabela1.raid_targets [flag] or 0) + amount
end
--> soma o container de habilidades
for spellid, habilidade in _pairs (tabela2.spells._ActorTable) do
--> pega a habilidade no primeiro ator
@@ -4918,6 +4928,13 @@ atributo_damage.__sub = function (tabela1, tabela2)
end
end
--> reduz o container de raid targets
for flag, amount in _pairs (tabela2.raid_targets) do
if (tabela1.raid_targets [flag]) then
tabela1.raid_targets [flag] = _math_max (tabela1.raid_targets [flag] - amount, 0)
end
end
--> reduz o container de habilidades
for spellid, habilidade in _pairs (tabela2.spells._ActorTable) do
--> pega a habilidade no primeiro ator
+7
View File
@@ -350,6 +350,13 @@
if (absorbed) then
amount = (amount or 0) - absorbed
end
else
--> advanced damage taken
if (_detalhes.damage_taken_everything) then
if (absorbed) then
amount = (amount or 0) - absorbed
end
end
end
--]]
+58 -1
View File
@@ -8144,6 +8144,58 @@ function _detalhes:CreateFakeWindow()
return t
end
local function click_to_change_segment (instancia, buttontype)
if (buttontype == "LeftButton") then
local segmento_goal = instancia.segmento + 1
if (segmento_goal > segments_used) then
segmento_goal = -1
elseif (segmento_goal > _detalhes.segments_amount) then
segmento_goal = -1
end
local total_shown = segments_filled+2
local goal = segmento_goal+1
local select_ = math.abs (goal - total_shown)
GameCooltip:Select (1, select_)
instancia:TrocaTabela (segmento_goal)
segmento_on_enter (instancia.baseframe.cabecalho.segmento.widget, _, true, true)
elseif (buttontype == "RightButton") then
local segmento_goal = instancia.segmento - 1
if (segmento_goal < -1) then
segmento_goal = segments_used
end
local total_shown = segments_filled+2
local goal = segmento_goal+1
local select_ = math.abs (goal - total_shown)
GameCooltip:Select (1, select_)
instancia:TrocaTabela (segmento_goal)
segmento_on_enter (instancia.baseframe.cabecalho.segmento.widget, _, true, true)
elseif (buttontype == "MiddleButton") then
local segmento_goal = 0
local total_shown = segments_filled+2
local goal = segmento_goal+1
local select_ = math.abs (goal - total_shown)
GameCooltip:Select (1, select_)
instancia:TrocaTabela (segmento_goal)
segmento_on_enter (instancia.baseframe.cabecalho.segmento.widget, _, true, true)
end
end
function gump:CriaCabecalho (baseframe, instancia)
baseframe.cabecalho = {}
@@ -8327,9 +8379,11 @@ function gump:CriaCabecalho (baseframe, instancia)
--> SELECIONAR O SEGMENTO ----------------------------------------------------------------------------------------------------------------------------------------------------
local segmento_button_click = function()
local segmento_button_click = function (self, button, param1)
if (_detalhes.instances_menu_click_to_open) then
segmento_on_enter (instancia.baseframe.cabecalho.segmento.widget, _, true, true)
else
click_to_change_segment (instancia, button)
end
end
@@ -8337,6 +8391,9 @@ function gump:CriaCabecalho (baseframe, instancia)
baseframe.cabecalho.segmento:SetFrameLevel (baseframe.UPFrame:GetFrameLevel()+1)
baseframe.cabecalho.segmento.widget._instance = instancia
baseframe.cabecalho.segmento:SetPoint ("left", baseframe.cabecalho.modo_selecao, "right", 0, 0)
--> ativa botão do meio e direito
baseframe.cabecalho.segmento:SetClickFunction (segmento_button_click, nil, nil, "rightclick")
baseframe.cabecalho.segmento:SetScript ("OnEnter", segmento_on_enter)
baseframe.cabecalho.segmento:SetScript ("OnLeave", segmento_on_leave)