- Added new custom display: Health Potion & Stone.
- Added tooltip and support for healers on 'My Spells' display. - Changed healing multistrike to use the same format as damage done. - Fre improvements on Tiny Threat plugin: color gradient green-red is fixed, texts and bar texture now correctly uses the window settings. - Fixed 'First Hit' raid tool. - Fixed 'Open Options Panel' from interface panel.
This commit is contained in:
+216
-74
@@ -143,6 +143,10 @@
|
||||
return _detalhes:EndRefresh (instance, 0, combat, combat [1])
|
||||
end
|
||||
|
||||
total = total or 0
|
||||
top = top or 0
|
||||
amount = amount or 0
|
||||
|
||||
else
|
||||
--> get the attribute
|
||||
local attribute = custom_object:GetAttribute()
|
||||
@@ -1245,20 +1249,74 @@
|
||||
self.custom [#self.custom+1] = PotionUsed
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local Healthstone = {
|
||||
name = Loc ["STRING_CUSTOM_HEALTHSTONE_DEFAULT"],
|
||||
icon = [[Interface\ICONS\warlock_ healthstone]],
|
||||
attribute = "healdone",
|
||||
spellid = 6262,
|
||||
author = "Details!",
|
||||
attribute = false,
|
||||
spellid = false,
|
||||
author = "Details! Team",
|
||||
desc = Loc ["STRING_CUSTOM_HEALTHSTONE_DEFAULT_DESC"],
|
||||
source = "[raid]",
|
||||
target = "[raid]",
|
||||
script = false,
|
||||
tooltip = false,
|
||||
script_version = 1,
|
||||
source = false,
|
||||
target = false,
|
||||
script = [[
|
||||
--get the parameters passed
|
||||
local combat, instance_container, instance = ...
|
||||
--declade the values to return
|
||||
local total, top, amount = 0, 0, 0
|
||||
|
||||
--do the loop
|
||||
local AllHealCharacters = combat:GetActorList (DETAILS_ATTRIBUTE_HEAL)
|
||||
for index, character in ipairs (AllHealCharacters) do
|
||||
local AllSpells = character:GetSpellList()
|
||||
local found = false
|
||||
for spellid, spell in pairs (AllSpells) do
|
||||
if (spellid == 6262 or spellid == 156445) then
|
||||
instance_container:AddValue (character, spell.total)
|
||||
total = total + spell.total
|
||||
if (top < spell.total) then
|
||||
top = spell.total
|
||||
end
|
||||
found = true
|
||||
end
|
||||
end
|
||||
|
||||
if (found) then
|
||||
amount = amount + 1
|
||||
end
|
||||
end
|
||||
--loop end
|
||||
--return the values
|
||||
return total, top, amount
|
||||
]],
|
||||
tooltip = [[
|
||||
--get the parameters passed
|
||||
local actor, combat, instance = ...
|
||||
|
||||
--get the cooltip object (we dont use the convencional GameTooltip here)
|
||||
local GameCooltip = GameCooltip
|
||||
local R, G, B, A = 0, 0, 0, 0.75
|
||||
local hs = actor:GetSpell (6262)
|
||||
if (hs) then
|
||||
GameCooltip:AddLine (select (1, GetSpellInfo(6262)), _detalhes:ToK(hs.total))
|
||||
GameCooltip:AddIcon (select (3, GetSpellInfo (6262)), 1, 1, 16, 16)
|
||||
GameCooltip:AddStatusBar (100, 1, R, G, B, A)
|
||||
end
|
||||
|
||||
local pot = actor:GetSpell (156445)
|
||||
if (pot) then
|
||||
GameCooltip:AddLine (select (1, GetSpellInfo(156445)), _detalhes:ToK(pot.total))
|
||||
GameCooltip:AddIcon (select (3, GetSpellInfo (156445)), 1, 1, 16, 16)
|
||||
GameCooltip:AddStatusBar (100, 1, R, G, B, A)
|
||||
end
|
||||
--Cooltip code
|
||||
]],
|
||||
percent_script = false,
|
||||
total_script = false,
|
||||
script_version = 3,
|
||||
}
|
||||
|
||||
-- /run_detalhes:AddDefaultCustomDisplays()
|
||||
local have = false
|
||||
for _, custom in ipairs (self.custom) do
|
||||
if (custom.name == Loc ["STRING_CUSTOM_HEALTHSTONE_DEFAULT"] and (custom.script_version and custom.script_version >= Healthstone.script_version) ) then
|
||||
@@ -1276,7 +1334,7 @@
|
||||
Healthstone.__index = _detalhes.atributo_custom
|
||||
self.custom [#self.custom+1] = Healthstone
|
||||
end
|
||||
|
||||
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local DamageActivityTime = {
|
||||
@@ -1571,15 +1629,26 @@
|
||||
desc = Loc ["STRING_CUSTOM_MYSPELLS_DESC"],
|
||||
source = false,
|
||||
target = false,
|
||||
script_version = 1,
|
||||
script_version = 2,
|
||||
script = [[
|
||||
--get the parameters passed
|
||||
local combat, instance_container, instance = ...
|
||||
--declade the values to return
|
||||
local total, top, amount = 0, 0, 0
|
||||
|
||||
local player
|
||||
local role = UnitGroupRolesAssigned ("player")
|
||||
|
||||
if (role == "DAMAGER") then
|
||||
player = combat (DETAILS_ATTRIBUTE_DAMAGE, _detalhes.playername)
|
||||
elseif (role == "HEALER") then
|
||||
player = combat (DETAILS_ATTRIBUTE_HEAL, _detalhes.playername)
|
||||
else
|
||||
player = combat (DETAILS_ATTRIBUTE_DAMAGE, _detalhes.playername)
|
||||
end
|
||||
|
||||
--do the loop
|
||||
local player = combat (DETAILS_ATTRIBUTE_DAMAGE, _detalhes.playername)
|
||||
|
||||
if (player) then
|
||||
local spells = player:GetSpellList()
|
||||
for spellid, spell in pairs (spells) do
|
||||
@@ -1610,71 +1679,144 @@
|
||||
local GC = GameCooltip
|
||||
GC:SetOption ("YSpacingMod", 1)
|
||||
|
||||
local role = UnitGroupRolesAssigned ("player")
|
||||
|
||||
local spellschool, schooltext = spell.spellschool, ""
|
||||
if (spellschool) then
|
||||
local t = _detalhes.spells_school [spellschool]
|
||||
if (t and t.name) then
|
||||
schooltext = t.formated
|
||||
end
|
||||
end
|
||||
|
||||
local total_hits = spell.counter
|
||||
local combat_time = instance.showing:GetCombatTime()
|
||||
|
||||
--Cooltip code
|
||||
GC:AddLine ("Hits:", spell.counter)
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
local average = spell.total / total_hits
|
||||
GC:AddLine ("Average:", _detalhes:ToK (average))
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
GC:AddLine ("E-Dps:", _detalhes:ToK (spell.total / combat_time))
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
GC:AddLine ("School:", schooltext)
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
--GC:AddLine (" ")
|
||||
|
||||
GC:AddLine ("Normal Hits: ", spell.n_amt .. " (" ..floor ( spell.n_amt/total_hits*100) .. "%)")
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
local n_average = spell.n_dmg / spell.n_amt
|
||||
local T = (combat_time*spell.n_dmg)/spell.total
|
||||
local P = average/n_average*100
|
||||
T = P*T/100
|
||||
|
||||
GC:AddLine ("Average / E-Dps: ", _detalhes:ToK (n_average) .. " / " .. format ("%.1f",spell.n_dmg / T ))
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
--GC:AddLine (" ")
|
||||
|
||||
GC:AddLine ("Critical Hits: ", spell.c_amt .. " (" ..floor ( spell.c_amt/total_hits*100) .. "%)")
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
if (spell.c_amt > 0) then
|
||||
local c_average = spell.c_dmg/spell.c_amt
|
||||
local T = (combat_time*spell.c_dmg)/spell.total
|
||||
local P = average/c_average*100
|
||||
T = P*T/100
|
||||
local crit_dps = spell.c_dmg / T
|
||||
if (spell.n_dmg) then
|
||||
|
||||
local spellschool, schooltext = spell.spellschool, ""
|
||||
if (spellschool) then
|
||||
local t = _detalhes.spells_school [spellschool]
|
||||
if (t and t.name) then
|
||||
schooltext = t.formated
|
||||
end
|
||||
end
|
||||
|
||||
local total_hits = spell.counter
|
||||
local combat_time = instance.showing:GetCombatTime()
|
||||
|
||||
--Cooltip code
|
||||
GC:AddLine ("Hits:", spell.counter)
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
local average = spell.total / total_hits
|
||||
GC:AddLine ("Average:", _detalhes:ToK (average))
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
GC:AddLine ("E-Dps:", _detalhes:ToK (spell.total / combat_time))
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
GC:AddLine ("School:", schooltext)
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
--GC:AddLine (" ")
|
||||
|
||||
GC:AddLine ("Normal Hits: ", spell.n_amt .. " (" ..floor ( spell.n_amt/total_hits*100) .. "%)")
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
local n_average = spell.n_dmg / spell.n_amt
|
||||
local T = (combat_time*spell.n_dmg)/spell.total
|
||||
local P = average/n_average*100
|
||||
T = P*T/100
|
||||
|
||||
GC:AddLine ("Average / E-Dps: ", _detalhes:ToK (n_average) .. " / " .. format ("%.1f",spell.n_dmg / T ))
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
--GC:AddLine (" ")
|
||||
|
||||
GC:AddLine ("Critical Hits: ", spell.c_amt .. " (" ..floor ( spell.c_amt/total_hits*100) .. "%)")
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
if (spell.c_amt > 0) then
|
||||
local c_average = spell.c_dmg/spell.c_amt
|
||||
local T = (combat_time*spell.c_dmg)/spell.total
|
||||
local P = average/c_average*100
|
||||
T = P*T/100
|
||||
local crit_dps = spell.c_dmg / T
|
||||
|
||||
GC:AddLine ("Average / E-Dps: ", _detalhes:ToK (c_average) .. " / " .. _detalhes:comma_value (crit_dps))
|
||||
else
|
||||
GC:AddLine ("Average / E-Dps: ", "0 / 0")
|
||||
end
|
||||
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
--GC:AddLine (" ")
|
||||
|
||||
GC:AddLine ("Multistrike: ", spell.m_amt .. " (" ..floor ( spell.m_amt/total_hits*100) .. "%)")
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
GC:AddLine ("On Normal / On Critical:", spell.m_amt - spell.m_crit .. " / " .. spell.m_crit)
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
elseif (spell.n_curado) then
|
||||
|
||||
local spellschool, schooltext = spell.spellschool, ""
|
||||
if (spellschool) then
|
||||
local t = _detalhes.spells_school [spellschool]
|
||||
if (t and t.name) then
|
||||
schooltext = t.formated
|
||||
end
|
||||
end
|
||||
|
||||
local total_hits = spell.counter
|
||||
local combat_time = instance.showing:GetCombatTime()
|
||||
|
||||
--Cooltip code
|
||||
GC:AddLine ("Hits:", spell.counter)
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
local average = spell.total / total_hits
|
||||
GC:AddLine ("Average:", _detalhes:ToK (average))
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
GC:AddLine ("E-Hps:", _detalhes:ToK (spell.total / combat_time))
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
GC:AddLine ("School:", schooltext)
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
--GC:AddLine (" ")
|
||||
|
||||
GC:AddLine ("Normal Hits: ", spell.n_amt .. " (" ..floor ( spell.n_amt/total_hits*100) .. "%)")
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
local n_average = spell.n_curado / spell.n_amt
|
||||
local T = (combat_time*spell.n_curado)/spell.total
|
||||
local P = average/n_average*100
|
||||
T = P*T/100
|
||||
|
||||
GC:AddLine ("Average / E-Dps: ", _detalhes:ToK (n_average) .. " / " .. format ("%.1f",spell.n_curado / T ))
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
--GC:AddLine (" ")
|
||||
|
||||
GC:AddLine ("Critical Hits: ", spell.c_amt .. " (" ..floor ( spell.c_amt/total_hits*100) .. "%)")
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
if (spell.c_amt > 0) then
|
||||
local c_average = spell.c_curado/spell.c_amt
|
||||
local T = (combat_time*spell.c_curado)/spell.total
|
||||
local P = average/c_average*100
|
||||
T = P*T/100
|
||||
local crit_dps = spell.c_curado / T
|
||||
|
||||
GC:AddLine ("Average / E-Hps: ", _detalhes:ToK (c_average) .. " / " .. _detalhes:comma_value (crit_dps))
|
||||
else
|
||||
GC:AddLine ("Average / E-Hps: ", "0 / 0")
|
||||
end
|
||||
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
--GC:AddLine (" ")
|
||||
|
||||
GC:AddLine ("Multistrike: ", spell.m_amt .. " (" ..floor ( spell.m_amt/total_hits*100) .. "%)")
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
GC:AddLine ("On Normal / On Critical:", spell.m_amt - spell.m_crit .. " / " .. spell.m_crit)
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
|
||||
GC:AddLine ("Average / E-Dps: ", _detalhes:ToK (c_average) .. " / " .. _detalhes:comma_value (crit_dps))
|
||||
else
|
||||
GC:AddLine ("Average / E-Dps: ", "0 / 0")
|
||||
end
|
||||
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
--GC:AddLine (" ")
|
||||
|
||||
GC:AddLine ("Multistrike: ", spell.m_amt .. " (" ..floor ( spell.m_amt/total_hits*100) .. "%)")
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
GC:AddLine ("On Normal / On Critical:", spell.m_amt - spell.m_crit .. " / " .. spell.m_crit)
|
||||
GC:AddStatusBar (100, 1, R, G, B, A)
|
||||
]],
|
||||
|
||||
percent_script = [[
|
||||
|
||||
+12
-21
@@ -1909,33 +1909,24 @@ function atributo_heal:MontaDetalhesHealingDone (spellid, barra)
|
||||
if (esta_magia.m_amt > 0) then
|
||||
|
||||
local multistrike_hits = esta_magia.m_amt
|
||||
local multistrike_heal = esta_magia.m_curado
|
||||
local multistrike_heal = esta_magia.m_healed
|
||||
|
||||
local media_multistrike = multistrike_heal/multistrike_hits
|
||||
|
||||
local T
|
||||
if (media_multistrike > 0) then
|
||||
T = (meu_tempo*multistrike_heal)/esta_magia.total
|
||||
local P = (esta_magia.total/esta_magia.counter)/media_multistrike*100
|
||||
T = P*T/100
|
||||
else
|
||||
T = 1
|
||||
end
|
||||
|
||||
local overheal = esta_magia.m_overheal
|
||||
overheal = overheal / (multistrike_heal + overheal) * 100
|
||||
local media_normal = multistrike_heal / multistrike_hits
|
||||
local T = (meu_tempo * multistrike_heal) / esta_magia.total
|
||||
local P = media / media_normal * 100
|
||||
T = P * T / 100
|
||||
|
||||
data[#data+1] = t3
|
||||
multistrike_table.p = esta_magia.m_amt/total_hits*100
|
||||
|
||||
t3[1] = esta_magia.m_amt
|
||||
t3[1] = multistrike_hits
|
||||
t3[2] = multistrike_table
|
||||
t3[3] = Loc ["STRING_MULTISTRIKE"]
|
||||
t3[4] = Loc ["STRING_OVERHEAL"] .. ": " .. _math_floor (overheal) .. "%"
|
||||
t3[5] = ""
|
||||
t3[6] = Loc ["STRING_AVERAGE"] .. ": " .. _detalhes:comma_value (esta_magia.m_curado/esta_magia.m_amt)
|
||||
t3[7] = Loc ["STRING_HPS"] .. ": " .. _detalhes:comma_value (esta_magia.m_curado/T)
|
||||
t3[8] = esta_magia.m_amt .. " / " .. _cstr ("%.1f", esta_magia.m_amt/total_hits*100) .. "%"
|
||||
t3[3] = Loc ["STRING_MULTISTRIKE_HITS"]
|
||||
t3[4] = "On Critical: " .. esta_magia.m_crit
|
||||
t3[5] = "On Normals: " .. (esta_magia.m_amt - esta_magia.m_crit)
|
||||
t3[6] = Loc ["STRING_AVERAGE"] .. ": " .. _detalhes:comma_value (multistrike_heal / multistrike_hits)
|
||||
t3[7] = Loc ["STRING_HPS"] .. ": " .. _detalhes:comma_value (multistrike_heal / T)
|
||||
t3[8] = multistrike_hits .. " / " .. _cstr ("%.1f", multistrike_hits / total_hits * 100) .. "%"
|
||||
|
||||
end
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
|
||||
--> multistrike
|
||||
m_amt = 0,
|
||||
m_curado = 0,
|
||||
m_overheal = 0,
|
||||
m_healed = 0,
|
||||
m_crit = 0,
|
||||
|
||||
--> normal hits
|
||||
n_min = 0,
|
||||
@@ -56,34 +56,35 @@
|
||||
|
||||
function habilidade_cura:Add (serial, nome, flag, amount, who_nome, absorbed, critical, overhealing, is_shield, multistrike)
|
||||
|
||||
self.counter = self.counter + 1
|
||||
|
||||
amount = amount or 0
|
||||
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_curado = self.m_curado + amount
|
||||
self.m_overheal = self.m_overheal + overhealing
|
||||
end
|
||||
self.m_healed = self.m_healed + amount
|
||||
|
||||
if (critical) then
|
||||
self.m_crit = self.m_crit + 1
|
||||
end
|
||||
else
|
||||
|
||||
if (absorbed and absorbed > 0) then
|
||||
self.absorbed = self.absorbed + absorbed
|
||||
end
|
||||
|
||||
if (overhealing and overhealing > 0) then
|
||||
self.overheal = self.overheal + overhealing
|
||||
self.targets_overheal [nome] = (self.targets_overheal [nome] or 0) + amount
|
||||
end
|
||||
|
||||
if (amount and amount > 0) then
|
||||
|
||||
self.total = self.total + amount
|
||||
self.counter = self.counter + 1
|
||||
|
||||
if (absorbed and absorbed > 0) then
|
||||
self.absorbed = self.absorbed + absorbed
|
||||
end
|
||||
|
||||
if (overhealing and overhealing > 0) then
|
||||
self.overheal = self.overheal + overhealing
|
||||
self.targets_overheal [nome] = (self.targets_overheal [nome] or 0) + amount
|
||||
end
|
||||
|
||||
if (is_shield) then
|
||||
self.totalabsorb = self.totalabsorb + amount
|
||||
self.targets_absorbs [nome] = (self.targets_absorbs [nome] or 0) + amount
|
||||
end
|
||||
|
||||
|
||||
if (critical) then
|
||||
self.c_curado = self.c_curado+amount --> amount é o total de dano
|
||||
self.c_amt = self.c_amt+1 --> amount é o total de dano
|
||||
@@ -103,6 +104,7 @@
|
||||
self.n_min = amount
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user