- Added Fast Dps/Hps Updates, enable in on Rows: Advanced -> Fast Updates.

- Added custom spell for Mirror Images Fireball and Frostbolt.
- Added new skin: 'ElvUI Style II'.
- Added Observer channel for Raid Tools, it only reports the cooldown/interrupt/death to you in your chat window.
- Added new plugin: Raid Check: it tracks raid members checking food, flask and pre-potions usage.
- Changed DPS display, now it shows onyl the player's Dps and the Dps difference between him and the top ranked.
- Changed Overheal display, now its percentage shows the player's overheal percent.
- Player Detail Window now shows the amount of multistrike on normal and critical hits.
- Removed skin: 'ElvUI Frame Style BW'.
- The tooltip for Scale option under options panel, now shows the real value for the scale.
- Fixed a problem where multistrike was counting towards critical strike amount.
- Fixed death display's report where it was't showing any death.
- Fixed a small issue with Encounter Details plugin where sometimes gets a error right after a boss encounter.
- Fixed bugs on sending messages to chat for Raid Tools.
This commit is contained in:
tercio
2014-12-24 00:57:31 -02:00
parent f5bf6ed55b
commit e4d5d40870
22 changed files with 341 additions and 135 deletions
+18 -23
View File
File diff suppressed because one or more lines are too long
+40 -9
View File
@@ -20,6 +20,7 @@
local _rawget= rawget --lua local
local _math_min = math.min --lua local
local _math_max = math.max --lua local
local _math_abs = math.abs --lua local
local _bit_band = bit.band --lua local
local _unpack = unpack --lua local
local _type = type --lua local
@@ -1144,6 +1145,11 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
end
if (sub_atributo == 2) then --> dps
instancia.player_top_dps = conteudo [1].last_dps
instancia.player_top_dps_threshold = instancia.player_top_dps - (instancia.player_top_dps * 0.65)
end
if (instancia.bars_sort_direction == 1) then --top to bottom
if (use_total_bar and instancia.barraS[1] == 1) then
@@ -1354,7 +1360,7 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
esta_barra.ps_text = formated_dps
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_damage, formated_dps, porcentagem, self))
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_damage, formated_dps, porcentagem, self, instancia.showing))
else
esta_barra.texto_direita:SetText (formated_damage .. " (" .. formated_dps .. ", " .. porcentagem .. "%)") --seta o texto da direita
end
@@ -1362,15 +1368,40 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
elseif (sub_atributo == 2) then --> mostrando dps
local raw_dps = dps
dps = _math_floor (dps)
local formated_damage = SelectedToKFunction (_, damage_total)
local formated_dps = SelectedToKFunction (_, dps)
esta_barra.ps_text = formated_dps
local diff_from_topdps
if (lugar > 1) then
diff_from_topdps = instancia.player_top_dps - raw_dps
end
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_dps, formated_damage, porcentagem, self))
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_dps, formated_damage, porcentagem, self, instancia.showing))
else
esta_barra.texto_direita:SetText (formated_dps .. " (" .. formated_damage .. ", " .. porcentagem .. "%)") --seta o texto da direita
if (diff_from_topdps) then
local threshold = diff_from_topdps / instancia.player_top_dps_threshold * 100
if (threshold < 100) then
threshold = _math_abs (threshold - 100)
else
threshold = 5
end
local rr, gg, bb = _detalhes:percent_color ( threshold )
rr, gg, bb = _detalhes:hex (_math_floor (rr*255)), _detalhes:hex (_math_floor (gg*255)), "28"
local color_percent = "" .. rr .. gg .. bb .. ""
esta_barra.texto_direita:SetText (formated_dps .. " (|cFFFF4444-|r|cFF" .. color_percent .. SelectedToKFunction (_, _math_floor (diff_from_topdps)) .. "|r)") --seta o texto da direita
else
esta_barra.texto_direita:SetText (formated_dps .. " |TInterface\\GROUPFRAME\\UI-Group-LeaderIcon:14:14:0:0:16:16:0:16:0:16|t ") --seta o texto da direita
end
end
esta_porcentagem = _math_floor ((dps/instancia.top) * 100) --> determina qual o tamanho da barra
@@ -1383,7 +1414,7 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
esta_barra.ps_text = formated_dtps
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_damage_taken, formated_dtps, porcentagem, self))
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_damage_taken, formated_dtps, porcentagem, self, instancia.showing))
else
esta_barra.texto_direita:SetText (formated_damage_taken .." (" .. formated_dtps .. ", " .. porcentagem .. "%)") --seta o texto da direita --
end
@@ -1394,7 +1425,7 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
local formated_friendly_fire = SelectedToKFunction (_, self.friendlyfire_total)
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_friendly_fire, "", porcentagem, self))
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_friendly_fire, "", porcentagem, self, instancia.showing))
else
esta_barra.texto_direita:SetText (formated_friendly_fire .. " (" .. porcentagem .. "%)") --seta o texto da direita --
end
@@ -1408,7 +1439,7 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
esta_barra.ps_text = formated_dps
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_damage, formated_dps, porcentagem, self))
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_damage, formated_dps, porcentagem, self, instancia.showing))
else
esta_barra.texto_direita:SetText (formated_damage .. " (" .. formated_dps .. ", " .. porcentagem .. "%)") --seta o texto da direita
end
@@ -2998,12 +3029,12 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
data[#data+1] = t4
multistrike_table.p = esta_magia.m_amt/total_hits*100
t4[1] = esta_magia.m_amt
t4[2] = multistrike_table
t4[3] = Loc ["STRING_MULTISTRIKE_HITS"]
t4[4] = ""
t4[5] = ""
t4[4] = "On Critical: " .. esta_magia.m_crit
t4[5] = "On Normals: " .. (esta_magia.m_amt - esta_magia.m_crit)
t4[6] = Loc ["STRING_AVERAGE"] .. ": " .. _detalhes:comma_value (esta_magia.m_dmg/esta_magia.m_amt)
t4[7] = Loc ["STRING_DPS"] .. ": " .. _detalhes:comma_value (esta_magia.m_dmg/T)
t4[8] = esta_magia.m_amt .. " / " .. _cstr ("%.1f", esta_magia.m_amt/total_hits*100) .. "%"
+55 -45
View File
@@ -35,6 +35,7 @@
--> multistrike
m_amt = 0,
m_dmg = 0,
m_crit = 0,
--off_amt = 0,
--off_dmg = 0,
--main_amt = 0,
@@ -86,63 +87,63 @@
function habilidade_dano:Add (serial, nome, flag, amount, who_nome, resisted, blocked, absorbed, critical, glacing, token, multistrike, isoffhand)
self.counter = self.counter + 1
self.total = self.total + amount
self.targets [nome] = (self.targets [nome] or 0) + amount
if (multistrike) then
self.m_amt = self.m_amt + 1
self.m_dmg = self.m_dmg + amount
end
--[[
if (isoffhand) then
self.off_amt = self.off_amt + 1
self.off_dmg = self.off_dmg + amount
if (critical) then
self.m_crit = self.m_crit + 1
end
else
self.main_amt = self.main_amt + 1
end
--]]
if (resisted and resisted > 0) then
self.r_dmg = self.r_dmg+amount --> tabela.total é o total de dano
self.r_amt = self.r_amt+1 --> tabela.total é o total de dano
end
if (blocked and blocked > 0) then
self.b_dmg = self.b_dmg+amount --> amount é o total de dano
self.b_amt = self.b_amt+1 --> amount é o total de dano
end
self.counter = self.counter + 1
if (absorbed and absorbed > 0) then
self.a_dmg = self.a_dmg+amount --> amount é o total de dano
self.a_amt = self.a_amt+1 --> amount é o total de dano
end
if (resisted and resisted > 0) then
self.r_dmg = self.r_dmg+amount --> tabela.total é o total de dano
self.r_amt = self.r_amt+1 --> tabela.total é o total de dano
end
if (blocked and blocked > 0) then
self.b_dmg = self.b_dmg+amount --> amount é o total de dano
self.b_amt = self.b_amt+1 --> amount é o total de dano
end
if (absorbed and absorbed > 0) then
self.a_dmg = self.a_dmg+amount --> amount é o total de dano
self.a_amt = self.a_amt+1 --> amount é o total de dano
end
self.total = self.total + amount
if (glacing) then
self.g_dmg = self.g_dmg+amount --> amount é o total de dano
self.g_amt = self.g_amt+1 --> amount é o total de dano
if (glacing) then
self.g_dmg = self.g_dmg+amount --> amount é o total de dano
self.g_amt = self.g_amt+1 --> amount é o total de dano
elseif (critical) then
self.c_dmg = self.c_dmg+amount --> amount é o total de dano
self.c_amt = self.c_amt+1 --> amount é o total de dano
if (amount > self.c_max) then
self.c_max = amount
end
if ((self.c_min > amount or self.c_min == 0) and not multistrike) then
self.c_min = amount
end
else
self.n_dmg = self.n_dmg+amount
self.n_amt = self.n_amt+1
if (amount > self.n_max) then
self.n_max = amount
end
if ((self.n_min > amount or self.n_min == 0) and not multistrike) then
self.n_min = amount
elseif (critical) then
self.c_dmg = self.c_dmg+amount --> amount é o total de dano
self.c_amt = self.c_amt+1 --> amount é o total de dano
if (amount > self.c_max) then
self.c_max = amount
end
if (self.c_min > amount or self.c_min == 0) then
self.c_min = amount
end
else
self.n_dmg = self.n_dmg+amount
self.n_amt = self.n_amt+1
if (amount > self.n_max) then
self.n_max = amount
end
if (self.n_min > amount or self.n_min == 0) then
self.n_min = amount
end
end
end
if (_recording_ability_with_buffs) then
@@ -205,3 +206,12 @@
function _detalhes:UpdateDamageAbilityGears()
_recording_ability_with_buffs = _detalhes.RecordPlayerAbilityWithBuffs
end
--[[
if (isoffhand) then
self.off_amt = self.off_amt + 1
self.off_dmg = self.off_dmg + amount
else
self.main_amt = self.main_amt + 1
end
--]]
+1 -1
View File
@@ -635,7 +635,7 @@ function atributo_energy:AtualizaBarra (instancia, barras_container, qual_barra,
local formated_energy = SelectedToKFunction (_, esta_e_energy_total)
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_energy, "", porcentagem, self))
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_energy, "", porcentagem, self, instancia.showing))
else
esta_barra.texto_direita:SetText (formated_energy .. " (" .. porcentagem .. "%)") --seta o texto da direita
end
+14 -7
View File
@@ -614,7 +614,7 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
esta_barra.ps_text = formated_hps
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_heal, formated_hps, porcentagem, self))
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_heal, formated_hps, porcentagem, self, instancia.showing))
else
esta_barra.texto_direita:SetText (formated_heal .." (" .. formated_hps .. ", " .. porcentagem .. "%)") --seta o texto da direita
end
@@ -628,7 +628,7 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
esta_barra.ps_text = formated_hps
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_hps, formated_heal, porcentagem, self))
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_hps, formated_heal, porcentagem, self, instancia.showing))
else
esta_barra.texto_direita:SetText (formated_hps .. " (" .. formated_heal .. ", " .. porcentagem .. "%)") --seta o texto da direita
end
@@ -638,10 +638,17 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
local formated_overheal = SelectedToKFunction (_, self.totalover)
local percent = self.totalover / (self.totalover + self.total) * 100
local overheal_percent = _cstr ("%.1f", percent)
local rr, gg, bb = _detalhes:percent_color (percent, true)
rr, gg, bb = _detalhes:hex (_math_floor (rr*255)), _detalhes:hex (_math_floor (gg*255)), _detalhes:hex (_math_floor (bb*255))
overheal_percent = "|cFF" .. rr .. gg .. bb .. overheal_percent .. "|r"
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_overheal, "", porcentagem, self))
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_overheal, "", overheal_percent, self, instancia.showing))
else
esta_barra.texto_direita:SetText (formated_overheal .." (" .. porcentagem .. "%)") --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
esta_barra.texto_direita:SetText (formated_overheal .." (" .. overheal_percent .. "%)") --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
end
esta_porcentagem = _math_floor ((self.totalover/instancia.top) * 100) --> determina qual o tamanho da barra
@@ -650,7 +657,7 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
local formated_healtaken = SelectedToKFunction (_, self.healing_taken)
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_healtaken, "", porcentagem, self))
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_healtaken, "", porcentagem, self, instancia.showing))
else
esta_barra.texto_direita:SetText (formated_healtaken .. " (" .. porcentagem .. "%)") --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
end
@@ -661,7 +668,7 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
local formated_enemyheal = SelectedToKFunction (_, self.heal_enemy_amt)
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_enemyheal, "", porcentagem, self))
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_enemyheal, "", porcentagem, self, instancia.showing))
else
esta_barra.texto_direita:SetText (formated_enemyheal .. " (" .. porcentagem .. "%)") --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
end
@@ -672,7 +679,7 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
local formated_absorbs = SelectedToKFunction (_, self.totalabsorb)
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_absorbs, "", porcentagem, self))
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_absorbs, "", porcentagem, self, instancia.showing))
else
esta_barra.texto_direita:SetText (formated_absorbs .. " (" .. porcentagem .. "%)") --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
end
+35 -13
View File
@@ -2100,6 +2100,7 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
end
end
_detalhes:InstanceCall (_detalhes.CheckPsUpdate)
_detalhes:SendEvent ("DETAILS_INSTANCE_CHANGEATTRIBUTE", nil, instancia, atributo, sub_atributo)
end
@@ -2117,6 +2118,7 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
instancia:ChangeIcon()
end
_detalhes:InstanceCall (_detalhes.CheckPsUpdate)
_detalhes:SendEvent ("DETAILS_INSTANCE_CHANGEATTRIBUTE", nil, instancia, atributo, sub_atributo)
end
@@ -2673,12 +2675,14 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
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
local reportarMortes = {}
for index, morte in ipairs (mortes) do
reportarMortes [#reportarMortes+1] = {dead = morte [6], nome = morte [3]:gsub (("%-.*"), "")}
end
container = reportarMortes
container_amount = #reportarMortes
keyName = "dead"
else
total, keyName, first, container_amount = _detalhes.atributo_misc:RefreshWindow (self, self.showing, true, true)
@@ -2697,18 +2701,20 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
--print (total, keyName, first, atributo, container_amount)
end
amt = math.min (amt, container_amount or 0)
amt = math.min (amt, container_amount or 0)
--amt é zero
for i = 1, amt do
local _thisActor = container [i]
if (_thisActor) then
local amount
local amount, is_string
if (type (_thisActor [keyName]) == "number") then
amount = _math_floor (_thisActor [keyName])
else
amount = _thisActor [keyName]
is_string = true
end
local name = _thisActor.nome.." "
@@ -2725,21 +2731,29 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
stringlen = _detalhes.fontstring_len:GetStringWidth()
end
local percent
if (self.atributo == 2 and self.sub_atributo == 3) then --overheal
percent = _cstr ("%.1f", _thisActor.totalover / (_thisActor.totalover + _thisActor.total) * 100)
elseif (not is_string) then
percent = _cstr ("%.1f", amount/total*100)
end
if (_type (amount) == "number" and amount > 0) then
if (keyNameSec) then
local dps = GetDpsHps (_thisActor, keyNameSec)
if (_detalhes.report_schema == 1) then
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. _detalhes:ToKMin ( _math_floor (amount) ) .. " (" .. _detalhes:ToKMin (_math_floor (dps)) .. ", " .. _cstr ("%.2f", amount/total*100) .. "%)"
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. _detalhes:ToKMin ( _math_floor (amount) ) .. " (" .. _detalhes:ToKMin (_math_floor (dps)) .. ", " .. percent .. "%)"
elseif (_detalhes.report_schema == 2) then
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. _cstr ("%.2f", amount/total*100) .. "% (" .. _detalhes:ToKMin (_math_floor (dps)) .. ", " .. _detalhes:ToKMin ( _math_floor (amount)) .. ")"
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. percent .. "% (" .. _detalhes:ToKMin (_math_floor (dps)) .. ", " .. _detalhes:ToKMin ( _math_floor (amount)) .. ")"
elseif (_detalhes.report_schema == 3) then
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. _cstr ("%.2f", amount/total*100) .. "% (" .. _detalhes:ToKMin ( _math_floor (amount) ) .. ", " .. _detalhes:ToKMin (_math_floor (dps)) .. ")"
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. percent .. "% (" .. _detalhes:ToKMin ( _math_floor (amount) ) .. ", " .. _detalhes:ToKMin (_math_floor (dps)) .. ")"
end
else
if (_detalhes.report_schema == 1) then
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. _detalhes:ToKReport (amount) .. " (" .. _cstr ("%.1f", amount/total*100) .. "%)"
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. _detalhes:ToKReport (amount) .. " (" .. percent .. "%)"
else
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. _cstr ("%.1f", amount/total*100) .. "% (" .. _detalhes:ToKReport (amount) .. ")"
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. percent .. "% (" .. _detalhes:ToKReport (amount) .. ")"
end
end
@@ -2850,20 +2864,28 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
if (_type (amount) == "number") then
if (amount > 0) then
local percent
if (self.atributo == 2 and self.sub_atributo == 3) then --overheal
percent = _cstr ("%.1f", _thisActor.totalover / (_thisActor.totalover + _thisActor.total) * 100)
else
percent = _cstr ("%.1f", amount/total*100)
end
if (keyNameSec) then
local dps = GetDpsHps (_thisActor, keyNameSec)
if (_detalhes.report_schema == 1) then
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. _detalhes:ToKMin ( _math_floor (amount) ) .. " (" .. _detalhes:ToKMin (_math_floor (dps)) .. ", " .. _cstr ("%.2f", amount/total*100) .. "%)"
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. _detalhes:ToKMin ( _math_floor (amount) ) .. " (" .. _detalhes:ToKMin (_math_floor (dps)) .. ", " .. percent .. "%)"
elseif (_detalhes.report_schema == 2) then
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. _cstr ("%.2f", amount/total*100) .. "% (" .. _detalhes:ToKMin (_math_floor (dps)) .. ", " .. _detalhes:ToKMin ( _math_floor (amount)) .. ")"
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. percent .. "% (" .. _detalhes:ToKMin (_math_floor (dps)) .. ", " .. _detalhes:ToKMin ( _math_floor (amount)) .. ")"
elseif (_detalhes.report_schema == 3) then
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. _cstr ("%.2f", amount/total*100) .. "% (" .. _detalhes:ToKMin ( _math_floor (amount) ) .. ", " .. _detalhes:ToKMin (_math_floor (dps)) .. ")"
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. percent .. "% (" .. _detalhes:ToKMin ( _math_floor (amount) ) .. ", " .. _detalhes:ToKMin (_math_floor (dps)) .. ")"
end
else
if (_detalhes.report_schema == 1) then
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. _detalhes:ToKReport (amount) .. " (" .. _cstr ("%.1f", amount/total*100) .. "%)"
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. _detalhes:ToKReport (amount) .. " (" .. percent .. "%)"
else
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. _cstr ("%.1f", amount/total*100) .. "% (" .. _detalhes:ToKReport (amount) .. ")"
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. _cstr ("%.1f", amount/total*100) .. "% (" .. percent .. ")"
end
end
+2
View File
@@ -176,6 +176,8 @@ _detalhes.instance_defaults = {
lower_model = [[World\EXPANSION02\DOODADS\Coldarra\COLDARRALOCUS.m2]],
lower_alpha = 0.10,
},
--fast hps/dps updates
fast_ps_update = false,
},
--instance window color
color = {1, 1, 1, 1},
+1 -1
View File
@@ -753,7 +753,7 @@ function atributo_misc:AtualizaBarra (instancia, barras_container, qual_barra, l
local esta_porcentagem = _math_floor ((meu_total/instancia.top) * 100)
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, meu_total, "", porcentagem, self))
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, meu_total, "", porcentagem, self, instancia.showing))
else
esta_barra.texto_direita:SetText (meu_total .." (" .. porcentagem .. "%)") --seta o texto da direita
end
+5 -1
View File
@@ -233,7 +233,7 @@
--> internal functions
-- _detalhes.statistics = {container_calls = 0, container_pet_calls = 0, container_unknow_pet = 0, damage_calls = 0, heal_calls = 0, absorbs_calls = 0, energy_calls = 0, pets_summons = 0}
-- ~start
-- ~start ~inicio
function _detalhes:EntrarEmCombate (...)
if (_detalhes.debug) then
@@ -332,6 +332,8 @@
end
end
_detalhes:InstanceCall (_detalhes.CheckPsUpdate)
_detalhes:SendEvent ("COMBAT_PLAYER_ENTER", nil, _detalhes.tabela_vigente)
_detalhes:HaveOneCurrentInstance()
@@ -610,6 +612,8 @@
_detalhes.pre_pot_used = nil
_table_wipe (_detalhes.encounter_table)
_detalhes:InstanceCall (_detalhes.CheckPsUpdate)
if (invalid_combat) then
_detalhes:SendEvent ("COMBAT_INVALID")
_detalhes:SendEvent ("COMBAT_PLAYER_LEAVE", nil, invalid_combat)
+4 -4
View File
@@ -1,7 +1,3 @@
--File Revision: 1
--Last Modification: 27/07/2013
-- Change Log:
-- 27/07/2013: Finished alpha version.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -163,6 +159,10 @@
who_name = "[*] "..spellname
end
if (absorbed) then
amount = absorbed + (amount or 0)
end
--> Fix for mage prismatic crystal
--local npcId = _detalhes:GetNpcIdFromGuid (alvo_serial)
--if (npcId == 76933) then
+7 -3
View File
@@ -160,7 +160,7 @@
return args [tonumber(i)]
end
local run_function = function (str)
local okey, value = _pcall (loadstring (str), args[4])
local okey, value = _pcall (loadstring (str), args[4], args[5])
if (not okey) then
_detalhes:Msg ("|cFFFF9900error on custom text function|r:", value)
return 0
@@ -233,7 +233,7 @@
return s
end
function _detalhes:percent_color (value)
function _detalhes:percent_color (value, inverted)
local r, g
if (value < 50) then
r = 255
@@ -247,7 +247,11 @@
g = _math_floor ( (value * 2) * 255 / 100)
end
return r/255, g/255, 0
if (inverted) then
return g/255, r/255, 0
else
return r/255, g/255, 0
end
end
--> unpack more than 1 table
+3
View File
@@ -65,6 +65,9 @@ do
[7] = {name = Loc ["STRING_ENVIRONMENTAL_LAVA"], icon = [[Interface\ICONS\Ability_Rhyolith_Volcano]]},
[8] = {name = Loc ["STRING_ENVIRONMENTAL_SLIME"], icon = [[Interface\ICONS\Ability_Creature_Poison_02]]},
[59638] = {name = GetSpellInfo (59638) .. " (" .. Loc ["STRING_MIRROR_IMAGE"] .. ")"}, --> Mirror Image's Frost Bolt (mage)
[88082] = {name = GetSpellInfo (88082) .. " (" .. Loc ["STRING_MIRROR_IMAGE"] .. ")"}, --> Mirror Image's Fireball (mage)
[94472] = {name = GetSpellInfo (94472) .. " (" .. Loc ["STRING_CRITICAL_ONLY"] .. ")"}, --> Atonement critical hit (priest)
[140816] = {name = GetSpellInfo (140816) .. " (" .. Loc ["STRING_CRITICAL_ONLY"] .. ")"}, --> Power Word: Solace critical hit (priest)
+47 -21
View File
@@ -5027,19 +5027,6 @@ function window:CreateFrame4()
frame4.BackdropColorPick:SetPoint ("left", frame4.BackdropColorLabel, "right", 2, 0)
local background = window:CreateLineBackground2 (frame4, "BackdropColorPick", "BackdropColorLabel", Loc ["STRING_OPTIONS_BAR_BACKDROP_COLOR_DESC"])
--player bar
g:NewLabel (frame4, _, "$parentPlayerBarAnchor", "PlayerBarAnchor", Loc ["STRING_OPTIONS_BAR_FOLLOWING_ANCHOR"], "GameFontNormal")
g:NewLabel (frame4, _, "$parentShowMeLabel", "ShowMeLabel", Loc ["STRING_OPTIONS_BAR_FOLLOWING"], "GameFontHighlightLeft")
g:NewSwitch (frame4, _, "$parentShowMeSlider", "ShowMeSlider", 60, 20, _, _, instance.following.enabled)
frame4.ShowMeSlider:SetPoint ("left", frame4.ShowMeLabel, "right", 2, -1)
frame4.ShowMeSlider.OnSwitch = function (self, instance, value)
--instance.following.enabled = value
instance:SetBarFollowPlayer (value)
end
window:CreateLineBackground2 (frame4, "ShowMeSlider", "ShowMeLabel", Loc ["STRING_OPTIONS_BAR_FOLLOWING_DESC"])
--> Anchors:
local x = window.left_start_at
@@ -5074,8 +5061,7 @@ function window:CreateFrame4()
{frame4.rowLowerTextureLabel, 4, true},
{frame4.rowBackgroundLabel, 5},
{frame4.rowBackgroundPickLabel, 6},
{"PlayerBarAnchor", 7, true},
{"ShowMeLabel", 8},
}
window:arrange_menu (frame4, left_side, x, -90)
@@ -5083,6 +5069,7 @@ function window:CreateFrame4()
end
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Appearance - Texts ~5
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -6347,7 +6334,36 @@ function window:CreateFrame8()
end)
window:CreateLineBackground2 (frame8, "ModelLowerAlphaSlider", "ModelLowerAlphaLabel", Loc ["STRING_OPTIONS_3D_LALPHA_DESC"])
--> fast updates
--> anchor
g:NewLabel (frame8, _, "$parentBarUpdateRateAnchor", "BarUpdateRateAnchor", Loc ["STRING_OPTIONS_BARUR_ANCHOR"], "GameFontNormal")
--> enable fast updates
g:NewLabel (frame8, _, "$parentBarUpdateRateLabel", "BarUpdateRateLabel", Loc ["STRING_OPTIONS_BARUR_ENABLED"], "GameFontHighlightLeft")
g:NewSwitch (frame8, _, "$parentBarUpdateRateSlider", "BarUpdateRateSlider", 60, 20, _, _, _G.DetailsOptionsWindow.instance.row_info.fast_ps_update)
frame8.BarUpdateRateSlider:SetPoint ("left", frame8.BarUpdateRateLabel, "right", 2, -1)
frame8.BarUpdateRateSlider.OnSwitch = function (self, instance, value)
instance:FastPSUpdate (value)
end
window:CreateLineBackground2 (frame8, "BarUpdateRateSlider", "BarUpdateRateLabel", Loc ["STRING_OPTIONS_BARUR_DESC"])
--> player bar
--> anchor
g:NewLabel (frame8, _, "$parentPlayerBarAnchor", "PlayerBarAnchor", Loc ["STRING_OPTIONS_BAR_FOLLOWING_ANCHOR"], "GameFontNormal")
--> enable player bar
g:NewLabel (frame8, _, "$parentShowMeLabel", "ShowMeLabel", Loc ["STRING_OPTIONS_BAR_FOLLOWING"], "GameFontHighlightLeft")
g:NewSwitch (frame8, _, "$parentShowMeSlider", "ShowMeSlider", 60, 20, _, _, instance.following.enabled)
frame8.ShowMeSlider:SetPoint ("left", frame8.ShowMeLabel, "right", 2, -1)
frame8.ShowMeSlider.OnSwitch = function (self, instance, value)
instance:SetBarFollowPlayer (value)
end
window:CreateLineBackground2 (frame8, "ShowMeSlider", "ShowMeLabel", Loc ["STRING_OPTIONS_BAR_FOLLOWING_DESC"])
--> anchors
local x = window.left_start_at
@@ -6368,7 +6384,16 @@ function window:CreateFrame8()
}
window:arrange_menu (frame8, left_side, x, -90)
local right_side = {
{"BarUpdateRateAnchor", 1, true},
{"BarUpdateRateLabel", 2},
{"PlayerBarAnchor", 3, true},
{"ShowMeLabel", 4},
}
window:arrange_menu (frame8, right_side, window.right_start_at, window.top_start_at)
end
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -8468,10 +8493,6 @@ end --> if not window
_G.DetailsOptionsWindow4BarStartSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow4BarStartSlider.MyObject:SetValue (editing_instance.row_info.start_after_icon)
_G.DetailsOptionsWindow4ShowMeSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow4ShowMeSlider.MyObject:SetValue (editing_instance.following.enabled)
_G.DetailsOptionsWindow4BackdropBorderTextureDropdown.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow4BackdropEnabledSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow4BackdropSizeHeight.MyObject:SetFixedParameter (editing_instance)
@@ -8577,7 +8598,12 @@ end --> if not window
_G.DetailsOptionsWindow8ModelLowerAlphaSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow8ModelLowerAlphaSlider.MyObject:SetValue (editing_instance.row_info.models.lower_alpha)
_G.DetailsOptionsWindow8BarUpdateRateSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow8BarUpdateRateSlider.MyObject:SetValue (editing_instance.row_info.fast_ps_update)
_G.DetailsOptionsWindow8ShowMeSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow8ShowMeSlider.MyObject:SetValue (editing_instance.following.enabled)
--> window 10
_G.DetailsOptionsWindow10SliderMemory.MyObject:SetValue (_detalhes.memory_threshold)
+90
View File
@@ -35,6 +35,8 @@ local modo_alone = _detalhes._detalhes_props["MODO_ALONE"]
local modo_grupo = _detalhes._detalhes_props["MODO_GROUP"]
local modo_all = _detalhes._detalhes_props["MODO_ALL"]
local tok_functions = _detalhes.ToKFunctions
--constants
local baseframe_strata = "LOW"
local gump_fundo_backdrop = {
@@ -3550,6 +3552,94 @@ end
--/script _detalhes:InstanceRefreshRows (_detalhes.tabela_instancias[1])
--> on update function
local fast_ps_func = function (self)
local instance = self.instance
local combat_time = instance.showing:GetCombatTime()
local ps_type = _detalhes.ps_abbreviation
for i = 1, instance.rows_fit_in_window do --instance:GetNumRows()
local row = instance.barras [i] --instance:GetRow (i)
if (row and row:IsShown()) then
local actor = row.minha_tabela
if (actor) then
local dps_text = row.ps_text
if (dps_text) then
local new_dps = _math_floor (actor.total / combat_time)
local formated_dps = tok_functions [ps_type] (_, new_dps)
row.texto_direita:SetText (row.texto_direita:GetText():gsub (dps_text, formated_dps))
row.ps_text = formated_dps
end
end
end
end
end
--> check if can start or need to stop
function _detalhes:CheckPsUpdate()
local is_enabled = self.row_info.fast_ps_update
if (is_enabled) then
--> check if the frame is created
if (not self.ps_update_frame) then
self.ps_update_frame = CreateFrame ("frame", "DetailsInstance" .. self.meu_id .. "PsUpdate", self.baseframe)
self.ps_update_frame.instance = self
end
--> if isn't in combat, just stop
if (not _detalhes.in_combat) then
if (self.ps_update_frame.is_running) then
self.ps_update_frame.is_running = nil
self.ps_update_frame:Hide()
self.ps_update_frame:SetScript ("OnUpdate", nil)
end
return
end
--> check if needs to start
local attribute, sub_attribute = self:GetDisplay()
--> check if the instance is showing damage done/dps or healing done/hps
if ( (attribute == 1 and (sub_attribute == 1 or sub_attribute == 2)) or (attribute == 2 and (sub_attribute == 1 or sub_attribute == 2))) then
if (not self.ps_update_frame.is_running) then
self.ps_update_frame.is_running = true
self.ps_update_frame:Show()
self.ps_update_frame:SetScript ("OnUpdate", fast_ps_func)
end
else
--> check if needs to stop
if (self.ps_update_frame.is_running) then
self.ps_update_frame.is_running = nil
self.ps_update_frame:Hide()
self.ps_update_frame:SetScript ("OnUpdate", nil)
end
end
else
if (self.ps_update_frame and self.ps_update_frame.is_running) then
self.ps_update_frame.is_running = nil
self.ps_update_frame:Hide()
self.ps_update_frame:SetScript ("OnUpdate", nil)
end
end
end
-- /run _detalhes:GetInstance(1):FastPSUpdate (true)
-- /dump (_detalhes:GetInstance(1).fast_ps_update)
function _detalhes:FastPSUpdate (enabled)
if (type (enabled) ~= "boolean") then
enabled = self.row_info.fast_ps_update
end
self.row_info.fast_ps_update = enabled
self:CheckPsUpdate()
end
-- search key: ~row
function _detalhes:InstanceRefreshRows (instancia)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1723,6 +1723,11 @@ do
}
emote_frame:SetScript ("OnEvent", function (...)
if (not EncounterDetails.current_whisper_table) then
return
end
local combat = EncounterDetails:GetCombat ("current")
--local arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 = ...
--print ("2 =", arg2, "3 =", arg3, "4 =", arg4, "5 =", arg5, "6 =", arg6, "7 =", arg7, "8 =", arg8, "9 =", arg9)
@@ -280,16 +280,23 @@ local food_list = {
elseif (button == "RightButton") then
--> link no pre-pot latest segment
local s = "No Pre-Pot Last Try: "
local s = "Details!: No Pre-Pot Last Try: "
for i = 1, GetNumGroupMembers(), 1 do
local playerName, realmName = _UnitName ("raid" .. i)
if (realmName and realmName ~= "") then
playerName = playerName .. "-" .. realmName
end
local role = _UnitGroupRolesAssigned ("raid" .. i)
if (role == "DAMAGER" or (role == "HEALER" and DetailsRaidCheck.db.pre_pot_healers) or (role == "TANK" and DetailsRaidCheck.db.pre_pot_tanks)) then
local playerName, realmName = _UnitName ("raid" .. i)
if (realmName and realmName ~= "") then
playerName = playerName .. "-" .. realmName
end
if (not DetailsRaidCheck.usedprepot_table [playerName]) then
s = s .. DetailsRaidCheck:GetOnlyName (playerName) .. " "
end
if (not DetailsRaidCheck.usedprepot_table [playerName]) then
s = s .. DetailsRaidCheck:GetOnlyName (playerName) .. " "
end
end