- New loc strings.
- Chromie should now be shown on damage and heal displays. - Fix for Ticket #198 'script run too long'. - Added boss target name on the first hit message. - Few improvements on the new death recap. - Added {rdps} and {rhps} for the data feed broker.
This commit is contained in:
@@ -2330,7 +2330,7 @@
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local DynamicOverallDamage = {
|
||||
name = "Dynamic Overall Damage",
|
||||
name = Loc ["STRING_CUSTOM_DYNAMICOVERAL"], --"Dynamic Overall Damage",
|
||||
icon = [[Interface\ICONS\Achievement_Quests_Completed_08]],
|
||||
attribute = false,
|
||||
spellid = false,
|
||||
@@ -2455,14 +2455,14 @@
|
||||
|
||||
local have = false
|
||||
for _, custom in ipairs (self.custom) do
|
||||
if (custom.name == "Dynamic Overall Damage" and (custom.script_version and custom.script_version >= DynamicOverallDamage.script_version) ) then
|
||||
if (custom.name == Loc ["STRING_CUSTOM_DYNAMICOVERAL"] and (custom.script_version and custom.script_version >= DynamicOverallDamage.script_version) ) then
|
||||
have = true
|
||||
break
|
||||
end
|
||||
end
|
||||
if (not have) then
|
||||
for i, custom in ipairs (self.custom) do
|
||||
if (custom.name == "Dynamic Overall Damage") then
|
||||
if (custom.name == Loc ["STRING_CUSTOM_DYNAMICOVERAL"]) then
|
||||
table.remove (self.custom, i)
|
||||
end
|
||||
end
|
||||
@@ -2474,7 +2474,7 @@
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local DamageOnShields = {
|
||||
name = "Damage on Shields",
|
||||
name = Loc ["STRING_CUSTOM_DAMAGEONSHIELDS"],
|
||||
icon = [[Interface\ICONS\Spell_Holy_PowerWordShield]],
|
||||
attribute = false,
|
||||
spellid = false,
|
||||
@@ -2556,14 +2556,14 @@
|
||||
|
||||
local have = false
|
||||
for _, custom in ipairs (self.custom) do
|
||||
if (custom.name == "Damage on Shields" and (custom.script_version and custom.script_version >= DamageOnShields.script_version) ) then
|
||||
if (custom.name == Loc ["STRING_CUSTOM_DAMAGEONSHIELDS"] and (custom.script_version and custom.script_version >= DamageOnShields.script_version) ) then
|
||||
have = true
|
||||
break
|
||||
end
|
||||
end
|
||||
if (not have) then
|
||||
for i, custom in ipairs (self.custom) do
|
||||
if (custom.name == "Damage on Shields") then
|
||||
if (custom.name == Loc ["STRING_CUSTOM_DAMAGEONSHIELDS"]) then
|
||||
table.remove (self.custom, i)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -302,6 +302,13 @@
|
||||
|
||||
else
|
||||
novo_objeto.displayName = nome
|
||||
|
||||
--Chromie - From 'The Deaths of Chromie'
|
||||
if (serial) then
|
||||
if (serial:match ("^Creature%-0%-%d+%-%d+%-%d+%-122663%-%w+$")) then
|
||||
novo_objeto.grupo = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> é inimigo
|
||||
|
||||
+1
-1
@@ -580,7 +580,7 @@
|
||||
|
||||
--> verifica memoria
|
||||
_detalhes:FlagActorsOnCommonFight() --fight_component
|
||||
_detalhes:CheckMemoryAfterCombat()
|
||||
--_detalhes:CheckMemoryAfterCombat() -- 7.2.5 is doing some weird errors even out of combat
|
||||
else
|
||||
|
||||
if (not InCombatLockdown() and not UnitAffectingCombat ("player")) then
|
||||
|
||||
+34
-16
@@ -203,6 +203,32 @@
|
||||
-- /run local f=CreateFrame("frame");f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");f:SetScript("OnEvent",function(self, ...) local a = select(6, ...);if (a=="<chr name>")then print (...) end end)
|
||||
-- /run local f=CreateFrame("frame");f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");f:SetScript("OnEvent",function(self, ...) local a = select(3, ...);print (a);if (a=="SPELL_CAST_SUCCESS")then print (...) end end)
|
||||
|
||||
local who_aggro = function (self)
|
||||
if ((_detalhes.LastPullMsg or 0) + 30 > time()) then
|
||||
_detalhes.WhoAggroTimer = nil
|
||||
return
|
||||
end
|
||||
_detalhes.LastPullMsg = time()
|
||||
|
||||
--local hitLine = self.HitBy or "|cFFFFFF00First Hit|r: *?* from *?* "
|
||||
local hitLine = self.HitBy or "|cFFFFFF00First Hit|r: *?*"
|
||||
local targetLine = ""
|
||||
|
||||
for i = 1, 5 do
|
||||
local boss = UnitExists ("boss" .. i)
|
||||
if (boss) then
|
||||
local target = UnitName ("boss" .. i .. "target")
|
||||
if (target and type (target) == "string") then
|
||||
targetLine = " |cFFFFFF00Boss First Target|r: " .. target
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes:Msg (hitLine .. targetLine)
|
||||
_detalhes.WhoAggroTimer = nil
|
||||
end
|
||||
|
||||
function parser:spell_dmg (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand)
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
@@ -317,22 +343,11 @@
|
||||
link = GetSpellLink (spellid)
|
||||
end
|
||||
|
||||
--check boss targets
|
||||
local gotTarget = false
|
||||
for i = 1, 5 do
|
||||
local boss = UnitExists ("boss" .. i)
|
||||
if (boss) then
|
||||
local target = UnitName ("boss" .. i .. "target")
|
||||
if (target and type (target) == "string" and not gotTarget) then
|
||||
_detalhes:Msg ("|cFFFFFF00First hit|r: " .. (link or "") .. " from " .. (who_name or "Unknown") .. " |cFFFFFF00First Boss Target|r: " .. target)
|
||||
gotTarget = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (not gotTarget) then
|
||||
_detalhes:Msg ("First hit: " .. (link or "") .. " from " .. (who_name or "Unknown"))
|
||||
if (_detalhes.WhoAggroTimer) then
|
||||
_detalhes.WhoAggroTimer:Cancel()
|
||||
end
|
||||
_detalhes.WhoAggroTimer = C_Timer.NewTimer (0.5, who_aggro)
|
||||
_detalhes.WhoAggroTimer.HitBy = "|cFFFFFF00First Hit|r: " .. (link or "") .. " from " .. (who_name or "Unknown")
|
||||
end
|
||||
_detalhes:EntrarEmCombate (who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags)
|
||||
else
|
||||
@@ -3758,7 +3773,6 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
|
||||
-- ~encounter
|
||||
function _detalhes.parser_functions:ENCOUNTER_START (...)
|
||||
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("(debug) |cFFFFFF00ENCOUNTER_START|r event triggered.")
|
||||
end
|
||||
@@ -3767,6 +3781,10 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
if (_detalhes.latest_ENCOUNTER_END + 10 > _GetTime()) then
|
||||
return
|
||||
end
|
||||
|
||||
if (not _detalhes.WhoAggroTimer) then
|
||||
_detalhes.WhoAggroTimer = C_Timer.NewTimer (0.5, who_aggro)
|
||||
end
|
||||
|
||||
local encounterID, encounterName, difficultyID, raidSize = _select (1, ...)
|
||||
--print ("START", encounterID, encounterName, difficultyID, raidSize)
|
||||
|
||||
@@ -169,7 +169,7 @@ do
|
||||
Loc ["STRING_ATTRIBUTE_HEAL_TAKEN"],
|
||||
Loc ["STRING_ATTRIBUTE_HEAL_ENEMY"],
|
||||
Loc ["STRING_ATTRIBUTE_HEAL_PREVENT"],
|
||||
"Heal Absorbed (in testing)",
|
||||
Loc ["STRING_ATTRIBUTE_HEAL_ABSORBED"],
|
||||
},
|
||||
|
||||
icones = {
|
||||
@@ -198,7 +198,7 @@ do
|
||||
Loc ["STRING_ATTRIBUTE_ENERGY_ENERGY"],
|
||||
Loc ["STRING_ATTRIBUTE_ENERGY_RUNEPOWER"],
|
||||
Loc ["STRING_ATTRIBUTE_ENERGY_RESOURCES"],
|
||||
"Alternate Power (in testing)",
|
||||
Loc ["STRING_ATTRIBUTE_ENERGY_ALTERNATEPOWER"],
|
||||
},
|
||||
icones = {
|
||||
{"Interface\\AddOns\\Details\\images\\atributos_icones_energyze", {0, .125, 0, 1}},
|
||||
|
||||
+209
-145
@@ -3169,10 +3169,57 @@ local create_deathrecap_line = function (parent, n)
|
||||
end
|
||||
|
||||
local OpenDetailsDeathRecapAtSegment = function (segment)
|
||||
_detalhes.OpenDetailsDeathRecap (segment)
|
||||
_detalhes.OpenDetailsDeathRecap (segment, RecapID)
|
||||
end
|
||||
|
||||
function _detalhes.OpenDetailsDeathRecap (segment)
|
||||
function _detalhes.BuildDeathTableFromRecap (recapID)
|
||||
local events = DeathRecap_GetEvents (recapID)
|
||||
|
||||
--check if it is a valid recap
|
||||
if (not events or #events <= 0) then
|
||||
DeathRecapFrame.Unavailable:Show()
|
||||
return
|
||||
end
|
||||
|
||||
--build an death log using details format
|
||||
ArtificialDeathLog = {
|
||||
{}, --deathlog events
|
||||
(events [1] and events [1].timestamp) or (DeathRecapFrame and DeathRecapFrame.DeathTimeStamp) or 0, --time of death
|
||||
UnitName ("player"),
|
||||
select (2, UnitClass ("player")),
|
||||
UnitHealthMax ("player"),
|
||||
"0m 0s", --formated fight time
|
||||
["dead"] = true,
|
||||
["last_cooldown"] = false,
|
||||
["dead_at"] = 0,
|
||||
n = 1
|
||||
}
|
||||
|
||||
for i = 1, #events do
|
||||
local evtData = events [i]
|
||||
local spellId, spellName, texture = DeathRecapFrame_GetEventInfo ( evtData )
|
||||
|
||||
local ev = {
|
||||
true,
|
||||
spellId or 0,
|
||||
evtData.amount or 0,
|
||||
evtData.timestamp or 0, --?
|
||||
evtData.currentHP or 0,
|
||||
evtData.sourceName or "--x--x--",
|
||||
evtData.absorbed or 0,
|
||||
evtData.school or 0,
|
||||
false,
|
||||
evtData.overkill
|
||||
}
|
||||
|
||||
tinsert (ArtificialDeathLog[1], ev)
|
||||
ArtificialDeathLog.n = ArtificialDeathLog.n + 1
|
||||
end
|
||||
|
||||
return ArtificialDeathLog
|
||||
end
|
||||
|
||||
function _detalhes.OpenDetailsDeathRecap (segment, RecapID)
|
||||
|
||||
if (not _detalhes.death_recap.enabled) then
|
||||
if (Details.DeathRecap and Details.DeathRecap.Lines) then
|
||||
@@ -3196,6 +3243,8 @@ function _detalhes.OpenDetailsDeathRecap (segment)
|
||||
Details.DeathRecap = CreateFrame ("frame", "DetailsDeathRecap", DeathRecapFrame)
|
||||
Details.DeathRecap:SetAllPoints()
|
||||
|
||||
DeathRecapFrame.Title:SetText (DeathRecapFrame.Title:GetText() .. " (by Details!)")
|
||||
|
||||
--lines
|
||||
Details.DeathRecap.Lines = {}
|
||||
for i = 1, 10 do
|
||||
@@ -3259,7 +3308,7 @@ function _detalhes.OpenDetailsDeathRecap (segment)
|
||||
_detalhes.gump:SetFontColor (Details.DeathRecap.Segments [1].text, "orange")
|
||||
else
|
||||
_detalhes.gump:SetFontColor (Details.DeathRecap.Segments [segment].text, "orange")
|
||||
death = _detalhes.tabela_historico.tabelas [segment].last_events_tables
|
||||
death = _detalhes.tabela_historico.tabelas [segment] and _detalhes.tabela_historico.tabelas [segment].last_events_tables
|
||||
end
|
||||
|
||||
else
|
||||
@@ -3268,165 +3317,180 @@ function _detalhes.OpenDetailsDeathRecap (segment)
|
||||
end
|
||||
end
|
||||
|
||||
if (not death) then
|
||||
return
|
||||
--if couldn't find the requested log from details!, so, import the log from the blizzard death recap
|
||||
--or if the player cliced on the chat link for the recap
|
||||
local ArtificialDeathLog
|
||||
if (not death or RecapID) then
|
||||
if (segment) then
|
||||
--nop, the player requested a death log from details it self but the log does not exists
|
||||
DeathRecapFrame.Unavailable:Show()
|
||||
return
|
||||
end
|
||||
--get the death events from the blizzard's recap
|
||||
ArtificialDeathLog = _detalhes.BuildDeathTableFromRecap (RecapID)
|
||||
end
|
||||
|
||||
DeathRecapFrame.Unavailable:Hide()
|
||||
|
||||
--get the relevance config
|
||||
local relevanceTime = _detalhes.death_recap.relevance_time
|
||||
|
||||
--for index, t in ipairs (death) do
|
||||
for index = #death, 1, -1 do
|
||||
local t = death [index]
|
||||
|
||||
if (t [3] == _detalhes.playername) then
|
||||
|
||||
local events = t [1]
|
||||
local timeOfDeath = t [2]
|
||||
|
||||
local BiggestDamageHits = {}
|
||||
for i = #events, 1, -1 do
|
||||
tinsert (BiggestDamageHits, events [i])
|
||||
local t
|
||||
if (ArtificialDeathLog) then
|
||||
t = ArtificialDeathLog
|
||||
else
|
||||
for index = #death, 1, -1 do
|
||||
if (death [index] [3] == _detalhes.playername) then
|
||||
t = death [index]
|
||||
break
|
||||
end
|
||||
table.sort (BiggestDamageHits, function (t1, t2)
|
||||
return t1[3] > t2[3]
|
||||
end)
|
||||
for i = #BiggestDamageHits, 1, -1 do
|
||||
if (BiggestDamageHits [i][4] + relevanceTime < timeOfDeath) then
|
||||
tremove (BiggestDamageHits, i)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (t) then
|
||||
local events = t [1]
|
||||
local timeOfDeath = t [2]
|
||||
|
||||
local BiggestDamageHits = {}
|
||||
for i = #events, 1, -1 do
|
||||
tinsert (BiggestDamageHits, events [i])
|
||||
end
|
||||
table.sort (BiggestDamageHits, function (t1, t2)
|
||||
return t1[3] > t2[3]
|
||||
end)
|
||||
for i = #BiggestDamageHits, 1, -1 do
|
||||
if (BiggestDamageHits [i][4] + relevanceTime < timeOfDeath) then
|
||||
tremove (BiggestDamageHits, i)
|
||||
end
|
||||
|
||||
--verifica se o evento que matou o jogador esta na lista, se nao, adiciona no primeiro index do BiggestDamageHits
|
||||
local hitKill
|
||||
for i = #events, 1, -1 do
|
||||
local event = events [i]
|
||||
local evType = event [1]
|
||||
if (type (evType) == "boolean" and evType) then
|
||||
hitKill = event
|
||||
end
|
||||
|
||||
--verifica se o evento que matou o jogador esta na lista, se nao, adiciona no primeiro index do BiggestDamageHits
|
||||
local hitKill
|
||||
for i = #events, 1, -1 do
|
||||
local event = events [i]
|
||||
local evType = event [1]
|
||||
if (type (evType) == "boolean" and evType) then
|
||||
hitKill = event
|
||||
break
|
||||
end
|
||||
end
|
||||
if (hitKill) then
|
||||
local haveHitKill = false
|
||||
for index, t in ipairs (BiggestDamageHits) do
|
||||
if (t == hitKill) then
|
||||
haveHitKill = true
|
||||
break
|
||||
end
|
||||
end
|
||||
if (hitKill) then
|
||||
local haveHitKill = false
|
||||
for index, t in ipairs (BiggestDamageHits) do
|
||||
if (t == hitKill) then
|
||||
haveHitKill = true
|
||||
break
|
||||
end
|
||||
end
|
||||
if (not haveHitKill) then
|
||||
tinsert (BiggestDamageHits, 1, hitKill)
|
||||
end
|
||||
if (not haveHitKill) then
|
||||
tinsert (BiggestDamageHits, 1, hitKill)
|
||||
end
|
||||
|
||||
|
||||
--tem menos que 10 eventos com grande dano dentro dos ultimos 5 segundos
|
||||
--precisa preencher com danos pequenos
|
||||
if (#BiggestDamageHits < 10) then
|
||||
for i = #events, 1, -1 do
|
||||
local event = events [i]
|
||||
local evType = event [1]
|
||||
if (type (evType) == "boolean" and evType) then
|
||||
local alreadyHave = false
|
||||
for index, t in ipairs (BiggestDamageHits) do
|
||||
if (t == event) then
|
||||
alreadyHave = true
|
||||
break
|
||||
end
|
||||
end
|
||||
if (not alreadyHave) then
|
||||
tinsert (BiggestDamageHits, event)
|
||||
if (#BiggestDamageHits == 10) then
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
--encurta a tabela em no maximo 10 eventos
|
||||
while (#BiggestDamageHits > 10) do
|
||||
tremove (BiggestDamageHits, 11)
|
||||
end
|
||||
end
|
||||
|
||||
table.sort (BiggestDamageHits, function (t1, t2)
|
||||
return t1[4] > t2[4]
|
||||
end)
|
||||
|
||||
local events = BiggestDamageHits
|
||||
|
||||
local maxHP = t [5]
|
||||
local lineIndex = 10
|
||||
|
||||
--for i = #events, 1, -1 do
|
||||
for i, event in ipairs (events) do
|
||||
local event = events [i]
|
||||
|
||||
local evType = event [1]
|
||||
local hp = min (floor (event [5] / maxHP * 100), 100)
|
||||
local spellName, _, spellIcon = _detalhes.GetSpellInfo (event [2])
|
||||
local amount = event [3]
|
||||
local eventTime = event [4]
|
||||
local source = event [6]
|
||||
local overkill = event [10] or 0
|
||||
|
||||
if (type (evType) == "boolean" and evType) then
|
||||
|
||||
local line = Details.DeathRecap.Lines [lineIndex]
|
||||
|
||||
if (line) then
|
||||
line.timeAt:SetText (format ("%.1f", eventTime - timeOfDeath) .. "s")
|
||||
line.spellIcon:SetTexture (spellIcon)
|
||||
line.TopFader:Hide()
|
||||
--line.spellIcon:SetTexCoord (.1, .9, .1, .9)
|
||||
|
||||
--line.sourceName:SetText ("|cFFC6B0D9" .. source .. "|r")
|
||||
line.sourceName:SetText (spellName)
|
||||
|
||||
if (amount > 1000) then
|
||||
--line.amount:SetText ("-" .. _detalhes:ToK (amount))
|
||||
line.amount:SetText ("-" .. amount)
|
||||
else
|
||||
line.amount:SetText ("-" .. floor (amount))
|
||||
end
|
||||
|
||||
line.lifePercent:SetText (hp .. "%")
|
||||
line.spellid = event [2]
|
||||
|
||||
line:Show()
|
||||
|
||||
if (_detalhes.death_recap.show_life_percent) then
|
||||
line.lifePercent:Show()
|
||||
line.amount:SetPoint ("left", line, "left", 220, 0)
|
||||
line.lifePercent:SetPoint ("left", line, "left", 320, 0)
|
||||
else
|
||||
line.lifePercent:Hide()
|
||||
line.amount:SetPoint ("left", line, "left", 280, 0)
|
||||
--line.lifePercent:SetPoint ("left", line, "left", 320, 0)
|
||||
end
|
||||
end
|
||||
|
||||
lineIndex = lineIndex - 1
|
||||
end
|
||||
end
|
||||
|
||||
local lastLine = Details.DeathRecap.Lines [lineIndex + 1]
|
||||
if (lastLine) then
|
||||
lastLine.TopFader:Show()
|
||||
end
|
||||
|
||||
DeathRecapFrame.Unavailable:Hide()
|
||||
|
||||
break
|
||||
end
|
||||
|
||||
|
||||
--tem menos que 10 eventos com grande dano dentro dos ultimos 5 segundos
|
||||
--precisa preencher com danos pequenos
|
||||
if (#BiggestDamageHits < 10) then
|
||||
for i = #events, 1, -1 do
|
||||
local event = events [i]
|
||||
local evType = event [1]
|
||||
if (type (evType) == "boolean" and evType) then
|
||||
local alreadyHave = false
|
||||
for index, t in ipairs (BiggestDamageHits) do
|
||||
if (t == event) then
|
||||
alreadyHave = true
|
||||
break
|
||||
end
|
||||
end
|
||||
if (not alreadyHave) then
|
||||
tinsert (BiggestDamageHits, event)
|
||||
if (#BiggestDamageHits == 10) then
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
--encurta a tabela em no maximo 10 eventos
|
||||
while (#BiggestDamageHits > 10) do
|
||||
tremove (BiggestDamageHits, 11)
|
||||
end
|
||||
end
|
||||
|
||||
table.sort (BiggestDamageHits, function (t1, t2)
|
||||
return t1[4] > t2[4]
|
||||
end)
|
||||
|
||||
local events = BiggestDamageHits
|
||||
|
||||
local maxHP = t [5]
|
||||
local lineIndex = 10
|
||||
|
||||
--for i = #events, 1, -1 do
|
||||
for i, event in ipairs (events) do
|
||||
local event = events [i]
|
||||
|
||||
local evType = event [1]
|
||||
local hp = min (floor (event [5] / maxHP * 100), 100)
|
||||
local spellName, _, spellIcon = _detalhes.GetSpellInfo (event [2])
|
||||
local amount = event [3]
|
||||
local eventTime = event [4]
|
||||
local source = event [6]
|
||||
local overkill = event [10] or 0
|
||||
|
||||
if (type (evType) == "boolean" and evType) then
|
||||
|
||||
local line = Details.DeathRecap.Lines [lineIndex]
|
||||
|
||||
if (line) then
|
||||
line.timeAt:SetText (format ("%.1f", eventTime - timeOfDeath) .. "s")
|
||||
line.spellIcon:SetTexture (spellIcon)
|
||||
line.TopFader:Hide()
|
||||
--line.spellIcon:SetTexCoord (.1, .9, .1, .9)
|
||||
|
||||
--line.sourceName:SetText ("|cFFC6B0D9" .. source .. "|r")
|
||||
line.sourceName:SetText (spellName)
|
||||
|
||||
if (amount > 1000) then
|
||||
--line.amount:SetText ("-" .. _detalhes:ToK (amount))
|
||||
line.amount:SetText ("-" .. amount)
|
||||
else
|
||||
line.amount:SetText ("-" .. floor (amount))
|
||||
end
|
||||
|
||||
line.lifePercent:SetText (hp .. "%")
|
||||
line.spellid = event [2]
|
||||
|
||||
line:Show()
|
||||
|
||||
if (_detalhes.death_recap.show_life_percent) then
|
||||
line.lifePercent:Show()
|
||||
line.amount:SetPoint ("left", line, "left", 220, 0)
|
||||
line.lifePercent:SetPoint ("left", line, "left", 320, 0)
|
||||
else
|
||||
line.lifePercent:Hide()
|
||||
line.amount:SetPoint ("left", line, "left", 280, 0)
|
||||
--line.lifePercent:SetPoint ("left", line, "left", 320, 0)
|
||||
end
|
||||
end
|
||||
|
||||
lineIndex = lineIndex - 1
|
||||
end
|
||||
end
|
||||
|
||||
local lastLine = Details.DeathRecap.Lines [lineIndex + 1]
|
||||
if (lastLine) then
|
||||
lastLine.TopFader:Show()
|
||||
end
|
||||
|
||||
DeathRecapFrame.Unavailable:Hide()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
hooksecurefunc (_G, "DeathRecap_LoadUI", function()
|
||||
hooksecurefunc (_G, "DeathRecapFrame_OpenRecap", function()
|
||||
_detalhes.OpenDetailsDeathRecap()
|
||||
hooksecurefunc (_G, "DeathRecapFrame_OpenRecap", function (RecapID)
|
||||
_detalhes.OpenDetailsDeathRecap (nil, RecapID)
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
+20
-1
@@ -461,6 +461,24 @@
|
||||
end
|
||||
end
|
||||
|
||||
local get_raid_dps = function()
|
||||
local damage_raid = _detalhes.tabela_vigente and _detalhes.tabela_vigente.totals [1]
|
||||
if (damage_raid ) then
|
||||
return ToKFunctions [_detalhes.minimap.text_format] (_, damage_raid / _detalhes.tabela_vigente:GetCombatTime())
|
||||
else
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
||||
local get_raid_hps = function()
|
||||
local healing_raid = _detalhes.tabela_vigente and _detalhes.tabela_vigente.totals [2]
|
||||
if (healing_raid ) then
|
||||
return ToKFunctions [_detalhes.minimap.text_format] (_, healing_raid / _detalhes.tabela_vigente:GetCombatTime())
|
||||
else
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
||||
local get_player_damage = function()
|
||||
local damage_player = _detalhes.tabela_vigente(1, _detalhes.playername)
|
||||
if (damage_player) then
|
||||
@@ -480,13 +498,14 @@
|
||||
end
|
||||
|
||||
local parse_broker_text = function()
|
||||
|
||||
local text = _detalhes.data_broker_text
|
||||
if (text == "") then
|
||||
return
|
||||
end
|
||||
|
||||
text = text:gsub ("{dmg}", get_player_damage)
|
||||
text = text:gsub ("{rdps}", get_raid_dps)
|
||||
text = text:gsub ("{rhps}", get_raid_hps)
|
||||
text = text:gsub ("{dps}", get_player_dps)
|
||||
text = text:gsub ("{heal}", get_player_heal)
|
||||
text = text:gsub ("{hps}", get_player_hps)
|
||||
|
||||
+283
@@ -80,3 +80,286 @@ function DetailsTutorialAlertFrame_SlideInFrame (frame, animType)
|
||||
frame.startDelay = frame.animData.startDelay;
|
||||
frame:SetScript("OnUpdate", DetailsTutorialAlertFrame_OnUpdate);
|
||||
end
|
||||
|
||||
function _detalhes.PlayBestDamageOnGuild (damage)
|
||||
|
||||
damage = damage or 100000000
|
||||
|
||||
--> create the main frame
|
||||
local DetailsNewDamageRecord = CreateFrame ("frame", "DetailsNewDamageRecordAnimationFrame", UIParent)
|
||||
DetailsNewDamageRecord:SetPoint ("CENTER", UIParent, "CENTER", 0, -200)
|
||||
DetailsNewDamageRecord:SetSize (300, 300)
|
||||
|
||||
--> single animation group
|
||||
local MainAnimationGroup = DetailsNewDamageRecord:CreateAnimationGroup ("DetailsNewDamageRecordAnimationGroup")
|
||||
MainAnimationGroup:SetLooping ("NONE")
|
||||
|
||||
--> widgets:
|
||||
|
||||
----------------------------------------------
|
||||
|
||||
local BaseTexture = DetailsNewDamageRecord:CreateTexture ("BaseTextureTexture", "ARTWORK")
|
||||
BaseTexture:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-Alert-Background-Mini]])
|
||||
BaseTexture:SetDrawLayer ("ARTWORK", -5)
|
||||
BaseTexture:SetPoint ("center", DetailsNewDamageRecord, "center", 0, 0)
|
||||
BaseTexture:SetSize (256, 64)
|
||||
BaseTexture:SetVertexColor (0.99999779462814, 0.99999779462814, 0.99999779462814, 0.99999779462814)
|
||||
|
||||
--> animations for BaseTexture
|
||||
|
||||
BaseTexture.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
BaseTexture.alpha:SetTarget (BaseTexture)
|
||||
BaseTexture.alpha:SetOrder (1)
|
||||
BaseTexture.alpha:SetDuration (0.14869952201843)
|
||||
BaseTexture.alpha:SetStartDelay (0)
|
||||
BaseTexture.alpha:SetEndDelay (0)
|
||||
BaseTexture.alpha:SetFromAlpha (0)
|
||||
BaseTexture.alpha:SetToAlpha (1)
|
||||
BaseTexture.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
BaseTexture.alpha:SetTarget (BaseTexture)
|
||||
BaseTexture.alpha:SetOrder (2)
|
||||
BaseTexture.alpha:SetDuration (1)
|
||||
BaseTexture.alpha:SetStartDelay (5)
|
||||
BaseTexture.alpha:SetEndDelay (0)
|
||||
BaseTexture.alpha:SetFromAlpha (1)
|
||||
BaseTexture.alpha:SetToAlpha (0)
|
||||
|
||||
----------------------------------------------
|
||||
|
||||
local BigFlash = DetailsNewDamageRecord:CreateTexture ("BigFlashTexture", "OVERLAY")
|
||||
BigFlash:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-Alert-Glow]])
|
||||
BigFlash:SetDrawLayer ("OVERLAY", 0)
|
||||
BigFlash:SetPoint ("center", DetailsNewDamageRecord, "center", -2, 2)
|
||||
BigFlash:SetSize (314, 100)
|
||||
BigFlash:SetDesaturated (false)
|
||||
BigFlash:SetTexCoord (0.0010000000149012, 0.77400001525879, 0.0010000000149012, 0.65800003051758)
|
||||
if (0 ~= 0) then
|
||||
BigFlash:SetRotation (0)
|
||||
end
|
||||
BigFlash:SetVertexColor (0.96470373868942, 0.98823314905167, 0.99999779462814, 0.99999779462814)
|
||||
BigFlash:SetAlpha (1)
|
||||
BigFlash:SetBlendMode ("ADD")
|
||||
|
||||
--> animations for BigFlash
|
||||
|
||||
BigFlash.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
BigFlash.alpha:SetTarget (BigFlash)
|
||||
BigFlash.alpha:SetOrder (1)
|
||||
BigFlash.alpha:SetDuration (0.11600000411272)
|
||||
BigFlash.alpha:SetStartDelay (0)
|
||||
BigFlash.alpha:SetEndDelay (0)
|
||||
BigFlash.alpha:SetFromAlpha (0)
|
||||
BigFlash.alpha:SetToAlpha (1)
|
||||
BigFlash.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
BigFlash.alpha:SetTarget (BigFlash)
|
||||
BigFlash.alpha:SetOrder (2)
|
||||
BigFlash.alpha:SetDuration (0.31600001454353)
|
||||
BigFlash.alpha:SetStartDelay (0)
|
||||
BigFlash.alpha:SetEndDelay (0)
|
||||
BigFlash.alpha:SetFromAlpha (1)
|
||||
BigFlash.alpha:SetToAlpha (0)
|
||||
|
||||
----------------------------------------------
|
||||
|
||||
local FlashSwipe = DetailsNewDamageRecord:CreateTexture ("FlashSwipeTexture", "OVERLAY")
|
||||
FlashSwipe:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-Alert-Glow]])
|
||||
FlashSwipe:SetDrawLayer ("OVERLAY", 7)
|
||||
FlashSwipe:SetPoint ("center", DetailsNewDamageRecord, "center", -99, 0)
|
||||
FlashSwipe:SetSize (100, 57)
|
||||
FlashSwipe:SetDesaturated (false)
|
||||
FlashSwipe:SetTexCoord (0.78199996948242, 0.91900001525879, 0.0010000000149012, 0.2760000038147)
|
||||
if (0 ~= 0) then
|
||||
FlashSwipe:SetRotation (0)
|
||||
end
|
||||
FlashSwipe:SetVertexColor (0.86666476726532, 0.54117530584335, 0, 0.99999779462814)
|
||||
FlashSwipe:SetAlpha (1)
|
||||
FlashSwipe:SetBlendMode ("ADD")
|
||||
|
||||
--> animations for FlashSwipe
|
||||
|
||||
FlashSwipe.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
FlashSwipe.alpha:SetTarget (FlashSwipe)
|
||||
FlashSwipe.alpha:SetOrder (1)
|
||||
FlashSwipe.alpha:SetDuration (0.31600001454353)
|
||||
FlashSwipe.alpha:SetStartDelay (0.20000000298023)
|
||||
FlashSwipe.alpha:SetEndDelay (0)
|
||||
FlashSwipe.alpha:SetFromAlpha (0)
|
||||
FlashSwipe.alpha:SetToAlpha (0.501051902771)
|
||||
FlashSwipe.translation = MainAnimationGroup:CreateAnimation ("TRANSLATION")
|
||||
FlashSwipe.translation:SetTarget (FlashSwipe)
|
||||
FlashSwipe.translation:SetOrder (1)
|
||||
FlashSwipe.translation:SetDuration (0.81599998474121)
|
||||
FlashSwipe.translation:SetStartDelay (0.20000000298023)
|
||||
FlashSwipe.translation:SetEndDelay (0)
|
||||
FlashSwipe.translation:SetOffset (200, 0)
|
||||
FlashSwipe.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
FlashSwipe.alpha:SetTarget (FlashSwipe)
|
||||
FlashSwipe.alpha:SetOrder (1)
|
||||
FlashSwipe.alpha:SetDuration (0.31600001454353)
|
||||
FlashSwipe.alpha:SetStartDelay (0.69999998807907)
|
||||
FlashSwipe.alpha:SetEndDelay (0)
|
||||
FlashSwipe.alpha:SetFromAlpha (0.501051902771)
|
||||
FlashSwipe.alpha:SetToAlpha (0)
|
||||
|
||||
----------------------------------------------
|
||||
|
||||
local Portrait = DetailsNewDamageRecord:CreateTexture ("PortraitTexture", "OVERLAY")
|
||||
Portrait:SetTexture ([[Interface\ARCHEOLOGY\ARCH-FLAREEFFECT]])
|
||||
Portrait:SetDrawLayer ("OVERLAY", -5)
|
||||
Portrait:SetPoint ("center", DetailsNewDamageRecord, "center", 3, 0)
|
||||
Portrait:SetSize (246, 44)
|
||||
Portrait:SetDesaturated (false)
|
||||
Portrait:SetTexCoord (0.051753740310669, 0.81701484680176, 0.086334381103516, 0.25102617263794)
|
||||
if (0 ~= 0) then
|
||||
Portrait:SetRotation (0)
|
||||
end
|
||||
Portrait:SetVertexColor (0.99999779462814, 0.99999779462814, 0.99999779462814, 0.99999779462814)
|
||||
Portrait:SetAlpha (1)
|
||||
Portrait:SetBlendMode ("BLEND")
|
||||
|
||||
--> animations for Portrait
|
||||
|
||||
Portrait.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
Portrait.alpha:SetTarget (Portrait)
|
||||
Portrait.alpha:SetOrder (1)
|
||||
Portrait.alpha:SetDuration (0.41600000858307)
|
||||
Portrait.alpha:SetStartDelay (0)
|
||||
Portrait.alpha:SetEndDelay (0)
|
||||
Portrait.alpha:SetFromAlpha (0)
|
||||
Portrait.alpha:SetToAlpha (1)
|
||||
Portrait.scale = MainAnimationGroup:CreateAnimation ("SCALE")
|
||||
Portrait.scale:SetTarget (Portrait)
|
||||
Portrait.scale:SetOrder (1)
|
||||
Portrait.scale:SetDuration (0.21600000560284)
|
||||
Portrait.scale:SetStartDelay (0)
|
||||
Portrait.scale:SetEndDelay (0)
|
||||
Portrait.scale:SetFromScale (0, 0)
|
||||
Portrait.scale:SetToScale (1, 1)
|
||||
Portrait.scale:SetOrigin ("center", 0, 0)
|
||||
Portrait.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
Portrait.alpha:SetTarget (Portrait)
|
||||
Portrait.alpha:SetOrder (2)
|
||||
Portrait.alpha:SetDuration (1)
|
||||
Portrait.alpha:SetStartDelay (4.7000002861023)
|
||||
Portrait.alpha:SetEndDelay (0)
|
||||
Portrait.alpha:SetFromAlpha (1)
|
||||
Portrait.alpha:SetToAlpha (0)
|
||||
|
||||
----------------------------------------------
|
||||
|
||||
local DamageIcon = DetailsNewDamageRecord:CreateTexture ("DamageIconTexture", "OVERLAY")
|
||||
DamageIcon:SetTexture ([[Interface\LFGFRAME\UI-LFG-ICON-ROLES]])
|
||||
DamageIcon:SetDrawLayer ("OVERLAY", 2)
|
||||
DamageIcon:SetPoint ("center", DetailsNewDamageRecord, "center", -97, 1)
|
||||
DamageIcon:SetSize (32, 32)
|
||||
DamageIcon:SetDesaturated (false)
|
||||
DamageIcon:SetTexCoord (0.27200000762939, 0.51899997711182, 0.25837841033936, 0.51399997711182)
|
||||
if (0 ~= 0) then
|
||||
DamageIcon:SetRotation (0)
|
||||
end
|
||||
DamageIcon:SetVertexColor (0.99999779462814, 0.99999779462814, 0.99999779462814, 0.99999779462814)
|
||||
DamageIcon:SetAlpha (1)
|
||||
DamageIcon:SetBlendMode ("BLEND")
|
||||
|
||||
--> animations for DamageIcon
|
||||
|
||||
DamageIcon.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
DamageIcon.alpha:SetTarget (DamageIcon)
|
||||
DamageIcon.alpha:SetOrder (1)
|
||||
DamageIcon.alpha:SetDuration (0.51599997282028)
|
||||
DamageIcon.alpha:SetStartDelay (0)
|
||||
DamageIcon.alpha:SetEndDelay (0)
|
||||
DamageIcon.alpha:SetFromAlpha (0)
|
||||
DamageIcon.alpha:SetToAlpha (1)
|
||||
DamageIcon.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
DamageIcon.alpha:SetTarget (DamageIcon)
|
||||
DamageIcon.alpha:SetOrder (2)
|
||||
DamageIcon.alpha:SetDuration (1)
|
||||
DamageIcon.alpha:SetStartDelay (4.5999999046326)
|
||||
DamageIcon.alpha:SetEndDelay (0)
|
||||
DamageIcon.alpha:SetFromAlpha (1)
|
||||
DamageIcon.alpha:SetToAlpha (0)
|
||||
|
||||
----------------------------------------------
|
||||
|
||||
local NewDamageRecord = DetailsNewDamageRecord:CreateFontString ("NewDamageRecordFontString", "OVERLAY")
|
||||
NewDamageRecord:SetFont ([=[Fonts\FRIZQT__.TTF]=], 12, "OUTLINE")
|
||||
NewDamageRecord:SetText ("Damage Record!")
|
||||
NewDamageRecord:SetDrawLayer ("OVERLAY", 0)
|
||||
NewDamageRecord:SetPoint ("center", DetailsNewDamageRecord, "center", 18, 7)
|
||||
NewDamageRecord:SetSize (181, 20)
|
||||
NewDamageRecord:SetTextColor (1, 1, 1)
|
||||
NewDamageRecord:SetAlpha (1)
|
||||
NewDamageRecord:SetJustifyH ("CENTER")
|
||||
|
||||
--> animations for NewDamageRecord
|
||||
|
||||
NewDamageRecord.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
NewDamageRecord.alpha:SetTarget (NewDamageRecord)
|
||||
NewDamageRecord.alpha:SetOrder (1)
|
||||
NewDamageRecord.alpha:SetDuration (0.016000000759959)
|
||||
NewDamageRecord.alpha:SetStartDelay (0)
|
||||
NewDamageRecord.alpha:SetEndDelay (0)
|
||||
NewDamageRecord.alpha:SetFromAlpha (0)
|
||||
NewDamageRecord.alpha:SetToAlpha (0)
|
||||
NewDamageRecord.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
NewDamageRecord.alpha:SetTarget (NewDamageRecord)
|
||||
NewDamageRecord.alpha:SetOrder (2)
|
||||
NewDamageRecord.alpha:SetDuration (0.51599997282028)
|
||||
NewDamageRecord.alpha:SetStartDelay (0.40000000596046)
|
||||
NewDamageRecord.alpha:SetEndDelay (4.0999999046326)
|
||||
NewDamageRecord.alpha:SetFromAlpha (0)
|
||||
NewDamageRecord.alpha:SetToAlpha (1)
|
||||
NewDamageRecord.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
NewDamageRecord.alpha:SetTarget (NewDamageRecord)
|
||||
NewDamageRecord.alpha:SetOrder (3)
|
||||
NewDamageRecord.alpha:SetDuration (1)
|
||||
NewDamageRecord.alpha:SetStartDelay (0.10000000149012)
|
||||
NewDamageRecord.alpha:SetEndDelay (0)
|
||||
NewDamageRecord.alpha:SetFromAlpha (1)
|
||||
NewDamageRecord.alpha:SetToAlpha (0)
|
||||
|
||||
----------------------------------------------
|
||||
|
||||
local DamageAmount = DetailsNewDamageRecord:CreateFontString ("DamageAmountFontString", "OVERLAY")
|
||||
DamageAmount:SetFont ([=[Fonts\FRIZQT__.TTF]=], 12, "THICKOUTLINE")
|
||||
DamageAmount:SetText (_detalhes:comma_value (damage))
|
||||
DamageAmount:SetDrawLayer ("OVERLAY", 0)
|
||||
DamageAmount:SetPoint ("center", DetailsNewDamageRecord, "center", 18, -7)
|
||||
DamageAmount:SetSize (100, 20)
|
||||
DamageAmount:SetTextColor (1, 1, 1)
|
||||
DamageAmount:SetAlpha (1)
|
||||
DamageAmount:SetJustifyH ("CENTER")
|
||||
|
||||
--> animations for DamageAmount
|
||||
|
||||
DamageAmount.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
DamageAmount.alpha:SetTarget (DamageAmount)
|
||||
DamageAmount.alpha:SetOrder (1)
|
||||
DamageAmount.alpha:SetDuration (0.016000000759959)
|
||||
DamageAmount.alpha:SetStartDelay (0)
|
||||
DamageAmount.alpha:SetEndDelay (0)
|
||||
DamageAmount.alpha:SetFromAlpha (0)
|
||||
DamageAmount.alpha:SetToAlpha (0)
|
||||
DamageAmount.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
DamageAmount.alpha:SetTarget (DamageAmount)
|
||||
DamageAmount.alpha:SetOrder (2)
|
||||
DamageAmount.alpha:SetDuration (0.51599997282028)
|
||||
DamageAmount.alpha:SetStartDelay (0.40000000596046)
|
||||
DamageAmount.alpha:SetEndDelay (0)
|
||||
DamageAmount.alpha:SetFromAlpha (0)
|
||||
DamageAmount.alpha:SetToAlpha (1)
|
||||
DamageAmount.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
DamageAmount.alpha:SetTarget (DamageAmount)
|
||||
DamageAmount.alpha:SetOrder (3)
|
||||
DamageAmount.alpha:SetDuration (1.0160000324249)
|
||||
DamageAmount.alpha:SetStartDelay (4.2000002861023)
|
||||
DamageAmount.alpha:SetEndDelay (0)
|
||||
DamageAmount.alpha:SetFromAlpha (1)
|
||||
DamageAmount.alpha:SetToAlpha (0)
|
||||
|
||||
--> test the animation
|
||||
MainAnimationGroup:Play()
|
||||
|
||||
|
||||
end
|
||||
|
||||
@@ -11,6 +11,9 @@ function _detalhes:OpenWelcomeWindow ()
|
||||
|
||||
if (not window) then
|
||||
|
||||
--on first run, sincronize with guild
|
||||
_detalhes.storage:DBGuildSync()
|
||||
|
||||
local index = 1
|
||||
local pages = {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user