- Pre Patch 6.0.2

This commit is contained in:
tercio
2014-10-14 16:27:43 -03:00
parent 645e19783b
commit c4d8cddc1f
60 changed files with 3057 additions and 1533 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
## Interface: 50400
## Interface: 60000
## Title: Details
## Notes: Computes detailed infos about combats.
## SavedVariables: _detalhes_global
+17 -13
View File
@@ -4,7 +4,7 @@
-- NickTag:SetNickname (name) -> set the player nick name, after set nicktag will broadcast the nick over addon guild channel.
--
local major, minor = "NickTag-1.0", 6
local major, minor = "NickTag-1.0", 7
local NickTag, oldminor = LibStub:NewLibrary (major, minor)
if (not NickTag) then
@@ -19,7 +19,6 @@ if (_G.NickTag) then
end
end
------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
@@ -911,7 +910,7 @@ end
if (not guid) then
return
end
serial = guid:sub (12, 18)
serial = select ( 3, strsplit ( "-", guid ) )
else
if (not silent) then
assert (type (serial) == "string", "NickTag 'GetSerial' expects a GUID string on #1 parameter"..serial)
@@ -919,12 +918,12 @@ end
else
if (type (serial) ~= "string") then
return
elseif (string.len (serial) < 17) then
elseif (string.len (serial) < 16) then
return
end
end
serial = serial:sub (12, 18)
serial = select ( 3, strsplit ( "-", serial ) )
end
return tonumber ("0x"..serial)
end
@@ -1181,13 +1180,18 @@ do
--> if none
_G.AvatarPickFrameAvatarPreview:SetTexture ( [[Interface\EncounterJournal\UI-EJ-BOSS-Default]] )
avatar_pick_frame.selected_avatar = [[Interface\EncounterJournal\UI-EJ-BOSS-Default]]
local background = NickTag.background_pool [avatar_pick_frame.selected_background]
_G.AvatarPickFrameBackgroundPreview:SetTexture ( background [1] )
avatar_pick_frame.selected_background = background [1]
_G.AvatarPickFrameBackgroundPreview:SetTexCoord (unpack (background [3]))
avatar_pick_frame.selected_texcoord = background [3]
_G.AvatarPickFrameBackgroundPreview:SetVertexColor (unpack (avatar_pick_frame.selected_color))
avatar_pick_frame.selected_color = avatar_pick_frame.selected_color
local background = NickTag.background_pool [1]
if (background) then
_G.AvatarPickFrameBackgroundPreview:SetTexture ( background [1] )
avatar_pick_frame.selected_background = background [1]
_G.AvatarPickFrameBackgroundPreview:SetTexCoord (unpack (background [3]))
avatar_pick_frame.selected_texcoord = background [3]
_G.AvatarPickFrameBackgroundPreview:SetVertexColor (unpack (avatar_pick_frame.selected_color))
avatar_pick_frame.selected_color = avatar_pick_frame.selected_color
end
end
end)
+27 -14
View File
File diff suppressed because one or more lines are too long
+4 -3
View File
@@ -16,6 +16,7 @@
local _date = date -- lua local
local _table_remove = table.remove -- lua local
local _rawget = rawget
local _math_max = math.max
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
@@ -101,11 +102,11 @@
--return the combat time in seconds
function combate:GetCombatTime()
if (self.end_time) then
return self.end_time - self.start_time
return _math_max (self.end_time - self.start_time, 0.1)
elseif (self.start_time and _detalhes.in_combat) then
return _tempo - self.start_time
return _math_max (_tempo - self.start_time, 0.1)
else
return 0
return 0.1
end
end
+30 -15
View File
@@ -982,7 +982,8 @@
local debuff_uptime_container = player.debuff_uptime and player.debuff_uptime_spell_tables and player.debuff_uptime_spell_tables._ActorTable
if (debuff_uptime_container) then
--potion of focus (can't use as pre-potion, so, its amount is always 1
local focus_potion = debuff_uptime_container [105701]
--local focus_potion = debuff_uptime_container [156432] --WoD
local focus_potion = debuff_uptime_container [105701] --MoP
if (focus_potion) then
total = total + 1
found_potion = true
@@ -999,7 +1000,8 @@
if (buff_uptime_container) then
--potion of the jade serpent
local jade_serpent_potion = buff_uptime_container [105702]
--local jade_serpent_potion = buff_uptime_container [156426] --WoD
local jade_serpent_potion = buff_uptime_container [105702] --MoP
if (jade_serpent_potion) then
local used = jade_serpent_potion.activedamt
if (used > 0) then
@@ -1014,7 +1016,8 @@
end
--potion of mogu power
local mogu_power_potion = buff_uptime_container [105706]
--local mogu_power_potion = buff_uptime_container [156428] --WoD
local mogu_power_potion = buff_uptime_container [105706] --MoP
if (mogu_power_potion) then
local used = mogu_power_potion.activedamt
if (used > 0) then
@@ -1029,7 +1032,8 @@
end
--virmen's bite
local virmens_bite_potion = buff_uptime_container [105697]
--local virmens_bite_potion = buff_uptime_container [156423] --WoD
local virmens_bite_potion = buff_uptime_container [105697] --MoP
if (virmens_bite_potion) then
local used = virmens_bite_potion.activedamt
if (used > 0) then
@@ -1044,7 +1048,8 @@
end
--potion of the mountains
local mountains_potion = buff_uptime_container [105698]
--local mountains_potion = buff_uptime_container [156430] --WoD
local mountains_potion = buff_uptime_container [105698] --MoP
if (mountains_potion) then
local used = mountains_potion.activedamt
if (used > 0) then
@@ -1075,9 +1080,11 @@
--get the debuff container for potion of focus
local debuff_uptime_container = player.debuff_uptime and player.debuff_uptime_spell_tables and player.debuff_uptime_spell_tables._ActorTable
if (debuff_uptime_container) then
local focus_potion = debuff_uptime_container [105701]
--local focus_potion = debuff_uptime_container [156432] --WoD
local focus_potion = debuff_uptime_container [105701] --MoP
if (focus_potion) then
local name, _, icon = GetSpellInfo (105701)
--local name, _, icon = GetSpellInfo (156432) --WoD
local name, _, icon = GetSpellInfo (105701) --MoP
GameCooltip:AddLine (name, 1) --> can use only 1 focus potion (can't be pre-potion)
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
@@ -1088,36 +1095,44 @@
local buff_uptime_container = player.buff_uptime and player.buff_uptime_spell_tables and player.buff_uptime_spell_tables._ActorTable
if (buff_uptime_container) then
--potion of the jade serpent
local jade_serpent_potion = buff_uptime_container [105702]
--local jade_serpent_potion = buff_uptime_container [156426] --WoD
local jade_serpent_potion = buff_uptime_container [105702] --MoP
if (jade_serpent_potion) then
local name, _, icon = GetSpellInfo (105702)
--local name, _, icon = GetSpellInfo (156426) --WoD
local name, _, icon = GetSpellInfo (105702) --MoP
GameCooltip:AddLine (name, jade_serpent_potion.activedamt)
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
end
--potion of mogu power
local mogu_power_potion = buff_uptime_container [105706]
--local mogu_power_potion = buff_uptime_container [156428] --WoD
local mogu_power_potion = buff_uptime_container [105706] --MoP
if (mogu_power_potion) then
local name, _, icon = GetSpellInfo (105706)
--local name, _, icon = GetSpellInfo (156428) --WoD
local name, _, icon = GetSpellInfo (105706) --MoP
GameCooltip:AddLine (name, mogu_power_potion.activedamt)
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
end
--virmen's bite
local virmens_bite_potion = buff_uptime_container [105697]
--local virmens_bite_potion = buff_uptime_container [156423] --WoD
local virmens_bite_potion = buff_uptime_container [105697] --MoP
if (virmens_bite_potion) then
local name, _, icon = GetSpellInfo (105697)
--local name, _, icon = GetSpellInfo (156423) --WoD
local name, _, icon = GetSpellInfo (105697) --MoP
GameCooltip:AddLine (name, virmens_bite_potion.activedamt)
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
end
--potion of the mountains
local mountains_potion = buff_uptime_container [105698]
--local mountains_potion = buff_uptime_container [156430] --WoD
local mountains_potion = buff_uptime_container [105698] --MoP
if (mountains_potion) then
local name, _, icon = GetSpellInfo (105698)
--local name, _, icon = GetSpellInfo (156430) --WoD
local name, _, icon = GetSpellInfo (105698) --MoP
GameCooltip:AddLine (name, mountains_potion.activedamt)
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
+172 -123
View File
@@ -60,7 +60,7 @@
local key_overlay = {1, 1, 1, .1}
local key_overlay_press = {1, 1, 1, .2}
local headerColor = "yellow"
local headerColor = {1, 0.9, 0.0, 1}
local info = _detalhes.janela_info
local keyName
@@ -1045,6 +1045,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
return _detalhes:EndRefresh (instancia, total, tabela_do_combate, showing) --> retorna a tabela que precisa ganhar o refresh
end
--print ("AMOUT: " .. amount)
instancia:AtualizarScrollBar (amount)
local qual_barra = 1
@@ -1053,7 +1054,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
local baseframe = instancia.baseframe
local use_animations = _detalhes.is_using_row_animations and (not baseframe.isStretching and not forcar and not baseframe.isResizing)
if (total == 0) then
total = 0.00000001
end
@@ -1565,7 +1566,7 @@ end
if (instancia.row_info.textL_show_number) then
bar_number = esta_barra.colocacao .. ". "
end
if (self.enemy) then
if (self.arena_enemy) then
if (UsingCustomLeftText) then
@@ -2800,72 +2801,16 @@ function atributo_damage:MontaDetalhesDamageTaken (nome, barra)
end
------ Detalhe Info Damage Done e Dps
local defenses_table = {c = {117/255, 58/255, 0/255}, p = 0}
local normal_table = {c = {255/255, 180/255, 0/255, 0.5}, p = 0}
local multistrike_table = {c = {223/255, 249/255, 45/255, 0.5}, p = 0}
local critical_table = {c = {249/255, 74/255, 45/255, 0.5}, p = 0}
local data_table = {}
local t1, t2, t3, t4 = {}, {}, {}, {}
function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
if (_type (spellid) == "string") then
local _barra = info.grupos_detalhes [1]
if (not _barra.pet) then
_barra.bg.PetIcon = _barra.bg:CreateTexture (nil, "overlay")
--_barra.bg.PetIcon:SetTexture ("Interface\\ICONS\\Ability_Druid_SkinTeeth")
_barra.bg.PetIcon:SetTexture ("Interface\\AddOns\\Details\\images\\classes")
_barra.bg.PetIcon:SetTexCoord (0.25, 0.49609375, 0.75, 1)
_barra.bg.PetIcon:SetPoint ("left", _barra.bg, "left", 2, 2)
_barra.bg.PetIcon:SetWidth (40)
_barra.bg.PetIcon:SetHeight (40)
gump:NewLabel (_barra.bg, _barra.bg, nil, "PetText", Loc ["STRING_ISA_PET"], "GameFontHighlightLeft")
_barra.bg.PetText:SetPoint ("topleft", _barra.bg.PetIcon, "topright", 10, -2)
gump:NewLabel (_barra.bg, _barra.bg, nil, "PetDps", "", "GameFontHighlightSmall")
_barra.bg.PetDps:SetPoint ("left", _barra.bg.PetIcon, "right", 10, 2)
_barra.bg.PetDps:SetPoint ("top", _barra.bg.PetText, "bottom", 0, -5)
_barra.pet = true
end
_barra.IsPet = true
_barra.bg:SetValue (100)
gump:Fade (_barra.bg.overlay, "OUT")
_barra.bg:SetStatusBarColor (1, 1, 1)
_barra.bg_end:SetPoint ("LEFT", _barra.bg, "LEFT", (_barra.bg:GetValue()*2.19)-6, 0)
_barra.bg.PetIcon:SetVertexColor (_unpack (_detalhes.class_colors [self.classe]))
_barra.bg:Show()
_barra.bg.PetIcon:Show()
_barra.bg.PetText:Show()
_barra.bg.PetDps:Show()
local PetActor = info.instancia.showing (info.instancia.atributo, spellid)
if (PetActor) then
local OwnerActor = PetActor.ownerName
if (OwnerActor) then --> nor necessary
OwnerActor = info.instancia.showing (info.instancia.atributo, OwnerActor)
if (OwnerActor) then
local meu_tempo = OwnerActor:Tempo()
local normal_dmg = PetActor.total
local T = (meu_tempo*normal_dmg)/PetActor.total
_barra.bg.PetDps:SetText ("Dps: " .. _cstr("%.1f", normal_dmg/T))
end
end
end
for i = 2, 5 do
gump:HidaDetalheInfo (i)
end
local ThisBox = _detalhes.janela_info.grupos_detalhes [1]
ThisBox.nome:Hide()
ThisBox.dano:Hide()
ThisBox.dano_porcento:Hide()
ThisBox.dano_media:Hide()
ThisBox.dano_dps:Hide()
ThisBox.nome2:Hide()
return
end
local esta_magia
if (barra.other_actor) then
esta_magia = barra.other_actor.spell_tables._ActorTable [spellid]
@@ -2878,10 +2823,9 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
end
--> icone direito superior
local nome, rank, icone = _GetSpellInfo (spellid)
local infospell = {nome, rank, icone}
local _, _, icone = _GetSpellInfo (spellid)
_detalhes.janela_info.spell_icone:SetTexture (infospell[3])
_detalhes.janela_info.spell_icone:SetTexture (icone)
local total = self.total
@@ -2893,28 +2837,35 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
end
local total_hits = esta_magia.counter
local index = 1
local data = {}
--print (debugstack())
local data = data_table
table.wipe (t1)
table.wipe (t2)
table.wipe (t3)
table.wipe (t4)
table.wipe (data)
--> GERAL
local media = esta_magia.total/total_hits
local this_dps = nil
if (esta_magia.counter > esta_magia.c_amt) then
this_dps = Loc ["STRING_DPS"]..": ".._cstr("%.1f", esta_magia.total/meu_tempo)
this_dps = Loc ["STRING_DPS"] .. ": " .. _detalhes:comma_value (esta_magia.total/meu_tempo)
else
this_dps = Loc ["STRING_DPS"]..": "..Loc ["STRING_SEE_BELOW"]
this_dps = Loc ["STRING_DPS"] .. ": " .. Loc ["STRING_SEE_BELOW"]
end
--local offhand = esta_magia.off_amt
--local mainhand = esta_magia.main_amt
--local offstring = Loc ["STRING_OFFHAND_HITS"] .. ": " .. _math_floor () _detalhes:comma_value (esta_magia.o_dmg/offhand)
gump:SetaDetalheInfoTexto ( index, 100,
Loc ["STRING_GERAL"],
Loc ["STRING_DAMAGE"]..": ".._detalhes:ToK (esta_magia.total),
Loc ["STRING_PERCENTAGE"]..": ".._cstr("%.1f", esta_magia.total/total*100) .. "%",
Loc ["STRING_MEDIA"]..": " .. _cstr("%.1f", media),
--Loc ["STRING_MULTISTRIKE"] .. ": " .. _cstr ("%.1f", esta_magia.counter/esta_magia.m_amt*100) .. "%",
"", --offhand,
Loc ["STRING_AVERAGE"] .. ": " .. _detalhes:comma_value (media),
this_dps,
Loc ["STRING_HITS"]..": " .. total_hits)
@@ -2927,16 +2878,19 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
local P = media/media_normal*100
T = P*T/100
data[#data+1] = {
esta_magia.n_amt,
normal_hits/total_hits*100,
Loc ["STRING_NORMAL_HITS"],
Loc ["STRING_MINIMUM"]..": ".._detalhes:comma_value (esta_magia.n_min),
Loc ["STRING_MAXIMUM"]..": ".._detalhes:comma_value (esta_magia.n_max),
Loc ["STRING_MEDIA"]..": ".._cstr("%.1f", media_normal),
Loc ["STRING_DPS"]..": ".._cstr("%.1f", normal_dmg/T),
normal_hits.. " / ".._cstr("%.1f", normal_hits/total_hits*100).."%"
}
normal_table.p = normal_hits/total_hits*100
data[#data+1] = t1
t1[1] = esta_magia.n_amt
t1[2] = normal_table
t1[3] = Loc ["STRING_NORMAL_HITS"]
t1[4] = Loc ["STRING_MINIMUM_SHORT"] .. ": " .. _detalhes:comma_value (esta_magia.n_min)
t1[5] = Loc ["STRING_MAXIMUM_SHORT"] .. ": " .. _detalhes:comma_value (esta_magia.n_max)
t1[6] = Loc ["STRING_AVERAGE"] .. ": " .. _detalhes:comma_value (media_normal)
t1[7] = Loc ["STRING_DPS"] .. ": " .. _detalhes:comma_value (normal_dmg/T)
t1[8] = normal_hits .. " / " .. _cstr ("%.1f", normal_hits/total_hits*100) .. "%"
end
--> CRITICO
@@ -2950,41 +2904,71 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
crit_dps = 0
end
data[#data+1] = {
esta_magia.c_amt,
esta_magia.c_amt/total_hits*100,
Loc ["STRING_CRITICAL_HITS"],
Loc ["STRING_MINIMUM"]..": ".._detalhes:comma_value (esta_magia.c_min),
Loc ["STRING_MAXIMUM"]..": ".._detalhes:comma_value (esta_magia.c_max),
Loc ["STRING_MEDIA"]..": ".._cstr("%.1f", media_critico),
Loc ["STRING_DPS"]..": ".._cstr("%.1f", crit_dps),
esta_magia.c_amt.. " / ".._cstr("%.1f", esta_magia.c_amt/total_hits*100).."%"
}
critical_table.p = esta_magia.c_amt/total_hits*100
data[#data+1] = t2
t2[1] = esta_magia.c_amt
t2[2] = critical_table
t2[3] = Loc ["STRING_CRITICAL_HITS"]
t2[4] = Loc ["STRING_MINIMUM_SHORT"] .. ": " .. _detalhes:comma_value (esta_magia.c_min)
t2[5] = Loc ["STRING_MAXIMUM_SHORT"] .. ": " .. _detalhes:comma_value (esta_magia.c_max)
t2[6] = Loc ["STRING_AVERAGE"] .. ": " .. _detalhes:comma_value (media_critico)
t2[7] = Loc ["STRING_DPS"] .. ": " .. _detalhes:comma_value (crit_dps)
t2[8] = esta_magia.c_amt .. " / " .. _cstr ("%.1f", esta_magia.c_amt/total_hits*100) .. "%"
end
--> Outros erros: GLACING, resisted, blocked, absorbed
local outros_desvios = esta_magia.g_amt + esta_magia.r_amt + esta_magia.b_amt + esta_magia.a_amt
if (outros_desvios > 0) then
local porcentagem_defesas = outros_desvios/total_hits*100
data[#data+1] = {
outros_desvios,
{["p"] = porcentagem_defesas, ["c"] = {117/255, 58/255, 0/255}},
Loc ["STRING_DEFENSES"],
Loc ["STRING_GLANCING"]..": "..esta_magia.g_amt.." / ".._math_floor (esta_magia.g_amt/esta_magia.counter*100).."%", --esta_magia.g_dmg
Loc ["STRING_RESISTED"]..": "..esta_magia.r_dmg, --esta_magia.resisted.amt.." / "..
Loc ["STRING_ABSORBED"]..": "..esta_magia.a_dmg, --esta_magia.absorbed.amt.." / "..
Loc ["STRING_BLOCKED"]..": "..esta_magia.b_amt.." / "..esta_magia.b_dmg,
outros_desvios.." / ".._cstr("%.1f", porcentagem_defesas).."%"
}
end
--> Erros de Ataque --habilidade.missType -- {"ABSORB", "BLOCK", "DEFLECT", "DODGE", "EVADE", "IMMUNE", "MISS", "PARRY", "REFLECT", "RESIST"}
local miss = esta_magia ["MISS"] or 0
local outros_desvios = esta_magia.g_amt + esta_magia.b_amt
local parry = esta_magia ["PARRY"] or 0
local dodge = esta_magia ["DODGE"] or 0
local erros = miss + parry + dodge
local erros = parry + dodge
if (outros_desvios > 0 or erros > 0) then
local porcentagem_defesas = (outros_desvios+erros) / total_hits * 100
data[#data+1] = t3
defenses_table.p = porcentagem_defesas
t3[1] = outros_desvios+erros
t3[2] = defenses_table
t3[3] = Loc ["STRING_DEFENSES"]
t3[4] = Loc ["STRING_GLANCING"] .. ": " .. _math_floor (esta_magia.g_amt/esta_magia.counter*100) .. "%"
t3[5] = Loc ["STRING_PARRY"] .. ": " .. parry
t3[6] = Loc ["STRING_DODGE"] .. ": " .. dodge
t3[7] = Loc ["STRING_BLOCKED"] .. ": " .. _math_floor (esta_magia.b_amt/esta_magia.counter*100)
t3[8] = (outros_desvios+erros) .. " / " .. _cstr ("%.1f", porcentagem_defesas) .. "%"
end
--> multistrike
if (esta_magia.m_amt > 0) then
local normal_hits = esta_magia.m_amt
local normal_dmg = esta_magia.m_dmg
local media_normal = normal_dmg/normal_hits
local T = (meu_tempo*normal_dmg)/esta_magia.total
local P = media/media_normal*100
T = P*T/100
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[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) .. "%"
end
--> Erros de Ataque --habilidade.missType -- {"ABSORB", "BLOCK", "DEFLECT", "DODGE", "EVADE", "IMMUNE", "MISS", "PARRY", "REFLECT", "RESIST"}
--[[
if (erros > 0) then
local porcentagem_erros = erros/total_hits*100
data[#data+1] = {
@@ -2992,14 +2976,14 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
{["p"] = porcentagem_erros, ["c"] = {0.5, 0.1, 0.1}},
Loc ["STRING_FAIL_ATTACKS"],
Loc ["STRING_MISS"]..": "..miss,
Loc ["STRING_PARRY"]..": "..parry,
Loc ["STRING_DODGE"]..": "..dodge,
"",
erros.." / ".._cstr("%.1f", porcentagem_erros).."%"
}
end
table.sort (data, function (a, b) return a[1] > b[1] end)
--]]
_table_sort (data, _detalhes.Sort1)
for index, tabela in _ipairs (data) do
gump:SetaDetalheInfoTexto (index+1, tabela[2], tabela[3], tabela[4], tabela[5], tabela[6], tabela[7], tabela[8])
@@ -3167,6 +3151,7 @@ end
SelectedToKFunction = ToKFunctions [_detalhes.ps_abbreviation]
FormatTooltipNumber = ToKFunctions [_detalhes.tooltip.abbreviation]
TooltipMaximizedMethod = _detalhes.tooltip.maximize_method
headerColor = _detalhes.tooltip.header_text_color
end
--> diminui o total das tabelas do combate
@@ -3568,5 +3553,69 @@ end
-- local grayscale = cor[1]*0.21 + cor[2]*0.71 + cor[3]*0.07
--(max(R, G, B) + min(R, G, B)) / 2
--[[
if (_type (spellid) == "string") then
local _barra = info.grupos_detalhes [1]
if (not _barra.pet) then
_barra.bg.PetIcon = _barra.bg:CreateTexture (nil, "overlay")
--_barra.bg.PetIcon:SetTexture ("Interface\\ICONS\\Ability_Druid_SkinTeeth")
_barra.bg.PetIcon:SetTexture ("Interface\\AddOns\\Details\\images\\classes")
_barra.bg.PetIcon:SetTexCoord (0.25, 0.49609375, 0.75, 1)
_barra.bg.PetIcon:SetPoint ("left", _barra.bg, "left", 2, 2)
_barra.bg.PetIcon:SetWidth (40)
_barra.bg.PetIcon:SetHeight (40)
gump:NewLabel (_barra.bg, _barra.bg, nil, "PetText", Loc ["STRING_ISA_PET"], "GameFontHighlightLeft")
_barra.bg.PetText:SetPoint ("topleft", _barra.bg.PetIcon, "topright", 10, -2)
gump:NewLabel (_barra.bg, _barra.bg, nil, "PetDps", "", "GameFontHighlightSmall")
_barra.bg.PetDps:SetPoint ("left", _barra.bg.PetIcon, "right", 10, 2)
_barra.bg.PetDps:SetPoint ("top", _barra.bg.PetText, "bottom", 0, -5)
_barra.pet = true
end
_barra.IsPet = true
_barra.bg:SetValue (100)
gump:Fade (_barra.bg.overlay, "OUT")
_barra.bg:SetStatusBarColor (1, 1, 1)
_barra.bg_end:SetPoint ("LEFT", _barra.bg, "LEFT", (_barra.bg:GetValue()*2.19)-6, 0)
_barra.bg.PetIcon:SetVertexColor (_unpack (_detalhes.class_colors [self.classe]))
_barra.bg:Show()
_barra.bg.PetIcon:Show()
_barra.bg.PetText:Show()
_barra.bg.PetDps:Show()
local PetActor = info.instancia.showing (info.instancia.atributo, spellid)
if (PetActor) then
local OwnerActor = PetActor.ownerName
if (OwnerActor) then --> nor necessary
OwnerActor = info.instancia.showing (info.instancia.atributo, OwnerActor)
if (OwnerActor) then
local meu_tempo = OwnerActor:Tempo()
local normal_dmg = PetActor.total
local T = (meu_tempo*normal_dmg)/PetActor.total
_barra.bg.PetDps:SetText ("Dps: " .. _cstr("%.1f", normal_dmg/T))
end
end
end
for i = 2, 5 do
gump:HidaDetalheInfo (i)
end
local ThisBox = _detalhes.janela_info.grupos_detalhes [1]
ThisBox.nome:Hide()
ThisBox.dano:Hide()
ThisBox.dano_porcento:Hide()
ThisBox.dano_media:Hide()
ThisBox.dano_dps:Hide()
ThisBox.nome2:Hide()
return
end
--]]
+22 -1
View File
@@ -33,6 +33,13 @@
id = id, --spellid
successful_casted = 0, --successful casted times (only for enemies)
--> multistrike
m_amt = 0,
m_dmg = 0,
--off_amt = 0,
--off_dmg = 0,
--main_amt = 0,
--> normal hits
n_min = 0,
n_max = 0,
@@ -92,7 +99,7 @@
self.total = self.total + amount
end
function habilidade_dano:Add (serial, nome, flag, amount, who_nome, resisted, blocked, absorbed, critical, glacing, token)
function habilidade_dano:Add (serial, nome, flag, amount, who_nome, resisted, blocked, absorbed, critical, glacing, token, multistrike, isoffhand)
self.counter = self.counter + 1
@@ -102,6 +109,20 @@
else
alvo = self.targets._ActorTable [alvo]
end
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
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
+8 -7
View File
@@ -65,6 +65,10 @@ local UsingCustomRightText = false
local FormatTooltipNumber = ToKFunctions [8]
local TooltipMaximizedMethod = 1
local headerColor = "yellow"
local key_overlay = {1, 1, 1, .1}
local key_overlay_press = {1, 1, 1, .2}
local info = _detalhes.janela_info
local keyName
@@ -289,11 +293,11 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
local baseframe = instancia.baseframe
local use_animations = _detalhes.is_using_row_animations and (not baseframe.isStretching and not forcar and not baseframe.isResizing)
if (total == 0) then
total = 0.00000001
end
local myPos
local following = instancia.following.enabled
@@ -578,7 +582,7 @@ function atributo_energy:RefreshBarra2 (esta_barra, instancia, tabela_anterior,
end
esta_barra.last_value = esta_porcentagem --> reseta o ultimo valor da barra
return self:RefreshBarra (esta_barra, instancia)
elseif (esta_porcentagem ~= esta_barra.last_value) then --> continua mostrando a mesma tabela então compara a porcentagem
@@ -790,12 +794,8 @@ function atributo_energy:ToolTip (instancia, numero, barra, keydown)
end
--> tooltip locals
local r, g, b
local headerColor = "yellow"
local barAlha = .6
local key_overlay = {1, 1, 1, .1}
local key_overlay_press = {1, 1, 1, .2}
function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown)
local owner = self.owner
@@ -1097,6 +1097,7 @@ end
SelectedToKFunction = ToKFunctions [_detalhes.ps_abbreviation]
FormatTooltipNumber = ToKFunctions [_detalhes.tooltip.abbreviation]
TooltipMaximizedMethod = _detalhes.tooltip.maximize_method
headerColor = _detalhes.tooltip.header_text_color
end
--> subtract total from a combat table
+172 -88
View File
@@ -12,6 +12,7 @@ local _cstr = string.format
local _table_insert = table.insert
local _bit_band = bit.band
local _math_min = math.min
local _math_ceil = math.ceil
--api locals
local GetSpellInfo = GetSpellInfo
local _GetSpellInfo = _detalhes.getspellinfo
@@ -59,6 +60,10 @@ local UsingCustomLeftText = false
local FormatTooltipNumber = ToKFunctions [8]
local TooltipMaximizedMethod = 1
local headerColor = "yellow"
local key_overlay = {1, 1, 1, .1}
local key_overlay_press = {1, 1, 1, .2}
local info = _detalhes.janela_info
local keyName
@@ -352,6 +357,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
return _detalhes:EndRefresh (instancia, total, tabela_do_combate, showing) --> retorna a tabela que precisa ganhar o refresh
end
--estra mostrando ALL então posso seguir o padrão correto? primeiro, atualiza a scroll bar...
instancia:AtualizarScrollBar (amount)
--depois faz a atualização normal dele através dos iterators
@@ -361,10 +367,10 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
local baseframe = instancia.baseframe
local use_animations = _detalhes.is_using_row_animations and (not baseframe.isStretching and not forcar and not baseframe.isResizing)
if (total == 0) then
total = 0.00000001
end
end
local myPos
local following = instancia.following.enabled
@@ -753,7 +759,7 @@ function atributo_heal:RefreshBarra2 (esta_barra, instancia, tabela_anterior, fo
end
esta_barra.last_value = esta_porcentagem --> reseta o ultimo valor da barra
return self:RefreshBarra (esta_barra, instancia)
elseif (esta_porcentagem ~= esta_barra.last_value) then --> continua mostrando a mesma tabela então compara a porcentagem
@@ -897,31 +903,36 @@ function atributo_heal:RefreshBarra (esta_barra, instancia, from_resize)
end
function _detalhes:CloseShields()
function _detalhes:CloseShields (combat)
if (not _IsInRaid()) then
return
end
local name_table = {}
for i = 1, _GetNumGroupMembers() do
name_table [_UnitName ("raid" .. i)] = "raid" .. i
end
local escudos = _detalhes.escudos
local container = combat[2]
local time = time()
local parser = _detalhes.parser
local GetSpellInfo = GetSpellInfo --não colocar no cache de spells
local spells_table = {}
--não da de fechar os escudos, precisa saber o total dele, unitaura nao retorna o valor do escudo
for alvo_name, spellid_table in _pairs (escudos) do
for spellid, caster_table in _pairs (spellid_table) do
if (not spells_table [spellid]) then
local tgt = container:PegarCombatente (_, alvo_name)
if (tgt) then
for spellid, owner_table in _pairs (spellid_table) do
local spellname = GetSpellInfo (spellid)
spells_table [spellid] = spellname
end
for caster_name, amount in _pairs (caster_table) do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura (name_table [alvo_name], buffIndex, nil, "HELPFUL")
for owner, amount in _pairs (owner_table) do
if (amount > 0) then
local obj = container:PegarCombatente (_, owner)
if (obj) then
parser:heal ("SPELL_AURA_REMOVED", time, obj.serial, owner, obj.flag_original, tgt.serial, alvo_name, tgt.flag_original, spellid, spellname, nil, 0, _math_ceil (amount), 0, 0, nil, true)
end
end
end
end
end
end
--escudo [alvo_name] [spellid] [who_name]
@@ -950,10 +961,7 @@ function atributo_heal:ToolTip (instancia, numero, barra, keydown)
end
--> tooltip locals
local r, g, b
local headerColor = "yellow"
local barAlha = .6
local key_overlay = {1, 1, 1, .1}
local key_overlay_press = {1, 1, 1, .2}
---------> HEALING TAKEN
function atributo_heal:ToolTip_HealingTaken (instancia, numero, barra, keydown)
@@ -1869,6 +1877,15 @@ function atributo_heal:MontaDetalhesHealingTaken (nome, barra)
end
end
local absorbed_table = {c = {180/255, 180/255, 180/255, 0.5}, p = 0}
local overhealing_table = {c = {0.5, 0.1, 0.1, 0.9}, p = 0}
local normal_table = {c = {255/255, 180/255, 0/255, 0.5}, p = 0}
local multistrike_table = {c = {223/255, 249/255, 45/255, 0.5}, p = 0}
local critical_table = {c = {249/255, 74/255, 45/255, 0.5}, p = 0}
local data_table = {}
local t1, t2, t3, t4 = {}, {}, {}, {}
function atributo_heal:MontaDetalhesHealingDone (spellid, barra)
local esta_magia
@@ -1883,10 +1900,8 @@ function atributo_heal:MontaDetalhesHealingDone (spellid, barra)
end
--> icone direito superior
local nome, rank, icone = _GetSpellInfo (spellid)
local infospell = {nome, rank, icone}
info.spell_icone:SetTexture (infospell[3])
local _, _, icone = _GetSpellInfo (spellid)
info.spell_icone:SetTexture (icone)
local total = self.total
@@ -1899,13 +1914,16 @@ function atributo_heal:MontaDetalhesHealingDone (spellid, barra)
elseif (_detalhes.time_type == 2) then
meu_tempo = info.instancia.showing:GetCombatTime()
end
--local total_hits = esta_magia.counter
local total_hits = esta_magia.n_amt+esta_magia.c_amt
local total_hits = esta_magia.counter
local index = 1
local data = data_table
local data = {}
table.wipe (t1)
table.wipe (t2)
table.wipe (t3)
table.wipe (t4)
table.wipe (data)
if (esta_magia.total > 0) then
@@ -1914,18 +1932,25 @@ function atributo_heal:MontaDetalhesHealingDone (spellid, barra)
local this_hps = nil
if (esta_magia.counter > esta_magia.c_amt) then
this_hps = Loc ["STRING_HPS"]..": ".._cstr ("%.1f", esta_magia.total/meu_tempo) --> localiza-me
this_hps = Loc ["STRING_HPS"] .. ": " .. _detalhes:comma_value (esta_magia.total/meu_tempo)
else
this_hps = Loc ["STRING_HPS"]..": "..Loc ["STRING_SEE_BELOW"]
this_hps = Loc ["STRING_HPS"] .. ": " .. Loc ["STRING_SEE_BELOW"]
end
gump:SetaDetalheInfoTexto ( index, 100, --> Localize-me
Loc ["STRING_GERAL"], --> localiza-me
Loc ["STRING_HEAL"]..": ".._detalhes:ToK (esta_magia.total), --> localiza-me
Loc ["STRING_PERCENTAGE"]..": ".._cstr ("%.1f", esta_magia.total/total*100) .. "%", --> localiza-me
Loc ["STRING_MEDIA"]..": ".._cstr ("%.1f", media), --> localiza-me
local heal_string
if (esta_magia.is_shield) then
heal_string = Loc ["STRING_SHIELD_HEAL"]
else
heal_string = Loc ["STRING_HEAL"]
end
gump:SetaDetalheInfoTexto ( index, 100,
Loc ["STRING_GERAL"],
heal_string .. ": " .. _detalhes:ToK (esta_magia.total),
"", --Loc ["STRING_PERCENTAGE"] .. ": " .. _cstr ("%.1f", esta_magia.total/total*100) .. "%",
Loc ["STRING_AVERAGE"] .. ": " .. _detalhes:comma_value (media),
this_hps,
Loc ["STRING_HITS"]..": " .. total_hits) --> localiza-me
Loc ["STRING_HITS"] .. ": " .. total_hits)
--> NORMAL
local normal_hits = esta_magia.n_amt
@@ -1936,17 +1961,25 @@ function atributo_heal:MontaDetalhesHealingDone (spellid, barra)
local P = media/media_normal*100
T = P*T/100
data[#data+1] = {
esta_magia.n_amt,
normal_hits/total_hits*100,
--esta_magia.n_curado/esta_magia.total*100,
Loc ["STRING_HEAL"], --> localiza-me
Loc ["STRING_MINIMUM"] .. ": " .. _detalhes:comma_value (esta_magia.n_min), --> localiza-me
Loc ["STRING_MAXIMUM"] .. ": " .. _detalhes:comma_value (esta_magia.n_max), --> localiza-me
Loc ["STRING_MEDIA"] .. ": " .. _cstr ("%.1f", media_normal), --> localiza-me
Loc ["STRING_HPS"] .. ": " .. _cstr ("%.1f", normal_curado/T), --> localiza-me
normal_hits .. " / ".. _cstr ("%.1f", normal_hits/total_hits*100).."%"
}
data[#data+1] = t1
if (esta_magia.is_shield) then
t1[3] = Loc ["STRING_ABSORBED"]
normal_table.p = esta_magia.total / (esta_magia.total+esta_magia.overheal) * 100
else
t1[3] = heal_string
normal_table.p = normal_hits/total_hits*100
end
t1[1] = esta_magia.n_amt
t1[2] = normal_table
t1[4] = Loc ["STRING_MINIMUM_SHORT"] .. ": " .. _detalhes:comma_value (esta_magia.n_min)
t1[5] = Loc ["STRING_MAXIMUM_SHORT"] .. ": " .. _detalhes:comma_value (esta_magia.n_max)
t1[6] = Loc ["STRING_AVERAGE"] .. ": " .. _detalhes:comma_value (media_normal)
t1[7] = Loc ["STRING_HPS"] .. ": " .. _detalhes:comma_value (normal_curado/T)
t1[8] = normal_hits .. " / ".. _cstr ("%.1f", normal_hits/total_hits*100) .. "%"
end
--> CRITICO
@@ -1960,59 +1993,109 @@ function atributo_heal:MontaDetalhesHealingDone (spellid, barra)
crit_hps = 0
end
data[#data+1] = {
esta_magia.c_amt,
esta_magia.c_amt/total_hits*100,
--esta_magia.c_curado/esta_magia.total*100,
Loc ["STRING_HEAL_CRIT"], --> localiza-me
Loc ["STRING_MINIMUM"] .. ": " .. _detalhes:comma_value (esta_magia.c_min), --> localiza-me
Loc ["STRING_MAXIMUM"] .. ": " .. _detalhes:comma_value (esta_magia.c_max), --> localiza-me
Loc ["STRING_MEDIA"] .. ": " .. _cstr ("%.1f", media_critico), --> localiza-me
Loc ["STRING_HPS"] .. ": " .. _cstr ("%.1f", crit_hps), --> localiza-me
esta_magia.c_amt .. " / ".._cstr ("%.1f", esta_magia.c_amt/total_hits*100).."%"
}
data[#data+1] = t2
critical_table.p = esta_magia.c_amt/total_hits*100
t2[1] = esta_magia.c_amt
t2[2] = critical_table
t2[3] = Loc ["STRING_HEAL_CRIT"]
t2[4] = Loc ["STRING_MINIMUM_SHORT"] .. ": " .. _detalhes:comma_value (esta_magia.c_min)
t2[5] = Loc ["STRING_MAXIMUM_SHORT"] .. ": " .. _detalhes:comma_value (esta_magia.c_max)
t2[6] = Loc ["STRING_AVERAGE"] .. ": " .. _detalhes:comma_value (media_critico)
t2[7] = Loc ["STRING_HPS"] .. ": " .. _detalhes:comma_value (crit_hps)
t2[8] = esta_magia.c_amt .. " / ".. _cstr ("%.1f", esta_magia.c_amt/total_hits*100) .. "%"
end
--> MULTISTRIKE
if (esta_magia.m_amt > 0) then
local multistrike_hits = esta_magia.m_amt
local multistrike_heal = esta_magia.m_curado
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
data[#data+1] = t3
multistrike_table.p = esta_magia.m_amt/total_hits*100
t3[1] = esta_magia.m_amt
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) .. "%"
end
end
_table_sort (data, function (a, b) return a[1] > b[1] end)
--> Aqui pode vir a cura absorvida
_table_sort (data, _detalhes.Sort1)
--[[
local absorbed = esta_magia.absorbed
if (absorbed > 0) then
local porcentagem_absorbed = absorbed/esta_magia.total*100
data[#data+1] = {
absorbed,
{["p"] = porcentagem_absorbed, ["c"] = {117/255, 58/255, 0/255}},
Loc ["STRING_HEAL_ABSORBED"], --> localiza-me
"", --esta_magia.glacing.curado
"",
"",
"",
absorbed.." / ".._cstr ("%.1f", porcentagem_absorbed).."%"
}
end
data[#data+1] = t3
absorbed_table.p = porcentagem_absorbed
t3[1] = absorbed
t3[2] = absorbed_table
t3[3] = Loc ["STRING_HEAL_ABSORBED"]
t3[4] = ""
t3[5] = ""
t3[6] = ""
t3[7] = ""
t3[8] = absorbed .. " / " .. _cstr ("%.1f", porcentagem_absorbed).."%"
end
--]]
for i = #data+1, 3 do --> para o overheal aparecer na ultima barra
data[i] = nil
end
--> overhealing
if (overheal > 0) then
local porcentagem_overheal = overheal/meu_total*100
data[4] = {
overheal,
{["p"] = porcentagem_overheal, ["c"] = {0.5, 0.1, 0.1}},
Loc ["STRING_OVERHEAL"], --> localiza-me
"",
"",
"",
"",
_detalhes:comma_value (overheal).." / ".._cstr ("%.1f", porcentagem_overheal).."%"
}
data[4] = t4
overhealing_table.p = porcentagem_overheal
t4[1] = overheal
t4[2] = overhealing_table
if (esta_magia.is_shield) then
t4[3] = Loc ["STRING_SHIELD_OVERHEAL"]
else
t4[3] = Loc ["STRING_OVERHEAL"]
end
t4[4] = ""
t4[5] = ""
t4[6] = ""
t4[7] = ""
t4[8] = _detalhes:comma_value (overheal) .. " / " .. _cstr ("%.1f", porcentagem_overheal) .. "%"
end
for index = 1, 4 do
@@ -2059,6 +2142,7 @@ end
SelectedToKFunction = ToKFunctions [_detalhes.ps_abbreviation]
FormatTooltipNumber = ToKFunctions [_detalhes.tooltip.abbreviation]
TooltipMaximizedMethod = _detalhes.tooltip.maximize_method
headerColor = _detalhes.tooltip.header_text_color
end
--> subtract total from a combat table
+12 -1
View File
@@ -28,6 +28,11 @@
totalabsorb = 0,
counter = 0,
id = id,
--> multistrike
m_amt = 0,
m_curado = 0,
m_overheal = 0,
--> normal hits
n_min = 0,
@@ -56,7 +61,7 @@
return _newHealSpell
end
function habilidade_cura:Add (serial, nome, flag, amount, who_nome, absorbed, critical, overhealing, is_shield)
function habilidade_cura:Add (serial, nome, flag, amount, who_nome, absorbed, critical, overhealing, is_shield, multistrike)
self.counter = self.counter + 1
@@ -67,6 +72,12 @@
alvo = self.targets._ActorTable [alvo]
end
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
if (absorbed and absorbed > 0) then
self.absorbed = self.absorbed + absorbed
alvo.absorbed = alvo.absorbed + absorbed
+31 -8
View File
@@ -654,12 +654,13 @@ function _detalhes:EstaAgrupada (esta_instancia, lado) --> lado //// 1 = encosto
end
function _detalhes:BaseFrameSnap()
for meu_id, instancia in _ipairs (_detalhes.tabela_instancias) do
if (instancia:IsAtiva()) then
instancia.baseframe:ClearAllPoints()
end
end
local group = self:GetInstanceGroup()
local scale = self.window_scale
for _, instance in _ipairs (group) do
@@ -789,7 +790,7 @@ end
function _detalhes:agrupar_janelas (lados)
local instancia = self
for lado, esta_instancia in _pairs (lados) do
if (esta_instancia) then
instancia.baseframe:ClearAllPoints()
@@ -1867,6 +1868,7 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
local atributo_changed = false
--> verifica se os valores passados são válidos
if (not segmento) then
segmento = instancia.segmento
elseif (_type (segmento) ~= "number") then
@@ -2671,9 +2673,19 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
if (_type (amount) == "number" and amount > 0) then
if (keyNameSec) then
local dps = GetDpsHps (_thisActor, keyNameSec)
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. _cstr ("%.2f", amount/total*100) .. "% (" .. _detalhes:comma_value (_math_floor (dps)) .. ", " .. _detalhes:ToK ( _math_floor (amount) ) .. ")"
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) .. "%)"
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)) .. ")"
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)) .. ")"
end
else
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. _detalhes:ToKReport (amount).." (".._cstr ("%.1f", amount/total*100).."%)"
if (_detalhes.report_schema == 1) then
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. _detalhes:ToKReport (amount) .. " (" .. _cstr ("%.1f", amount/total*100) .. "%)"
else
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. _cstr ("%.1f", amount/total*100) .. "% (" .. _detalhes:ToKReport (amount) .. ")"
end
end
elseif (_type (amount) == "string") then
@@ -2782,11 +2794,22 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
if (_type (amount) == "number") then
if (amount > 0) then
if (keyNameSec) then
local dps = GetDpsHps (_thisActor, keyNameSec)
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. _cstr ("%.2f", amount/total*100) .. "% (" .. _detalhes:comma_value (_math_floor (dps)) .. ", " .. _detalhes:ToK ( _math_floor (amount) ) .. ")"
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) .. "%)"
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)) .. ")"
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)) .. ")"
end
else
report_lines [#report_lines+1] = i .. "." .. name .. " " .. _detalhes:comma_value ( _math_floor (amount) ).." (".._cstr ("%.1f", amount/total*100).."%)"
if (_detalhes.report_schema == 1) then
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. _detalhes:ToKReport (amount) .. " (" .. _cstr ("%.1f", amount/total*100) .. "%)"
else
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. _cstr ("%.1f", amount/total*100) .. "% (" .. _detalhes:ToKReport (amount) .. ")"
end
end
quantidade = quantidade + 1
@@ -3006,9 +3029,9 @@ function _detalhes:envia_relatorio (linhas, custom)
return
end
if (to_who == "RAID") then
if (to_who == "RAID" or to_who == "PARTY") then
--LE_PARTY_CATEGORY_HOME - default
--LE_PARTY_CATEGORY_INSTANCE - player's automatic group, raid finder?.
--LE_PARTY_CATEGORY_INSTANCE - player's automatic group
if (GetNumGroupMembers (LE_PARTY_CATEGORY_INSTANCE) > 0) then
to_who = "INSTANCE_CHAT"
end
+6 -4
View File
@@ -69,6 +69,8 @@ local TooltipMaximizedMethod = 1
local info = _detalhes.janela_info
local keyName
local headerColor = "yellow"
function _detalhes.SortIfHaveKey (table1, table2)
if (table1[keyName] and table2[keyName]) then
return table1[keyName] > table2[keyName]
@@ -651,7 +653,7 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo
if (total == 0) then
total = 0.00000001
end
UsingCustomLeftText = instancia.row_info.textL_enable_custom_text
UsingCustomRightText = instancia.row_info.textR_enable_custom_text
@@ -814,7 +816,7 @@ function atributo_misc:RefreshBarra2 (esta_barra, instancia, tabela_anterior, fo
end
esta_barra.last_value = esta_porcentagem --> reseta o ultimo valor da barra
return self:RefreshBarra (esta_barra, instancia)
elseif (esta_porcentagem ~= esta_barra.last_value) then --> continua mostrando a mesma tabela então compara a porcentagem
@@ -974,7 +976,6 @@ end
--> tooltip locals
local r, g, b
local headerColor = "yellow"
local barAlha = .6
function atributo_misc:ToolTipDead (instancia, numero, barra)
@@ -1384,7 +1385,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
end
if (in_or_out == "BUFF_UPTIME_IN") then
local string_output = "pre-potion: "
local string_output = "pre-potion: " --> localize-me
for playername, potspellid in _pairs (pot_usage) do
local name, _, icon = _GetSpellInfo (potspellid)
local _, class = UnitClass (playername)
@@ -2142,6 +2143,7 @@ end
SelectedToKFunction = ToKFunctions [_detalhes.ps_abbreviation]
FormatTooltipNumber = ToKFunctions [_detalhes.tooltip.abbreviation]
TooltipMaximizedMethod = _detalhes.tooltip.maximize_method
headerColor = _detalhes.tooltip.header_text_color
end
+32 -17
View File
@@ -163,8 +163,8 @@
if (_UnitExists ("boss"..index)) then
local guid = _UnitGUID ("boss"..index)
if (guid) then
local serial = tonumber (guid:sub(6, 10), 16)
local serial = _detalhes:GetNpcIdFromGuid (guid)
if (serial) then
local ZoneName, _, DifficultyID, _, _, _, _, ZoneMapID = _GetInstanceInfo()
@@ -205,7 +205,7 @@
if (ActorsContainer) then
for index, Actor in _ipairs (ActorsContainer) do
if (not Actor.grupo) then
local serial = tonumber (Actor.serial:sub (6, 10), 16)
local serial = _detalhes:GetNpcIdFromGuid (Actor.serial)
if (serial) then
BossIndex = BossIds [serial]
if (BossIndex) then
@@ -235,8 +235,8 @@
--> 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)
_table_wipe (_detalhes.tabela_vigente)
--_table_wipe (_detalhes.tabela_overall) no more wipes, avoid combat invalid issues
--_table_wipe (_detalhes.tabela_vigente)
--> aqui ele perdeu o self.showing das instâncias, precisa fazer com que elas atualizem
_detalhes.tabela_overall = _detalhes.combate:NovaTabela()
@@ -400,6 +400,9 @@
--> lock timers
_detalhes.tabela_vigente:TravarTempos()
--> get waste shields
_detalhes:CloseShields (_detalhes.tabela_vigente)
_detalhes.tabela_vigente:seta_data (_detalhes._detalhes_props.DATA_TYPE_END) --> salva hora, minuto, segundo do fim da luta
_detalhes.tabela_overall:seta_data (_detalhes._detalhes_props.DATA_TYPE_END) --> salva hora, minuto, segundo do fim da luta
_detalhes.tabela_vigente:seta_tempo_decorrido() --> salva o end_time
@@ -449,7 +452,9 @@
_detalhes.tabela_vigente.is_boss.killed = true
end
if (_detalhes:GetBossDetails (_detalhes.tabela_vigente.is_boss.mapid, _detalhes.tabela_vigente.is_boss.index)) then
--if (_detalhes:GetBossDetails (_detalhes.tabela_vigente.is_boss.mapid, _detalhes.tabela_vigente.is_boss.index) or ) then
_detalhes.tabela_vigente.is_boss.index = _detalhes.tabela_vigente.is_boss.index or 1
_detalhes.tabela_vigente.enemy = _detalhes.tabela_vigente.is_boss.encounter
@@ -463,13 +468,13 @@
_detalhes.pre_pot_used = nil
end
end
if (from_encounter_end) then
_detalhes.tabela_vigente.end_time = _detalhes.encounter_table ["end"]
end
--> encounter boss function
local bossFunction, bossFunctionType = _detalhes:GetBossFunction (_detalhes.tabela_vigente.is_boss.mapid, _detalhes.tabela_vigente.is_boss.index)
local bossFunction, bossFunctionType = _detalhes:GetBossFunction (_detalhes.tabela_vigente.is_boss.mapid or 0, _detalhes.tabela_vigente.is_boss.index or 0)
if (bossFunction) then
if (_bit_band (bossFunctionType, 0x2) ~= 0) then --end of combat
bossFunction()
@@ -496,11 +501,11 @@
_detalhes:ScheduleTimer ("DelayedSyncAlert", 3)
end
else
if (_detalhes.debug) then
_detalhes:EqualizeActorsSchedule (_detalhes.host_of)
end
end
--else
-- if (_detalhes.debug) then
-- _detalhes:EqualizeActorsSchedule (_detalhes.host_of)
-- end
--end
end
if (_detalhes.solo) then
@@ -509,14 +514,17 @@
end
local tempo_do_combate = _detalhes.tabela_vigente.end_time - _detalhes.tabela_vigente.start_time
local invalid_combat
--if ( tempo_do_combate >= _detalhes.minimum_combat_time) then --> tempo minimo precisa ser 5 segundos pra acrecentar a tabela ao historico
if ( tempo_do_combate >= 5 or not _detalhes.tabela_historico.tabelas[1]) then --> tempo minimo precisa ser 5 segundos pra acrecentar a tabela ao historico
_detalhes.tabela_historico:adicionar (_detalhes.tabela_vigente) --move a tabela atual para dentro do histórico
else
--print ("combat invalid...")
--> this is a little bit complicated, need a specific function for combat cancellation
--_table_wipe (_detalhes.tabela_vigente) --> descarta ela, não será mais usada
invalid_combat = _detalhes.tabela_vigente
_detalhes.tabela_vigente = _detalhes.tabela_historico.tabelas[1] --> pega a tabela do ultimo combate
if (_detalhes.tabela_vigente.start_time == 0) then
@@ -576,7 +584,12 @@
_detalhes.pre_pot_used = nil
_table_wipe (_detalhes.encounter_table)
_detalhes:SendEvent ("COMBAT_PLAYER_LEAVE", nil, _detalhes.tabela_vigente)
if (invalid_combat) then
_detalhes:SendEvent ("COMBAT_INVALID")
_detalhes:SendEvent ("COMBAT_PLAYER_LEAVE", nil, invalid_combat)
else
_detalhes:SendEvent ("COMBAT_PLAYER_LEAVE", nil, _detalhes.tabela_vigente)
end
end
function _detalhes:GetPlayersInArena()
@@ -949,6 +962,7 @@
local backgroundPoint = {{"bottomleft", "topleft", 0, -3}, {"bottomright", "topright", 0, -3}}
local textPoint = {"left", "right", -11, -5}
local avatarTexCoord = {0, 1, 0, 1}
local backgroundColor = {0, 0, 0, 0.6}
function _detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddStatusBar (100, 1, unpack (_detalhes.tooltip.background))
@@ -971,14 +985,15 @@
GameCooltip:SetOption ("TextSize", _detalhes.tooltip.fontsize)
GameCooltip:SetOption ("TextFont", _detalhes.tooltip.fontface)
GameCooltip:SetOption ("TextColor", _detalhes.tooltip.fontcolor)
GameCooltip:SetOption ("TextColorRight", _detalhes.tooltip.fontcolor_right)
GameCooltip:SetOption ("TextShadow", _detalhes.tooltip.fontshadow and "OUTLINE")
GameCooltip:SetOption ("LeftBorderSize", -5)
GameCooltip:SetOption ("RightBorderSize", 5)
GameCooltip:SetOption ("MinWidth", _math_max (230, self.baseframe:GetWidth()*0.8))
GameCooltip:SetOption ("MinWidth", _math_max (230, self.baseframe:GetWidth()*0.9))
GameCooltip:SetOption ("StatusBarTexture", [[Interface\WorldStateFrame\WORLDSTATEFINALSCORE-HIGHLIGHT]]) --[[Interface\Addons\Details\images\bar_flat]]
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, backgroundColor, _detalhes.tooltip_border_color) --{.090, .090, .188, .1}
local myPoint = _detalhes.tooltip.anchor_point
local anchorPoint = _detalhes.tooltip.anchor_relative
+146 -105
View File
@@ -129,21 +129,35 @@
--> DAMAGE serach key: ~damage |
-----------------------------------------------------------------------------------------------------------------------------------------
function parser:swing (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing)
return parser:spell_dmg (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, 1, "Corpo-a-Corpo", 00000001, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing) --> localize-me
function parser:swing (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand, multistrike)
return parser:spell_dmg (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, 1, "Corpo-a-Corpo", 00000001, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand, multistrike) --> localize-me
--spellid, spellname, spelltype
end
function parser:range (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing)
return parser:spell_dmg (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, 2, "Tiro-Automático", 00000001, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing) --> localize-me
function parser:range (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand, multistrike)
return parser:spell_dmg (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, 2, "Tiro-Automático", 00000001, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand, multistrike) --> localize-me
--spellid, spellname, spelltype
end
function parser:spell_dmg (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing)
function parser:spell_dmg (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand, multistrike)
------------------------------------------------------------------------------------------------
--> early checks and fixes
--[[
if (who_name == "Quinel") then
if (isoffhand) then
print (spellname, isoffhand, "off hand")
end
if (multistrike) then
print (spellname, multistrike, "multistrike")
end
end
--]]
--if (spellid ~= 1) then
-- print (who_name, alvo_name, alvo_flags, spellname, amount)
--end
if (who_serial == "0x0000000000000000") then
if (who_flags and _bit_band (who_flags, OBJECT_TYPE_PETS) ~= 0) then --> é um pet
--> pets must have an serial
@@ -159,6 +173,12 @@
--> no actor name, use spell name instead
who_name = "[*] "..spellname
end
--> Fix for mage prismatic crystal
--local npcId = _detalhes:GetNpcIdFromGuid (alvo_serial)
--if (npcId == 76933) then
-- return
--end
------------------------------------------------------------------------------------------------
--> check if need start an combat
@@ -183,7 +203,6 @@
end
_detalhes:Msg ("First hit: " .. (link or "") .. " from " .. (who_name or "Unknown"))
end
_detalhes:EntrarEmCombate (who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags)
end
end
@@ -371,8 +390,10 @@
------------------------------------------------------------------------------------------------
--> firendly fire
--if (_bit_band (who_flags, REACTION_FRIENDLY) ~= 0 and _bit_band (alvo_flags, REACTION_FRIENDLY) ~= 0) then (old friendly check)
if (raid_members_cache [who_serial] and raid_members_cache [alvo_serial]) then
if (
(_bit_band (alvo_flags, REACTION_FRIENDLY) ~= 0 and _bit_band (who_flags, REACTION_FRIENDLY) ~= 0) or
(raid_members_cache [who_serial] and raid_members_cache [alvo_serial])
) then
--> record death log
local t = last_events_cache [alvo_name]
@@ -465,7 +486,7 @@
spell = este_jogador.spell_tables:PegaHabilidade (spellid, true, token)
end
return spell_damage_func (spell, alvo_serial, alvo_name, alvo_flags, amount, who_name, resisted, blocked, absorbed, critical, glacing, token)
return spell_damage_func (spell, alvo_serial, alvo_name, alvo_flags, amount, who_name, resisted, blocked, absorbed, critical, glacing, token, multistrike, isoffhand)
end
function parser:swingmissed (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, missType, isOffHand, amountMissed)
@@ -476,8 +497,10 @@
return parser:missed (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, 2, "Tiro-Automático", 00000001, missType, isOffHand, amountMissed)
end
function parser:missed (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, missType, isOffHand, amountMissed)
function parser:missed (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, missType, isOffHand, amountMissed, arg1, arg2)
--print (spellname, spelltype, missType, isOffHand, amountMissed, arg1, arg2)
------------------------------------------------------------------------------------------------
--> early checks and fixes
@@ -521,13 +544,13 @@
if (missType == "ABSORB") then --full absorb
overall ["ALL"] = overall ["ALL"] + 1 --> qualtipo de hit ou absorb
overall ["FULL_ABSORBED"] = overall ["FULL_ABSORBED"] + 1 --amount
overall ["ABSORB_AMT"] = overall ["ABSORB_AMT"] + amountMissed
overall ["FULL_ABSORB_AMT"] = overall ["FULL_ABSORB_AMT"] + amountMissed
overall ["ABSORB_AMT"] = overall ["ABSORB_AMT"] + (amountMissed or 0)
overall ["FULL_ABSORB_AMT"] = overall ["FULL_ABSORB_AMT"] + (amountMissed or 0)
mob ["ALL"] = mob ["ALL"] + 1 --> qualtipo de hit ou absorb
mob ["FULL_ABSORBED"] = mob ["FULL_ABSORBED"] + 1 --amount
mob ["ABSORB_AMT"] = mob ["ABSORB_AMT"] + amountMissed
mob ["FULL_ABSORB_AMT"] = mob ["FULL_ABSORB_AMT"] + amountMissed
mob ["ABSORB_AMT"] = mob ["ABSORB_AMT"] + (amountMissed or 0)
mob ["FULL_ABSORB_AMT"] = mob ["FULL_ABSORB_AMT"] + (amountMissed or 0)
end
end
@@ -572,9 +595,49 @@
-----------------------------------------------------------------------------------------------------------------------------------------
--> HEALING serach key: ~heal |
-----------------------------------------------------------------------------------------------------------------------------------------
local gotit = {
[140468]=true, --Flameglow Mage
[122470]=true, --touch of karma Monk
[114556]=true, --purgatory DK
[152280]=true, --defile DK
[20711]=true, --spirit of redeption priest
[155783]=true, --Primal Tenacity Druid
[135597]=true, --Tooth and Claw Druid
[152261]=true, --Holy Shield Paladin
[158708]=true, --Earthen Barrier boss?
}
function parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, amount, overhealing, absorbed, critical, is_shield)
function parser:heal_absorb (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, owner_serial, owner_name, owner_flags, owner_flags2, shieldid, shieldname, shieldtype, amount)
if (not shieldname) then
owner_serial, owner_name, owner_flags, owner_flags2, shieldid, shieldname, shieldtype, amount = spellid, spellname, spellschool, owner_serial, owner_name, owner_flags, owner_flags2, shieldid
end
--if (not absorb_spell_list [shieldid] and not gotit[shieldid]) then
-- local _, class = UnitClass (owner_name)
--print ("Shield Not Registered:", shieldid, shieldname, class)
--end
--> diminuir o escudo nas tabelas de escudos
local shields_on_target = escudo [alvo_name]
if (shields_on_target) then
local shields_by_spell = shields_on_target [shieldid]
if (shields_by_spell) then
local owner_shield = shields_by_spell [owner_name]
if (owner_shield) then
--print ("amt: ", owner_shield, owner_shield - amount, amount)
shields_by_spell [owner_name] = owner_shield - amount
end
end
end
--> chamar a função de cura pra contar a cura
return parser:heal (token, time, owner_serial, owner_name, owner_flags, alvo_serial, alvo_name, alvo_flags, shieldid, shieldname, shieldtype, amount, 0, 0, nil, nil, true)
end
function parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, amount, overhealing, absorbed, critical, multistrike, is_shield)
------------------------------------------------------------------------------------------------
--> early checks and fixes
@@ -773,14 +836,17 @@
local spell = este_jogador.spell_tables._ActorTable [spellid]
if (not spell) then
spell = este_jogador.spell_tables:PegaHabilidade (spellid, true, token)
if (is_shield) then
spell.is_shield = true
end
end
if (is_shield) then
--return spell:Add (alvo_serial, alvo_name, alvo_flags, cura_efetiva, who_name, 0, nil, overhealing, true)
return spell_heal_func (spell, alvo_serial, alvo_name, alvo_flags, cura_efetiva, who_name, 0, nil, overhealing, true)
return spell_heal_func (spell, alvo_serial, alvo_name, alvo_flags, cura_efetiva, who_name, 0, nil, overhealing, true, multistrike)
else
--return spell:Add (alvo_serial, alvo_name, alvo_flags, cura_efetiva, who_name, absorbed, critical, overhealing)
return spell_heal_func (spell, alvo_serial, alvo_name, alvo_flags, cura_efetiva, who_name, absorbed, critical, overhealing)
return spell_heal_func (spell, alvo_serial, alvo_name, alvo_flags, cura_efetiva, who_name, absorbed, critical, overhealing, nil, multistrike)
end
end
@@ -788,7 +854,7 @@
--> BUFFS & DEBUFFS serach key: ~buff ~aura ~shield |
-----------------------------------------------------------------------------------------------------------------------------------------
function parser:buff (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, tipo, amount)
function parser:buff (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, tipo, amount, arg1, arg2, arg3)
--> not yet well know about unnamed buff casters
if (not alvo_name) then
@@ -801,8 +867,17 @@
--> handle shields
if (tipo == "BUFF") then
--if (who_name == _detalhes.playername) then
-- print (spellid, spellname)
--end
------------------------------------------------------------------------------------------------
--> buff uptime
--if (arg1 or arg2 or arg3) then
-- print (spellname, arg1, arg2, arg3)
--end
if (_recording_buffs_and_debuffs) then
-- jade spirit doesn't send who_name, that's a shame.
if (who_name == alvo_name and raid_members_cache [who_serial] and _in_combat) then
@@ -954,12 +1029,19 @@
if (escudo [alvo_name] and escudo [alvo_name][spellid] and escudo [alvo_name][spellid][who_name]) then
local absorb = escudo [alvo_name][spellid][who_name] - amount
local overheal = amount - absorb
local overheal = escudo [alvo_name][spellid][who_name]
escudo [alvo_name][spellid][who_name] = amount
if (overheal > 0) then
return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, nil, 0, _math_ceil (overheal), 0, 0, nil, true)
end
--local absorb = escudo [alvo_name][spellid][who_name] - amount
--local overheal = amount - absorb
--escudo [alvo_name][spellid][who_name] = amount
--if (absorb > 0) then
return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, nil, _math_ceil (absorb), _math_ceil (overheal), 0, 0, true)
--return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, nil, _math_ceil (absorb), _math_ceil (overheal), 0, 0, nil, true)
--end
else
--> should apply aura if not found in already applied buff list?
@@ -1077,16 +1159,24 @@
if (escudo [alvo_name] and escudo [alvo_name][spellid] and escudo [alvo_name][spellid][who_name]) then
if (amount) then
-- o amount é o que sobrou do escudo
local escudo_antigo = escudo [alvo_name][spellid][who_name] --> quantidade total do escudo que foi colocado
local absorb = escudo_antigo - amount
local overheal = escudo_antigo - absorb
local overheal = escudo [alvo_name][spellid][who_name]
--escudo [alvo_name][spellid][who_name] = nil
escudo [alvo_name][spellid][who_name] = nil
if (overheal > 0) then
return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, nil, 0, _math_ceil (overheal), 0, 0, nil, true)
end
---
--local escudo_antigo = escudo [alvo_name][spellid][who_name] --> quantidade total do escudo que foi colocado
return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, nil, _math_ceil (absorb), _math_ceil (overheal), 0, 0, true) --> último parametro IS_SHIELD
--local absorb = escudo_antigo - amount
--local overheal = escudo_antigo - absorb
--escudo [alvo_name][spellid][who_name] = nil
--return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, nil, _math_ceil (absorb), _math_ceil (overheal), 0, 0, nil, true) --> último parametro IS_SHIELD
end
escudo [alvo_name][spellid][who_name] = nil
escudo [alvo_name][spellid][who_name] = 0
end
--end
@@ -2240,18 +2330,6 @@
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
@@ -2368,58 +2446,6 @@
end
end
local sort_dead = function (table1, table2)
if (not table1) then
--print (1)
return false
elseif (not table2) then
--print (2)
return false
elseif (table1 [4] == table2 [4]) then --> os 2 tem o mesmo tempo
if (type (table1 [1]) == "boolean" and table1 [1] and type (table2 [1]) == "boolean" and table2) then --> ambos sao dano
--print (3)
return table1 [5] > table2 [5] --> joga pra cima quem tem mais vida
elseif (type (table1 [1]) == "boolean" and not table1 [1] and type (table2 [1]) == "boolean" and not table2) then --> ambos sao cura
--print (4)
return table1 [5] < table2 [5] --> joga pra cima quem tem menos vida
else
if (type (table1 [1]) == "boolean" and table1 and type (table2 [1]) == "boolean" and table2) then --> primeiro é dano e segundo é heal
--print (5)
return true --> passa o dano pra frente
elseif (type (table2 [1]) == "boolean" and table2 and type (table1 [1]) == "boolean" and table1) then --> primeiro é heal e o segundo é dano
--print (6)
return false --> passa o heal pra frente
else
--print (7)
return table1 [5] < table2 [5] --> passa quem tem menos vida
end
end
else
--print (8)
return table1 [4] < table2 [4]
end
end
local function sort_error (error)
return error
end
local death_table
function do_death_sort()
_table_sort (death_table, sort_dead)
end
function parser:safe_sort_dead (t)
death_table = t
local status, error = xpcall (do_death_sort, sort_error)
if (not status) then
--_detalhes:Msg ("(debug) xpcall return false, sort got error.")
_table_sort (t, _detalhes.Sort4Reverse)
end
end
function parser:environment (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, env_type, amount)
local spelid
@@ -2532,6 +2558,7 @@
elseif (capture_type == "heal") then
token_list ["SPELL_HEAL"] = nil
token_list ["SPELL_PERIODIC_HEAL"] = nil
token_list ["SPELL_ABSORBED"] = nil
_recording_healing = false
elseif (capture_type == "aura") then
@@ -2573,6 +2600,8 @@
--SPELL_PERIODIC_DRAIN --> need research
--SPELL_PERIODIC_LEECH --> need research
--SPELL_DISPEL_FAILED --> need research
--SPELL_ABSORBED
function _detalhes:CaptureEnable (capture_type)
@@ -2594,6 +2623,7 @@
elseif (capture_type == "heal") then
token_list ["SPELL_HEAL"] = parser.heal
token_list ["SPELL_PERIODIC_HEAL"] = parser.heal
token_list ["SPELL_ABSORBED"] = parser.heal_absorb
_recording_healing = true
elseif (capture_type == "aura") then
@@ -2675,10 +2705,11 @@
_detalhes:EnteredInArena()
else
if (zoneType == "raid" or zoneType == "party") then
_detalhes:CheckForAutoErase (zoneMapID)
end
if (_detalhes:IsInInstance()) then
_detalhes.last_instance = zoneMapID
end
@@ -2707,20 +2738,19 @@
local encounterID, encounterName, difficultyID, raidSize = _select (1, ...)
if (_in_combat and not _detalhes.tabela_vigente.is_boss) then
--print ("encounter start while in combat... finishing the combat...")
_detalhes:SairDoCombate()
_detalhes:Msg ("encounter against|cFFFFFF00", encounterName, "|rbegan, GL HF!")
else
_detalhes:Msg ("encounter against|cFFFFC000", encounterName, "|rbegan, GL HF!")
end
local dbm_mod, dbm_time = _detalhes.encounter_table.DBM_Mod, _detalhes.encounter_table.DBM_ModTime
_table_wipe (_detalhes.encounter_table)
local encounterID, encounterName, difficultyID, raidSize = _select (1, ...)
local zoneName, _, _, _, _, _, _, zoneMapID = _GetInstanceInfo()
--print (encounterID, encounterName, difficultyID, raidSize)
_detalhes.encounter_table.phase = 1
_detalhes.encounter_table ["start"] = time()
@@ -2762,7 +2792,7 @@
end
function _detalhes.parser_functions:ENCOUNTER_END (...)
local encounterID, encounterName, difficultyID, raidSize, endStatus = _select (1, ...)
_detalhes:Msg ("encounter against|cFFFFC000", encounterName, "|rended.")
@@ -2778,7 +2808,7 @@
_detalhes.latest_ENCOUNTER_END = _detalhes._tempo
_detalhes.encounter_table ["end"] = time() - 0.4
local _, _, _, _, _, _, _, zoneMapID = _GetInstanceInfo()
if (_in_combat) then
@@ -3029,14 +3059,14 @@
if (_detalhes.FechaJanelaInfo) then
_detalhes:FechaJanelaInfo()
end
--> do not save window pos
for id, instance in _detalhes:ListInstances() do
if (instance.baseframe) then
instance.baseframe:SetUserPlaced (false)
end
end
--> leave combat start save tables
if (_detalhes.in_combat and _detalhes.tabela_vigente) then
_detalhes:SairDoCombate()
@@ -3067,10 +3097,23 @@
--> end
-- ~parserstart ~startparser
function _detalhes:OnParserEvent (evento, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, ...)
local funcao = token_list [token]
--[[
Prismatic Crystal still bugged on Combat Log
--print (token, ...)
Mage's damage towards the Prismatic Crystal is still triggering a SPELL_DAMAGE Combat Log Event, I think this isn't indented.
So in practice, what happens is:
- Player cast Frost Bolt against his Crystal which is near 3 enemies.
- Combat Log trigger [b]4 SPELL_DAMAGE[/b] events: 3 events splitting the damage against the 3 enemies and 1 event with the total damage against the crystal <- this last one should not happen, it's literally duplicating the mage's damage.
The only way to detect the damage towards the crystal is getting [b]every single[/b] combatlog event and splitting the target GUID getting the crystal's npcId.
This workaround will consume a huge amount of Cpu (any addon which counts damage will need to use this fix).
--]]
if (funcao) then
return funcao (nil, token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, ... )
@@ -3374,5 +3417,3 @@
return nil --_detalhes:NewError ("Couldn't find a combat object for passed parameters")
end
end
+15
View File
@@ -141,6 +141,21 @@
end
end
function _detalhes.SoloTables:EnableSoloMode (instance, plugin_name, from_cooltip)
--> check if came from cooltip
if (from_cooltip) then
self = _detalhes.SoloTables
instance = plugin_name
plugin_name = from_cooltip
end
instance:SoloMode (true)
_detalhes.SoloTables:switch (nil, plugin_name)
end
--> Build Solo Mode Tables and Functions
function gump:PrepareSoloMode (instancia)
+2 -2
View File
@@ -609,7 +609,7 @@ do
-- handle event "COMBAT_PLAYER_ENTER"
function PDps:PlayerEnterCombat()
for index, child in _ipairs (PDps.childs) do
if (child.enabled and (child.instance:GetSegment() == 0 or child.instance:GetSegment() == -1)) then
if (child.enabled and child.instance:GetSegment() == 0) then
child.tick = _detalhes:ScheduleRepeatingTimer ("PluginDpsUpdate", 1, child)
end
end
@@ -654,7 +654,7 @@ do
if (child.instance.showing) then
--GetCombatTime() return the time length of combat
local combatTime = child.instance.showing:GetCombatTime()
if (combatTime == 0) then
if (combatTime < 1) then
return child.text:SetText ("0")
end
--GetTotal (attribute, sub attribute, onlyGroup) return the total of requested attribute
+12
View File
@@ -25,6 +25,9 @@
local _string_len = string.lenv
local _string_format = string.format --lua local
local loadstring = loadstring --lua local
local _select = select
local _tonumber = tonumber
local _strsplit = strsplit
local _UnitClass = UnitClass --wow api local
local _IsInRaid = IsInRaid --wow api local
@@ -41,6 +44,15 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> details api functions
--> get the npc id from guid
function _detalhes:GetNpcIdFromGuid (guid)
local NpcId = _select ( 6, _strsplit ( "-", guid ) )
if (NpcId) then
return _tonumber ( NpcId )
end
return 0
end
--> get the fractional number representing the alphabetical letter
function _detalhes:GetOrderNumber (who_name)
--local name = _upper (who_name .. "zz")
+14 -12
View File
@@ -135,10 +135,11 @@
function _detalhes:AtualizaPontos()
local _x, _y = self:GetPositionOnScreen()
if (not _x) then
return
end
return
end
local _w, _h = self:GetRealSize()
local metade_largura = _w/2
local metade_altura = _h/2
@@ -162,6 +163,7 @@
self.ponto4.x = _x + metade_largura
self.ponto4.y = _y + metade_altura + (statusbar_y_mod*-1)
end
end
function _detalhes:SaveMainWindowPosition (instance)
@@ -173,17 +175,17 @@
--> get sizes
local baseframe_width = self.baseframe:GetWidth()
local baseframe_height = self.baseframe:GetHeight()
if (not baseframe_width) then
return _detalhes:ScheduleTimer ("SaveMainWindowPosition", 1, self)
end
local baseframe_height = self.baseframe:GetHeight()
--> calc position
local _x, _y = self:GetPositionOnScreen()
if (not _x) then
return _detalhes:ScheduleTimer ("SaveMainWindowPosition", 1, self)
end
return _detalhes:ScheduleTimer ("SaveMainWindowPosition", 1, self)
end
--> save the position
local _w = baseframe_width
local _h = baseframe_height
@@ -199,7 +201,7 @@
local statusbar_y_mod = 0
if (not self.show_statusbar) then
statusbar_y_mod = 14
statusbar_y_mod = 14 * self.baseframe:GetScale()
end
if (not self.ponto1) then
@@ -784,7 +786,7 @@
local r, g, b = unpack (current_class_color)
_detalhes.gump:ColorPick (self, r, g, b, 1, callback)
end
local reset_color = function (class, index, self, button)
local reset_color = function (class, index, self, button)
local color_table = RAID_CLASS_COLORS [class]
local r, g, b = color_table.r, color_table.g, color_table.b
self.MyObject.my_texture:SetVertexColor (r, g, b)
@@ -799,7 +801,7 @@
--GameCooltip:Show (self)
end
local on_leave = function (self, capsule)
--GameCooltip:Hide()
--GameCooltip:Hide()
end
local reset = gump:NewLabel (panel, _, nil, nil, "|TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:" .. 20 .. ":" .. 20 .. ":0:1:512:512:8:70:328:409|t " .. "Right Click to Reset")
@@ -846,7 +848,7 @@
_G.DetailsClassColorManager:Show()
end
--> config bookmarks
function _detalhes:OpenBookmarkConfig()
@@ -916,7 +918,7 @@
set:SetBackdropColor (0, 0, 0, 0.5)
set:SetHook ("OnEnter", set_onenter)
set:SetHook ("OnLeave", set_onleave)
set:InstallCustomTexture (nil, nil, nil, nil, true)
local bg_texture = gump:CreateImage (set, [[Interface\AddOns\Details\images\bar_skyline]], 135, 30, "background")
+25 -1
View File
@@ -88,6 +88,7 @@ function DetailsCreateCoolTip()
["TextSize"] = true,
["TextFont"] = true,
["TextColor"] = true,
["TextColorRight"] = true,
["TextShadow"] = true,
["LeftTextWidth"] = true,
["RightTextWidth"] = true,
@@ -105,6 +106,7 @@ function DetailsCreateCoolTip()
["IconBlendMode"] = true,
["IconBlendModeHover"] = true,
["SubFollowButton"] = true,
["IgnoreArrows"] = true,
}
CoolTip.OptionsTable = {}
@@ -638,7 +640,11 @@ function DetailsCreateCoolTip()
local r, g, b, a = rightTextTable [2], rightTextTable [3], rightTextTable [4], rightTextTable [5]
if (r == 0 and g == 0 and b == 0 and a == 0) then
if (CoolTip.OptionsTable.TextColor) then
if (CoolTip.OptionsTable.TextColorRight) then
r, g, b, a = gump:ParseColors (CoolTip.OptionsTable.TextColorRight)
menuButton.rightText:SetTextColor (r, g, b, a)
elseif (CoolTip.OptionsTable.TextColor) then
r, g, b, a = gump:ParseColors (CoolTip.OptionsTable.TextColor)
menuButton.rightText:SetTextColor (r, g, b, a)
else
@@ -1388,6 +1394,19 @@ function DetailsCreateCoolTip()
frame1:SetHeight (_math_max ( (frame1.hHeight * CoolTip.Indexes) + 12 + (-spacing) + mod, 22 ))
end
--> sub menu arrows
if (CoolTip.HaveSubMenu and not CoolTip.OptionsTable.IgnoreArrows and not CoolTip.OptionsTable.SubMenuIsTooltip) then
for i = 1, CoolTip.Indexes do
if (CoolTip.IndexesSub [i] and CoolTip.IndexesSub [i] > 0) then
frame1.Lines [i].statusbar.subMenuArrow:Show()
else
frame1.Lines [i].statusbar.subMenuArrow:Hide()
end
end
frame1:SetWidth (frame1:GetWidth() + 16)
end
frame1:ClearAllPoints()
CoolTip:SetMyPoint (host)
@@ -1792,6 +1811,11 @@ function DetailsCreateCoolTip()
CoolTip:ClearAllOptions()
CoolTip:SetColor (1, "transparent")
CoolTip:SetColor (2, "transparent")
local f1Lines = frame1.Lines
for i = 1, #f1Lines do
f1Lines [i].statusbar.subMenuArrow:Hide()
end
end
----------------------------------------------------------------------
+9
View File
@@ -221,6 +221,15 @@
<Anchor point="LEFT" relativeTo="$parent" relativePoint="RIGHT" x="-17" y="-1"/>
</Anchors>
</Texture>
<!-- sub menu arrow -->
<Texture name="$parent_SubMenuArrow" hidden="true" parentKey="subMenuArrow" file = "Interface\CHATFRAME\ChatFrameExpandArrow" alphaMode="BLEND">
<Size>
<AbsDimension x="12" y="12"/>
</Size>
<Anchors>
<Anchor point="RIGHT" relativeTo="$parent" relativePoint="RIGHT" x="3" y="0"/>
</Anchors>
</Texture>
</Layer>
</Layers>
+2 -2
View File
@@ -239,7 +239,7 @@ function gump:ShowTutorialAlertFrame (maintext, desctext, clickfunc)
if (not TutorialAlertFrame) then
TutorialAlertFrame = CreateFrame ("ScrollFrame", "DetailsTutorialAlertFrame", UIParent, "WatchFrameAutoQuestPopUpTemplate")
TutorialAlertFrame = CreateFrame ("ScrollFrame", "DetailsTutorialAlertFrame", UIParent, "DetailsTutorialAlertFrameTemplate")
TutorialAlertFrame.isFirst = true
TutorialAlertFrame:SetPoint ("left", UIParent, "left", -20, 100)
@@ -295,5 +295,5 @@ function gump:ShowTutorialAlertFrame (maintext, desctext, clickfunc)
TutorialAlertFrame.clickfunc = clickfunc
TutorialAlertFrame:Show()
WatchFrame_SlideInFrame (TutorialAlertFrame, "AUTOQUEST")
DetailsTutorialAlertFrame_SlideInFrame (TutorialAlertFrame, "AUTOQUEST")
end
+6 -4
View File
@@ -108,10 +108,12 @@ do
end
end
local fases = encounter.phases
for fase_id, fase in _ipairs (fases) do
if (fase.spells) then
for index, spellid in _ipairs (fase.spells) do
habilidades_poll [spellid] = true
if (fases) then
for fase_id, fase in _ipairs (fases) do
if (fase.spells) then
for index, spellid in _ipairs (fase.spells) do
habilidades_poll [spellid] = true
end
end
end
end
+2
View File
@@ -32,6 +32,7 @@
["COMBAT_PLAYER_LEAVE"] = {},
["COMBAT_PLAYER_TIMESTARTED"] = {},
["COMBAT_BOSS_FOUND"] = {},
["COMBAT_INVALID"] = {},
--> area
["ZONE_TYPE_CHANGED"] = {},
@@ -76,6 +77,7 @@ local common_events = {
["COMBAT_PLAYER_LEAVE"] = true,
["COMBAT_PLAYER_TIMESTARTED"] = true,
["COMBAT_BOSS_FOUND"] = true,
["COMBAT_INVALID"] = true,
["GROUP_ONENTER"] = true,
["GROUP_ONLEAVE"] = true,
["ZONE_TYPE_CHANGED"] = true,
+8 -4
View File
@@ -381,8 +381,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
instance.posicao.normal = {x = 1, y = 1, w = 300, h = 200}
end
end
-- /dump _detalhes:GetInstance(1).sub_atributo
--> open the instance
if (instance:IsEnabled()) then
if (not instance.baseframe) then
@@ -757,6 +756,7 @@ local default_profile = {
use_row_animations = false,
animate_scroll = false,
use_scroll = false,
scroll_speed = 2,
update_speed = 1,
time_type = 2,
memory_threshold = 3,
@@ -772,6 +772,7 @@ local default_profile = {
report_lines = 5,
report_to_who = "",
report_heal_links = false,
report_schema = 1,
--> colors
default_bg_color = 0.0941,
@@ -812,12 +813,14 @@ local default_profile = {
fontface = "Friz Quadrata TT",
fontsize = 10,
fontcolor = {1, 1, 1, 1},
fontcolor_right = {1, 0.7, 0, 1}, --{1, 0.9254, 0.6078, 1}
fontshadow = false,
background = {.45, .45, .45, .28},
abbreviation = 5, --ToK I Lower -- was 8
background = {0.1411, 0.1411, 0.1411, 0.8763},
abbreviation = 2, -- 2 = ToK I Upper 5 = ToK I Lower -- was 8
maximize_method = 1,
show_amount = false,
commands = {},
header_text_color = {1, 0.9176, 0, 1}, --{1, 0.7, 0, 1}
anchored_to = 1,
anchor_screen_pos = {507.700, -350.500},
@@ -888,6 +891,7 @@ local default_player_data = {
enabled = true,
channel = "SELF",
},
}
_detalhes.default_player_data = default_player_data
+1
View File
@@ -19,6 +19,7 @@ local is_exception = {
}
function _detalhes:SaveLocalInstanceConfig()
for index, instance in _detalhes:ListInstances() do
local a1, a2 = instance:GetDisplay()
+16 -13
View File
@@ -252,18 +252,21 @@ local _
}
})
local dark_serenity = function()
local instance = _G.DetailsOptionsWindow.instance
--> black color
instance:InstanceColor (0, 0, 0, 1)
--> flip wallpaper
local wtexc = instance.wallpaper.texcoord
wtexc[1], wtexc[2], wtexc[3], wtexc[4] = 0.04800000, 0.29800001, 0.75599998, 0.63099998
--> reload skin
instance:ChangeSkin()
if (instance) then
--> black color
instance:InstanceColor (0, 0, 0, 1)
--> flip wallpaper
local wtexc = instance.wallpaper.texcoord
wtexc[1], wtexc[2], wtexc[3], wtexc[4] = 0.04800000, 0.29800001, 0.75599998, 0.63099998
--> reload skin
instance:ChangeSkin()
end
end
_detalhes:InstallSkin ("Serenity", { --
_detalhes:InstallSkin ("Serenity", {
file = [[Interface\AddOns\Details\images\skins\flat_skin]],
author = "Details!",
version = "1.0",
@@ -288,7 +291,7 @@ local _
right_corner_anchor_bottom = {96, 0},
instance_cprops = {
resetbutton_config = {size = {13, 13}, anchor = {3, 0}, normal_texture = [[Interface\Addons\Details\Images\reset_button2]], highlight_texture = [[Interface\Addons\Details\Images\reset_button2]]},
instancebutton_config = {size = {20, 16}, anchor = {5, 0}, textcolor = {.8, .6, .0, 0.8}, textsize = 10, textfont = "Friz Quadrata TT", highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]]},
closebutton_config = {size = {18, 18}, alpha = 1, anchor = {0, 0}},
@@ -300,7 +303,8 @@ local _
1, -- [2]
1, -- [3]
0.9199999570846558, -- [4]
},
},
["menu_anchor"] = {
-60, -- [1]
0, -- [2]
@@ -451,11 +455,10 @@ local _
alpha = 0.8,
texture = [[Interface\AddOns\Details\images\skins\elvui]],
},
["stretch_button_side"] = 1,
["micro_displays_side"] = 2,
["bg_b"] = 1,
},
},
skin_options = {
{type = "button", name = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP"], func = reset_tooltip, desc = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP_DESC"]},
+2 -1
View File
@@ -15,6 +15,7 @@ SLASH_DETAILS1, SLASH_DETAILS2, SLASH_DETAILS3 = "/details", "/dt", "/de"
function SlashCmdList.DETAILS (msg, editbox)
local command, rest = msg:match("^(%S*)%s*(.-)$")
command = string.lower (command)
if (command == Loc ["STRING_SLASH_NEW"] or command == "new") then
_detalhes:CriarInstancia (nil, true)
@@ -89,7 +90,7 @@ function SlashCmdList.DETAILS (msg, editbox)
else
_detalhes:CheckChatOnLeaveGroup()
end
elseif (msg == "owner2") then
local tip = CreateFrame('GameTooltip', 'GuardianOwnerTooltip', nil, 'GameTooltipTemplate')
+22 -13
View File
@@ -65,10 +65,6 @@ 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]]},
[124464] = {name = GetSpellInfo (124464) .. " (" .. Loc ["STRING_MASTERY"] .. ")"}, --> shadow word: pain mastery proc (priest)
[124465] = {name = GetSpellInfo (124465) .. " (" .. Loc ["STRING_MASTERY"] .. ")"}, --> vampiric touch mastery proc (priest)
[124468] = {name = GetSpellInfo (124468) .. " (" .. Loc ["STRING_MASTERY"] .. ")"}, --> mind flay mastery proc (priest)
[124469] = {name = GetSpellInfo (124469) .. " (" .. Loc ["STRING_MASTERY"] .. ")"}, --> mind sear mastery proc (priest)
[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)
@@ -77,19 +73,23 @@ do
[121414] = {name = GetSpellInfo (121414) .. " (Glaive #1)"}, --> glaive toss (hunter)
[120761] = {name = GetSpellInfo (120761) .. " (Glaive #2)"}, --> glaive toss (hunter)
[77451] = {name = GetSpellInfo (77451) .. " (" .. Loc ["STRING_MASTERY"] .. ")"}, --> lava burst (shaman)
[45284] = {name = GetSpellInfo (45284) .. " (" .. Loc ["STRING_MASTERY"] .. ")"}, --> lightningbolt (shaman)
[45297] = {name = GetSpellInfo (45297) .. " (" .. Loc ["STRING_MASTERY"] .. ")"}, --> chain lightning (shaman)
[131079] = {name = GetSpellInfo (131079) .. " (" .. GetSpellInfo (12472) .. ")"}, --> frostbolt with icy veins glyph (mage)
[131080] = {name = GetSpellInfo (131080) .. " (" .. GetSpellInfo (12472) .. ")"}, --> ice lance with icy veins glyph (mage)
[131081] = {name = GetSpellInfo (131081) .. " (" .. GetSpellInfo (12472) .. ")"}, --> frostfire with icy veins glyph (mage)
[108686] = {name = GetSpellInfo (108686) .. " (" .. GetSpellInfo (108683) .. ")" }, --> immolate (brimstone)
[108685] = {name = GetSpellInfo (108685) .. " (" .. GetSpellInfo (108683) .. ")" }, --> conflagrate (brimstone)
[114654] = {name = GetSpellInfo (114654) .. " (" .. GetSpellInfo (108683) .. ")" }, --> incinetate (brimstone)
}
-- removed on warlords of draenor:
-- [77451] = {name = GetSpellInfo (77451) .. " (" .. Loc ["STRING_MASTERY"] .. ")"}, --> lava burst (shaman)
-- [45284] = {name = GetSpellInfo (45284) .. " (" .. Loc ["STRING_MASTERY"] .. ")"}, --> lightningbolt (shaman)
-- [45297] = {name = GetSpellInfo (45297) .. " (" .. Loc ["STRING_MASTERY"] .. ")"}, --> chain lightning (shaman)
-- [131079] = {name = GetSpellInfo (131079) .. " (" .. GetSpellInfo (12472) .. ")"}, --> frostbolt with icy veins glyph (mage)
-- [131080] = {name = GetSpellInfo (131080) .. " (" .. GetSpellInfo (12472) .. ")"}, --> ice lance with icy veins glyph (mage)
-- [131081] = {name = GetSpellInfo (131081) .. " (" .. GetSpellInfo (12472) .. ")"}, --> frostfire with icy veins glyph (mage)
-- [124464] = {name = GetSpellInfo (124464) .. " (" .. Loc ["STRING_MASTERY"] .. ")"}, --> shadow word: pain mastery proc (priest)
-- [124465] = {name = GetSpellInfo (124465) .. " (" .. Loc ["STRING_MASTERY"] .. ")"}, --> vampiric touch mastery proc (priest)
-- [124468] = {name = GetSpellInfo (124468) .. " (" .. Loc ["STRING_MASTERY"] .. ")"}, --> mind flay mastery proc (priest)
-- [124469] = {name = GetSpellInfo (124469) .. " (" .. Loc ["STRING_MASTERY"] .. ")"}, --> mind sear mastery proc (priest)
function _detalhes:UserCustomSpellUpdate (index, name, icon)
local t = _detalhes.savedCustomSpells [index]
if (t) then
@@ -126,7 +126,6 @@ do
end
function _detalhes:FillUserCustomSpells()
for spellid, t in pairs (default_user_spells) do
local already_have
@@ -143,6 +142,16 @@ do
end
for i = #_detalhes.savedCustomSpells, 1, -1 do
local spelltable = _detalhes.savedCustomSpells [i]
local spellid = spelltable [1]
if (spellid > 10) then
local exists = _GetSpellInfo (spellid)
if (not exists) then
tremove (_detalhes.savedCustomSpells, i)
end
end
end
end
function _detalhes:UserCustomSpellAdd (spellid, name, icon)
+402 -194
View File
File diff suppressed because it is too large Load Diff
+69 -1
View File
@@ -11,4 +11,72 @@ function _detalhes:PlayGlow (frame)
frame.shine.animIn:Play()
PlaySound ("LFG_Rewards", "master")
end
end
--> WatchFrame copy, got removed on WoD
local function DetailsTutorialAlertFrame_OnFinishSlideIn (frame)
frame.ScrollChild.Shine:Show();
frame.ScrollChild.IconShine:Show();
frame.ScrollChild.Shine.Flash:Play();
frame.ScrollChild.IconShine.Flash:Play();
end
local function DetailsTutorialAlertFrame_OnUpdate (frame, timestep)
local animData = frame.animData;
local height = animData.height;
local scrollStart = animData.scrollStart;
local scrollEnd = animData.scrollEnd;
local endTime = animData.slideInTime + (animData.endDelay or 0);
if (frame.startDelay) then
frame.startDelay = frame.startDelay - timestep;
if (frame.startDelay <= 0) then
frame.startDelay = nil;
else
return;
end
end
if (frame.isFirst) then
height = height + 10;
scrollEnd = scrollEnd - 10;
end
frame.totalTime = frame.totalTime+timestep;
if (frame.totalTime > endTime) then
frame.totalTime = endTime;
end
local scrollPos = scrollEnd;
if (animData.slideInTime and animData.slideInTime > 0) then
height = height*(frame.totalTime/animData.slideInTime);
scrollPos = scrollStart + (scrollEnd-scrollStart)*(frame.totalTime/animData.slideInTime);
end
if ( animData.reverse ) then
height = max(animData.height - height, 1);
end
frame:SetHeight(height);
frame:UpdateScrollChildRect();
frame:SetVerticalScroll(floor(scrollPos+0.5));
if (frame.totalTime >= endTime) then
frame:SetScript("OnUpdate", nil);
if ( animData.onFinishFunc ) then
animData.onFinishFunc(frame);
end
end
end
function DetailsTutorialAlertFrame_SlideInFrame (frame, animType)
frame.totalTime = 0;
frame.animData = { height = 72, scrollStart = 65, scrollEnd = -9, slideInTime = 0.4, onFinishFunc = DetailsTutorialAlertFrame_OnFinishSlideIn };
frame.slideInTime = frame.animData.slideInTime;
frame:SetHeight(1);
if ( frame.animData.reverse ) then
frame:SetHeight(frame.animData["height"]);
else
frame:SetHeight(1);
end
frame.startDelay = frame.animData.startDelay;
frame:SetScript("OnUpdate", DetailsTutorialAlertFrame_OnUpdate);
end
+222
View File
@@ -91,4 +91,226 @@
</Frame>
<!-- WatchFrame copy, got removed on WoD -->
<ScrollFrame name="DetailsTutorialAlertFrameTemplate" enableMouse="true" virtual="true">
<Size x="224" y="72"/>
<Scripts>
<OnLoad>
self:SetHorizontalScroll(-28.5);
</OnLoad>
</Scripts>
<ScrollChild>
<Frame name="$parentScrollChild" parentKey="ScrollChild">
<Size x="190" y="60"/>
<Layers>
<Layer level="BACKGROUND">
<Texture name="$parentBg" setAllPoints="true">
<Color r="0" g="0" b="0" a="0.5"/>
</Texture>
</Layer>
<Layer level="BORDER">
<Texture name="$parentBorderTopLeft" file="Interface\QuestFrame\AutoQuest-Parts">
<Size x="16" y="16"/>
<TexCoords left="0.02539063" right="0.05664063" top="0.01562500" bottom="0.26562500"/>
<Anchors>
<Anchor point="TOPLEFT" x="-4" y="4" />
</Anchors>
</Texture>
<Texture name="$parentBorderTopRight" file="Interface\QuestFrame\AutoQuest-Parts">
<Size x="16" y="16"/>
<TexCoords left="0.02539063" right="0.05664063" top="0.29687500" bottom="0.54687500"/>
<Anchors>
<Anchor point="TOPRIGHT" x="4" y="4" />
</Anchors>
</Texture>
<Texture name="$parentBorderBotLeft" file="Interface\QuestFrame\AutoQuest-Parts">
<Size x="16" y="16"/>
<TexCoords left="0.02539063" right="0.05664063" top="0.57812500" bottom="0.82812500"/>
<Anchors>
<Anchor point="BOTTOMLEFT" x="-4" y="-4" />
</Anchors>
</Texture>
<Texture name="$parentBorderBotRight" file="Interface\QuestFrame\AutoQuest-Parts">
<Size x="16" y="16"/>
<TexCoords left="0.06054688" right="0.09179688" top="0.01562500" bottom="0.26562500"/>
<Anchors>
<Anchor point="BOTTOMRIGHT" x="4" y="-4"/>
</Anchors>
</Texture>
<Texture name="$parentBorderLeft" file="Interface\QuestFrame\AutoQuestToastBorder-LeftRight" vertTile="true">
<Size x="8" y="16"/>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentBorderTopLeft" relativePoint="BOTTOMLEFT"/>
<Anchor point="BOTTOMLEFT" relativeTo="$parentBorderBotLeft" relativePoint="TOPLEFT"/>
</Anchors>
<TexCoords left="0" right="0.5" top="0" bottom="1"/>
</Texture>
<Texture name="$parentBorderRight" file="Interface\QuestFrame\AutoQuestToastBorder-LeftRight" vertTile="true">
<Size x="8" y="16"/>
<Anchors>
<Anchor point="TOPRIGHT" relativeTo="$parentBorderTopRight" relativePoint="BOTTOMRIGHT"/>
<Anchor point="BOTTOMRIGHT" relativeTo="$parentBorderBotRight" relativePoint="TOPRIGHT"/>
</Anchors>
<TexCoords left="0.5" right="1" top="0" bottom="1"/>
</Texture>
<Texture name="$parentBorderTop" file="Interface\QuestFrame\AutoQuestToastBorder-TopBot" horizTile="true">
<Size x="16" y="8"/>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentBorderTopLeft" relativePoint="TOPRIGHT"/>
<Anchor point="TOPRIGHT" relativeTo="$parentBorderTopRight" relativePoint="TOPLEFT"/>
</Anchors>
<TexCoords left="0" right="1" top="0" bottom="0.5"/>
</Texture>
<Texture name="$parentBorderBottom" file="Interface\QuestFrame\AutoQuestToastBorder-TopBot" horizTile="true">
<Size x="16" y="8"/>
<Anchors>
<Anchor point="BOTTOMLEFT" relativeTo="$parentBorderBotLeft" relativePoint="BOTTOMRIGHT"/>
<Anchor point="BOTTOMRIGHT" relativeTo="$parentBorderBotRight" relativePoint="BOTTOMLEFT"/>
</Anchors>
<TexCoords left="0" right="1" top="0.5" bottom="1"/>
</Texture>
</Layer>
<Layer level="ARTWORK">
<Texture name="$parentQuestIconBg" inherits="QuestIcon-Large">
<Anchors>
<Anchor point="CENTER" relativePoint="LEFT"/>
</Anchors>
</Texture>
</Layer>
<Layer level="ARTWORK" textureSubLevel="1">
<Texture name="$parentExclamation" parentKey="Exclamation" hidden="true" file="Interface\QuestFrame\AutoQuest-Parts">
<Size x="19" y="33"/>
<TexCoords left="0.13476563" right="0.17187500" top="0.01562500" bottom="0.53125000"/>
<Anchors>
<Anchor point="CENTER" relativeTo="$parentQuestIconBg" x="0.5" />
</Anchors>
</Texture>
<Texture name="$parentQuestionMark" parentKey="QuestionMark" hidden="true" file="Interface\QuestFrame\AutoQuest-Parts">
<Size x="19" y="33"/>
<TexCoords left="0.17578125" right="0.21289063" top="0.01562500" bottom="0.53125000"/>
<Anchors>
<Anchor point="CENTER" relativeTo="$parentQuestIconBg" x="0.5" />
</Anchors>
</Texture>
</Layer>
<Layer level="BORDER">
<FontString name="$parentQuestName" inherits="QuestFont_Large" parentKey="QuestName">
<Anchors>
<Anchor point="LEFT" relativeTo="$parentQuestIconBg" relativePoint="RIGHT" x="-6"/>
<Anchor point="RIGHT" x="-8"/>
<Anchor point="TOP" x="0" y="-24"/>
</Anchors>
<Color r="1" g="1" b="1"/>
</FontString>
<FontString name="$parentTopText" inherits="GameFontNormalSmall" parentKey="TopText">
<Anchors>
<Anchor point="TOP" x="0" y="-4"/>
<Anchor point="LEFT" relativeTo="$parentQuestIconBg" relativePoint="RIGHT" x="-6"/>
<Anchor point="RIGHT" x="-8"/>
</Anchors>
</FontString>
<FontString name="$parentBottomText" inherits="GameFontDisableSmall" parentKey="BottomText">
<Anchors>
<Anchor point="BOTTOM" x="0" y="4"/>
<Anchor point="LEFT" relativeTo="$parentQuestIconBg" relativePoint="RIGHT" x="-6"/>
<Anchor point="RIGHT" x="-8"/>
</Anchors>
</FontString>
</Layer>
<Layer level="BORDER" textureSubLevel="1">
<Texture name="$parentShine" alphaMode="ADD" alpha="0" hidden="true" parentKey="Shine">
<Animations>
<AnimationGroup name="$parentFlash" parentKey="Flash">
<Alpha startDelay="0" change="0.4" duration="0.25" order="1"/>
<Alpha startDelay="0.05" change="-0.4" duration="0.25" order="2"/>
<Scripts>
<OnStop>
self:GetParent():Hide();
</OnStop>
<OnFinished>
self:GetParent():Hide();
</OnFinished>
</Scripts>
</AnimationGroup>
</Animations>
<Anchors>
<Anchor point="TOPLEFT" x="-1" y="1"/>
<Anchor point="BOTTOMRIGHT" x="1" y="-1"/>
</Anchors>
<Color r="1" g="1" b="1"/>
</Texture>
</Layer>
<Layer level="OVERLAY">
<Texture name="$parentIconShine" alphaMode="ADD" alpha="0" hidden="true" parentKey="IconShine" file="Interface\QuestFrame\AutoQuest-Parts">
<Size x="42" y="42"/>
<TexCoords left="0.21679688" right="0.29882813" top="0.01562500" bottom="0.67187500"/>
<Anchors>
<Anchor point="CENTER" relativeTo="$parentQuestIconBg"/>
</Anchors>
<Animations>
<AnimationGroup name="$parentFlash" parentKey="Flash">
<Alpha change="0.9" duration="0.25" order="1"/>
<Alpha startDelay="0.05" change="-0.9" duration="0.25" order="2"/>
<Scripts>
<OnStop>
self:GetParent():Hide();
</OnStop>
<OnFinished>
self:GetParent():Hide();
--if (self:GetParent():GetParent():GetParent().type=="COMPLETED") then
--self:GetParent():GetParent().Flash:Show();
--end
</OnFinished>
</Scripts>
</AnimationGroup>
</Animations>
</Texture>
</Layer>
</Layers>
<Frames>
<Frame name="$parentFlash" useParentLevel="true" setAllPoints="true" hidden="true" parentKey="Flash">
<Layers>
<Layer level="BORDER">
<Texture name="QuestLogFrameCompleteButtonFlash" inherits="UIPanelButtonHighlightTexture" parentKey="Flash">
<Size x="180" y="28"/>
<Anchors>
<Anchor point="TOPLEFT" x="14" y="-2"/>
</Anchors>
</Texture>
</Layer>
<Layer level="OVERLAY">
<Texture name="$parentIconFlash" alphaMode="ADD" alpha="0.5" parentKey="IconFlash" file="Interface\QuestFrame\AutoQuest-Parts">
<Size x="42" y="42"/>
<TexCoords left="0.21679688" right="0.29882813" top="0.01562500" bottom="0.67187500"/>
<Anchors>
<Anchor point="CENTER" relativePoint="LEFT"/>
</Anchors>
</Texture>
</Layer>
</Layers>
<Scripts>
<OnLoad>
self.IconFlash:SetVertexColor(1, 0, 0);
</OnLoad>
<OnShow>
UIFrameFlash(self, 0.75, 0.75, -1, nil);
</OnShow>
<OnHide>
UIFrameFlashStop(self);
</OnHide>
</Scripts>
</Frame>
</Frames>
</Frame>
</ScrollChild>
</ScrollFrame>
</Ui>
+43 -29
View File
@@ -512,7 +512,7 @@ function gump:SetaDetalheInfoTexto (index, p, arg1, arg2, arg3, arg4, arg5, arg6
if (p) then
if (_type (p) == "table") then
info.bg:SetValue (p.p)
info.bg:SetStatusBarColor (p.c[1], p.c[2], p.c[3])
info.bg:SetStatusBarColor (p.c[1], p.c[2], p.c[3], p.c[4] or 1)
else
info.bg:SetValue (p)
info.bg:SetStatusBarColor (1, 1, 1)
@@ -1375,7 +1375,7 @@ function gump:CriaJanelaInfo()
if (halfabsorb_amt > 0) then
local average = halfabsorb_amt / halfabsorb --tenho o average
local last_average = 0
if (last_actor and last_actor.avoidance) then
if (last_actor and last_actor.avoidance and last_actor.avoidance.overall.PARTIAL_ABSORBED > 0) then
last_average = last_actor.avoidance.overall.PARTIAL_ABSORB_AMT / last_actor.avoidance.overall.PARTIAL_ABSORBED
end
@@ -1924,21 +1924,30 @@ function gump:CriaJanelaInfo()
bar_2 [2].righttext:SetText ("0 +(0%)")
elseif (data [2] > spell.total) then
local diff = data [2] - spell.total
local up = diff / spell.total * 100
up = _math_floor (up)
if (up > 999) then
up = ">" .. 999
if (spell.total > 0) then
local diff = data [2] - spell.total
local up = diff / spell.total * 100
up = _math_floor (up)
if (up > 999) then
up = ">" .. 999
end
bar_2 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. minor .. up .. "%)|r")
else
bar_2 [2].righttext:SetText ("0 +(0%)")
end
bar_2 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. minor .. up .. "%)|r")
else
local diff = spell.total - data [2]
local down = diff / data [2] * 100
down = _math_floor (down)
if (down > 999) then
down = ">" .. 999
if (data [2] > 0) then
local diff = spell.total - data [2]
local down = diff / data [2] * 100
down = _math_floor (down)
if (down > 999) then
down = ">" .. 999
end
bar_2 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. plus .. down .. "%)|r")
else
bar_2 [2].righttext:SetText ("0 +(0%)")
end
bar_2 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. plus .. down .. "%)|r")
end
bar_2 [2]:SetValue (spell.total / player_2_top * 100)
@@ -1969,21 +1978,29 @@ function gump:CriaJanelaInfo()
bar_3 [2].righttext:SetText ("0 +(0%)")
elseif (data [2] > spell.total) then
local diff = data [2] - spell.total
local up = diff / spell.total * 100
up = _math_floor (up)
if (up > 999) then
up = ">" .. 999
if (spell.total > 0) then
local diff = data [2] - spell.total
local up = diff / spell.total * 100
up = _math_floor (up)
if (up > 999) then
up = ">" .. 999
end
bar_3 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. minor .. up .. "%)|r")
else
bar_3 [2].righttext:SetText ("0 +(0%)")
end
bar_3 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. minor .. up .. "%)|r")
else
local diff = spell.total - data [2]
local down = diff / data [2] * 100
down = _math_floor (down)
if (down > 999) then
down = ">" .. 999
if (data [2] > 0) then
local diff = spell.total - data [2]
local down = diff / data [2] * 100
down = _math_floor (down)
if (down > 999) then
down = ">" .. 999
end
bar_3 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. plus .. down .. "%)|r")
else
bar_3 [2].righttext:SetText ("0 +(0%)")
end
bar_3 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. plus .. down .. "%)|r")
end
bar_3 [2]:SetValue (spell.total / player_3_top * 100)
@@ -3434,11 +3451,8 @@ end
local function CriaTexturaBarra (instancia, barra)
barra.textura = _CreateFrame ("StatusBar", nil, barra)
barra.textura:SetAllPoints (barra)
--barra.textura:SetStatusBarTexture (instancia.row_info.texture_file)
barra.textura:SetStatusBarTexture (_detalhes.default_texture)
--barra.textura:SetStatusBarTexture ([[Interface\AddOns\Details\images\bar_serenity]])
barra.textura:SetStatusBarColor (.5, .5, .5, 0)
barra.textura:SetMinMaxValues (0,100)
+820 -727
View File
File diff suppressed because it is too large Load Diff
+64 -53
View File
@@ -483,6 +483,7 @@ local update_line = function (self, target_frame)
end
local tempo_movendo, precisa_ativar, instancia_alvo, tempo_fades, nao_anexados, flash_bounce, start_draw_lines
local movement_onupdate = function (self, elapsed)
if (start_draw_lines and start_draw_lines > 0.95) then
@@ -512,7 +513,7 @@ local movement_onupdate = function (self, elapsed)
for lado, livre in _ipairs (nao_anexados) do
if (livre) then
if (lado == 1) then
local texture = instancia_alvo.h_esquerda.texture
texture:ClearAllPoints()
@@ -539,6 +540,7 @@ local movement_onupdate = function (self, elapsed)
elseif (lado == 2) then
local texture = instancia_alvo.h_baixo.texture
texture:ClearAllPoints()
@@ -590,7 +592,7 @@ local movement_onupdate = function (self, elapsed)
tem_livre = true
elseif (lado == 4) then
local texture = instancia_alvo.h_cima.texture
texture:ClearAllPoints()
@@ -601,9 +603,10 @@ local movement_onupdate = function (self, elapsed)
texture:SetPoint ("bottomleft", instancia_alvo.baseframe, "topleft", 0, 0)
texture:SetPoint ("bottomright", instancia_alvo.baseframe, "topright", 0, 0)
end
instancia_alvo.h_cima:Flash (1, 1, 2.0, false, 0, 0)
tem_livre = true
end
end
end
@@ -667,7 +670,7 @@ local function move_janela (baseframe, iniciando, instancia)
nao_anexados = {true, true, true, true}
tempo_movendo = 1
flash_bounce = 0
start_draw_lines = 0
for lado, snap_to in _pairs (instancia_alvo.snap) do
if (snap_to == instancia.meu_id) then
@@ -720,7 +723,7 @@ local function move_janela (baseframe, iniciando, instancia)
need_start = false
end
baseframe:SetScript ("OnUpdate", movement_onupdate)
end
@@ -729,7 +732,7 @@ local function move_janela (baseframe, iniciando, instancia)
baseframe:StopMovingOrSizing()
baseframe.isMoving = false
baseframe:SetScript ("OnUpdate", nil)
if (_detalhes.guide_balls) then
for index, ball in ipairs (_detalhes.guide_balls) do
ball:Hide()
@@ -745,7 +748,6 @@ local function move_janela (baseframe, iniciando, instancia)
--baseframe:SetClampRectInsets (unpack (_detalhes.window_clamp))
if (instancia_alvo) then
instancia:AtualizaPontos()
local esquerda, baixo, direita, cima
@@ -802,10 +804,12 @@ local function move_janela (baseframe, iniciando, instancia)
if (esquerda or baixo or direita or cima) then
instancia:agrupar_janelas ({esquerda, baixo, direita, cima})
end
--aqui
for _, esta_instancia in _ipairs (_detalhes.tabela_instancias) do
if (not esta_instancia:IsAtiva() and esta_instancia.iniciada) then
esta_instancia:ResetaGump()
--aqui
gump:Fade (esta_instancia.baseframe, "in", 0.2)
gump:Fade (esta_instancia.baseframe.cabecalho.ball, "in", 0.2)
gump:Fade (esta_instancia.baseframe.cabecalho.atributo_icon, "in", 0.2)
@@ -837,7 +841,7 @@ local function move_janela (baseframe, iniciando, instancia)
for _, this_instance in _ipairs (group) do
this_instance.isMoving = false
end
_detalhes.snap_alert.playing = false
_detalhes.snap_alert.animIn:Stop()
_detalhes.snap_alert.animOut:Play()
@@ -863,6 +867,11 @@ local BGFrame_scripts_onleave = function (self)
end
local BGFrame_scripts_onmousedown = function (self, button)
if (self.is_toolbar and self._instance.baseframe.isLocked and button == "LeftButton") then
return self._instance.baseframe.button_stretch:GetScript ("OnMouseDown") (self._instance.baseframe.button_stretch, "LeftButton")
end
if (self._instance.baseframe.isMoving) then
move_janela (self._instance.baseframe, false, self._instance)
self._instance:SaveMainWindowPosition()
@@ -886,6 +895,11 @@ local BGFrame_scripts_onmousedown = function (self, button)
end
local BGFrame_scripts_onmouseup = function (self, button)
if (self.is_toolbar and self._instance.baseframe.isLocked and button == "LeftButton") then
return self._instance.baseframe.button_stretch:GetScript ("OnMouseUp") (self._instance.baseframe.button_stretch, "LeftButton")
end
if (self._instance.baseframe.isMoving) then
move_janela (self._instance.baseframe, false, self._instance) --> novo movedor da janela
self._instance:SaveMainWindowPosition()
@@ -1306,7 +1320,7 @@ local resize_scripts_onmousedown = function (self, button)
end
_detalhes:SendEvent ("DETAILS_INSTANCE_STARTRESIZE", nil, self._instance)
if (_detalhes.update_speed > 0.3) then
_detalhes:CancelTimer (_detalhes.atualizador)
_detalhes.atualizador = _detalhes:ScheduleRepeatingTimer ("AtualizaGumpPrincipal", 0.3, -1)
@@ -1339,7 +1353,7 @@ local resize_scripts_onmouseup = function (self, button)
self._instance:RefreshBars()
self._instance:InstanceReset()
self._instance:ReajustaGump()
if (self._instance.stretchToo and #self._instance.stretchToo > 0) then
for _, esta_instancia in ipairs (self._instance.stretchToo) do
esta_instancia.baseframe:StopMovingOrSizing()
@@ -1648,7 +1662,7 @@ local barra_scripts_onenter = function (self)
--local r, g, b = self.textura:GetVertexColor()
--self.textura:SetVertexColor (math.min (r+0.1, 1), math.min (g+0.1, 1), math.min (b+0.1, 1))
--self.icone_classe:SetBlendMode ("ADD")
self:SetScript ("OnUpdate", shift_monitor)
end
@@ -1898,7 +1912,6 @@ local function button_stretch_scripts (baseframe, backgrounddisplay, instancia)
_detalhes:SendEvent ("DETAILS_INSTANCE_STARTSTRETCH", nil, instancia)
--> change the update speed
if (_detalhes.update_speed > 0.3) then
_detalhes:CancelTimer (_detalhes.atualizador)
_detalhes.atualizador = _detalhes:ScheduleRepeatingTimer ("AtualizaGumpPrincipal", 0.3, -1)
@@ -1962,7 +1975,6 @@ local function button_stretch_scripts (baseframe, backgrounddisplay, instancia)
esta_instancia:RefreshBars()
esta_instancia:InstanceReset()
esta_instancia:ReajustaGump()
end
instancia.stretchToo = nil
end
@@ -2037,7 +2049,7 @@ local function button_up_scripts (main_frame, backgrounddisplay, instancia, scro
local A = instancia.barraS[1]
if (A > 1) then
scrollbar:SetValue (scrollbar:GetValue() - instancia.row_height)
scrollbar:SetValue (scrollbar:GetValue() - instancia.row_height*2)
end
self.precionado = true
@@ -2048,7 +2060,7 @@ local function button_up_scripts (main_frame, backgrounddisplay, instancia, scro
self.last_up = 0
A = instancia.barraS[1]
if (A > 1) then
scrollbar:SetValue (scrollbar:GetValue() - instancia.row_height)
scrollbar:SetValue (scrollbar:GetValue() + instancia.row_height*2)
else
self:Disable()
end
@@ -2131,18 +2143,16 @@ local function iterate_scroll_scripts (backgrounddisplay, backgroundframe, basef
if (delta > 0) then --> rolou pra cima
local A = instancia.barraS[1]
if (A > 1) then
scrollbar:SetValue (scrollbar:GetValue() - instancia.row_height*2)
scrollbar:SetValue (scrollbar:GetValue() - instancia.row_height * _detalhes.scroll_speed)
else
scrollbar:SetValue (0)
scrollbar.ultimo = 0
baseframe.button_up:Disable()
end
elseif (delta < 0) then --> rolou pra baixo
local B = instancia.barraS[2]
if (B < instancia.rows_showing) then
scrollbar:SetValue (scrollbar:GetValue() + instancia.row_height*2)
scrollbar:SetValue (scrollbar:GetValue() + instancia.row_height * _detalhes.scroll_speed)
else
local _, maxValue = scrollbar:GetMinMaxValues()
scrollbar:SetValue (maxValue)
@@ -2168,7 +2178,7 @@ local function iterate_scroll_scripts (backgrounddisplay, backgroundframe, basef
instancia:AtualizaGumpPrincipal (instancia, true)
self.ultimo = meu_valor
baseframe.button_up:Disable()
return
return
elseif (maxValue == meu_valor) then
local min = instancia.rows_showing -instancia.rows_fit_in_window
min = min+1
@@ -2191,14 +2201,12 @@ local function iterate_scroll_scripts (backgrounddisplay, backgroundframe, basef
end
if (meu_valor > ultimo) then --> scroll down
local B = instancia.barraS[2]
if (B < instancia.rows_showing) then --> se o valor maximo não for o máximo de barras a serem mostradas
local precisa_passar = ((B+2) * instancia.row_height) - (instancia.row_height*instancia.rows_fit_in_window)
-- if (meu_valor > precisa_passar) then --> o valor atual passou o valor que precisa passar pra locomover
if (true) then --> testing
local precisa_passar = ((B+1) * instancia.row_height) - (instancia.row_height*instancia.rows_fit_in_window)
--if (meu_valor > precisa_passar) then --> o valor atual passou o valor que precisa passar pra locomover
if (true) then --> testing by pass row check
local diff = meu_valor - ultimo --> pega a diferença de H
diff = diff / instancia.row_height --> calcula quantas barras ele pulou
diff = _math_ceil (diff) --> arredonda para cima
@@ -2217,7 +2225,7 @@ local function iterate_scroll_scripts (backgrounddisplay, backgroundframe, basef
if (A > 1) then
local precisa_passar = (A-1) * instancia.row_height
--if (meu_valor < precisa_passar) then
if (true) then --> testing
if (true) then --> testing by pass row check
--> calcula quantas barras passou
local diff = ultimo - meu_valor
diff = diff / instancia.row_height
@@ -4420,21 +4428,19 @@ local build_mode_list = function (self, elapsed)
CoolTip:SetColor ("main", "transparent")
CoolTip:SetOption ("TextSize", _detalhes.font_sizes.menus)
CoolTip:SetOption ("ButtonHeightModSub", -5)
CoolTip:SetOption ("ButtonHeightModSub", -2)
CoolTip:SetOption ("ButtonHeightMod", -5)
CoolTip:SetOption ("ButtonsYModSub", -5)
CoolTip:SetOption ("ButtonsYModSub", -3)
CoolTip:SetOption ("ButtonsYMod", -5)
CoolTip:SetOption ("YSpacingModSub", 1)
CoolTip:SetOption ("YSpacingModSub", -3)
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)
--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)
@@ -4481,23 +4487,27 @@ local build_mode_list = function (self, elapsed)
--build self plugins list
--pega a list de plugins solo:
if (#_detalhes.SoloTables.Menu > 0) then
for index, ptable in _ipairs (_detalhes.SoloTables.Menu) do
if (ptable [3].__enabled) then
CoolTip:AddMenu (2, _detalhes.SoloTables.EnableSoloMode, instancia, ptable [4], true, ptable [1], ptable [2], true)
end
end
CoolTip:SetWallpaper (2, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
end
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
if (instancia.toolbar_side == 1) then
CoolTip:SetOwner (self)
elseif (instancia.toolbar_side == 2) then --> bottom
CoolTip:SetOwner (self, "bottom", "top", 0, 0) -- -7
end
if (instancia.toolbar_side == 1) then
CoolTip:SetOwner (self)
elseif (instancia.toolbar_side == 2) then --> bottom
CoolTip:SetOwner (self, "bottom", "top", 0, 0) -- -7
end
--CoolTip:SetWallpaper (1, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-Parchment-Horizontal-Desaturated]], nil, {1, 1, 1, 0.3})
CoolTip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
CoolTip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
@@ -5048,7 +5058,7 @@ function _detalhes:ChangeSkin (skin_name)
end
--> set the scale
self:SetWindowScale()
self:SetWindowScale()
if (not just_updating or _detalhes.initializing) then
if (this_skin.callback) then
@@ -5618,7 +5628,7 @@ function _detalhes:ToolbarSide (side)
--> tex coords
self.baseframe.cabecalho.emenda:SetTexCoord (unpack (COORDS_LEFT_CONNECTOR))
self.baseframe.cabecalho.top_bg:SetTexCoord (unpack (COORDS_TOP_BACKGROUND))
--> up frames
self.baseframe.UPFrame:SetPoint ("left", self.baseframe.cabecalho.ball, "right", 0, -53)
self.baseframe.UPFrame:SetPoint ("right", self.baseframe.cabecalho.ball_r, "left", 0, -53)
@@ -5630,6 +5640,7 @@ function _detalhes:ToolbarSide (side)
self.baseframe.UPFrameLeftPart:ClearAllPoints()
self.baseframe.UPFrameLeftPart:SetPoint ("bottomleft", self.baseframe, "topleft", 0, 0)
else --> bottom
local y = 0
@@ -5671,7 +5682,7 @@ function _detalhes:ToolbarSide (side)
self.baseframe.UPFrameLeftPart:ClearAllPoints()
self.baseframe.UPFrameLeftPart:SetPoint ("topleft", self.baseframe, "bottomleft", 0, 0)
end
--> update top menus
@@ -6268,7 +6279,7 @@ function gump:CriaCabecalho (baseframe, instancia)
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")
baseframe.cabecalho.ball_point:SetPoint ("bottomleft", baseframe, "topleft", -37, 0)
@@ -6809,7 +6820,7 @@ function gump:CriaCabecalho (baseframe, instancia)
if (ClosedInstances == 0) then
if (_detalhes:GetNumInstancesAmount() == _detalhes:GetMaxInstancesAmount()) then
CoolTip:AddMenu (1, _detalhes.CriarInstancia, true, nil, nil, Loc ["STRING_NOMORE_INSTANCES"], _, true)
CoolTip:AddMenu (1, _detalhes.OpenOptionsWindow, true, 1, nil, Loc ["STRING_NOMORE_INSTANCES"], _, true)
CoolTip:AddIcon ([[Interface\Buttons\UI-PlusButton-Up]], 1, 1, 16, 16)
else
CoolTip:AddMenu (1, _detalhes.CriarInstancia, true, nil, nil, Loc ["STRING_NOCLOSED_INSTANCES"], _, true)
-1
View File
@@ -126,7 +126,6 @@ function _detalhes:OpenWelcomeWindow ()
instance.baseframe:SetPoint ("left", DetailsWelcomeWindow, "right", 10, 0)
end
_detalhes:ScheduleTimer ("WelcomeSetLoc", 12)
--_detalhes:WelcomeSetLoc()
--/script local f=CreateFrame("frame");local g=false;f:SetScript("OnUpdate",function(s,e)if not g then local r=math.random for i=1,2500000 do local a=r(1,1000000);a=a+1 end g=true else print(string.format("cpu: %.3f",e));f:SetScript("OnUpdate",nil)end end)
@@ -17,6 +17,7 @@ local DmgRankFrame = DmgRank.Frame
DmgRank:SetPluginDescription ("A plugin for you have fun with a training dummy testing your damage skill and gear, leveling through many challenges.")
--> this function will run when the plugin receives the Addon_Loaded event, ["data"] = previus saved player rank
local function CreatePluginFrames (data)
+1 -1
View File
@@ -1,4 +1,4 @@
## Interface: 50400
## Interface: 60000
## Title: Details DamageRank (plugin)
## Notes: Plugin for Details
## SavedVariablesPerCharacter: _detalhes_databaseDmgRank
@@ -111,6 +111,10 @@ local function CreatePluginFrames()
elseif (event == "COMBAT_PLAYER_ENTER") then
DpsTuningPlugin:OnCombatStart (...)
elseif (event == "COMBAT_INVALID") then
--DpsTuningPlugin:Reset()
--print ("eh invalido...")
elseif (event == "COMBAT_PLAYER_LEAVE") then
DpsTuningPlugin:OnCombatEnd (...)
@@ -1183,6 +1187,7 @@ function DpsTuningPlugin:OnEvent (_, event, ...)
_G._detalhes:RegisterEvent (DpsTuningPlugin, "COMBAT_PLAYER_ENTER")
_G._detalhes:RegisterEvent (DpsTuningPlugin, "COMBAT_PLAYER_LEAVE")
_G._detalhes:RegisterEvent (DpsTuningPlugin, "DETAILS_DATA_RESET")
_G._detalhes:RegisterEvent (DpsTuningPlugin, "COMBAT_INVALID")
end
end
@@ -1,4 +1,4 @@
## Interface: 50400
## Interface: 60000
## Title: Details Dps Tuning (plugin)
## Notes: Plugin for Details
## RequiredDeps: Details
@@ -1,4 +1,4 @@
## Interface: 50400
## Interface: 60000
## Title: Details: Mists of Pandaria Dungeons
## Notes: Plugin for Details
## RequiredDeps: Details
@@ -21,6 +21,7 @@ local _pairs = pairs --> lua library local
local _table_sort = table.sort --> lua library local
local _table_insert = table.insert --> lua library local
local _unpack = unpack --> lua library local
local _bit_band = bit.band
--> Create the plugin Object
@@ -785,10 +786,13 @@ function EncounterDetails:OpenAndRefresh (_, segment)
end
end
--> the segment is a boss
boss_id = _combat_object.is_boss.index
map_id = _combat_object.is_boss.mapid
boss_info = _detalhes:GetBossDetails (_combat_object.is_boss.mapid, _combat_object.is_boss.index)
--[[
if (not boss_info) then
if (EncounterDetails.LastSegmentShown) then
_combat_object = EncounterDetails.LastSegmentShown
@@ -796,6 +800,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
return EncounterDetails:Msg (Loc ["STRING_BOSS_NOT_REGISTRED"])
end
end
--]]
if (EncounterDetailsFrame.ShowType == "graph") then
EncounterDetails:BuildDpsGraphic()
@@ -809,13 +814,24 @@ function EncounterDetails:OpenAndRefresh (_, segment)
-------------- set portrait and background image --------------
local L, R, T, B, Texture = EncounterDetails:GetBossIcon (_combat_object.is_boss.mapid, _combat_object.is_boss.index)
EncounterDetailsFrame.boss_icone:SetTexture (Texture)
EncounterDetailsFrame.boss_icone:SetTexCoord (L, R, T, B)
if (L) then
EncounterDetailsFrame.boss_icone:SetTexture (Texture)
EncounterDetailsFrame.boss_icone:SetTexCoord (L, R, T, B)
else
EncounterDetailsFrame.boss_icone:SetTexture ([[Interface\CHARACTERFRAME\TempPortrait]])
EncounterDetailsFrame.boss_icone:SetTexCoord (0, 1, 0, 1)
end
local file, L, R, T, B = EncounterDetails:GetRaidBackground (_combat_object.is_boss.mapid)
EncounterDetailsFrame.raidbackground:SetTexture (file)
EncounterDetailsFrame.raidbackground:SetTexCoord (L, R, T, B)
EncounterDetailsFrame.raidbackground:SetAlpha (0.8)
if (file) then
EncounterDetailsFrame.raidbackground:SetTexture (file)
EncounterDetailsFrame.raidbackground:SetTexCoord (L, R, T, B)
EncounterDetailsFrame.raidbackground:SetAlpha (0.8)
else
EncounterDetailsFrame.raidbackground:SetTexture ([[Interface\Glues\LOADINGSCREENS\LoadScreenDungeon]])
EncounterDetailsFrame.raidbackground:SetTexCoord (0, 1, 120/512, 408/512)
EncounterDetailsFrame.raidbackground:SetAlpha (0.8)
end
-------------- set totals on down frame --------------
--[[ data mine:
@@ -902,16 +918,15 @@ function EncounterDetails:OpenAndRefresh (_, segment)
local habilidades_poll = {}
--> pega as magias contínuas presentes em todas as fases
if (boss_info.continuo) then
if (boss_info and boss_info.continuo) then
for index, spellid in _ipairs (boss_info.continuo) do
habilidades_poll [spellid] = true
end
end
--> pega as habilidades que pertence especificamente a cada fase
local fases = boss_info.phases
if (fases) then
for fase_id, fase in _ipairs (fases) do
if (boss_info and boss_info.phases) then
for fase_id, fase in _ipairs (boss_info.phases) do
if (fase.spells) then
for index, spellid in _ipairs (fase.spells) do
habilidades_poll [spellid] = true
@@ -921,39 +936,94 @@ function EncounterDetails:OpenAndRefresh (_, segment)
end
local habilidades_usadas = {}
local have_pool = false
for spellid, _ in _pairs (habilidades_poll) do
have_pool = true
break
end
for index, jogador in _ipairs (DamageContainer._ActorTable) do
local habilidades = jogador.spell_tables._ActorTable
for id, habilidade in _pairs (habilidades) do
if (habilidades_poll [id]) then
--> esse jogador usou uma habilidade do boss
local esta_habilidade = habilidades_usadas [id] --> tabela não numerica, pq diferentes monstros podem castar a mesma magia
if (not esta_habilidade) then
esta_habilidade = {0, {}, {}, id} --> [1] total dano causado [2] jogadores que foram alvos [3] jogadores que castaram essa magia [4] ID da magia
habilidades_usadas [id] = esta_habilidade
end
--> adiciona ao [1] total de dano que esta habilidade causou
esta_habilidade[1] = esta_habilidade[1] + habilidade.total
--> adiciona ao [3] total do jogador que castou
if (not esta_habilidade[3][jogador.nome]) then
esta_habilidade[3][jogador.nome] = 0
end
esta_habilidade[3][jogador.nome] = esta_habilidade[3][jogador.nome] + habilidade.total
--> pega os alvos e adiciona ao [2]
local alvos = habilidade.targets
for index, jogador in _ipairs (alvos._ActorTable) do
--> ele tem o nome do jogador, vamos ver se este alvo é realmente um jogador verificando na tabela do combate
local tabela_dano_do_jogador = DamageContainer._ActorTable [DamageContainer._NameIndexTable [jogador.nome]]
if (tabela_dano_do_jogador and tabela_dano_do_jogador.grupo) then
if (not esta_habilidade[2] [jogador.nome]) then
esta_habilidade[2] [jogador.nome] = {0, tabela_dano_do_jogador.classe}
--> get all spells from neutral and hostile npcs
if (
_bit_band (jogador.flag_original, 0x00000060) ~= 0 and --is neutral or hostile
(not jogador.owner or (_bit_band (jogador.owner.flag_original, 0x00000060) ~= 0 and not jogador.owner.grupo and _bit_band (jogador.owner.flag_original, 0x00000400) == 0)) and --isn't a pet or the owner isn't a player
not jogador.grupo and
_bit_band (jogador.flag_original, 0x00000400) == 0
) then
local habilidades = jogador.spell_tables._ActorTable
for id, habilidade in _pairs (habilidades) do
--if (habilidades_poll [id]) then
--> esse jogador usou uma habilidade do boss
local esta_habilidade = habilidades_usadas [id] --> tabela não numerica, pq diferentes monstros podem castar a mesma magia
if (not esta_habilidade) then
esta_habilidade = {0, {}, {}, id} --> [1] total dano causado [2] jogadores que foram alvos [3] jogadores que castaram essa magia [4] ID da magia
habilidades_usadas [id] = esta_habilidade
end
--> adiciona ao [1] total de dano que esta habilidade causou
esta_habilidade[1] = esta_habilidade[1] + habilidade.total
--> adiciona ao [3] total do jogador que castou
if (not esta_habilidade[3][jogador.nome]) then
esta_habilidade[3][jogador.nome] = 0
end
esta_habilidade[3][jogador.nome] = esta_habilidade[3][jogador.nome] + habilidade.total
--> pega os alvos e adiciona ao [2]
local alvos = habilidade.targets
for index, jogador in _ipairs (alvos._ActorTable) do
--> ele tem o nome do jogador, vamos ver se este alvo é realmente um jogador verificando na tabela do combate
local tabela_dano_do_jogador = DamageContainer._ActorTable [DamageContainer._NameIndexTable [jogador.nome]]
if (tabela_dano_do_jogador and tabela_dano_do_jogador.grupo) then
if (not esta_habilidade[2] [jogador.nome]) then
esta_habilidade[2] [jogador.nome] = {0, tabela_dano_do_jogador.classe}
end
esta_habilidade[2] [jogador.nome] [1] = esta_habilidade[2] [jogador.nome] [1] + jogador.total
end
end
--end
end
elseif (have_pool) then
--> check if the spell id is in the spell poll.
local habilidades = jogador.spell_tables._ActorTable
for id, habilidade in _pairs (habilidades) do
if (habilidades_poll [id]) then
--> esse jogador usou uma habilidade do boss
local esta_habilidade = habilidades_usadas [id] --> tabela não numerica, pq diferentes monstros podem castar a mesma magia
if (not esta_habilidade) then
esta_habilidade = {0, {}, {}, id} --> [1] total dano causado [2] jogadores que foram alvos [3] jogadores que castaram essa magia [4] ID da magia
habilidades_usadas [id] = esta_habilidade
end
--> adiciona ao [1] total de dano que esta habilidade causou
esta_habilidade[1] = esta_habilidade[1] + habilidade.total
--> adiciona ao [3] total do jogador que castou
if (not esta_habilidade[3][jogador.nome]) then
esta_habilidade[3][jogador.nome] = 0
end
esta_habilidade[3][jogador.nome] = esta_habilidade[3][jogador.nome] + habilidade.total
--> pega os alvos e adiciona ao [2]
local alvos = habilidade.targets
for index, jogador in _ipairs (alvos._ActorTable) do
--> ele tem o nome do jogador, vamos ver se este alvo é realmente um jogador verificando na tabela do combate
local tabela_dano_do_jogador = DamageContainer._ActorTable [DamageContainer._NameIndexTable [jogador.nome]]
if (tabela_dano_do_jogador and tabela_dano_do_jogador.grupo) then
if (not esta_habilidade[2] [jogador.nome]) then
esta_habilidade[2] [jogador.nome] = {0, tabela_dano_do_jogador.classe}
end
esta_habilidade[2] [jogador.nome] [1] = esta_habilidade[2] [jogador.nome] [1] + jogador.total
end
esta_habilidade[2] [jogador.nome] [1] = esta_habilidade[2] [jogador.nome] [1] + jogador.total
end
end
end
@@ -966,7 +1036,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
tabela_em_ordem [#tabela_em_ordem+1] = tabela
end
_table_sort (tabela_em_ordem, function (a, b) return a[1] > b[1] end)
_table_sort (tabela_em_ordem, _detalhes.Sort1)
container = frame.overall_habilidades.gump
quantidade = 0
@@ -1034,7 +1104,8 @@ function EncounterDetails:OpenAndRefresh (_, segment)
local adds_pool = {}
--> pega as habilidades que pertence especificamente a cada fase
if (boss_info.phases) then
if (boss_info and boss_info.phases) then
for fase_id, fase in _ipairs (boss_info.phases) do
if (fase.adds) then
for index, addId in _ipairs (fase.adds) do
@@ -1053,7 +1124,13 @@ function EncounterDetails:OpenAndRefresh (_, segment)
for index, jogador in _ipairs (DamageContainer._ActorTable) do
--> só estou interessado nos adds, conferir pelo nome
if (adds_pool [tonumber (jogador.serial:sub(6, 10), 16)] or (jogador.flag_original and bit.band (jogador.flag_original, 0x00000060) ~= 0)) then --> é um inimigo ou neutro
if (adds_pool [_detalhes:GetNpcIdFromGuid (jogador.serial)] or (
jogador.flag_original and
bit.band (jogador.flag_original, 0x00000060) ~= 0 and
(not jogador.owner or (_bit_band (jogador.owner.flag_original, 0x00000060) ~= 0 and not jogador.owner.grupo and _bit_band (jogador.owner.flag_original, 0x00000400) == 0)) and --isn't a pet or the owner isn't a player
not jogador.grupo and
_bit_band (jogador.flag_original, 0x00000400) == 0
)) then --> é um inimigo ou neutro
local nome = jogador.nome
local tabela = {nome = nome, total = 0, dano_em = {}, dano_em_total = 0, damage_from = {}, damage_from_total = 0}
@@ -1494,7 +1571,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
-- boss_info.spell_tables_info o erro de lua do boss é a habilidade dele que não foi declarada ainda
local mortes = _combat_object.last_events_tables
local habilidades_info = boss_info.spell_mechanics or {} --barra.extra pega esse cara aqui --> então esse erro é das habilidades que não tao
local habilidades_info = boss_info and boss_info.spell_mechanics or {} --barra.extra pega esse cara aqui --> então esse erro é das habilidades que não tao
for index, tabela in _ipairs (mortes) do
--> {esta_morte, time, este_jogador.nome, este_jogador.classe, _UnitHealthMax (alvo_name), minutos.."m "..segundos.."s", ["dead"] = true}
@@ -1,4 +1,4 @@
## Interface: 50400
## Interface: 60000
## Title: Details Encounter (plugin)
## Notes: Plugin for Details
## RequiredDeps: Details
@@ -0,0 +1,269 @@
local _detalhes = _G._detalhes
local blackrock_foundry = {
id = 1205, --994 = map id extracted from encounter journal
ej_id = 477, --encounter journal id
name = "Blackrock Foundry",
icons = [[Interface\AddOns\Details_RaidInfo-BlackrockFoundry\boss_faces]],
icon = [[Interface\AddOns\Details_RaidInfo-BlackrockFoundry\icon256x128]],
is_raid = true,
backgroundFile = {file = [[Interface\Glues\LOADINGSCREENS\LoadingScreen_BlackrockFoundry]], coords = {0, 1, 132/512, 439/512}},
backgroundEJ = [[Interface\EncounterJournal\UI-EJ-LOREBG-BlackrockFoundry]],
boss_names = {
--[[ 1 ]] "Gruul",
--[[ 2 ]] "Oregorger",
--[[ 3 ]] "Beastlord Darmac",
--[[ 4 ]] "Flamebender Ka'graz",
--[[ 5 ]] "Hans'gar and Franzok",
--[[ 6 ]] "Operator Thogar",
--[[ 7 ]] "The Blast Furnace",
--[[ 8 ]] "Kromog",
--[[ 9 ]] "The Iron Maidens",
--[[ 10 ]] "Blackhand",
},
encounter_ids = { --encounter journal encounter id
--> Ids by Index
1161, 1202, 1122, 1123, 1155, 1147, 1154, 1162, 1203, 959,
--> Boss Index
[1161] = 1,
[1202] = 2,
[1122] = 3,
[1123] = 4,
[1155] = 5,
[1147] = 6,
[1154] = 7,
[1162] = 8,
[1203] = 9,
[959] = 10,
},
encounter_ids2 = {
--combatlog encounter id
[1694] = 3, --Beastlord Darmac
[1689] = 4, --Flamebender Ka'graz
[1693] = 5, --Hans'gar & Franzok
[1692] = 6, --Operator Thogar
[1713] = 8, --Kromog, Legend of the Mountain
[1695] = 9, --The Iron Maidens
},
boss_ids = {
--npc ids
[76865] = 3, --Beastlord Darmac
[76814] = 4, --Flamebender Ka'graz
[76974] = 5, --Franzok
[76973] = 5, --Hans'gar
[76906] = 6, --Operator Thogar
[77692] = 8, --Kromog, Legend of the Mountain
[77557] = 9, -- Admiral Gar'an
[77231] = 9, --Enforcer Sorka
[77477] = 9, --Marak the Blooded
},
encounters = {
[1] = {
boss = "Gruul",
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-Gruul]],
--> spell list
continuo = {
155080,
155301,
155530,
162322,
165983,
173190,
173192,
},
},
[2] = {
boss = "Oregorger",
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-Oregorger]],
--> spell list
continuo = {
155897,
155900,
156203,
156297,
156324,
156374,
156388,
156879,
165983,
173471,
},
},
[3] = {
boss = "Beastlord Darmac",
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-Beastlord Darmac]],
--> spell list
continuo = {
154956,
154960,
154981,
154989,
155030,
155061,
155198,
155222,
155247,
155499,
155531,
155611,
155657,
155718,
156823,
156824,
162275,
162283,
},
},
[4] = {
boss = "Flamebender Ka'graz",
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-Flamebender Kagraz]],
--> spell list
continuo = {
154938,
155049,
155074,
155314,
155318,
155484,
155511,
156018,
156040,
156713,
163284,
163633,
163822,
},
},
[5] = {
boss = "Hans'gar and Franzok",
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-Franzok]],
--> spell list
continuo = {
153470,
155818,
156938,
157853,
158140,
161570,
},
},
[6] = {
boss = "Operator Thogar",
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-Operator Thogar]],
--> spell list
continuo = {
163754,
156554,
155921,
158084,
163752,
155701,
160050,
156270,
156655,
},
},
[7] = {
boss = "The Blast Furnace",
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-The Blast Furnace]],
--> spell list
continuo = {
155187,
155201,
155209,
155223,
155242,
155743,
156932,
156937,
158246,
159408,
},
},
[8] = {
boss = "Kromog, Legend of the Mountain",
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-Kromog]],
--> spell list
continuo = {
156704,
156844,
157055,
157059,
157247,
157659,
161893,
161923,
162349,
162392,
},
},
[9] = {
boss = "The Iron Maidens",
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-Iron Maidens]],
--> spell list
continuo = {
155841,
156637,
156669,
157884,
158078,
158080,
158683,
159335,
160436,
160733,
},
},
[10] = {
boss = "Blackhand",
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-Warlord Blackhand]],
--> spell list
continuo = {
155992,
156044,
156107,
156401,
156479,
156497,
156731,
156743,
},
},
},
}
_detalhes:InstallEncounter (blackrock_foundry)
@@ -0,0 +1,6 @@
## Interface: 60000
## Title: Details: Blackrock Foundry
## Notes: Plugin for Details
## RequiredDeps: Details
Details_RaidInfo-BlackrockFoundry.lua
@@ -0,0 +1,115 @@
local _detalhes = _G._detalhes
local highmaul = {
id = 1228, --994 = map id extracted from encounter journal
ej_id = 477, --encounter journal id
name = "Highmaul",
icons = [[Interface\AddOns\Details_RaidInfo-Highmaul\boss_faces]],
icon = [[Interface\AddOns\Details_RaidInfo-Highmaul\icon256x128]],
is_raid = true,
backgroundFile = {file = [[Interface\Glues\LOADINGSCREENS\LoadingScreen_HighMaulRaid]], coords = {0, 1, 265/1024, 875/1024}},
backgroundEJ = [[Interface\EncounterJournal\UI-EJ-LOREBG-Highmaul]],
boss_names = {
--[[ 1 ]] "Kargath Bladefist",
--[[ 2 ]] "The Butcher",
--[[ 3 ]] "Tectus",
--[[ 4 ]] "Brackenspore",
--[[ 5 ]] "Twin Ogron",
--[[ 6 ]] "Ko'ragh",
--[[ 7 ]] "Imperator Mar'gok",
},
encounter_ids = { --encounter journal encounter id
--> Ids by Index
1128, 971, 1195, 1196, 1148, 1153, 1197,
--> Boss Index
[1128] = 1,
[971] = 2,
[1195] = 3,
[1196] = 4,
[1148] = 5,
[1153] = 6,
[1197] = 7,
},
encounter_ids2 = {
--combatlog encounter id
},
boss_ids = {
--npc ids
},
encounters = {
[1] = {
boss = "Kargath Bladefist",
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-Kargath Bladefist]],
--> spell list
continuo = {},
},
[2] = {
boss = "The Butcher",
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-The Butcher]],
--> spell list
continuo = {},
},
[3] = {
boss = "Tectus",
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-Tectus The Living Mountain]],
--> spell list
continuo = {},
},
[4] = {
boss = "Brackenspore",
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-Brackenspore]],
--> spell list
continuo = {},
},
[5] = {
boss = "Twin Ogron",
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-Twin Ogron]],
--> spell list
continuo = {},
},
[6] = {
boss = "Ko'ragh",
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-Fel Breaker]],
--> spell list
continuo = {},
},
[7] = {
boss = "Imperator Mar'gok",
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-Imperator Margok]],
--> spell list
continuo = {},
},
},
}
_detalhes:InstallEncounter (highmaul)
@@ -0,0 +1,6 @@
## Interface: 60000
## Title: Details: Highmaul
## Notes: Plugin for Details
## RequiredDeps: Details
Details_RaidInfo-Highmaul.lua
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
## Interface: 50400
## Interface: 60000
## Title: Details: Siege of Orgrimmar
## Notes: Plugin for Details
## RequiredDeps: Details
@@ -49,7 +49,7 @@ local siege_of_orgrimmar = {
--> find galakras (this encounter doesn't have a boss frames before galakras comes into in play)
if (_detalhes.tabela_vigente and _detalhes.tabela_vigente[1] and _detalhes.tabela_vigente[1]._ActorTable) then
for _, damage_actor in ipairs (_detalhes.tabela_vigente[1]._ActorTable) do
local serial = tonumber (damage_actor.serial:sub (6, 10), 16)
local serial = _detalhes:GetNpcIdFromGuid (damage_actor.serial)
if (serial == 73909) then --Archmage Aethas Sunreaver
return 5 --> galakras boss index
end
@@ -1,4 +1,4 @@
## Interface: 50400
## Interface: 60000
## Title: Details: Throne of Thunder
## Notes: Plugin for Details
## RequiredDeps: Details
@@ -912,8 +912,8 @@ end
function TimeAttack:CheckTargetForTutorial()
local guid = UnitGUID ("target")
if (guid) then
local mobid = tonumber (guid:sub (6, 10), 16)
if (mobid == 31144 or mobid == 32666 or mobid == 31146 or mobid == 32667 or mobid == 67127 or mobid == 46647) then
local mobid = TimeAttack:GetNpcIdFromGuid (guid)
if (mobid == 31144 or mobid == 32666 or mobid == 31146 or mobid == 32667 or mobid == 67127 or mobid == 46647 or mobid == 87762 or mobid == 87761) then
TimeAttack:SetTutorialCVar ("TIME_ATTACK_TUTORIAL1", true)
TimeAttackFrame:UnregisterEvent ("PLAYER_TARGET_CHANGED")
TimeAttack:ShowTargetTutorial()
@@ -1,4 +1,4 @@
## Interface: 50400
## Interface: 60000
## Title: Details TimeAttack (plugin)
## Notes: Plugin for Details
## SavedVariablesPerCharacter: _detalhes_databaseTimeAttack
@@ -1,4 +1,4 @@
## Interface: 50400
## Interface: 60000
## Title: Details Tiny Threat (plugin)
## Notes: Plugin for Details
## RequiredDeps: Details
@@ -1,4 +1,4 @@
## Interface: 50400
## Interface: 60000
## Title: Details Vanguard (plugin)
## Notes: Plugin for Details
## SavedVariablesPerCharacter: _detalhes_databaseVanguard
@@ -9,10 +9,9 @@
--> main frame (shortcut)
local YouAreNotPreparedFrame = YouAreNotPrepared.Frame
YouAreNotPrepared:SetPluginDescription ("Tracks your deaths during raid encounters and shows it for you right after the fight end.")
local debugmode = false
YouAreNotPrepared:SetPluginDescription ("Tracks your deaths during raid encounters and shows it for you right after the fight end.")
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> init the frames
@@ -1,4 +1,4 @@
## Interface: 50400
## Interface: 60000
## Title: Details You Are Not Prepared (plugin)
## Notes: Plugin for Details
## RequiredDeps: Details
+85 -18
View File
@@ -166,8 +166,8 @@ function _G._detalhes:Start()
self.move_janela_func (instance.baseframe, true, instance)
self.move_janela_func (instance.baseframe, false, instance)
end
self.CheckWallpaperAfterStartup = nil
end
self.CheckWallpaperAfterStartup = nil
end
_detalhes:ScheduleTimer ("CheckWallpaperAfterStartup", 5)
@@ -308,6 +308,17 @@ function _G._detalhes:Start()
_detalhes:FillUserCustomSpells()
_detalhes:AddDefaultCustomDisplays()
if (_detalhes_database.last_realversion and _detalhes_database.last_realversion < 31 and enable_reset_warning) then
for index, custom in ipairs (_detalhes.custom) do
if (custom.name == Loc ["STRING_CUSTOM_POT_DEFAULT"]) then
-- only on 14/11/2014
--_detalhes.atributo_custom:RemoveCustom (index)
break
end
end
_detalhes:AddDefaultCustomDisplays()
end
if (_detalhes_database.last_realversion and _detalhes_database.last_realversion < 20 and enable_reset_warning) then
table.wipe (self.custom)
_detalhes:AddDefaultCustomDisplays()
@@ -436,23 +447,6 @@ function _G._detalhes:Start()
_detalhes:BrokerTick()
--test realtime dps
--[[
local real_time_frame = CreateFrame ("frame", nil, UIParent)
local instance = _detalhes:GetInstance (1)
real_time_frame:SetScript ("OnUpdate", function (self, elapsed)
if (_detalhes.in_combat and instance.atributo == 1 and instance.sub_atributo == 1) then
for i = 1, instance:GetNumRows() do
local row = instance:GetRow (index)
if (row:IsShown()) then
local actor = row.minha_tabela
local right_text = row.texto_direita
end
end
end
end)
--]]
-- test dbm callbacks
if (_G.DBM) then
@@ -487,6 +481,79 @@ function _G._detalhes:Start()
DBM:RegisterCallback ("DBM_Announce", dbm_callback_phase)
DBM:RegisterCallback ("pull", dbm_callback_pull)
end
--test realtime dps
--[[
local real_time_frame = CreateFrame ("frame", nil, UIParent)
local instance = _detalhes:GetInstance (1)
real_time_frame:SetScript ("OnUpdate", function (self, elapsed)
if (_detalhes.in_combat and instance.atributo == 1 and instance.sub_atributo == 1) then
for i = 1, instance:GetNumRows() do
local row = instance:GetRow (index)
if (row:IsShown()) then
local actor = row.minha_tabela
local right_text = row.texto_direita
end
end
end
end)
--]]
--WOD Spell Test
--[[
local f = CreateFrame ("frame")
f:SetSize (400, 600)
f:SetPoint ("center", UIParent)
local invalid_spells = {}
local amt = 0
--for spellid, class in pairs (_detalhes.ClassSpellList) do
--for spellid, class in pairs (_detalhes.CrowdControlSpells) do
--for spellid, class in pairs (_detalhes.AbsorbSpells) do
--for spellid, class in pairs (_detalhes.DefensiveCooldownSpellsNoBuff) do
--for spellid, class in pairs (_detalhes.DefensiveCooldownSpells) do
--for spellid, class in pairs (_detalhes.HarmfulSpells) do
--for spellid, class in pairs (_detalhes.MiscClassSpells) do
--for spellid, class in pairs (_detalhes.DualSideSpells) do
--for spellid, class in pairs (_detalhes.AttackCooldownSpells) do
for spellid, class in pairs (_detalhes.HelpfulSpells) do
local name = GetSpellInfo (spellid)
if (not name) then
invalid_spells [spellid] = class
amt = amt + 1
local edit = _detalhes.gump:NewTextEntry (f, f, "box"..amt, nil, 150, 12)
edit:SetPoint ("topleft", f, "topleft", 10, amt*13*-1)
edit:SetText (spellid)
edit:SetHook ("OnEditFocusGained", function()
edit:HighlightText()
end)
end
end
print ("Spells Invalid:", amt)
--]]
--[[
local parser = CreateFrame ("frame")
parser:RegisterEvent ("COMBAT_LOG_EVENT_UNFILTERED")
parser:SetScript ("OnEvent", function (self, evento, time, token, ...)
if (token == "SPELL_AURA_APPLIED") then
print (...)
end
end)
--]]
end