- testing the mercurial repo packpager.
This commit is contained in:
@@ -194,7 +194,14 @@ DETAILS_TOTALS_ONLYGROUP = true
|
||||
total = combat:GetTotal ( attribute, subAttribute [, onlyGroup] )
|
||||
returns the total of the requested attribute.
|
||||
|
||||
mythictInfo = combat:GetMythicDungeonInfo()
|
||||
returns a table with information about the mythic dungeon encounter.
|
||||
|
||||
isMythicDungeonSegment = combat:IsMythicDungeon()
|
||||
returns if the segment is from a mythic dungeon.
|
||||
|
||||
isMythicDungeonOverallSegment = combat:IsMythicDungeonOverall()
|
||||
returns if the segment is an overall mythic dungeon segment.
|
||||
|
||||
--------------------------------------------------------------------
|
||||
|
||||
@@ -220,6 +227,9 @@ break a death table returning the data from it:
|
||||
playername, playerclass, deathtime, deathcombattime, deathtimestring, playermaxhealth, deathevents, lastcooldown = Details:UnpackDeathTable (deathTable)
|
||||
|
||||
|
||||
isMythicOverallSegment, segmentID, mythicLevel, EJID, mapID, zoneName, encounterID, encounterName, startedAt, endedAt, runID = Details:UnpackMythicDungeonInfo (combat:GetMythicDungeonInfo())
|
||||
extract information from the mythic dungeon table for the combat.
|
||||
|
||||
Container Object:
|
||||
=======================================
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
## Interface: 70200
|
||||
## Interface: 70300
|
||||
## Title: Details
|
||||
## Notes: Computes detailed infos about combats.
|
||||
## SavedVariables: _detalhes_global
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
-- make into AceComm.
|
||||
-- @class file
|
||||
-- @name AceComm-3.0
|
||||
-- @release $Id: AceComm-3.0.lua 1107 2014-02-19 16:40:32Z nevcairiel $
|
||||
-- @release $Id: AceComm-3.0.lua 1161 2017-08-12 14:30:16Z funkydude $
|
||||
|
||||
--[[ AceComm-3.0
|
||||
|
||||
@@ -17,15 +17,14 @@ TODO: Time out old data rotting around from dead senders? Not a HUGE deal since
|
||||
|
||||
]]
|
||||
|
||||
local MAJOR, MINOR = "AceComm-3.0", 9
|
||||
local CallbackHandler = LibStub("CallbackHandler-1.0")
|
||||
local CTL = assert(ChatThrottleLib, "AceComm-3.0 requires ChatThrottleLib")
|
||||
|
||||
local MAJOR, MINOR = "AceComm-3.0", 10
|
||||
local AceComm,oldminor = LibStub:NewLibrary(MAJOR, MINOR)
|
||||
|
||||
if not AceComm then return end
|
||||
|
||||
local CallbackHandler = LibStub:GetLibrary("CallbackHandler-1.0")
|
||||
local CTL = assert(ChatThrottleLib, "AceComm-3.0 requires ChatThrottleLib")
|
||||
|
||||
-- Lua APIs
|
||||
local type, next, pairs, tostring = type, next, pairs, tostring
|
||||
local strsub, strfind = string.sub, string.find
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
|
||||
local dversion = 54
|
||||
local dversion = 55
|
||||
local major, minor = "DetailsFramework-1.0", dversion
|
||||
local DF, oldminor = LibStub:NewLibrary (major, minor)
|
||||
|
||||
|
||||
+102
-85
@@ -1223,13 +1223,27 @@ function DF:IconPick (callback, close_when_select, param1, param2)
|
||||
DF.IconPickFrame:SetHeight (227)
|
||||
DF.IconPickFrame:EnableMouse (true)
|
||||
DF.IconPickFrame:SetMovable (true)
|
||||
DF.IconPickFrame:SetBackdrop ({bgFile = DF.folder .. "background", edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
|
||||
tile = true, tileSize = 32, edgeSize = 32, insets = {left = 5, right = 5, top = 5, bottom = 5}})
|
||||
|
||||
DF.IconPickFrame:SetBackdropBorderColor (170/255, 170/255, 170/255)
|
||||
DF.IconPickFrame:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
|
||||
DF.IconPickFrame:SetBackdropBorderColor (0, 0, 0)
|
||||
DF.IconPickFrame:SetBackdropColor (24/255, 24/255, 24/255, .8)
|
||||
DF.IconPickFrame:SetFrameLevel (1)
|
||||
|
||||
DF.IconPickFrame:SetScript ("OnMouseDown", function (self)
|
||||
if (not self.isMoving) then
|
||||
DF.IconPickFrame:StartMoving()
|
||||
self.isMoving = true
|
||||
end
|
||||
end)
|
||||
|
||||
DF.IconPickFrame:SetScript ("OnMouseUp", function (self)
|
||||
if (self.isMoving) then
|
||||
DF.IconPickFrame:StopMovingOrSizing()
|
||||
self.isMoving = nil
|
||||
end
|
||||
end)
|
||||
|
||||
DF.IconPickFrame.emptyFunction = function() end
|
||||
DF.IconPickFrame.callback = DF.IconPickFrame.emptyFunction
|
||||
|
||||
@@ -1267,37 +1281,37 @@ function DF:IconPick (callback, close_when_select, param1, param2)
|
||||
close_button:SetFrameLevel (close_button:GetFrameLevel()+2)
|
||||
|
||||
local MACRO_ICON_FILENAMES = {}
|
||||
DF.IconPickFrame:SetScript ("OnShow", function()
|
||||
local SPELLNAMES_CACHE = {}
|
||||
|
||||
MACRO_ICON_FILENAMES = {};
|
||||
MACRO_ICON_FILENAMES[1] = "INV_MISC_QUESTIONMARK";
|
||||
DF.IconPickFrame:SetScript ("OnShow", function()
|
||||
|
||||
MACRO_ICON_FILENAMES [1] = "INV_MISC_QUESTIONMARK";
|
||||
local index = 2;
|
||||
|
||||
for i = 1, GetNumSpellTabs() do
|
||||
local tab, tabTex, offset, numSpells, _ = GetSpellTabInfo(i);
|
||||
offset = offset + 1;
|
||||
local tabEnd = offset + numSpells;
|
||||
local tab, tabTex, offset, numSpells, _ = GetSpellTabInfo (i)
|
||||
offset = offset + 1
|
||||
local tabEnd = offset + numSpells
|
||||
|
||||
for j = offset, tabEnd - 1 do
|
||||
--to get spell info by slot, you have to pass in a pet argument
|
||||
local spellType, ID = GetSpellBookItemInfo(j, "player");
|
||||
local spellType, ID = GetSpellBookItemInfo (j, "player")
|
||||
if (spellType ~= "FUTURESPELL") then
|
||||
local spellTexture = strupper(GetSpellBookItemTexture(j, "player"));
|
||||
if ( not string.match( spellTexture, "INTERFACE\\BUTTONS\\") ) then
|
||||
MACRO_ICON_FILENAMES[index] = gsub( spellTexture, "INTERFACE\\ICONS\\", "");
|
||||
index = index + 1;
|
||||
end
|
||||
end
|
||||
if (spellType == "FLYOUT") then
|
||||
local _, _, numSlots, isKnown = GetFlyoutInfo(ID);
|
||||
MACRO_ICON_FILENAMES [index] = GetSpellBookItemTexture (j, "player") or 0
|
||||
index = index + 1;
|
||||
|
||||
elseif (spellType == "FLYOUT") then
|
||||
local _, _, numSlots, isKnown = GetFlyoutInfo (ID)
|
||||
if (isKnown and numSlots > 0) then
|
||||
for k = 1, numSlots do
|
||||
local spellID, overrideSpellID, isKnown = GetFlyoutSlotInfo(ID, k)
|
||||
local spellID, overrideSpellID, isKnown = GetFlyoutSlotInfo (ID, k)
|
||||
if (isKnown) then
|
||||
MACRO_ICON_FILENAMES[index] = gsub( strupper(GetSpellTexture(spellID)), "INTERFACE\\ICONS\\", "");
|
||||
MACRO_ICON_FILENAMES [index] = GetSpellTexture (spellID) or 0
|
||||
index = index + 1;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1305,12 +1319,12 @@ function DF:IconPick (callback, close_when_select, param1, param2)
|
||||
GetLooseMacroItemIcons (MACRO_ICON_FILENAMES)
|
||||
GetLooseMacroIcons (MACRO_ICON_FILENAMES)
|
||||
GetMacroIcons (MACRO_ICON_FILENAMES)
|
||||
GetMacroItemIcons (MACRO_ICON_FILENAMES )
|
||||
|
||||
GetMacroItemIcons (MACRO_ICON_FILENAMES)
|
||||
|
||||
end)
|
||||
|
||||
DF.IconPickFrame:SetScript ("OnHide", function()
|
||||
MACRO_ICON_FILENAMES = nil;
|
||||
wipe (MACRO_ICON_FILENAMES)
|
||||
collectgarbage()
|
||||
end)
|
||||
|
||||
@@ -1454,77 +1468,61 @@ function DF:IconPick (callback, close_when_select, param1, param2)
|
||||
if (DF.IconPickFrame.searching) then
|
||||
filter = string_lower (DF.IconPickFrame.searching)
|
||||
end
|
||||
|
||||
local pool
|
||||
local shown = 0
|
||||
|
||||
if (filter and filter ~= "") then
|
||||
|
||||
local ignored = 0
|
||||
local tryed = 0
|
||||
local found = 0
|
||||
local type = type
|
||||
local buttons = DF.IconPickFrame.buttons
|
||||
index = 1
|
||||
|
||||
for i = 1, 60 do
|
||||
|
||||
macroPopupIcon = buttons[i].icon
|
||||
macroPopupButton = buttons[i]
|
||||
|
||||
for o = index, numMacroIcons do
|
||||
|
||||
tryed = tryed + 1
|
||||
|
||||
texture = MACRO_ICON_FILENAMES [o]
|
||||
if (type (texture) == "number") then
|
||||
macroPopupIcon:SetToFileData (texture)
|
||||
texture = macroPopupIcon:GetTexture()
|
||||
macroPopupIcon:SetTexture (nil)
|
||||
else
|
||||
texture = "INTERFACE\\ICONS\\" .. texture
|
||||
end
|
||||
|
||||
if (texture and texture:find (filter)) then
|
||||
macroPopupIcon:SetTexture (texture)
|
||||
macroPopupButton:Show()
|
||||
found = found + 1
|
||||
DF.IconPickFrame.last_filter_index = o
|
||||
index = o+1
|
||||
break
|
||||
else
|
||||
ignored = ignored + 1
|
||||
end
|
||||
|
||||
if (#SPELLNAMES_CACHE == 0) then
|
||||
--build name cache
|
||||
local GetSpellInfo = GetSpellInfo
|
||||
for i = 1, #MACRO_ICON_FILENAMES do
|
||||
local spellName = GetSpellInfo (MACRO_ICON_FILENAMES [i])
|
||||
SPELLNAMES_CACHE [i] = spellName or "NULL"
|
||||
end
|
||||
end
|
||||
|
||||
for o = found+1, 60 do
|
||||
macroPopupButton = _G ["DetailsFrameworkIconPickFrameButton"..o]
|
||||
macroPopupButton:Hide()
|
||||
|
||||
--do the filter
|
||||
pool = {}
|
||||
for i = 1, #SPELLNAMES_CACHE do
|
||||
if (SPELLNAMES_CACHE [i]:find (filter)) then
|
||||
pool [#pool+1] = MACRO_ICON_FILENAMES [i]
|
||||
shown = shown + 1
|
||||
end
|
||||
end
|
||||
else
|
||||
for i = 1, 60 do
|
||||
macroPopupIcon = _G ["DetailsFrameworkIconPickFrameButton"..i.."Icon"]
|
||||
macroPopupButton = _G ["DetailsFrameworkIconPickFrameButton"..i]
|
||||
index = (macroPopupOffset * 10) + i
|
||||
texture = MACRO_ICON_FILENAMES [index]
|
||||
if ( index <= numMacroIcons and texture ) then
|
||||
|
||||
if (type (texture) == "number") then
|
||||
macroPopupIcon:SetToFileData (texture)
|
||||
else
|
||||
macroPopupIcon:SetTexture ("INTERFACE\\ICONS\\" .. texture)
|
||||
end
|
||||
|
||||
macroPopupIcon:SetTexCoord (4/64, 60/64, 4/64, 60/64)
|
||||
macroPopupButton.IconID = index
|
||||
macroPopupButton:Show()
|
||||
else
|
||||
macroPopupButton:Hide()
|
||||
end
|
||||
end
|
||||
shown = nil
|
||||
end
|
||||
|
||||
if (not pool) then
|
||||
pool = MACRO_ICON_FILENAMES
|
||||
end
|
||||
|
||||
for i = 1, 60 do
|
||||
macroPopupIcon = _G ["DetailsFrameworkIconPickFrameButton"..i.."Icon"]
|
||||
macroPopupButton = _G ["DetailsFrameworkIconPickFrameButton"..i]
|
||||
index = (macroPopupOffset * 10) + i
|
||||
texture = pool [index]
|
||||
if ( index <= numMacroIcons and texture ) then
|
||||
|
||||
if (type (texture) == "number") then
|
||||
macroPopupIcon:SetTexture (texture)
|
||||
else
|
||||
macroPopupIcon:SetTexture ("INTERFACE\\ICONS\\" .. texture)
|
||||
end
|
||||
|
||||
macroPopupIcon:SetTexCoord (4/64, 60/64, 4/64, 60/64)
|
||||
macroPopupButton.IconID = index
|
||||
macroPopupButton:Show()
|
||||
else
|
||||
macroPopupButton:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
pool = nil
|
||||
|
||||
-- Scrollbar stuff
|
||||
FauxScrollFrame_Update (scroll, ceil (numMacroIcons / 10) , 5, 20 )
|
||||
FauxScrollFrame_Update (scroll, ceil ((shown or numMacroIcons) / 10) , 5, 20 )
|
||||
end
|
||||
|
||||
DF.IconPickFrame.updateFunc = ChecksFrame_Update
|
||||
@@ -3124,6 +3122,16 @@ local gframe_create_line = function (self)
|
||||
spellicon:SetSize (16, 16)
|
||||
f.spellicon = spellicon
|
||||
|
||||
local text = f:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
local textBackground = f:CreateTexture (nil, "artwork")
|
||||
textBackground:SetSize (30, 16)
|
||||
textBackground:SetColorTexture (0, 0, 0, 0.5)
|
||||
textBackground:SetPoint ("bottom", f.ball, "top", 0, -6)
|
||||
text:SetPoint ("center", textBackground, "center")
|
||||
DF:SetFontSize (text, 10)
|
||||
f.text = text
|
||||
f.textBackground = textBackground
|
||||
|
||||
local timeline = f:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
timeline:SetPoint ("bottomright", f, "bottomright", -2, 0)
|
||||
DF:SetFontSize (timeline, 8)
|
||||
@@ -3195,6 +3203,15 @@ local gframe_update = function (self, lines)
|
||||
line.timeline:SetText (data.text)
|
||||
line.timeline:Show()
|
||||
|
||||
if (data.utext) then
|
||||
line.text:Show()
|
||||
line.textBackground:Show()
|
||||
line.text:SetText (data.utext)
|
||||
else
|
||||
line.text:Hide()
|
||||
line.textBackground:Hide()
|
||||
end
|
||||
|
||||
line.data = data
|
||||
|
||||
o = o + 1
|
||||
|
||||
@@ -53,6 +53,16 @@
|
||||
return self.data_inicio, self.data_fim
|
||||
end
|
||||
|
||||
--set the combat date
|
||||
function combate:SetDate (started, ended)
|
||||
if (started and type (started) == "string") then
|
||||
self.data_inicio = started
|
||||
end
|
||||
if (ended and type (ended) == "string") then
|
||||
self.data_fim = ended
|
||||
end
|
||||
end
|
||||
|
||||
--return data for charts
|
||||
function combate:GetTimeData (name)
|
||||
return self.TimeData [name]
|
||||
@@ -90,6 +100,24 @@
|
||||
return self.is_pvp
|
||||
end
|
||||
|
||||
function combate:GetMythicDungeonInfo()
|
||||
return self.is_mythic_dungeon
|
||||
end
|
||||
|
||||
function combate:GetMythicDungeonTrashInfo()
|
||||
return self.is_mythic_dungeon_trash
|
||||
end
|
||||
|
||||
function combate:IsMythicDungeon()
|
||||
local is_segment = self.is_mythic_dungeon_segment
|
||||
local run_id = self.is_mythic_dungeon_run_id
|
||||
return is_segment, run_id
|
||||
end
|
||||
|
||||
function combate:IsMythicDungeonOverall()
|
||||
return self.is_mythic_dungeon and self.is_mythic_dungeon.OverallSegment
|
||||
end
|
||||
|
||||
function combate:GetArenaInfo()
|
||||
return self.is_arena
|
||||
end
|
||||
@@ -500,19 +528,23 @@
|
||||
combate.__add = function (combate1, combate2)
|
||||
|
||||
local all_containers = {combate2 [class_type_dano]._ActorTable, combate2 [class_type_cura]._ActorTable, combate2 [class_type_e_energy]._ActorTable, combate2 [class_type_misc]._ActorTable}
|
||||
local custom_combat
|
||||
if (combate1 ~= _detalhes.tabela_overall) then
|
||||
custom_combat = combate1
|
||||
end
|
||||
|
||||
for class_type, actor_container in ipairs (all_containers) do
|
||||
for _, actor in ipairs (actor_container) do
|
||||
local shadow
|
||||
|
||||
if (class_type == class_type_dano) then
|
||||
shadow = _detalhes.atributo_damage:r_connect_shadow (actor, true)
|
||||
shadow = _detalhes.atributo_damage:r_connect_shadow (actor, true, custom_combat)
|
||||
elseif (class_type == class_type_cura) then
|
||||
shadow = _detalhes.atributo_heal:r_connect_shadow (actor, true)
|
||||
shadow = _detalhes.atributo_heal:r_connect_shadow (actor, true, custom_combat)
|
||||
elseif (class_type == class_type_e_energy) then
|
||||
shadow = _detalhes.atributo_energy:r_connect_shadow (actor, true)
|
||||
shadow = _detalhes.atributo_energy:r_connect_shadow (actor, true, custom_combat)
|
||||
elseif (class_type == class_type_misc) then
|
||||
shadow = _detalhes.atributo_misc:r_connect_shadow (actor, true)
|
||||
shadow = _detalhes.atributo_misc:r_connect_shadow (actor, true, custom_combat)
|
||||
end
|
||||
|
||||
shadow.boss_fight_component = actor.boss_fight_component
|
||||
|
||||
+79
-16
@@ -1553,11 +1553,19 @@
|
||||
|
||||
|
||||
function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, exportar, refresh_needed)
|
||||
|
||||
|
||||
local showing = tabela_do_combate [class_type] --> o que esta sendo mostrado -> [1] - dano [2] - cura --> pega o container com ._NameIndexTable ._ActorTable
|
||||
|
||||
--> não há barras para mostrar -- not have something to show
|
||||
if (#showing._ActorTable < 1) then
|
||||
if (_detalhes.debug) then
|
||||
_detalhes.showing_ActorTable_Timer = _detalhes.showing_ActorTable_Timer or 0
|
||||
if (time() > _detalhes.showing_ActorTable_Timer) then
|
||||
_detalhes:Msg ("(debug) nothing to show -> #showing._ActorTable < 1")
|
||||
_detalhes.showing_ActorTable_Timer = time()+5
|
||||
end
|
||||
end
|
||||
|
||||
--> colocado isso recentemente para fazer as barras de dano sumirem na troca de atributo
|
||||
return _detalhes:EsconderBarrasNaoUsadas (instancia, showing), "", 0, 0
|
||||
end
|
||||
@@ -2002,6 +2010,14 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
end
|
||||
|
||||
if (#conteudo < 1) then
|
||||
if (_detalhes.debug) then
|
||||
_detalhes.showing_ActorTable_Timer2 = _detalhes.showing_ActorTable_Timer2 or 0
|
||||
if (time() > _detalhes.showing_ActorTable_Timer2) then
|
||||
_detalhes:Msg ("(debug) nothing to show -> #conteudo < 1 (using cache)")
|
||||
_detalhes.showing_ActorTable_Timer2 = time()+5
|
||||
end
|
||||
end
|
||||
|
||||
return _detalhes:EsconderBarrasNaoUsadas (instancia, showing), "", 0, 0
|
||||
end
|
||||
|
||||
@@ -2065,6 +2081,15 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
end
|
||||
end
|
||||
instancia:EsconderScrollBar() --> precisaria esconder a scroll bar
|
||||
|
||||
if (_detalhes.debug) then
|
||||
_detalhes.showing_ActorTable_Timer2 = _detalhes.showing_ActorTable_Timer2 or 0
|
||||
if (time() > _detalhes.showing_ActorTable_Timer2) then
|
||||
_detalhes:Msg ("(debug) nothing to show -> amount < 1")
|
||||
_detalhes.showing_ActorTable_Timer2 = time()+5
|
||||
end
|
||||
end
|
||||
|
||||
return _detalhes:EndRefresh (instancia, total, tabela_do_combate, showing) --> retorna a tabela que precisa ganhar o refresh
|
||||
end
|
||||
|
||||
@@ -2278,6 +2303,8 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes.LastFullDamageUpdate = _detalhes._tempo
|
||||
|
||||
return _detalhes:EndRefresh (instancia, total, tabela_do_combate, showing) --> retorna a tabela que precisa ganhar o refresh
|
||||
|
||||
end
|
||||
@@ -2714,19 +2741,23 @@ end
|
||||
elseif (classe == "UNGROUPPLAYER") then
|
||||
if (self.enemy) then
|
||||
if (_detalhes.faction_against == "Horde") then
|
||||
texture:SetTexture ("Interface\\ICONS\\Achievement_Character_Orc_Male")
|
||||
texture:SetTexCoord (0, 1, 0, 1)
|
||||
--texture:SetTexture ("Interface\\ICONS\\Achievement_Character_Orc_Male")
|
||||
texture:SetTexture ("Interface\\ICONS\\PVPCurrency-Honor-Horde.blp")
|
||||
texture:SetTexCoord (0.05, 0.95, 0.05, 0.95)
|
||||
else
|
||||
texture:SetTexture ("Interface\\ICONS\\Achievement_Character_Human_Male")
|
||||
texture:SetTexCoord (0, 1, 0, 1)
|
||||
--texture:SetTexture ("Interface\\ICONS\\Achievement_Character_Human_Male")
|
||||
texture:SetTexture ("Interface\\ICONS\\PVPCurrency-Honor-Alliance.blp")
|
||||
texture:SetTexCoord (0.05, 0.95, 0.05, 0.95)
|
||||
end
|
||||
else
|
||||
if (_detalhes.faction_against == "Horde") then
|
||||
texture:SetTexture ("Interface\\ICONS\\Achievement_Character_Human_Male")
|
||||
texture:SetTexCoord (0, 1, 0, 1)
|
||||
--texture:SetTexture ("Interface\\ICONS\\Achievement_Character_Human_Male")
|
||||
texture:SetTexture ("Interface\\ICONS\\PVPCurrency-Honor-Alliance.blp")
|
||||
texture:SetTexCoord (0.05, 0.95, 0.05, 0.95)
|
||||
else
|
||||
texture:SetTexture ("Interface\\ICONS\\Achievement_Character_Orc_Male")
|
||||
texture:SetTexCoord (0, 1, 0, 1)
|
||||
--texture:SetTexture ("Interface\\ICONS\\Achievement_Character_Orc_Male")
|
||||
texture:SetTexture ("Interface\\ICONS\\PVPCurrency-Honor-Horde.blp")
|
||||
texture:SetTexCoord (0.05, 0.95, 0.05, 0.95)
|
||||
end
|
||||
end
|
||||
texture:SetVertexColor (1, 1, 1)
|
||||
@@ -3903,7 +3934,7 @@ end
|
||||
|
||||
------ Damage Done & Dps
|
||||
function atributo_damage:MontaInfoDamageDone()
|
||||
|
||||
|
||||
local barras = info.barras1
|
||||
local instancia = info.instancia
|
||||
local total = self.total_without_pet --> total de dano aplicado por este jogador
|
||||
@@ -3924,6 +3955,36 @@ function atributo_damage:MontaInfoDamageDone()
|
||||
local nome, _, icone = _GetSpellInfo (_spellid)
|
||||
_table_insert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome, icone, nil, _skill.spellschool})
|
||||
end
|
||||
|
||||
--damage rank
|
||||
--este_gump:SetTopRightTexts (text1, text2, size, color, font)
|
||||
local combat = instancia:GetShowingCombat()
|
||||
local diff = combat:GetDifficulty()
|
||||
local attribute, subattribute = instancia:GetDisplay()
|
||||
|
||||
--> check if is a raid encounter and if is heroic or mythic
|
||||
if (diff and (diff == 15 or diff == 16)) then
|
||||
local db = _detalhes.OpenStorage()
|
||||
if (db) then
|
||||
local bestRank, encounterTable = _detalhes.storage:GetBestFromPlayer (diff, combat:GetBossInfo().id, "damage", self.nome, true)
|
||||
if (bestRank) then
|
||||
--> discover which are the player position in the guild rank
|
||||
local playerTable, onEncounter, rankPosition = _detalhes.storage:GetPlayerGuildRank (diff, combat:GetBossInfo().id, "damage", self.nome, true)
|
||||
|
||||
local text1 = self.nome .. " on " .. combat:GetBossInfo().name .. ":"
|
||||
local text2 = "Guild Rank: " .. (rankPosition or "x") .. " Best Dps: " .. _detalhes:ToK2 ((bestRank[1] or 0) / encounterTable.elapsed) .. " (" .. encounterTable.date:gsub (".*%s", "") .. ")"
|
||||
|
||||
info:SetTopRightTexts (text1, text2, 9, "gray", font)
|
||||
else
|
||||
info:SetTopRightTexts()
|
||||
end
|
||||
else
|
||||
info:SetTopRightTexts()
|
||||
end
|
||||
else
|
||||
info:SetTopRightTexts()
|
||||
end
|
||||
|
||||
|
||||
--> add pets
|
||||
local ActorPets = self.pets
|
||||
@@ -3976,10 +4037,10 @@ function atributo_damage:MontaInfoDamageDone()
|
||||
|
||||
if (info.sub_atributo == 2) then
|
||||
local formated_value = SelectedToKFunction (_, _math_floor (tabela[2]/meu_tempo))
|
||||
self:UpdadeInfoBar (barra, index-1, tabela[1], name, tabela[2], formated_value, max_, tabela[3], tabela[5], true, nil, tabela [7])
|
||||
self:UpdadeInfoBar (barra, index, tabela[1], name, tabela[2], formated_value, max_, tabela[3], tabela[5], true, nil, tabela [7])
|
||||
else
|
||||
local formated_value = SelectedToKFunction (_, _math_floor (tabela[2]))
|
||||
self:UpdadeInfoBar (barra, index-1, tabela[1], name, tabela[2], formated_value, max_, tabela[3], tabela[5], true, nil, tabela [7])
|
||||
self:UpdadeInfoBar (barra, index, tabela[1], name, tabela[2], formated_value, max_, tabela[3], tabela[5], true, nil, tabela [7])
|
||||
end
|
||||
|
||||
self:FocusLock (barra, tabela[1])
|
||||
@@ -4926,10 +4987,12 @@ end
|
||||
return shadow
|
||||
end
|
||||
|
||||
function atributo_damage:r_connect_shadow (actor, no_refresh)
|
||||
function atributo_damage:r_connect_shadow (actor, no_refresh, combat_object)
|
||||
|
||||
local host_combat = combat_object or _detalhes.tabela_overall
|
||||
|
||||
--> criar uma shadow desse ator se ainda não tiver uma
|
||||
local overall_dano = _detalhes.tabela_overall [1]
|
||||
local overall_dano = host_combat [1]
|
||||
local shadow = overall_dano._ActorTable [overall_dano._NameIndexTable [actor.nome]]
|
||||
|
||||
if (not shadow) then
|
||||
@@ -4973,9 +5036,9 @@ end
|
||||
shadow.friendlyfire_total = shadow.friendlyfire_total + actor.friendlyfire_total
|
||||
|
||||
--> total no combate overall (captura de dados)
|
||||
_detalhes.tabela_overall.totals[1] = _detalhes.tabela_overall.totals[1] + actor.total
|
||||
host_combat.totals[1] = host_combat.totals[1] + actor.total
|
||||
if (actor.grupo) then
|
||||
_detalhes.tabela_overall.totals_grupo[1] = _detalhes.tabela_overall.totals_grupo[1] + actor.total
|
||||
host_combat.totals_grupo[1] = host_combat.totals_grupo[1] + actor.total
|
||||
end
|
||||
|
||||
--> copia o damage_from (captura de dados)
|
||||
|
||||
@@ -1395,10 +1395,12 @@ end
|
||||
return shadow
|
||||
end
|
||||
|
||||
function atributo_energy:r_connect_shadow (actor, no_refresh)
|
||||
function atributo_energy:r_connect_shadow (actor, no_refresh, combat_object)
|
||||
|
||||
local host_combat = combat_object or _detalhes.tabela_overall
|
||||
|
||||
--> criar uma shadow desse ator se ainda não tiver uma
|
||||
local overall_energy = _detalhes.tabela_overall [3]
|
||||
local overall_energy = host_combat [3]
|
||||
local shadow = overall_energy._ActorTable [overall_energy._NameIndexTable [actor.nome]]
|
||||
|
||||
if (not shadow) then
|
||||
@@ -1438,10 +1440,10 @@ end
|
||||
end
|
||||
|
||||
--> total no combate overall (captura de dados)
|
||||
_detalhes.tabela_overall.totals[3] [actor.powertype] = _detalhes.tabela_overall.totals[3] [actor.powertype] + actor.total
|
||||
host_combat.totals[3] [actor.powertype] = host_combat.totals[3] [actor.powertype] + actor.total
|
||||
|
||||
if (actor.grupo) then
|
||||
_detalhes.tabela_overall.totals_grupo[3][actor.powertype] = _detalhes.tabela_overall.totals_grupo[3][actor.powertype] + actor.total
|
||||
host_combat.totals_grupo[3][actor.powertype] = host_combat.totals_grupo[3][actor.powertype] + actor.total
|
||||
end
|
||||
|
||||
--> targets
|
||||
|
||||
@@ -2404,10 +2404,12 @@ end
|
||||
return shadow
|
||||
end
|
||||
|
||||
function atributo_heal:r_connect_shadow (actor, no_refresh)
|
||||
function atributo_heal:r_connect_shadow (actor, no_refresh, combat_object)
|
||||
|
||||
local host_combat = combat_object or _detalhes.tabela_overall
|
||||
|
||||
--> criar uma shadow desse ator se ainda não tiver uma
|
||||
local overall_cura = _detalhes.tabela_overall [2]
|
||||
local overall_cura = host_combat [2]
|
||||
local shadow = overall_cura._ActorTable [overall_cura._NameIndexTable [actor.nome]]
|
||||
|
||||
if (not shadow) then
|
||||
@@ -2457,9 +2459,9 @@ end
|
||||
shadow.healing_taken = shadow.healing_taken + actor.healing_taken
|
||||
|
||||
--> total no combate overall (captura de dados)
|
||||
_detalhes.tabela_overall.totals[2] = _detalhes.tabela_overall.totals[2] + actor.total
|
||||
host_combat.totals[2] = host_combat.totals[2] + actor.total
|
||||
if (actor.grupo) then
|
||||
_detalhes.tabela_overall.totals_grupo[2] = _detalhes.tabela_overall.totals_grupo[2] + actor.total
|
||||
host_combat.totals_grupo[2] = host_combat.totals_grupo[2] + actor.total
|
||||
end
|
||||
|
||||
--> copia o healing_from (captura de dados)
|
||||
|
||||
@@ -2825,7 +2825,10 @@ local function GetDpsHps (_thisActor, key)
|
||||
end
|
||||
end
|
||||
|
||||
-- report_table: table sent to report func / data: numeric table {{value1, value2}} / f1: format value1 / f2: format value2
|
||||
-- table sent to report func / f1: format value1 / f2: format value2
|
||||
-- report_table = a table header: {"report results for:"}
|
||||
-- data = table with {{value1 (string), value2 ( the value)} , {value1 (string), value2 ( the value)}}
|
||||
|
||||
local default_format_value1 = function (v) return v end
|
||||
local default_format_value2 = function (v) return v end
|
||||
local default_format_value3 = function (i, v1, v2)
|
||||
@@ -3179,6 +3182,26 @@ function _detalhes:envia_relatorio (linhas, custom)
|
||||
end
|
||||
end
|
||||
|
||||
local isMythicDungeon = _detalhes.tabela_vigente:IsMythicDungeon()
|
||||
if (isMythicDungeon) then
|
||||
local mythicDungeonInfo = _detalhes.tabela_vigente:GetMythicDungeonInfo()
|
||||
if (mythicDungeonInfo) then
|
||||
local isMythicOverallSegment, segmentID, mythicLevel, EJID, mapID, zoneName, encounterID, encounterName, startedAt, endedAt, runID = _detalhes:UnpackMythicDungeonInfo (mythicDungeonInfo)
|
||||
|
||||
if (isMythicOverallSegment) then
|
||||
luta = zoneName .. " +" .. mythicLevel .. " (" .. Loc ["STRING_SEGMENTS_LIST_OVERALL"] .. ")"
|
||||
else
|
||||
if (segmentID == "trashoverall") then
|
||||
luta = encounterName .. " (" .. Loc ["STRING_SEGMENTS_LIST_TRASH"] .. ")"
|
||||
else
|
||||
luta = encounterName .. " (" .. Loc ["STRING_SEGMENTS_LIST_BOSS"] .. ")"
|
||||
end
|
||||
end
|
||||
else
|
||||
luta = Loc ["STRING_SEGMENTS_LIST_TRASH"]
|
||||
end
|
||||
end
|
||||
|
||||
if (not luta) then
|
||||
if (_detalhes.tabela_vigente.enemy) then
|
||||
luta = _detalhes.tabela_vigente.enemy
|
||||
@@ -3207,6 +3230,27 @@ function _detalhes:envia_relatorio (linhas, custom)
|
||||
end
|
||||
end
|
||||
|
||||
local thisSegment = _detalhes.tabela_historico.tabelas[1]
|
||||
local isMythicDungeon = thisSegment:IsMythicDungeon()
|
||||
if (isMythicDungeon) then
|
||||
local mythicDungeonInfo = thisSegment:GetMythicDungeonInfo()
|
||||
if (mythicDungeonInfo) then
|
||||
local isMythicOverallSegment, segmentID, mythicLevel, EJID, mapID, zoneName, encounterID, encounterName, startedAt, endedAt, runID = _detalhes:UnpackMythicDungeonInfo (mythicDungeonInfo)
|
||||
|
||||
if (isMythicOverallSegment) then
|
||||
luta = zoneName .. " +" .. mythicLevel .. " (" .. Loc ["STRING_SEGMENTS_LIST_OVERALL"] .. ")"
|
||||
else
|
||||
if (segmentID == "trashoverall") then
|
||||
luta = encounterName .. " (" .. Loc ["STRING_SEGMENTS_LIST_TRASH"] .. ")"
|
||||
else
|
||||
luta = encounterName .. " (" .. Loc ["STRING_SEGMENTS_LIST_BOSS"] .. ")"
|
||||
end
|
||||
end
|
||||
else
|
||||
luta = Loc ["STRING_SEGMENTS_LIST_TRASH"]
|
||||
end
|
||||
end
|
||||
|
||||
if (not luta) then
|
||||
if (_detalhes.tabela_historico.tabelas[1].enemy) then
|
||||
luta = _detalhes.tabela_historico.tabelas[1].enemy .. " (" .. Loc ["STRING_REPORT_LASTFIGHT"] .. ")"
|
||||
@@ -3234,6 +3278,27 @@ function _detalhes:envia_relatorio (linhas, custom)
|
||||
end
|
||||
end
|
||||
|
||||
local thisSegment = _detalhes.tabela_historico.tabelas [segmento]
|
||||
local isMythicDungeon = thisSegment:IsMythicDungeon()
|
||||
if (isMythicDungeon) then
|
||||
local mythicDungeonInfo = thisSegment:GetMythicDungeonInfo()
|
||||
if (mythicDungeonInfo) then
|
||||
local isMythicOverallSegment, segmentID, mythicLevel, EJID, mapID, zoneName, encounterID, encounterName, startedAt, endedAt, runID = _detalhes:UnpackMythicDungeonInfo (mythicDungeonInfo)
|
||||
|
||||
if (isMythicOverallSegment) then
|
||||
luta = zoneName .. " +" .. mythicLevel .. " (" .. Loc ["STRING_SEGMENTS_LIST_OVERALL"] .. ")"
|
||||
else
|
||||
if (segmentID == "trashoverall") then
|
||||
luta = encounterName .. " (" .. Loc ["STRING_SEGMENTS_LIST_TRASH"] .. ")"
|
||||
else
|
||||
luta = encounterName .. " (" .. Loc ["STRING_SEGMENTS_LIST_BOSS"] .. ")"
|
||||
end
|
||||
end
|
||||
else
|
||||
luta = Loc ["STRING_SEGMENTS_LIST_TRASH"]
|
||||
end
|
||||
end
|
||||
|
||||
if (not luta) then
|
||||
if (_detalhes.tabela_historico.tabelas[segmento].enemy) then
|
||||
luta = _detalhes.tabela_historico.tabelas[segmento].enemy .. " (" .. segmento .. " " .. Loc ["STRING_REPORT_PREVIOUSFIGHTS"] .. ")"
|
||||
|
||||
+36
-28
@@ -230,10 +230,11 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown)
|
||||
end
|
||||
else
|
||||
--> heal
|
||||
GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%)", 1, "white", "white")
|
||||
GameCooltip:AddIcon (spellicon)
|
||||
GameCooltip:AddStatusBar (hp, 1, "green", true) --, backgroud_bar_heal
|
||||
|
||||
if (amount > _detalhes.deathlog_healingdone_min) then
|
||||
GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%)", 1, "white", "white")
|
||||
GameCooltip:AddIcon (spellicon)
|
||||
GameCooltip:AddStatusBar (hp, 1, "green", true) --, backgroud_bar_heal
|
||||
end
|
||||
end
|
||||
|
||||
elseif (type (evtype) == "number") then
|
||||
@@ -391,20 +392,25 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia)
|
||||
end
|
||||
|
||||
elseif (not evento [1] and type (evento [1]) == "boolean") then --> heal
|
||||
local elapsed = _cstr ("%.1f", evento [4] - time_of_death) .."s"
|
||||
local spelllink = GetSpellLink (evento [2])
|
||||
local source = _detalhes:GetOnlyName (evento [6])
|
||||
local spellname, _, spellicon = _GetSpellInfo (evento [2])
|
||||
|
||||
local amount = evento [3]
|
||||
local hp = _math_floor (evento [5] / max_health * 100)
|
||||
if (hp > 100) then
|
||||
hp = 100
|
||||
end
|
||||
|
||||
if (amount > _detalhes.deathlog_healingdone_min) then
|
||||
local elapsed = _cstr ("%.1f", evento [4] - time_of_death) .."s"
|
||||
local spelllink = GetSpellLink (evento [2])
|
||||
local source = _detalhes:GetOnlyName (evento [6])
|
||||
local spellname, _, spellicon = _GetSpellInfo (evento [2])
|
||||
|
||||
local hp = _math_floor (evento [5] / max_health * 100)
|
||||
if (hp > 100) then
|
||||
hp = 100
|
||||
end
|
||||
|
||||
if (_detalhes.report_heal_links) then
|
||||
tinsert (report_array, {elapsed .. " ", spelllink, " (" .. source .. ")", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%) "})
|
||||
else
|
||||
tinsert (report_array, {elapsed .. " ", spellname, " (" .. source .. ")", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%) "})
|
||||
if (_detalhes.report_heal_links) then
|
||||
tinsert (report_array, {elapsed .. " ", spelllink, " (" .. source .. ")", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%) "})
|
||||
else
|
||||
tinsert (report_array, {elapsed .. " ", spellname, " (" .. source .. ")", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%) "})
|
||||
end
|
||||
end
|
||||
|
||||
elseif (type (evento [1]) == "number" and evento [1] == 4) then --> debuff
|
||||
@@ -2407,10 +2413,12 @@ local somar_habilidades = function (container1, container2)
|
||||
end
|
||||
end
|
||||
|
||||
function atributo_misc:r_connect_shadow (actor, no_refresh)
|
||||
function atributo_misc:r_connect_shadow (actor, no_refresh, combat_object)
|
||||
|
||||
local host_combat = combat_object or _detalhes.tabela_overall
|
||||
|
||||
--> criar uma shadow desse ator se ainda não tiver uma
|
||||
local overall_misc = _detalhes.tabela_overall [4]
|
||||
local overall_misc = host_combat [4]
|
||||
local shadow = overall_misc._ActorTable [overall_misc._NameIndexTable [actor.nome]]
|
||||
|
||||
if (not actor.nome) then
|
||||
@@ -2467,9 +2475,9 @@ function atributo_misc:r_connect_shadow (actor, no_refresh)
|
||||
end
|
||||
|
||||
shadow.cooldowns_defensive = shadow.cooldowns_defensive + actor.cooldowns_defensive
|
||||
_detalhes.tabela_overall.totals[4].cooldowns_defensive = _detalhes.tabela_overall.totals[4].cooldowns_defensive + actor.cooldowns_defensive
|
||||
host_combat.totals[4].cooldowns_defensive = host_combat.totals[4].cooldowns_defensive + actor.cooldowns_defensive
|
||||
if (actor.grupo) then
|
||||
_detalhes.tabela_overall.totals_grupo[4].cooldowns_defensive = _detalhes.tabela_overall.totals_grupo[4].cooldowns_defensive + actor.cooldowns_defensive
|
||||
host_combat.totals_grupo[4].cooldowns_defensive = host_combat.totals_grupo[4].cooldowns_defensive + actor.cooldowns_defensive
|
||||
end
|
||||
|
||||
somar_alvos (shadow.cooldowns_defensive_targets, actor.cooldowns_defensive_targets)
|
||||
@@ -2536,9 +2544,9 @@ function atributo_misc:r_connect_shadow (actor, no_refresh)
|
||||
end
|
||||
|
||||
shadow.interrupt = shadow.interrupt + actor.interrupt
|
||||
_detalhes.tabela_overall.totals[4].interrupt = _detalhes.tabela_overall.totals[4].interrupt + actor.interrupt
|
||||
host_combat.totals[4].interrupt = host_combat.totals[4].interrupt + actor.interrupt
|
||||
if (actor.grupo) then
|
||||
_detalhes.tabela_overall.totals_grupo[4].interrupt = _detalhes.tabela_overall.totals_grupo[4].interrupt + actor.interrupt
|
||||
host_combat.totals_grupo[4].interrupt = host_combat.totals_grupo[4].interrupt + actor.interrupt
|
||||
end
|
||||
|
||||
somar_alvos (shadow.interrupt_targets, actor.interrupt_targets)
|
||||
@@ -2567,9 +2575,9 @@ function atributo_misc:r_connect_shadow (actor, no_refresh)
|
||||
end
|
||||
|
||||
shadow.ress = shadow.ress + actor.ress
|
||||
_detalhes.tabela_overall.totals[4].ress = _detalhes.tabela_overall.totals[4].ress + actor.ress
|
||||
host_combat.totals[4].ress = host_combat.totals[4].ress + actor.ress
|
||||
if (actor.grupo) then
|
||||
_detalhes.tabela_overall.totals_grupo[4].ress = _detalhes.tabela_overall.totals_grupo[4].ress + actor.ress
|
||||
host_combat.totals_grupo[4].ress = host_combat.totals_grupo[4].ress + actor.ress
|
||||
end
|
||||
|
||||
somar_alvos (shadow.ress_targets, actor.ress_targets)
|
||||
@@ -2586,9 +2594,9 @@ function atributo_misc:r_connect_shadow (actor, no_refresh)
|
||||
end
|
||||
|
||||
shadow.dispell = shadow.dispell + actor.dispell
|
||||
_detalhes.tabela_overall.totals[4].dispell = _detalhes.tabela_overall.totals[4].dispell + actor.dispell
|
||||
host_combat.totals[4].dispell = host_combat.totals[4].dispell + actor.dispell
|
||||
if (actor.grupo) then
|
||||
_detalhes.tabela_overall.totals_grupo[4].dispell = _detalhes.tabela_overall.totals_grupo[4].dispell + actor.dispell
|
||||
host_combat.totals_grupo[4].dispell = host_combat.totals_grupo[4].dispell + actor.dispell
|
||||
end
|
||||
|
||||
somar_alvos (shadow.dispell_targets, actor.dispell_targets)
|
||||
@@ -2616,9 +2624,9 @@ function atributo_misc:r_connect_shadow (actor, no_refresh)
|
||||
end
|
||||
|
||||
shadow.cc_break = shadow.cc_break + actor.cc_break
|
||||
_detalhes.tabela_overall.totals[4].cc_break = _detalhes.tabela_overall.totals[4].cc_break + actor.cc_break
|
||||
host_combat.totals[4].cc_break = host_combat.totals[4].cc_break + actor.cc_break
|
||||
if (actor.grupo) then
|
||||
_detalhes.tabela_overall.totals_grupo[4].cc_break = _detalhes.tabela_overall.totals_grupo[4].cc_break + actor.cc_break
|
||||
host_combat.totals_grupo[4].cc_break = host_combat.totals_grupo[4].cc_break + actor.cc_break
|
||||
end
|
||||
|
||||
somar_alvos (shadow.cc_break_targets, actor.cc_break_targets)
|
||||
|
||||
@@ -184,8 +184,9 @@
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
novo_objeto.classe = "UNKNOW"
|
||||
return
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
@@ -201,6 +202,12 @@
|
||||
novo_objeto.displayName = _detalhes:GetNickname (serial, false, true) --> serial, default, silent
|
||||
end
|
||||
if (not novo_objeto.displayName) then
|
||||
if (_detalhes.remove_realm_from_name) then
|
||||
novo_objeto.displayName = nome:gsub (("%-.*"), "")
|
||||
else
|
||||
novo_objeto.displayName = nome
|
||||
end
|
||||
--[=[
|
||||
|
||||
if (_IsInInstance() and _detalhes.remove_realm_from_name) then
|
||||
novo_objeto.displayName = nome:gsub (("%-.*"), "")
|
||||
@@ -211,6 +218,11 @@
|
||||
else
|
||||
novo_objeto.displayName = nome
|
||||
end
|
||||
--]=]
|
||||
end
|
||||
|
||||
if (_detalhes.all_players_are_group or _detalhes.immersion_enabled) then
|
||||
novo_objeto.grupo = true
|
||||
end
|
||||
|
||||
if ((_bit_band (flag, IS_GROUP_OBJECT) ~= 0 and novo_objeto.classe ~= "UNKNOW" and novo_objeto.classe ~= "UNGROUPPLAYER") or _detalhes:IsInCache (serial)) then
|
||||
@@ -486,7 +498,8 @@
|
||||
|
||||
if (self.tipo == container_damage) then --> CONTAINER DAMAGE
|
||||
|
||||
get_actor_class (novo_objeto, nome, flag, serial)
|
||||
local shouldScanOnce = get_actor_class (novo_objeto, nome, flag, serial)
|
||||
|
||||
read_actor_flag (novo_objeto, dono_do_pet, serial, flag, nome, "damage")
|
||||
|
||||
if (dono_do_pet) then
|
||||
@@ -508,6 +521,10 @@
|
||||
if (self.shadow) then --> não executar 2x
|
||||
_detalhes:ScheduleTimer ("GuessClass", 1, {novo_objeto, self, 1})
|
||||
end
|
||||
|
||||
elseif (shouldScanOnce) then
|
||||
|
||||
|
||||
end
|
||||
|
||||
if (novo_objeto.isTank) then
|
||||
@@ -516,7 +533,7 @@
|
||||
|
||||
elseif (self.tipo == container_heal) then --> CONTAINER HEALING
|
||||
|
||||
get_actor_class (novo_objeto, nome, flag, serial)
|
||||
local shouldScanOnce = get_actor_class (novo_objeto, nome, flag, serial)
|
||||
read_actor_flag (novo_objeto, dono_do_pet, serial, flag, nome, "heal")
|
||||
|
||||
if (dono_do_pet) then
|
||||
@@ -543,7 +560,7 @@
|
||||
|
||||
elseif (self.tipo == container_energy) then --> CONTAINER ENERGY
|
||||
|
||||
get_actor_class (novo_objeto, nome, flag, serial)
|
||||
local shouldScanOnce = get_actor_class (novo_objeto, nome, flag, serial)
|
||||
read_actor_flag (novo_objeto, dono_do_pet, serial, flag, nome, "energy")
|
||||
|
||||
if (dono_do_pet) then
|
||||
@@ -563,7 +580,7 @@
|
||||
|
||||
elseif (self.tipo == container_misc) then --> CONTAINER MISC
|
||||
|
||||
get_actor_class (novo_objeto, nome, flag, serial)
|
||||
local shouldScanOnce = get_actor_class (novo_objeto, nome, flag, serial)
|
||||
read_actor_flag (novo_objeto, dono_do_pet, serial, flag, nome, "misc")
|
||||
|
||||
--local teste_classe =
|
||||
@@ -603,7 +620,7 @@
|
||||
|
||||
elseif (self.tipo == container_friendlyfire) then --> CONTAINER FRIENDLY FIRE
|
||||
|
||||
get_actor_class (novo_objeto, nome, serial)
|
||||
local shouldScanOnce = get_actor_class (novo_objeto, nome, serial)
|
||||
|
||||
end
|
||||
|
||||
|
||||
@@ -435,7 +435,14 @@ function historico:resetar()
|
||||
_detalhes:UpdateParserGears()
|
||||
|
||||
if (not InCombatLockdown() and not UnitAffectingCombat ("player")) then
|
||||
collectgarbage()
|
||||
--> workarround for the "script run too long" issue while outside the combat lockdown
|
||||
local cleargarbage = function()
|
||||
collectgarbage()
|
||||
end
|
||||
local successful, errortext = pcall (cleargarbage)
|
||||
if (not successful) then
|
||||
_detalhes:Msg ("couldn't call collectgarbage()")
|
||||
end
|
||||
else
|
||||
_detalhes.schedule_hard_garbage_collect = true
|
||||
end
|
||||
|
||||
+48
-27
@@ -146,7 +146,7 @@
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
_detalhes.tabela_vigente.is_boss = boss_table
|
||||
|
||||
if (_detalhes.in_combat and not _detalhes.leaving_combat) then
|
||||
@@ -239,7 +239,7 @@
|
||||
end
|
||||
|
||||
--try to get the encounter name after the encounter (can be called during the combat as well)
|
||||
function _detalhes:FindBoss()
|
||||
function _detalhes:FindBoss (noJournalSearch)
|
||||
|
||||
if (_detalhes.encounter_table.name) then
|
||||
local encounter_table = _detalhes.encounter_table
|
||||
@@ -269,24 +269,27 @@
|
||||
end
|
||||
end
|
||||
|
||||
local in_instance = IsInInstance() --> garrison returns party as instance type.
|
||||
if ((InstanceType == "party" or InstanceType == "raid") and in_instance) then
|
||||
local boss_list = _detalhes:GetCurrentDungeonBossListFromEJ()
|
||||
if (boss_list) then
|
||||
local ActorsContainer = _detalhes.tabela_vigente [class_type_dano]._ActorTable
|
||||
if (ActorsContainer) then
|
||||
for index, Actor in _ipairs (ActorsContainer) do
|
||||
if (not Actor.grupo) then
|
||||
if (boss_list [Actor.nome]) then
|
||||
Actor.boss = true
|
||||
return boss_found_not_registered (boss_list [Actor.nome], ZoneName, ZoneMapID, DifficultyID)
|
||||
noJournalSearch = true --> disabling the scan on encounter journal
|
||||
|
||||
if (not noJournalSearch) then
|
||||
local in_instance = IsInInstance() --> garrison returns party as instance type.
|
||||
if ((InstanceType == "party" or InstanceType == "raid") and in_instance) then
|
||||
local boss_list = _detalhes:GetCurrentDungeonBossListFromEJ()
|
||||
if (boss_list) then
|
||||
local ActorsContainer = _detalhes.tabela_vigente [class_type_dano]._ActorTable
|
||||
if (ActorsContainer) then
|
||||
for index, Actor in _ipairs (ActorsContainer) do
|
||||
if (not Actor.grupo) then
|
||||
if (boss_list [Actor.nome]) then
|
||||
Actor.boss = true
|
||||
return boss_found_not_registered (boss_list [Actor.nome], ZoneName, ZoneMapID, DifficultyID)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
@@ -460,12 +463,13 @@
|
||||
_detalhes:CatchRaidDebuffUptime ("DEBUFF_UPTIME_OUT")
|
||||
_detalhes:CloseEnemyDebuffsUptime()
|
||||
|
||||
--> pega a zona do jogador e vê se foi uma luta contra um Boss -- identifica se a luta foi com um boss
|
||||
--> check if this isn't a boss and try to find a boss in the segment
|
||||
if (not _detalhes.tabela_vigente.is_boss) then
|
||||
|
||||
--> function which runs after a boss encounter to try recognize a encounter
|
||||
|
||||
--> if this is a mythic+ dungeon, do not scan for encounter journal boss names in the actor list
|
||||
_detalhes:FindBoss()
|
||||
|
||||
--> still didn't find the boss
|
||||
if (not _detalhes.tabela_vigente.is_boss) then
|
||||
local ZoneName, _, DifficultyID, _, _, _, _, ZoneMapID = _GetInstanceInfo()
|
||||
local findboss = _detalhes:GetRaidBossFindFunction (ZoneMapID)
|
||||
@@ -512,6 +516,7 @@
|
||||
local encounterID, encounterName, difficultyID, raidSize, endStatus = unpack (from_encounter_end)
|
||||
|
||||
if (encounterID) then
|
||||
|
||||
local ZoneName, InstanceType, DifficultyID, DifficultyName, _, _, _, ZoneMapID = GetInstanceInfo()
|
||||
local ejid = EJ_GetCurrentInstance()
|
||||
if (ejid == 0) then
|
||||
@@ -531,8 +536,14 @@
|
||||
id = encounterID,
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--> tag as a mythic dungeon segment, can be any type of segment, this tag also avoid the segment to be tagged as trash
|
||||
if (_detalhes.MythicPlus.Started) then
|
||||
_detalhes.tabela_vigente.is_mythic_dungeon_segment = true
|
||||
_detalhes.tabela_vigente.is_mythic_dungeon_run_id = _detalhes.mythic_dungeon_id
|
||||
end
|
||||
|
||||
if (not _detalhes.tabela_vigente.is_boss) then
|
||||
|
||||
if (_detalhes.tabela_vigente.is_pvp or _detalhes.tabela_vigente.is_arena) then
|
||||
@@ -542,16 +553,22 @@
|
||||
if (_detalhes.tabela_vigente.is_arena) then
|
||||
_detalhes.tabela_vigente.enemy = "[" .. ARENA .. "] " .. _detalhes.tabela_vigente.is_arena.name
|
||||
end
|
||||
|
||||
|
||||
local in_instance = IsInInstance() --> garrison returns party as instance type.
|
||||
if ((InstanceType == "party" or InstanceType == "raid") and in_instance) then
|
||||
if (InstanceType == "party") then
|
||||
--if (_detalhes:GetBossNames (_detalhes.zone_id)) then
|
||||
-- _detalhes.tabela_vigente.is_trash = true
|
||||
--end
|
||||
|
||||
--> is new dungeon?
|
||||
_detalhes.tabela_vigente.is_trash = true
|
||||
if (not _detalhes.tabela_vigente.is_mythic_dungeon_segment) then
|
||||
--> tag the combat as trash clean up
|
||||
_detalhes.tabela_vigente.is_trash = true
|
||||
else
|
||||
local zoneName, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceMapID, instanceGroupSize = GetInstanceInfo()
|
||||
_detalhes.tabela_vigente.is_mythic_dungeon_trash = {
|
||||
ZoneName = zoneName,
|
||||
MapID = instanceMapID,
|
||||
Level = _detalhes.MythicPlus.Level,
|
||||
EJID = _detalhes.MythicPlus.ejID,
|
||||
}
|
||||
end
|
||||
else
|
||||
_detalhes.tabela_vigente.is_trash = true
|
||||
end
|
||||
@@ -636,7 +653,7 @@
|
||||
end
|
||||
|
||||
if (from_encounter_end) then
|
||||
_detalhes.tabela_vigente:SetEndTime (_detalhes.encounter_table ["end"])
|
||||
_detalhes.tabela_vigente:SetEndTime (_detalhes.encounter_table ["end"] or GetTime())
|
||||
end
|
||||
|
||||
--> encounter boss function
|
||||
@@ -1614,6 +1631,10 @@
|
||||
instancia = self
|
||||
end
|
||||
|
||||
if (not forcar) then
|
||||
_detalhes.LastUpdateTick = _detalhes._tempo
|
||||
end
|
||||
|
||||
if (instancia == -1) then
|
||||
|
||||
--> update
|
||||
|
||||
+273
-30
@@ -689,12 +689,59 @@ function _detalhes.storage:OpenRaidStorage()
|
||||
return db
|
||||
end
|
||||
|
||||
function _detalhes.storage:GetBestFromGuild (diff, encounter_id, role)
|
||||
function _detalhes.storage:HaveDataForEncounter (diff, encounter_id, guild_name)
|
||||
local db = _detalhes.storage:OpenRaidStorage()
|
||||
|
||||
if (not db) then
|
||||
return
|
||||
end
|
||||
|
||||
if (guild_name and type (guild_name) == "boolean") then
|
||||
guild_name = GetGuildInfo ("player")
|
||||
end
|
||||
|
||||
local table = db [diff]
|
||||
if (table) then
|
||||
local encounters = table [encounter_id]
|
||||
if (encounters) then
|
||||
--> didn't requested a guild name, so just return 'we have data for this encounter'
|
||||
if (not guild_name) then
|
||||
return true
|
||||
end
|
||||
|
||||
--> data for a specific guild is requested, check if there is data for the guild
|
||||
for index, encounter in ipairs (encounters) do
|
||||
if (encounter.guild == guild_name) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes.storage:GetBestFromGuild (diff, encounter_id, role, dps, guild_name)
|
||||
local db = _detalhes.storage:OpenRaidStorage()
|
||||
|
||||
if (not db) then
|
||||
return
|
||||
end
|
||||
|
||||
if (not guild_name) then
|
||||
guild_name = GetGuildInfo ("player")
|
||||
end
|
||||
|
||||
if (not guild_name) then
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("(debug) GetBestFromGuild() guild name invalid.")
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
local best = 0
|
||||
local bestdps = 0
|
||||
local bestplayername
|
||||
local onencounter
|
||||
local bestactor
|
||||
|
||||
if (not role) then
|
||||
role = "damage"
|
||||
@@ -711,14 +758,26 @@ function _detalhes.storage:GetBestFromGuild (diff, encounter_id, role)
|
||||
local encounters = table [encounter_id]
|
||||
if (encounters) then
|
||||
for index, encounter in ipairs (encounters) do
|
||||
|
||||
local players = encounter [role]
|
||||
if (players) then
|
||||
for playername, t in pairs (players) do
|
||||
if (t[1] > best) then
|
||||
best = t [1]
|
||||
bestplayername = playername
|
||||
onencounter = encounter
|
||||
if (encounter.guild == guild_name) then
|
||||
local players = encounter [role]
|
||||
if (players) then
|
||||
for playername, t in pairs (players) do
|
||||
if (dps) then
|
||||
if (t[1]/encounter.elapsed > bestdps) then
|
||||
bestdps = t[1]/encounter.elapsed
|
||||
bestplayername = playername
|
||||
onencounter = encounter
|
||||
bestactor = t
|
||||
end
|
||||
else
|
||||
if (t[1] > best) then
|
||||
best = t [1]
|
||||
bestplayername = playername
|
||||
onencounter = encounter
|
||||
bestactor = t
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -726,14 +785,107 @@ function _detalhes.storage:GetBestFromGuild (diff, encounter_id, role)
|
||||
end
|
||||
end
|
||||
|
||||
return best, bestplayername, onencounter
|
||||
return t, onencounter
|
||||
end
|
||||
|
||||
function _detalhes.storage:GetBestFromPlayer (diff, encounter_id, role, playername)
|
||||
function _detalhes.storage:GetPlayerGuildRank (diff, encounter_id, role, playername, dps, guild_name)
|
||||
|
||||
local db = _detalhes.storage:OpenRaidStorage()
|
||||
|
||||
if (not db) then
|
||||
return
|
||||
end
|
||||
|
||||
if (not guild_name) then
|
||||
guild_name = GetGuildInfo ("player")
|
||||
end
|
||||
|
||||
if (not guild_name) then
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("(debug) GetBestFromGuild() guild name invalid.")
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
if (not role) then
|
||||
role = "damage"
|
||||
end
|
||||
role = string.lower (role)
|
||||
if (role == "damager") then
|
||||
role = "damage"
|
||||
elseif (role == "healer") then
|
||||
role = "healing"
|
||||
end
|
||||
|
||||
local playerScore = {}
|
||||
|
||||
local _table = db [diff]
|
||||
if (_table) then
|
||||
local encounters = _table [encounter_id]
|
||||
if (encounters) then
|
||||
for index, encounter in ipairs (encounters) do
|
||||
if (encounter.guild == guild_name) then
|
||||
local roleTable = encounter [role]
|
||||
for playerName, playerTable in pairs (roleTable) do
|
||||
|
||||
if (not playerScore [playerName]) then
|
||||
playerScore [playerName] = {0, 0, {}}
|
||||
end
|
||||
|
||||
local total = playerTable[1]
|
||||
local persecond = total / encounter.elapsed
|
||||
|
||||
if (dps) then
|
||||
if (persecond > playerScore [playerName][2]) then
|
||||
playerScore [playerName][1] = total
|
||||
playerScore [playerName][2] = total / encounter.elapsed
|
||||
playerScore [playerName][3] = playerTable
|
||||
playerScore [playerName][4] = encounter
|
||||
end
|
||||
else
|
||||
if (total > playerScore [playerName][1]) then
|
||||
playerScore [playerName][1] = total
|
||||
playerScore [playerName][2] = total / encounter.elapsed
|
||||
playerScore [playerName][3] = playerTable
|
||||
playerScore [playerName][4] = encounter
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (not playerScore [playername]) then
|
||||
return
|
||||
end
|
||||
|
||||
local t = {}
|
||||
for playerName, playerTable in pairs (playerScore) do
|
||||
playerTable [5] = playerName
|
||||
tinsert (t, playerTable)
|
||||
end
|
||||
|
||||
table.sort (t, dps and _detalhes.Sort2 or _detalhes.Sort1)
|
||||
|
||||
for i = 1, #t do
|
||||
if (t[i][5] == playername) then
|
||||
return t[i][3], t[i][4], i
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function _detalhes.storage:GetBestFromPlayer (diff, encounter_id, role, playername, dps)
|
||||
local db = _detalhes.storage:OpenRaidStorage()
|
||||
|
||||
if (not db) then
|
||||
return
|
||||
end
|
||||
|
||||
local best
|
||||
local onencounter
|
||||
local topdps
|
||||
|
||||
if (not role) then
|
||||
role = "damage"
|
||||
@@ -753,13 +905,22 @@ function _detalhes.storage:GetBestFromPlayer (diff, encounter_id, role, playerna
|
||||
local player = encounter [role] and encounter [role] [playername]
|
||||
if (player) then
|
||||
if (best) then
|
||||
if (player[1] > best[1]) then
|
||||
onencounter = encounter
|
||||
best = player
|
||||
if (dps) then
|
||||
if (player[1]/encounter.elapsed > topdps) then
|
||||
onencounter = encounter
|
||||
best = player
|
||||
topdps = player[1]/encounter.elapsed
|
||||
end
|
||||
else
|
||||
if (player[1] > best[1]) then
|
||||
onencounter = encounter
|
||||
best = player
|
||||
end
|
||||
end
|
||||
else
|
||||
onencounter = encounter
|
||||
best = player
|
||||
topdps = player[1]/encounter.elapsed
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1133,6 +1294,94 @@ function _detalhes.storage:GetEncounterData (diff, encounter_id, guild)
|
||||
return t
|
||||
end
|
||||
|
||||
local create_storage_tables = function()
|
||||
--> get the storage table
|
||||
local db = DetailsDataStorage
|
||||
|
||||
if (not db and _detalhes.CreateStorageDB) then
|
||||
db = _detalhes:CreateStorageDB()
|
||||
if (not db) then
|
||||
return
|
||||
end
|
||||
elseif (not db) then
|
||||
return
|
||||
end
|
||||
|
||||
return db
|
||||
end
|
||||
|
||||
function _detalhes.ScheduleLoadStorage()
|
||||
if (InCombatLockdown() or UnitAffectingCombat ("player")) then
|
||||
if (_detalhes.debug) then
|
||||
print ("|cFFFFFF00Details! storage scheduled to load (player in combat).")
|
||||
end
|
||||
_detalhes.schedule_storage_load = true
|
||||
return
|
||||
else
|
||||
if (not IsAddOnLoaded ("Details_DataStorage")) then
|
||||
local loaded, reason = LoadAddOn ("Details_DataStorage")
|
||||
if (not loaded) then
|
||||
if (_detalhes.debug) then
|
||||
print ("|cFFFFFF00Details! Storage|r: can't load storage, may be the addon is disabled.")
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
create_storage_tables()
|
||||
end
|
||||
end
|
||||
|
||||
if (IsAddOnLoaded ("Details_DataStorage")) then
|
||||
_detalhes.schedule_storage_load = nil
|
||||
_detalhes.StorageLoaded = true
|
||||
if (_detalhes.debug) then
|
||||
print ("|cFFFFFF00Details! storage loaded.")
|
||||
end
|
||||
else
|
||||
if (_detalhes.debug) then
|
||||
print ("|cFFFFFF00Details! fail to load storage, scheduled once again.")
|
||||
end
|
||||
_detalhes.schedule_storage_load = true
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes.GetStorage()
|
||||
return DetailsDataStorage
|
||||
end
|
||||
|
||||
function _detalhes.OpenStorage()
|
||||
--if the player is in combat, this function return false, if failed to load by other reason it returns nil
|
||||
|
||||
--> check if the storage is already loaded
|
||||
if (not IsAddOnLoaded ("Details_DataStorage")) then
|
||||
--> can't open it during combat
|
||||
if (InCombatLockdown() or UnitAffectingCombat ("player")) then
|
||||
if (_detalhes.debug) then
|
||||
print ("|cFFFFFF00Details! Storage|r: can't load storage due to combat.")
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
local loaded, reason = LoadAddOn ("Details_DataStorage")
|
||||
if (not loaded) then
|
||||
if (_detalhes.debug) then
|
||||
print ("|cFFFFFF00Details! Storage|r: can't load storage, may be the addon is disabled.")
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
local db = create_storage_tables()
|
||||
|
||||
if (db and IsAddOnLoaded ("Details_DataStorage")) then
|
||||
_detalhes.StorageLoaded = true
|
||||
end
|
||||
|
||||
return DetailsDataStorage
|
||||
else
|
||||
return DetailsDataStorage
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:StoreEncounter (combat)
|
||||
|
||||
combat = combat or _detalhes.tabela_vigente
|
||||
@@ -1238,7 +1487,7 @@ function _detalhes:StoreEncounter (combat)
|
||||
elapsed = combat:GetCombatTime(),
|
||||
guild = guildName,
|
||||
}
|
||||
|
||||
|
||||
local damage_container_hash = combat [1]._NameIndexTable
|
||||
local damage_container_pool = combat [1]._ActorTable
|
||||
|
||||
@@ -1282,35 +1531,29 @@ function _detalhes:StoreEncounter (combat)
|
||||
|
||||
tinsert (encounter_database, this_combat_data)
|
||||
|
||||
print ("|cFFFFFF00Details! Storage|r: encounter saved!")
|
||||
--print ("|cFFFFFF00Details! Storage|r: encounter saved!")
|
||||
|
||||
local myrole = UnitGroupRolesAssigned ("player")
|
||||
local mybest, onencounter = _detalhes.storage:GetBestFromPlayer (diff, encounter_id, myrole, _detalhes.playername)
|
||||
local mybest, onencounter = _detalhes.storage:GetBestFromPlayer (diff, encounter_id, myrole, _detalhes.playername, true) --> get dps or hps
|
||||
local myBestDps = mybest [1] / onencounter.elapsed
|
||||
|
||||
--print (myrole, mybest and mybest[1], mybest and mybest[2], mybest and mybest[3], onencounter and onencounter.date)
|
||||
|
||||
if (mybest) then
|
||||
local d_one = 0
|
||||
if (myrole == "DAMAGER" or myrole == "TANK") then
|
||||
d_one = combat (1, _detalhes.playername) and combat (1, _detalhes.playername).total
|
||||
d_one = combat (1, _detalhes.playername) and combat (1, _detalhes.playername).total / combat:GetCombatTime()
|
||||
elseif (myrole == "HEALER") then
|
||||
d_one = combat (2, _detalhes.playername) and combat (2, _detalhes.playername).total
|
||||
d_one = combat (2, _detalhes.playername) and combat (2, _detalhes.playername).total / combat:GetCombatTime()
|
||||
end
|
||||
|
||||
if (mybest[1] > d_one) then
|
||||
print (Loc ["STRING_DETAILS1"] .. format (Loc ["STRING_SCORE_NOTBEST"], _detalhes:comma_value (d_one), _detalhes:comma_value (mybest[1]), onencounter.date, mybest[2]))
|
||||
if (myBestDps > d_one) then
|
||||
print (Loc ["STRING_DETAILS1"] .. format (Loc ["STRING_SCORE_NOTBEST"], _detalhes:ToK2 (d_one), _detalhes:ToK2 (myBestDps), onencounter.date, mybest[2]))
|
||||
else
|
||||
print (Loc ["STRING_DETAILS1"] .. format (Loc ["STRING_SCORE_BEST"], _detalhes:comma_value (d_one)))
|
||||
print (Loc ["STRING_DETAILS1"] .. format (Loc ["STRING_SCORE_BEST"], _detalhes:ToK2 (d_one)))
|
||||
end
|
||||
end
|
||||
|
||||
--guild best
|
||||
local amount, playerName, encounterObject = _detalhes.storage:GetBestFromGuild (diff, encounter_id, myrole)
|
||||
if (amount > 0) then
|
||||
--> player got the high score on his guild
|
||||
|
||||
end
|
||||
|
||||
local lower_instance = _detalhes:GetLowerInstanceNumber()
|
||||
if (lower_instance) then
|
||||
local instance = _detalhes:GetInstance (lower_instance)
|
||||
@@ -1323,7 +1566,7 @@ function _detalhes:StoreEncounter (combat)
|
||||
local func = {_detalhes.OpenRaidHistoryWindow, _detalhes, raid_name, encounter_id, diff, my_role, guildName} --, 2, UnitName ("player")
|
||||
--local icon = {[[Interface\AddOns\Details\images\icons]], 16, 16, false, 434/512, 466/512, 243/512, 273/512}
|
||||
local icon = {[[Interface\PvPRankBadges\PvPRank08]], 16, 16, false, 0, 1, 0, 1}
|
||||
instance:InstanceAlert (Loc ["STRING_GUILDDAMAGERANK_WINDOWALERT"], icon, 10, func, true)
|
||||
instance:InstanceAlert (Loc ["STRING_GUILDDAMAGERANK_WINDOWALERT"], icon, _detalhes.update_warning_timeout, func, true)
|
||||
end
|
||||
end
|
||||
else
|
||||
|
||||
+109
-25
@@ -228,7 +228,7 @@
|
||||
_detalhes.LastPullMsg = time()
|
||||
|
||||
--local hitLine = self.HitBy or "|cFFFFFF00First Hit|r: *?* from *?* "
|
||||
local hitLine = self.HitBy or "|cFFFFFF00First Hit|r: *?*"
|
||||
local hitLine = self.HitBy or "|cFFFFBB00First Hit|r: *?*"
|
||||
local targetLine = ""
|
||||
|
||||
for i = 1, 5 do
|
||||
@@ -236,7 +236,7 @@
|
||||
if (boss) then
|
||||
local target = UnitName ("boss" .. i .. "target")
|
||||
if (target and type (target) == "string") then
|
||||
targetLine = " |cFFFFFF00Boss First Target|r: " .. target
|
||||
targetLine = " |cFFFFBB00Boss First Target|r: " .. target
|
||||
break
|
||||
end
|
||||
end
|
||||
@@ -246,6 +246,63 @@
|
||||
_detalhes.WhoAggroTimer = nil
|
||||
end
|
||||
|
||||
local lastRecordFound = {id = 0, diff = 0, combatTime = 0}
|
||||
|
||||
_detalhes.PrintEncounterRecord = function (self)
|
||||
--> this block won't execute if the storage isn't loaded
|
||||
--> self is a timer reference from C_Timer
|
||||
|
||||
local encounterID = self.Boss
|
||||
local diff = self.Diff
|
||||
|
||||
if (diff == 15 or diff == 16) then
|
||||
|
||||
local value, rank, combatTime = 0, 0, 0
|
||||
|
||||
if (encounterID == lastRecordFound.id and diff == lastRecordFound.diff) then
|
||||
--> is the same encounter, no need to find the value again.
|
||||
value, rank, combatTime = lastRecordFound.value, lastRecordFound.rank, lastRecordFound.combatTime
|
||||
else
|
||||
local db = _detalhes.GetStorage()
|
||||
|
||||
local role = UnitGroupRolesAssigned ("player")
|
||||
local isDamage = (role == "DAMAGER") or (role == "TANK") --or true
|
||||
local bestRank, encounterTable = _detalhes.storage:GetBestFromPlayer (diff, encounterID, isDamage and "damage" or "healing", _detalhes.playername, true)
|
||||
|
||||
if (bestRank) then
|
||||
local playerTable, onEncounter, rankPosition = _detalhes.storage:GetPlayerGuildRank (diff, encounterID, isDamage and "damage" or "healing", _detalhes.playername, true)
|
||||
|
||||
value = bestRank[1] or 0
|
||||
rank = rankPosition or 0
|
||||
combatTime = encounterTable.elapsed
|
||||
|
||||
--> if found the result, cache the values so no need to search again next pull
|
||||
lastRecordFound.value = value
|
||||
lastRecordFound.rank = rank
|
||||
lastRecordFound.id = encounterID
|
||||
lastRecordFound.diff = diff
|
||||
lastRecordFound.combatTime = combatTime
|
||||
else
|
||||
--> if didn't found, no reason to search again on next pull
|
||||
lastRecordFound.value = 0
|
||||
lastRecordFound.rank = 0
|
||||
lastRecordFound.combatTime = 0
|
||||
lastRecordFound.id = encounterID
|
||||
lastRecordFound.diff = diff
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes:Msg ("|cFFFFBB00Your Best Score|r:", _detalhes:ToK2 ((value) / combatTime) .. " [|cFFFFFF00Guild Rank: " .. rank .. "|r]")
|
||||
|
||||
if ((not combatTime or combatTime == 0) and not _detalhes.SyncWarning) then
|
||||
_detalhes:Msg ("|cFFFF3300you may need sync the rank within the guild, type '|cFFFFFF00/details rank|r'|r")
|
||||
_detalhes.SyncWarning = true
|
||||
end
|
||||
end
|
||||
|
||||
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)
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
@@ -4007,8 +4064,16 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
_detalhes:EnteredInArena()
|
||||
|
||||
else
|
||||
if ((zoneType == "raid" or zoneType == "party") and select (1, IsInInstance())) then
|
||||
local inInstance = IsInInstance()
|
||||
if ((zoneType == "raid" or zoneType == "party") and inInstance) then
|
||||
_detalhes:CheckForAutoErase (zoneMapID)
|
||||
|
||||
--> if the current raid is current tier raid, pre-load the storage database
|
||||
if (zoneType == "raid") then
|
||||
if (_detalhes.InstancesToStoreData [zoneMapID]) then
|
||||
_detalhes.ScheduleLoadStorage()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (_detalhes:IsInInstance()) then
|
||||
@@ -4046,28 +4111,31 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("(debug) |cFFFFFF00ENCOUNTER_START|r event triggered.")
|
||||
end
|
||||
|
||||
|
||||
_detalhes.latest_ENCOUNTER_END = _detalhes.latest_ENCOUNTER_END or 0
|
||||
if (_detalhes.latest_ENCOUNTER_END + 10 > _GetTime()) then
|
||||
return
|
||||
end
|
||||
|
||||
--> leave the current combat when the encounter start, if is doing a mythic plus dungeons, check if the options alows to create a dedicated segment for the boss fight
|
||||
if ((_in_combat and not _detalhes.tabela_vigente.is_boss) and (not _detalhes.MythicPlus.Started or _detalhes.mythic_plus.boss_dedicated_segment)) then
|
||||
_detalhes:SairDoCombate()
|
||||
end
|
||||
|
||||
local encounterID, encounterName, difficultyID, raidSize = _select (1, ...)
|
||||
|
||||
if (not _detalhes.WhoAggroTimer and _detalhes.announce_firsthit.enabled) then
|
||||
_detalhes.WhoAggroTimer = C_Timer.NewTimer (0.5, who_aggro)
|
||||
end
|
||||
|
||||
local encounterID, encounterName, difficultyID, raidSize = _select (1, ...)
|
||||
--print ("START", encounterID, encounterName, difficultyID, raidSize)
|
||||
|
||||
_current_encounter_id = encounterID
|
||||
|
||||
if (_in_combat and not _detalhes.tabela_vigente.is_boss) then
|
||||
_detalhes:SairDoCombate()
|
||||
--_detalhes:Msg ("encounter against|cFFFFFF00", encounterName, "|rbegan, GL HF!")
|
||||
else
|
||||
--_detalhes:Msg ("encounter against|cFFFFC000", encounterName, "|rbegan, GL HF!")
|
||||
if (IsInGuild() and IsInRaid() and _detalhes.announce_damagerecord.enabled and _detalhes.StorageLoaded) then
|
||||
_detalhes.TellDamageRecord = C_Timer.NewTimer (0.6, _detalhes.PrintEncounterRecord)
|
||||
_detalhes.TellDamageRecord.Boss = encounterID
|
||||
_detalhes.TellDamageRecord.Diff = difficultyID
|
||||
end
|
||||
|
||||
|
||||
_current_encounter_id = encounterID
|
||||
|
||||
local dbm_mod, dbm_time = _detalhes.encounter_table.DBM_Mod, _detalhes.encounter_table.DBM_ModTime
|
||||
_table_wipe (_detalhes.encounter_table)
|
||||
|
||||
@@ -4116,7 +4184,10 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
_detalhes.encounter_table.index = boss_index
|
||||
end
|
||||
|
||||
parser:Handle3rdPartyBuffs_OnEncounterStart()
|
||||
if (not _detalhes.MythicPlus.Started or (_detalhes.MythicPlus.Started and not _in_combat)) then
|
||||
parser:Handle3rdPartyBuffs_OnEncounterStart()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function _detalhes.parser_functions:ENCOUNTER_END (...)
|
||||
@@ -4127,7 +4198,8 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
|
||||
_current_encounter_id = nil
|
||||
|
||||
if (_detalhes.zone_type == "party") then
|
||||
local _, instanceType = GetInstanceInfo() --> let's make sure it isn't a dungeon
|
||||
if (_detalhes.zone_type == "party" or instanceType == "party") then
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("(debug) the zone type is 'party', ignoring ENCOUNTER_END.")
|
||||
end
|
||||
@@ -4210,6 +4282,21 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
_detalhes:SairDoCombate()
|
||||
end
|
||||
|
||||
if (_detalhes.schedule_mythicdungeon_trash_merge) then
|
||||
_detalhes.schedule_mythicdungeon_trash_merge = nil
|
||||
DetailsMythicPlusFrame.MergeTrashCleanup()
|
||||
end
|
||||
|
||||
if (_detalhes.schedule_mythicdungeon_endtrash_merge) then
|
||||
_detalhes.schedule_mythicdungeon_endtrash_merge = nil
|
||||
DetailsMythicPlusFrame.MergeRemainingTrashAfterAllBossesDone()
|
||||
end
|
||||
|
||||
if (_detalhes.schedule_mythicdungeon_overallrun_merge) then
|
||||
_detalhes.schedule_mythicdungeon_overallrun_merge = nil
|
||||
DetailsMythicPlusFrame.MergeSegmentsOnEnd()
|
||||
end
|
||||
|
||||
--> aqui, tentativa de fazer o timer da janela do Solo funcionar corretamente:
|
||||
if (_detalhes.solo and _detalhes.PluginCount.SOLO > 0) then
|
||||
if (_detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Stop) then
|
||||
@@ -4217,6 +4304,11 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
end
|
||||
end
|
||||
|
||||
if (_detalhes.schedule_storage_load) then
|
||||
_detalhes.schedule_storage_load = nil
|
||||
_detalhes.ScheduleLoadStorage()
|
||||
end
|
||||
|
||||
if (_detalhes.schedule_flag_boss_components) then
|
||||
_detalhes.schedule_flag_boss_components = false
|
||||
_detalhes:FlagActorsOnBossFight()
|
||||
@@ -4350,14 +4442,6 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
_detalhes:Msg ("(debug) found a timer.")
|
||||
end
|
||||
|
||||
local name, groupType, _, difficult = GetInstanceInfo()
|
||||
if (groupType == "party" and difficult == "Mythic Keystone" and _detalhes.overall_clear_newchallenge) then
|
||||
_detalhes.historico:resetar_overall()
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("(debug) timer is for a mythic+ dungeon, overall has been reseted.")
|
||||
end
|
||||
end
|
||||
|
||||
--if (C_Scenario.IsChallengeMode() and _detalhes.overall_clear_newchallenge) then
|
||||
-- if (_detalhes.overall_clear_newchallenge) then --C_Scenario.IsChallengeMode() and parece que não existe mais
|
||||
-- _detalhes.historico:resetar_overall()
|
||||
|
||||
@@ -803,6 +803,11 @@ end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--mythic dungeon test
|
||||
if (_detalhes.MythicPlus.Started and _detalhes.mythic_plus.always_in_combat) then
|
||||
return true
|
||||
end
|
||||
|
||||
_detalhes:SairDoCombate()
|
||||
end
|
||||
|
||||
+86
-37
@@ -1090,7 +1090,7 @@
|
||||
end
|
||||
|
||||
--> raid history window ~history
|
||||
function _detalhes:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild, _player_base, _player_name)
|
||||
function _detalhes:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild, _player_base, _player_name, _history_type)
|
||||
|
||||
if (not _G.DetailsRaidHistoryWindow) then
|
||||
|
||||
@@ -1195,7 +1195,7 @@
|
||||
local guild_sync = function()
|
||||
_detalhes.storage:DBGuildSync()
|
||||
f.GuildSyncButton:Disable()
|
||||
|
||||
|
||||
if (not f.SyncTexture) then
|
||||
local workingFrame = CreateFrame ("frame", nil, f)
|
||||
f.WorkingFrame = workingFrame
|
||||
@@ -1220,7 +1220,7 @@
|
||||
local rotation = _detalhes.gump:CreateAnimation (animationHub, "ROTATION", 1, 3, -360)
|
||||
rotation:SetTarget (f.SyncTextureCircle)
|
||||
--_detalhes.gump:CreateAnimation (animationHub, "ALPHA", 1, 0.5, 0, 1)
|
||||
|
||||
|
||||
f.SyncText = workingFrame:CreateFontString (nil, "border", "GameFontNormal")
|
||||
f.SyncText:SetPoint ("right", f.SyncTextureBackground, "left", 0, 0)
|
||||
f.SyncText:SetText ("working")
|
||||
@@ -1250,24 +1250,29 @@
|
||||
GuildSyncButton:SetPoint ("topright", f, "topright", -20, -34)
|
||||
GuildSyncButton:SetIcon ([[Interface\GLUES\CharacterSelect\RestoreButton]], 12, 12, "overlay", {0.2, .8, 0.2, .8}, nil, 4)
|
||||
|
||||
|
||||
function f.BuildReport()
|
||||
if (f.LatestResourceTable) then
|
||||
local reportFunc = function (IsCurrent, IsReverse, AmtLines)
|
||||
|
||||
local bossName = f.select_boss.label:GetText()
|
||||
local bossDiff = f.select_diff.label:GetText()
|
||||
local reportTable = {"Details!: DPS Rank for: " .. (bossDiff or "") .. " " .. (bossName or "--x--x--")}
|
||||
local result = {}
|
||||
|
||||
local bossName = f.select_boss.label:GetText()
|
||||
|
||||
tinsert (result, "Details!: Damage Rank for: " .. (bossName or "--x--x--"))
|
||||
for i = 1, AmtLines do
|
||||
if (f.LatestResourceTable[i]) then
|
||||
tinsert (result, f.LatestResourceTable[i][1] .. ": " .. f.LatestResourceTable[i][2])
|
||||
local playerName = f.LatestResourceTable[i][1]
|
||||
playerName = playerName:gsub ("%|c%x%x%x%x%x%x%x%x", "")
|
||||
playerName = playerName:gsub ("%|r", "")
|
||||
playerName = playerName:gsub (".*%s", "")
|
||||
tinsert (result, {playerName, f.LatestResourceTable[i][2]})
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
Details:SendReportLines (result)
|
||||
_detalhes:FormatReportLines (reportTable, result)
|
||||
Details:SendReportLines (reportTable)
|
||||
end
|
||||
|
||||
Details:SendReportWindow (reportFunc, nil, nil, true)
|
||||
@@ -1306,6 +1311,18 @@
|
||||
end
|
||||
end)
|
||||
|
||||
f:SetScript ("OnHide", function()
|
||||
--> save latest shown state
|
||||
f.LatestSelection = f.LatestSelection or {}
|
||||
f.LatestSelection.Raid = DetailsRaidHistoryWindow.select_raid.value
|
||||
f.LatestSelection.Boss = DetailsRaidHistoryWindow.select_boss.value
|
||||
f.LatestSelection.Diff = DetailsRaidHistoryWindow.select_diff.value
|
||||
f.LatestSelection.Role = DetailsRaidHistoryWindow.select_role.value
|
||||
f.LatestSelection.Guild = DetailsRaidHistoryWindow.select_guild.value
|
||||
f.LatestSelection.PlayerBase = DetailsRaidHistoryWindow.select_player.value
|
||||
f.LatestSelection.PlayerName = DetailsRaidHistoryWindow.select_player2.value
|
||||
end)
|
||||
|
||||
f.TitleText:SetText ("Details! Raid Ranking")
|
||||
--f.portrait:SetTexture ([[Interface\AddOns\Details\images\icons2]])
|
||||
f.portrait:SetTexture ([[Interface\PVPFrame\PvPPrestigeIcons]])
|
||||
@@ -1429,6 +1446,8 @@
|
||||
|
||||
function f:UpdateDropdowns (DoNotSelectRaid)
|
||||
|
||||
local currentGuild = guild_dropdown.value
|
||||
|
||||
--difficulty
|
||||
wipe (diff_list)
|
||||
wipe (boss_list)
|
||||
@@ -1473,7 +1492,6 @@
|
||||
if (not boss_repeated [encounterId]) then
|
||||
local encounter, instance = _detalhes:GetBossEncounterDetailsFromEncounterId (_, encounterId)
|
||||
if (encounter) then
|
||||
|
||||
local InstanceID = _detalhes:GetInstanceIdFromEncounterId (encounterId)
|
||||
if (raidSelected == InstanceID) then
|
||||
tinsert (boss_list, {value = encounterId, label = encounter.boss, icon = icon, onclick = on_boss_select})
|
||||
@@ -1491,7 +1509,7 @@
|
||||
for index, encounter in ipairs (encounterTable) do
|
||||
local guild = encounter.guild
|
||||
if (not guild_repeated [guild]) then
|
||||
tinsert (guild_list, {value = guild, label = guild, icon = icon, onclick = on_raid_select})
|
||||
tinsert (guild_list, {value = guild, label = guild, icon = icon, onclick = on_guild_select})
|
||||
guild_repeated [guild] = true
|
||||
end
|
||||
end
|
||||
@@ -1510,9 +1528,13 @@
|
||||
raid_dropdown:Refresh()
|
||||
raid_dropdown:Select (1, true)
|
||||
end
|
||||
guild_dropdown:Refresh()
|
||||
guild_dropdown:Select (1, true)
|
||||
|
||||
guild_dropdown:Refresh()
|
||||
if (currentGuild) then
|
||||
guild_dropdown:Select (currentGuild)
|
||||
else
|
||||
guild_dropdown:Select (1, true)
|
||||
end
|
||||
end
|
||||
|
||||
function f.UpdateBossDropdown()
|
||||
@@ -1611,40 +1633,26 @@
|
||||
local player = roleTable [playerName]
|
||||
|
||||
if (player) then
|
||||
tinsert (data, {text = date, value = player[1], data = player, fulldate = encounter.date, elapsed = encounter.elapsed})
|
||||
|
||||
--tinsert (data, {text = date, value = player[1], data = player, fulldate = encounter.date, elapsed = encounter.elapsed})
|
||||
tinsert (data, {text = date, value = player[1]/encounter.elapsed, utext = _detalhes:ToK2 (player[1]/encounter.elapsed), data = player, fulldate = encounter.date, elapsed = encounter.elapsed})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> update graphic
|
||||
if (not f.gframe) then
|
||||
|
||||
local cooltip_block_bg = {0, 0, 0, 1}
|
||||
local menu_wallpaper_tex = {.6, 0.1, 0, 0.64453125}
|
||||
local menu_wallpaper_color = {1, 1, 1, 0.1}
|
||||
|
||||
local onenter = function (self)
|
||||
GameCooltip:Reset()
|
||||
GameCooltip:SetType ("tooltip")
|
||||
|
||||
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", 175)
|
||||
GameCooltip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\bar_background]])
|
||||
|
||||
GameCooltip:AddLine ("Total Done:", _detalhes:ToK2 (self.data.value))
|
||||
GameCooltip:AddLine ("Dps:", _detalhes:ToK2 (self.data.value / self.data.elapsed))
|
||||
GameCooltip:AddLine ("Item Level:", floor (self.data.data [2]))
|
||||
GameCooltip:AddLine ("Date:", self.data.fulldate:gsub (".*%s", ""))
|
||||
|
||||
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], menu_wallpaper_tex, menu_wallpaper_color, true)
|
||||
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, cooltip_block_bg, _detalhes.tooltip_border_color)
|
||||
GameCooltip:Preset (2)
|
||||
|
||||
GameCooltip:AddLine ("Total Done:", _detalhes:ToK2 (self.data.value), 1, "white")
|
||||
GameCooltip:AddLine ("Dps:", _detalhes:ToK2 (self.data.value / self.data.elapsed), 1, "white")
|
||||
GameCooltip:AddLine ("Item Level:", floor (self.data.data [2]), 1, "white")
|
||||
GameCooltip:AddLine ("Date:", self.data.fulldate:gsub (".*%s", ""), 1, "white")
|
||||
|
||||
GameCooltip:SetOwner (self.ball.tooltip_anchor)
|
||||
GameCooltip:Show()
|
||||
end
|
||||
@@ -1729,8 +1737,15 @@
|
||||
t.ps,
|
||||
})
|
||||
end
|
||||
|
||||
table.sort (sortTable, function(a, b) return a[8] > b[8] end)
|
||||
|
||||
--> add the number before the player name
|
||||
for i = 1, #sortTable do
|
||||
local t = sortTable [i]
|
||||
t [1] = i .. ". " .. t [1]
|
||||
end
|
||||
|
||||
fillpanel:SetFillFunction (function (index) return sortTable [index] end)
|
||||
fillpanel:SetTotalFunction (function() return #sortTable end)
|
||||
fillpanel:UpdateRows (header)
|
||||
@@ -1790,6 +1805,9 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> sort alphabetical
|
||||
table.sort (players, function(a, b) return a[1] < b[1] end)
|
||||
|
||||
for index, playerTable in ipairs (players) do
|
||||
for i = #playerTable, amt_encounters do
|
||||
tinsert (playerTable, "")
|
||||
@@ -1882,12 +1900,40 @@
|
||||
|
||||
end
|
||||
|
||||
|
||||
--> table means some button send the request - nil for other ways
|
||||
if (type (_raid) == "table" or (not _raid and not _boss and not _difficulty and not _role and not _guild and not _player_base and not _player_name)) then
|
||||
local f = _G.DetailsRaidHistoryWindow
|
||||
if (f.LatestSelection) then
|
||||
_raid = f.LatestSelection.Raid
|
||||
_boss = f.LatestSelection.Boss
|
||||
_difficulty = f.LatestSelection.Diff
|
||||
_role = f.LatestSelection.Role
|
||||
_guild = f.LatestSelection.Guild
|
||||
_player_base = f.LatestSelection.PlayerBase
|
||||
_player_name = f.LatestSelection.PlayerBase
|
||||
end
|
||||
end
|
||||
|
||||
_G.DetailsRaidHistoryWindow:UpdateDropdowns()
|
||||
_G.DetailsRaidHistoryWindow:UpdateDropdowns()
|
||||
|
||||
_G.DetailsRaidHistoryWindow:Refresh()
|
||||
_G.DetailsRaidHistoryWindow:Show()
|
||||
|
||||
if (_history_type == 1 or _history_type == 2) then
|
||||
DetailsRaidHistoryWindow.Mode = _history_type
|
||||
if (DetailsRaidHistoryWindow.Mode == 1) then
|
||||
--overall
|
||||
DetailsRaidHistoryWindow.HistoryCheckBox:SetValue (true)
|
||||
DetailsRaidHistoryWindow.GuildRankCheckBox:SetValue (false)
|
||||
elseif (DetailsRaidHistoryWindow.Mode == 2) then
|
||||
--guild rank
|
||||
DetailsRaidHistoryWindow.GuildRankCheckBox:SetValue (true)
|
||||
DetailsRaidHistoryWindow.HistoryCheckBox:SetValue (false)
|
||||
end
|
||||
end
|
||||
|
||||
if (_raid) then
|
||||
DetailsRaidHistoryWindow.select_raid:Select (_raid)
|
||||
_G.DetailsRaidHistoryWindow:Refresh()
|
||||
@@ -1906,6 +1952,9 @@
|
||||
_G.DetailsRaidHistoryWindow:Refresh()
|
||||
end
|
||||
if (_guild) then
|
||||
if (type (_guild) == "boolean") then
|
||||
_guild = GetGuildInfo ("player")
|
||||
end
|
||||
DetailsRaidHistoryWindow.select_guild:Select (_guild)
|
||||
_G.DetailsRaidHistoryWindow:Refresh()
|
||||
end
|
||||
|
||||
+57
-9
@@ -18,6 +18,28 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
--> return the full table with all data for the instance
|
||||
function _detalhes:GetRaidInfoFromEncounterID (encounterID, encounterEJID)
|
||||
for id, raidTable in pairs (_detalhes.EncounterInformation) do
|
||||
if (encounterID) then
|
||||
local ids = raidTable.encounter_ids2 --combatlog
|
||||
if (ids) then
|
||||
if (ids [encounterID]) then
|
||||
return raidTable
|
||||
end
|
||||
end
|
||||
end
|
||||
if (encounterEJID) then
|
||||
local ejids = raidTable.encounter_ids --encounter journal
|
||||
if (ejids) then
|
||||
if (ejids [encounterEJID]) then
|
||||
return raidTable
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> return the ids of trash mobs in the instance
|
||||
function _detalhes:GetInstanceTrashInfo (mapid)
|
||||
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].trash_ids
|
||||
@@ -213,8 +235,24 @@ do
|
||||
end
|
||||
end
|
||||
--> return the icon for the raid instance
|
||||
function _detalhes:GetRaidIcon (mapid)
|
||||
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].icon
|
||||
function _detalhes:GetRaidIcon (mapid, ejID, instanceType)
|
||||
local raidIcon = _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].icon
|
||||
if (raidIcon) then
|
||||
return raidIcon
|
||||
end
|
||||
|
||||
if (ejID and ejID ~= 0) then
|
||||
local name, description, bgImage, buttonImage, loreImage, dungeonAreaMapID, link = EJ_GetInstanceInfo (ejID)
|
||||
if (name) then
|
||||
if (instanceType == "party") then
|
||||
return loreImage --bgImage
|
||||
elseif (instanceType == "raid") then
|
||||
return loreImage
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
--> return the boss icon
|
||||
@@ -227,15 +265,25 @@ do
|
||||
end
|
||||
|
||||
--> return the boss portrit
|
||||
function _detalhes:GetBossPortrait (mapid, bossindex)
|
||||
function _detalhes:GetBossPortrait (mapid, bossindex, encounterName, ejID)
|
||||
if (mapid and bossindex) then
|
||||
--print (_detalhes.EncounterInformation [mapid])
|
||||
--print (_detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters)
|
||||
--print (_detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters and _detalhes.EncounterInformation [mapid].encounters [bossindex])
|
||||
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters [bossindex] and _detalhes.EncounterInformation [mapid].encounters [bossindex].portrait
|
||||
else
|
||||
return false
|
||||
local haveIcon = _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters [bossindex] and _detalhes.EncounterInformation [mapid].encounters [bossindex].portrait
|
||||
if (haveIcon) then
|
||||
return haveIcon
|
||||
end
|
||||
end
|
||||
|
||||
if (encounterName and ejID and ejID ~= 0) then
|
||||
local index, name, description, encounterID, rootSectionID, link = _detalhes:GetEncounterInfoFromEncounterName (ejID, encounterName)
|
||||
if (index and name and encounterID) then
|
||||
local id, name, description, displayInfo, iconImage = EJ_GetCreatureInfo (1, encounterID)
|
||||
if (iconImage) then
|
||||
return iconImage
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
--> return a list with names of adds and bosses
|
||||
|
||||
+340
-86
@@ -683,7 +683,7 @@
|
||||
["custom"] = "aura_env.reimaningTime = 5",
|
||||
},
|
||||
},
|
||||
["cooldown"] = true,
|
||||
["cooldown"] = false,
|
||||
["stacksContainment"] = "OUTSIDE",
|
||||
["zoom"] = 0.3,
|
||||
["auto"] = true,
|
||||
@@ -1252,7 +1252,7 @@
|
||||
},
|
||||
}
|
||||
|
||||
function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, name, icon_texture, target, stacksize, sound, chat, icon_text, icon_glow, encounter_id, group, icon_size, other_values)
|
||||
function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, name, icon_texture, target, stacksize, sound, chat, icon_text, icon_glow, encounter_id, group, icon_size, other_values, in_combat, cooldown_animation)
|
||||
|
||||
--print (aura_type, spellid, use_spellid, spellname, name, icon_texture, target, stacksize, sound, chat, icon_text, icon_glow, encounter_id, group, icon_size, other_values)
|
||||
|
||||
@@ -1314,6 +1314,13 @@
|
||||
--> size
|
||||
new_aura.fontSize = min (icon_size, 24)
|
||||
|
||||
--> combat only
|
||||
if (in_combat) then
|
||||
new_aura.load.use_combat = true
|
||||
else
|
||||
new_aura.load.use_combat = nil
|
||||
end
|
||||
|
||||
elseif (target == 42) then -- dispell
|
||||
|
||||
chat = nil
|
||||
@@ -1353,7 +1360,14 @@
|
||||
--> size
|
||||
new_aura.fontSize = min (icon_size, 24)
|
||||
|
||||
elseif (other_values.dbm_timer_id or other_values.bw_timer_id) then
|
||||
--> combat only
|
||||
if (in_combat) then
|
||||
new_aura.load.use_combat = true
|
||||
else
|
||||
new_aura.load.use_combat = nil
|
||||
end
|
||||
|
||||
elseif (other_values.dbm_timer_id or other_values.bw_timer_id) then --boss mods
|
||||
|
||||
--> create the default aura table
|
||||
if (aura_type == "icon") then
|
||||
@@ -1529,6 +1543,13 @@
|
||||
end
|
||||
_detalhes.table.overwrite (new_aura, add)
|
||||
end
|
||||
|
||||
--> combat only
|
||||
if (in_combat) then
|
||||
new_aura.load.use_combat = true
|
||||
else
|
||||
new_aura.load.use_combat = nil
|
||||
end
|
||||
else
|
||||
new_aura.trigger.spellId = tostring (spellid)
|
||||
new_aura.trigger.name = spellname
|
||||
@@ -1620,9 +1641,37 @@
|
||||
_detalhes.table.overwrite (new_aura, add)
|
||||
end
|
||||
|
||||
if (cooldown_animation) then
|
||||
new_aura.cooldown = true
|
||||
new_aura.cooldownTextEnabled = true
|
||||
end
|
||||
|
||||
--> add the aura on a group
|
||||
if (group) then
|
||||
new_aura.parent = group
|
||||
|
||||
if (new_aura.regionType == "icon") then
|
||||
--> adjust the width and height of the new aura following the existing auras on the group
|
||||
local normalWidth, normalHeight, amount = 0, 0, 0
|
||||
local allAurasInTheGroup = WeakAurasSaved.displays [group].controlledChildren
|
||||
|
||||
for index, auraname in ipairs (allAurasInTheGroup) do
|
||||
local auraObject = WeakAurasSaved.displays [auraname]
|
||||
if (auraObject and auraObject.regionType == "icon") then
|
||||
amount = amount + 1
|
||||
normalWidth = normalWidth + auraObject.width
|
||||
normalHeight = normalHeight + auraObject.height
|
||||
end
|
||||
end
|
||||
|
||||
if (normalWidth > 0) then
|
||||
normalWidth = normalWidth / amount
|
||||
normalHeight = normalHeight / amount
|
||||
new_aura.width = normalWidth
|
||||
new_aura.height = normalHeight
|
||||
end
|
||||
end
|
||||
|
||||
tinsert (WeakAurasSaved.displays [group].controlledChildren, new_aura.id)
|
||||
else
|
||||
new_aura.parent = nil
|
||||
@@ -1679,41 +1728,64 @@
|
||||
end
|
||||
end
|
||||
|
||||
local f = CreateFrame ("frame", "DetailsAuraPanel", UIParent, "ButtonFrameTemplate")
|
||||
f:SetSize (600, 488)
|
||||
local f = CreateFrame ("frame", "DetailsAuraPanel", UIParent)
|
||||
f:SetSize (800, 600)
|
||||
f:SetPoint ("center", UIParent, "center", 0, 150)
|
||||
f:SetFrameStrata ("HIGH")
|
||||
f:SetToplevel (true)
|
||||
f:EnableMouse (true)
|
||||
f:SetMovable (true)
|
||||
f:SetToplevel (true)
|
||||
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor (24/255, 24/255, 24/255, .8)
|
||||
f:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
|
||||
tinsert (UISpecialFrames, "DetailsAuraPanel")
|
||||
--register to libwindow
|
||||
local LibWindow = LibStub ("LibWindow-1.1")
|
||||
LibWindow.RegisterConfig (f, _detalhes.createauraframe)
|
||||
LibWindow.RestorePosition (f)
|
||||
LibWindow.MakeDraggable (f)
|
||||
LibWindow.SavePosition (f)
|
||||
|
||||
f:SetScript ("OnMouseDown", function(self, button)
|
||||
if (self.isMoving) then
|
||||
return
|
||||
end
|
||||
if (button == "RightButton") then
|
||||
self:Hide()
|
||||
else
|
||||
self:StartMoving()
|
||||
self.isMoving = true
|
||||
end
|
||||
end)
|
||||
f:SetScript ("OnMouseUp", function(self, button)
|
||||
if (self.isMoving and button == "LeftButton") then
|
||||
self:StopMovingOrSizing()
|
||||
self.isMoving = nil
|
||||
end
|
||||
end)
|
||||
--titlebar
|
||||
f.TitleBar = CreateFrame ("frame", "$parentTitleBar", f)
|
||||
f.TitleBar:SetPoint ("topleft", f, "topleft", 2, -3)
|
||||
f.TitleBar:SetPoint ("topright", f, "topright", -2, -3)
|
||||
f.TitleBar:SetHeight (20)
|
||||
f.TitleBar:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f.TitleBar:SetBackdropColor (.2, .2, .2, 1)
|
||||
f.TitleBar:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
|
||||
f.TitleText:SetText ("Create Aura")
|
||||
f.portrait:SetTexture ([[Interface\CHARACTERFRAME\TEMPORARYPORTRAIT-FEMALE-BLOODELF]])
|
||||
--close button
|
||||
f.Close = CreateFrame ("button", "$parentCloseButton", f)
|
||||
f.Close:SetPoint ("right", f.TitleBar, "right", -2, 0)
|
||||
f.Close:SetSize (16, 16)
|
||||
f.Close:SetNormalTexture (_detalhes.gump.folder .. "icons")
|
||||
f.Close:SetHighlightTexture (_detalhes.gump.folder .. "icons")
|
||||
f.Close:SetPushedTexture (_detalhes.gump.folder .. "icons")
|
||||
f.Close:GetNormalTexture():SetTexCoord (0, 16/128, 0, 1)
|
||||
f.Close:GetHighlightTexture():SetTexCoord (0, 16/128, 0, 1)
|
||||
f.Close:GetPushedTexture():SetTexCoord (0, 16/128, 0, 1)
|
||||
f.Close:SetAlpha (0.7)
|
||||
f.Close:SetScript ("OnClick", function() f:Hide() end)
|
||||
|
||||
--title
|
||||
f.Title = f.TitleBar:CreateFontString ("$parentTitle", "overlay", "GameFontNormal")
|
||||
f.Title:SetPoint ("center", f.TitleBar, "center")
|
||||
f.Title:SetTextColor (.8, .8, .8, 1)
|
||||
f.Title:SetText ("Details! Create Aura")
|
||||
|
||||
local fw = _detalhes:GetFramework()
|
||||
|
||||
local text_template = fw:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")
|
||||
local dropdown_template = fw:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
|
||||
local switch_template = fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")
|
||||
local slider_template = fw:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
|
||||
local button_template = fw:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
|
||||
|
||||
--aura name
|
||||
local name_label = fw:CreateLabel (f, "Aura Name: ", nil, nil, "GameFontNormal")
|
||||
local name_textentry = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "AuraName", "$parentAuraName")
|
||||
name_textentry:SetTemplate (slider_template)
|
||||
name_textentry:SetPoint ("left", name_label, "right", 2, 0)
|
||||
f.name = name_textentry
|
||||
|
||||
@@ -1734,40 +1806,86 @@
|
||||
local aura_type = fw:CreateDropDown (f, aura_type_options, 1, 150, 20, "AuraTypeDropdown", "$parentAuraTypeDropdown")
|
||||
local aura_type_label = fw:CreateLabel (f, "Aura Type: ", nil, nil, "GameFontNormal")
|
||||
aura_type:SetPoint ("left", aura_type_label, "right", 2, 0)
|
||||
aura_type:Hide()
|
||||
|
||||
--spellname
|
||||
local spellname_label = fw:CreateLabel (f, "Spell Name: ", nil, nil, "GameFontNormal")
|
||||
local spellname_textentry = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "SpellName", "$parentSpellName")
|
||||
spellname_textentry:SetPoint ("left", spellname_label, "right", 2, 0)
|
||||
f.spellname = spellname_textentry
|
||||
spellname_textentry.tooltip = "Spell/Debuff/Buff to be tracked."
|
||||
local Icon_IconAuraType = fw:CreateImage (f, [[Interface\AddOns\Details\images\icons2]], 32, 32, "overlay", {119/512, 151/512, 176/512, 208/512}, nil, nil)
|
||||
Icon_IconAuraType:SetPoint ("topleft", aura_type_label, "bottomleft", 10, -16)
|
||||
|
||||
--spellid
|
||||
local auraid_label = fw:CreateLabel (f, "Spell Id: ", nil, nil, "GameFontNormal")
|
||||
local auraid_textentry = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "AuraSpellId", "$parentAuraSpellId")
|
||||
auraid_textentry:Disable()
|
||||
auraid_textentry:SetPoint ("left", auraid_label, "right", 2, 0)
|
||||
local Icon_StatusbarAuraType = fw:CreateImage (f, [[Interface\AddOns\Details\images\icons2]], 92, 12, "overlay", {154/512, 246/512, 176/512, 188/512}, nil, nil)
|
||||
Icon_StatusbarAuraType:SetPoint ("topleft", aura_type_label, "bottomleft", 60, -26)
|
||||
|
||||
local Icon_TextOnlyAuraType = fw:CreateImage (f, [[Interface\AddOns\Details\images\icons2]], 57, 8, "overlay", {169/512, 225/512, 200/512, 207/512}, nil, nil)
|
||||
Icon_TextOnlyAuraType:SetPoint ("topleft", aura_type_label, "bottomleft", 170, -28)
|
||||
|
||||
--use spellid
|
||||
local usespellid_label = fw:CreateLabel (f, "Use SpellId: ", nil, nil, "GameFontNormal")
|
||||
local aura_use_spellid = fw:CreateSwitch (f, function(_, _, state) if (state) then auraid_textentry:Enable() else auraid_textentry:Disable() end end, false, nil, nil, nil, nil, "UseSpellId")
|
||||
aura_use_spellid:SetPoint ("left", usespellid_label, "right", 2, 0)
|
||||
aura_use_spellid.tooltip = "Use the spell id instead of the spell name, for advanced users."
|
||||
local AuraTypeSelectedColor = {1, 1, 1, 0.3}
|
||||
local AuraTypeBorderColor = {.3, .3, .3, 0.5}
|
||||
local AuraTypeBorderSelectedColor = {1, 1, 1, 0.4}
|
||||
|
||||
--aura icon
|
||||
local icon_label = fw:CreateLabel (f, "Icon: ", nil, nil, "GameFontNormal")
|
||||
local icon_button_func = function (texture)
|
||||
f.IconButton.icon.texture = texture
|
||||
local OnSelectAuraType = function (self, fixedParam, auraType, noUpdate)
|
||||
|
||||
if (type (auraType) == "number") then
|
||||
if (auraType == 1) then
|
||||
auraType = "icon"
|
||||
elseif (auraType == 2) then
|
||||
auraType = "text"
|
||||
elseif (auraType == 3) then
|
||||
auraType = "aurabar"
|
||||
end
|
||||
end
|
||||
|
||||
f.IconAuraTypeButton:SetBackdropColor (0, 0, 0, 0.05)
|
||||
f.StatusbarAuraTypeButton:SetBackdropColor (0, 0, 0, 0.05)
|
||||
f.TextOnlyAuraTypeButton:SetBackdropColor (0, 0, 0, 0.05)
|
||||
|
||||
f.IconAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderColor))
|
||||
f.StatusbarAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderColor))
|
||||
f.TextOnlyAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderColor))
|
||||
|
||||
if (auraType == "icon") then
|
||||
f.IconAuraTypeButton:SetBackdropColor (unpack (AuraTypeSelectedColor))
|
||||
f.IconAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderSelectedColor))
|
||||
elseif (auraType == "aurabar") then
|
||||
f.StatusbarAuraTypeButton:SetBackdropColor (unpack (AuraTypeSelectedColor))
|
||||
f.StatusbarAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderSelectedColor))
|
||||
elseif (auraType == "text") then
|
||||
f.TextOnlyAuraTypeButton:SetBackdropColor (unpack (AuraTypeSelectedColor))
|
||||
f.TextOnlyAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderSelectedColor))
|
||||
end
|
||||
|
||||
aura_type:SetValue (auraType)
|
||||
if (f.UpdateLabels and not noUpdate) then
|
||||
f:UpdateLabels()
|
||||
end
|
||||
end
|
||||
local icon_pick_button = fw:NewButton (f, nil, "$parentIconButton", "IconButton", 20, 20, function() fw:IconPick (icon_button_func, true) end)
|
||||
local icon_button_icon = fw:NewImage (icon_pick_button, [[Interface\ICONS\TEMP]], 19, 19, "background", nil, "icon", "$parentIcon")
|
||||
icon_pick_button:InstallCustomTexture()
|
||||
f.OnSelectAuraType = OnSelectAuraType
|
||||
|
||||
icon_pick_button:SetPoint ("left", icon_label, "right", 2, 0)
|
||||
icon_button_icon:SetPoint ("left", icon_label, "right", 2, 0)
|
||||
local AuraTypeBackground = f:CreateTexture (nil, "border")
|
||||
AuraTypeBackground:SetColorTexture (.4, .4, .4, .1)
|
||||
AuraTypeBackground:SetHeight (64)
|
||||
AuraTypeBackground:SetPoint ("topleft", f, "topleft", 10, -79)
|
||||
AuraTypeBackground:SetPoint ("topright", f, "topright", -10, -79)
|
||||
|
||||
f.icon = icon_button_icon
|
||||
local Icon_IconAuraTypeButton = fw:CreateButton (f, OnSelectAuraType, 46, 46, "", "icon", nil, nil, "IconAuraTypeButton")
|
||||
local Icon_StatusbarAuraTypeButton = fw:CreateButton (f, OnSelectAuraType, 100, 46, "", "aurabar", nil, nil, "StatusbarAuraTypeButton")
|
||||
local Icon_TextOnlyAuraTypeButton = fw:CreateButton (f, OnSelectAuraType, 69, 46, "", "text", nil, nil, "TextOnlyAuraTypeButton")
|
||||
|
||||
Icon_IconAuraTypeButton:SetPoint ("center", Icon_IconAuraType, "center")
|
||||
Icon_StatusbarAuraTypeButton:SetPoint ("center", Icon_StatusbarAuraType, "center")
|
||||
Icon_TextOnlyAuraTypeButton:SetPoint ("center", Icon_TextOnlyAuraType, "center")
|
||||
|
||||
Icon_IconAuraTypeButton:SetBackdrop ({edgeFile = [[Interface\AddOns\Details\images\dotted]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
Icon_IconAuraTypeButton:SetBackdropColor (unpack (AuraTypeSelectedColor))
|
||||
Icon_IconAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderColor))
|
||||
|
||||
Icon_StatusbarAuraTypeButton:SetBackdrop ({edgeFile = [[Interface\AddOns\Details\images\dotted]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
Icon_StatusbarAuraTypeButton:SetBackdropColor (0, 0, 0, 0.05)
|
||||
Icon_StatusbarAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderColor))
|
||||
|
||||
Icon_TextOnlyAuraTypeButton:SetBackdrop ({edgeFile = [[Interface\AddOns\Details\images\dotted]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
Icon_TextOnlyAuraTypeButton:SetBackdropColor (0, 0, 0, 0.05)
|
||||
Icon_TextOnlyAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderColor))
|
||||
|
||||
--trigger list
|
||||
--target
|
||||
local on_select_aura_trigger = function (_, _, aura_trigger)
|
||||
if (f.UpdateLabels) then
|
||||
@@ -1798,13 +1916,122 @@
|
||||
return aura_on_table
|
||||
end
|
||||
local aura_on = fw:CreateDropDown (f, aura_on_options, 1, 150, 20, "AuraOnDropdown", "$parentAuraOnDropdown")
|
||||
local aura_on_label = fw:CreateLabel (f, "Trigger: ", nil, nil, "GameFontNormal")
|
||||
local aura_on_label = fw:CreateLabel (f, "Trigger On: ", nil, nil, "GameFontNormal")
|
||||
aura_on:SetPoint ("left", aura_on_label, "right", 2, 0)
|
||||
aura_on:Hide()
|
||||
|
||||
local triggerList = {
|
||||
{name = "Debuff on You", value = 1},
|
||||
{name = "Debuff on Target", value = 2}, --2
|
||||
{name = "Debuff on Focus", value = 3},
|
||||
{name = "Buff on You", value = 11}, --4
|
||||
{name = "Buff on Target", value = 12},
|
||||
{name = "Buff on Focus", value = 13},
|
||||
{name = "Spell Cast Started", value = 21},
|
||||
{name = "Spell Cast Successful", value = 22},
|
||||
{name = "DBM Time Bar", value = 31},
|
||||
{name = "BigWigs Time Bar", value = 32},
|
||||
{name = "Spell Interrupt", value = 41},
|
||||
{name = "Spell Dispell", value = 42},
|
||||
}
|
||||
|
||||
local SetTriggerState = function (triggerID)
|
||||
for i = 1, #triggerList do
|
||||
triggerList[i].checkBox:SetValue (false)
|
||||
if (triggerList[i].value == triggerID) then
|
||||
triggerList[i].checkBox:SetValue (true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
f.SetTriggerState = SetTriggerState
|
||||
f.TriggerList = triggerList
|
||||
|
||||
local OnChangeTriggerState = function (self, triggerID, state)
|
||||
SetTriggerState (triggerID)
|
||||
aura_on:SetValue (triggerID)
|
||||
|
||||
if (f.UpdateLabels) then
|
||||
f:UpdateLabels()
|
||||
end
|
||||
end
|
||||
|
||||
for i = 1, #triggerList do
|
||||
local checkBox = fw:CreateSwitch (f, OnChangeTriggerState, i == 1)
|
||||
checkBox:SetTemplate (fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
|
||||
checkBox:SetAsCheckBox()
|
||||
checkBox:SetFixedParameter (triggerList [i].value)
|
||||
|
||||
checkBox:SetSize (20, 20)
|
||||
checkBox:SetPoint ("topleft", aura_on_label, "bottomleft", 0, 12 + (-i*20))
|
||||
local label = fw:CreateLabel (f, triggerList [i].name)
|
||||
label:SetPoint ("left", checkBox, "right", 2, 0)
|
||||
|
||||
triggerList [i].checkBox = checkBox
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
--spellname
|
||||
local spellname_label = fw:CreateLabel (f, "Spell Name: ", nil, nil, "GameFontNormal")
|
||||
local spellname_textentry = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "SpellName", "$parentSpellName")
|
||||
spellname_textentry:SetTemplate (slider_template)
|
||||
spellname_textentry:SetPoint ("left", spellname_label, "right", 2, 0)
|
||||
f.spellname = spellname_textentry
|
||||
spellname_textentry.tooltip = "Spell/Debuff/Buff to be tracked."
|
||||
|
||||
--spellid
|
||||
local auraid_label = fw:CreateLabel (f, "Spell Id: ", nil, nil, "GameFontNormal")
|
||||
local auraid_textentry = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "AuraSpellId", "$parentAuraSpellId")
|
||||
auraid_textentry:SetTemplate (slider_template)
|
||||
auraid_textentry:Disable()
|
||||
auraid_textentry:SetPoint ("left", auraid_label, "right", 2, 0)
|
||||
|
||||
--use spellid
|
||||
local usespellid_label = fw:CreateLabel (f, "Use SpellId: ", nil, nil, "GameFontNormal")
|
||||
local aura_use_spellid = fw:CreateSwitch (f, function(_, _, state) if (state) then auraid_textentry:Enable() else auraid_textentry:Disable() end end, false, nil, nil, nil, nil, "UseSpellId")
|
||||
aura_use_spellid:SetTemplate (fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
|
||||
aura_use_spellid:SetAsCheckBox()
|
||||
|
||||
aura_use_spellid:SetPoint ("left", usespellid_label, "right", 2, 0)
|
||||
aura_use_spellid.tooltip = "Use the spell id instead of the spell name, for advanced users."
|
||||
|
||||
--in combat only
|
||||
local incombat_label = fw:CreateLabel (f, "Only in Combat: ", nil, nil, "GameFontNormal")
|
||||
local aura_incombat = fw:CreateSwitch (f, function(_, _, state) end, true, nil, nil, nil, nil, "UseInCombat")
|
||||
aura_incombat:SetTemplate (fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
|
||||
aura_incombat:SetAsCheckBox()
|
||||
aura_incombat:SetPoint ("left", incombat_label, "right", 2, 0)
|
||||
aura_incombat.tooltip = "Only active when in combat."
|
||||
|
||||
--aura icon
|
||||
local icon_label = fw:CreateLabel (f, "Icon: ", nil, nil, "GameFontNormal")
|
||||
local icon_button_func = function (texture)
|
||||
f.IconButton.icon.texture = texture
|
||||
end
|
||||
local icon_pick_button = fw:NewButton (f, nil, "$parentIconButton", "IconButton", 20, 20, function() fw:IconPick (icon_button_func, true) end)
|
||||
local icon_button_icon = fw:NewImage (icon_pick_button, [[Interface\ICONS\TEMP]], 19, 19, "background", nil, "icon", "$parentIcon")
|
||||
icon_pick_button:InstallCustomTexture()
|
||||
|
||||
icon_pick_button:SetPoint ("left", icon_label, "right", 2, 0)
|
||||
icon_button_icon:SetPoint ("left", icon_label, "right", 2, 0)
|
||||
|
||||
f.icon = icon_button_icon
|
||||
|
||||
--is cooldown
|
||||
local iscooldown_label = fw:CreateLabel (f, "Cooldown Animation: ", nil, nil, "GameFontNormal")
|
||||
local aura_iscooldown = fw:CreateSwitch (f, function(_, _, state) end, true, nil, nil, nil, nil, "IsCooldown")
|
||||
aura_iscooldown:SetTemplate (fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
|
||||
aura_iscooldown:SetAsCheckBox()
|
||||
aura_iscooldown:SetPoint ("left", iscooldown_label, "right", 2, 0)
|
||||
aura_iscooldown.tooltip = "Only active when in combat."
|
||||
|
||||
--stack
|
||||
local stack_slider = fw:NewSlider (f, f, "$parentStackSlider", "StackSlider", 150, 20, 0, 30, 1, 0, true)
|
||||
stack_slider.useDecimals = true
|
||||
local stack_label = fw:CreateLabel (f, "Stack Size: ", nil, nil, "GameFontNormal")
|
||||
stack_slider:SetTemplate (slider_template)
|
||||
local stack_label = fw:CreateLabel (f, "Trigger Stack Size: ", nil, nil, "GameFontNormal")
|
||||
stack_slider:SetPoint ("left", stack_label, "right", 2, 0)
|
||||
stack_slider.tooltip = "Minimum amount of stacks to trigger the aura."
|
||||
|
||||
@@ -1898,19 +2125,22 @@
|
||||
return t
|
||||
end
|
||||
local sound_effect = fw:CreateDropDown (f, sound_options, 1, 150, 20, "SoundEffectDropdown", "$parentSoundEffectDropdown")
|
||||
sound_effect:SetTemplate (slider_template)
|
||||
local sound_effect_label = fw:CreateLabel (f, "Play Sound: ", nil, nil, "GameFontNormal")
|
||||
sound_effect:SetPoint ("left", sound_effect_label, "right", 2, 0)
|
||||
sound_effect.tooltip = "Sound played when the aura triggers."
|
||||
|
||||
--say something
|
||||
local say_something_label = fw:CreateLabel (f, "/Say: ", nil, nil, "GameFontNormal")
|
||||
local say_something_label = fw:CreateLabel (f, "/Say on Trigger: ", nil, nil, "GameFontNormal")
|
||||
local say_something = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "SaySomething", "$parentSaySomething")
|
||||
say_something:SetTemplate (slider_template)
|
||||
say_something:SetPoint ("left", say_something_label, "right", 2, 0)
|
||||
say_something.tooltip = "Your character /say this phrase when the aura triggers."
|
||||
|
||||
--aura text
|
||||
local aura_text_label = fw:CreateLabel (f, "Aura Text: ", nil, nil, "GameFontNormal")
|
||||
local aura_text = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "AuraText", "$parentAuraText")
|
||||
aura_text:SetTemplate (slider_template)
|
||||
aura_text:SetPoint ("left", aura_text_label, "right", 2, 0)
|
||||
aura_text.tooltip = "Text shown at aura's icon right side."
|
||||
|
||||
@@ -1926,6 +2156,10 @@
|
||||
self.glow_test.animOut:Play()
|
||||
end
|
||||
end, false, nil, nil, nil, nil, "UseGlow")
|
||||
|
||||
useglow:SetTemplate (fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
|
||||
useglow:SetAsCheckBox()
|
||||
|
||||
useglow:SetPoint ("left", useglow_label, "right", 2, 0)
|
||||
useglow.tooltip = "Do not rename the aura on WeakAuras options panel or the glow effect may not work."
|
||||
|
||||
@@ -1937,12 +2171,14 @@
|
||||
--encounter id
|
||||
local encounterid_label = fw:CreateLabel (f, "Encounter ID: ", nil, nil, "GameFontNormal")
|
||||
local encounterid = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "EncounterIdText", "$parentEncounterIdText")
|
||||
encounterid:SetTemplate (slider_template)
|
||||
encounterid:SetPoint ("left", encounterid_label, "right", 2, 0)
|
||||
encounterid.tooltip = "Only load this aura for this raid encounter."
|
||||
|
||||
--size
|
||||
local icon_size_slider = fw:NewSlider (f, f, "$parentIconSizeSlider", "IconSizeSlider", 150, 20, 8, 256, 1, 64)
|
||||
local icon_size_label = fw:CreateLabel (f, "Size: ", nil, nil, "GameFontNormal")
|
||||
icon_size_slider:SetTemplate (slider_template)
|
||||
icon_size_slider:SetPoint ("left", icon_size_label, "right", 2, 0)
|
||||
icon_size_slider.tooltip = "Icon size, width and height."
|
||||
|
||||
@@ -1955,6 +2191,7 @@
|
||||
return t
|
||||
end
|
||||
local aura_addon = fw:CreateDropDown (f, addon_options, 1, 150, 20, "AuraAddonDropdown", "$parentAuraAddonDropdown")
|
||||
aura_addon:SetTemplate (slider_template)
|
||||
local aura_addon_label = fw:CreateLabel (f, "Addon: ", nil, nil, "GameFontNormal")
|
||||
aura_addon:SetPoint ("left", aura_addon_label, "right", 2, 0)
|
||||
|
||||
@@ -1982,6 +2219,7 @@
|
||||
|
||||
local weakauras_folder_label = fw:CreateLabel (f, "Weak Auras Group: ", nil, nil, "GameFontNormal")
|
||||
local weakauras_folder = fw:CreateDropDown (f, weakauras_folder_options, 1, 150, 20, "WeakaurasFolderDropdown", "$parentWeakaurasFolder")
|
||||
weakauras_folder:SetTemplate (slider_template)
|
||||
weakauras_folder:SetPoint ("left", weakauras_folder_label, "right", 2, 0)
|
||||
|
||||
--create
|
||||
@@ -2000,6 +2238,8 @@
|
||||
local addon = f.AuraAddonDropdown.value
|
||||
local folder = f.WeakaurasFolderDropdown.value
|
||||
local iconsize = f.IconSizeSlider.value
|
||||
local incombat = f.UseInCombat.value
|
||||
local iscooldown = f.IsCooldown.value
|
||||
|
||||
local icon_text = f.AuraText.text
|
||||
local icon_glow = f.UseGlow.value
|
||||
@@ -2010,7 +2250,7 @@
|
||||
end
|
||||
|
||||
if (addon == "WA") then
|
||||
_detalhes:CreateWeakAura (aura_type_value, spellid, use_spellId, spellname, name, icon, target, stacksize, sound, chat, icon_text, icon_glow, eid, folder, iconsize, f.other_values)
|
||||
_detalhes:CreateWeakAura (aura_type_value, spellid, use_spellId, spellname, name, icon, target, stacksize, sound, chat, icon_text, icon_glow, eid, folder, iconsize, f.other_values, incombat, iscooldown)
|
||||
else
|
||||
_detalhes:Msg ("No Aura Addon selected. Addons currently supported: WeakAuras 2.")
|
||||
end
|
||||
@@ -2018,46 +2258,48 @@
|
||||
f:Hide()
|
||||
end
|
||||
|
||||
local create_button = fw:CreateButton (f, create_func, 106, 16, "Create Aura")
|
||||
create_button:InstallCustomTexture()
|
||||
local create_button = fw:CreateButton (f, create_func, 106, 20, "Create Aura")
|
||||
create_button:SetTemplate (slider_template)
|
||||
|
||||
local cancel_button = fw:CreateButton (f, function() name_textentry:ClearFocus(); f:Hide() end, 106, 16, "Cancel")
|
||||
cancel_button:InstallCustomTexture()
|
||||
local cancel_button = fw:CreateButton (f, function() name_textentry:ClearFocus(); f:Hide() end, 106, 20, "Cancel")
|
||||
cancel_button:SetTemplate (slider_template)
|
||||
|
||||
create_button:SetIcon ([[Interface\Buttons\UI-CheckBox-Check]], nil, nil, nil, {0.125, 0.875, 0.125, 0.875}, nil, 4, 2)
|
||||
cancel_button:SetIcon ([[Interface\Buttons\UI-GroupLoot-Pass-Down]], nil, nil, nil, {0.125, 0.875, 0.125, 0.875}, nil, 4, 2)
|
||||
|
||||
local x_start = 20
|
||||
local x2_start = 320
|
||||
local x2_start = 420
|
||||
local y_start = 21
|
||||
|
||||
|
||||
--aura name and the type
|
||||
name_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*1) + (50)) * -1)
|
||||
aura_type_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*2) + (50)) * -1)
|
||||
name_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*1) + (25)) * -1)
|
||||
aura_type_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*2) + (25)) * -1)
|
||||
|
||||
--triggers
|
||||
aura_on_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*4) + (45)) * -1)
|
||||
stack_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*5) + (45)) * -1)
|
||||
encounterid_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*6) + (45)) * -1)
|
||||
aura_on_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*4) + (65)) * -1)
|
||||
stack_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*17) + (65)) * -1)
|
||||
encounterid_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*18) + (65)) * -1)
|
||||
|
||||
--about the spell
|
||||
spellname_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*8) + (45)) * -1)
|
||||
auraid_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*9) + (45)) * -1)
|
||||
usespellid_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*10) + (45)) * -1)
|
||||
|
||||
--configuration
|
||||
icon_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*1) + (50)) * -1)
|
||||
sound_effect_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*2) + (50)) * -1)
|
||||
say_something_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*3) + (50)) * -1)
|
||||
aura_text_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*4) + (50)) * -1)
|
||||
useglow_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*5) + (50)) * -1)
|
||||
icon_size_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*6) + (50)) * -1)
|
||||
|
||||
aura_addon_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*15) + (60)) * -1)
|
||||
weakauras_folder_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*16) + (60)) * -1)
|
||||
spellname_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*20) + (45)) * -1)
|
||||
usespellid_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*21) + (45)) * -1)
|
||||
auraid_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*22) + (45)) * -1)
|
||||
incombat_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*23) + (45)) * -1)
|
||||
|
||||
create_button:SetPoint ("topleft", f, "topleft", x_start, ((y_start*18) + (60)) * -1)
|
||||
cancel_button:SetPoint ("topright", f, "topright", x_start*-1, ((y_start*18) + (60)) * -1)
|
||||
--configuration
|
||||
icon_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*6) + (47)) * -1)
|
||||
sound_effect_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*7) + (47)) * -1)
|
||||
say_something_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*8) + (47)) * -1)
|
||||
aura_text_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*9) + (47)) * -1)
|
||||
useglow_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*10) + (47)) * -1)
|
||||
iscooldown_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*11) + (47)) * -1)
|
||||
icon_size_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*12) + (47)) * -1)
|
||||
|
||||
aura_addon_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*20) + (60)) * -1)
|
||||
weakauras_folder_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*21) + (60)) * -1)
|
||||
|
||||
create_button:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*23) + (60)) * -1)
|
||||
cancel_button:SetPoint ("left", create_button, "right", 20, 0)
|
||||
|
||||
function f:UpdateLabels()
|
||||
|
||||
@@ -2081,6 +2323,7 @@
|
||||
f.AuraText:SetText ("")
|
||||
aura_text_label.text = "Aura Text: "
|
||||
f.UseGlow:Enable()
|
||||
f.IsCooldown:Enable()
|
||||
|
||||
if (aura_type == "icon") then
|
||||
aura_text_label:SetText ("Icon Text: ")
|
||||
@@ -2091,22 +2334,24 @@
|
||||
aura_text_label:SetText ("Text: ")
|
||||
icon_size_label:SetText ("Font Size: ")
|
||||
f.IconSizeSlider:SetValue (12)
|
||||
f.IsCooldown:Disable()
|
||||
|
||||
elseif (aura_type == "aurabar") then
|
||||
aura_text_label:SetText ("Left Text: ")
|
||||
icon_size_label:SetText ("Bar Width: ")
|
||||
f.IconSizeSlider:SetValue (250)
|
||||
f.IsCooldown:Disable()
|
||||
end
|
||||
|
||||
if (trigger >= 1 and trigger <= 19) then --buff and debuff
|
||||
stack_label:SetText ("Stack Size: ")
|
||||
stack_label:SetText ("Trigger Stack Size: ")
|
||||
|
||||
elseif (trigger >= 20 and trigger <= 29) then --cast end cast start
|
||||
stack_label:SetText ("Duration: ")
|
||||
stack_label:SetText ("Cast Duration: ")
|
||||
f.StackSlider:SetValue (2)
|
||||
|
||||
elseif (trigger >= 30 and trigger <= 39) then --boss mods
|
||||
stack_label:SetText ("Remaining Time:")
|
||||
stack_label:SetText ("Trigger Remaining Time:")
|
||||
f.StackSlider:SetValue (4)
|
||||
f.StackSlider.tooltip = "Will trigger when the bar remaining time reach this value."
|
||||
f.SpellName:Disable()
|
||||
@@ -2117,6 +2362,9 @@
|
||||
f.SpellName:Disable()
|
||||
f.UseSpellId:Disable()
|
||||
DetailsAuraPanel.AuraTypeDropdown:Select (2, true)
|
||||
DetailsAuraPanel.OnSelectAuraType (nil, nil, 2, true)
|
||||
f.IsCooldown:Disable()
|
||||
|
||||
f.SoundEffectDropdown:Disable()
|
||||
f.SaySomething:Disable()
|
||||
f.IconButton:Disable()
|
||||
@@ -2179,14 +2427,18 @@
|
||||
|
||||
if (triggertype and type (triggertype) == "number") then
|
||||
DetailsAuraPanel.AuraOnDropdown:Select (triggertype, true)
|
||||
DetailsAuraPanel.SetTriggerState (DetailsAuraPanel.TriggerList [triggertype].value) --passed by index not by the trigger ID
|
||||
else
|
||||
DetailsAuraPanel.AuraOnDropdown:Select (1, true)
|
||||
DetailsAuraPanel.SetTriggerState (1)
|
||||
end
|
||||
|
||||
if (auratype and type (auratype) == "number") then
|
||||
DetailsAuraPanel.AuraTypeDropdown:Select (auratype, true)
|
||||
DetailsAuraPanel.OnSelectAuraType (nil, nil, auratype)
|
||||
else
|
||||
DetailsAuraPanel.AuraTypeDropdown:Select (1, true)
|
||||
DetailsAuraPanel.OnSelectAuraType (nil, nil, "icon")
|
||||
end
|
||||
|
||||
DetailsAuraPanel:UpdateLabels()
|
||||
@@ -2591,6 +2843,8 @@
|
||||
f:SetToplevel (true)
|
||||
f:SetMovable (true)
|
||||
f.Title:SetTextColor (1, .8, .2)
|
||||
|
||||
f:SetBackdropColor (unpack (_detalhes.default_backdropcolor))
|
||||
|
||||
local have_plugins_enabled
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ do
|
||||
end
|
||||
|
||||
local class = _detalhes:GetClass (Actor.nome)
|
||||
if (class) then
|
||||
if (class and class ~= "UNKNOW") then
|
||||
Actor.classe = class
|
||||
Actor.need_refresh = true
|
||||
Actor.guessing_class = nil
|
||||
@@ -212,6 +212,7 @@ do
|
||||
_detalhes.cached_specs [Actor.serial] = spec
|
||||
|
||||
Actor.spec = spec
|
||||
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
|
||||
Actor.guessing_spec = nil
|
||||
|
||||
if (container) then
|
||||
@@ -236,6 +237,7 @@ do
|
||||
_detalhes.cached_specs [Actor.serial] = spec
|
||||
|
||||
Actor.spec = spec
|
||||
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
|
||||
|
||||
if (container) then
|
||||
container.need_refresh = true
|
||||
@@ -267,6 +269,7 @@ do
|
||||
_detalhes.cached_specs [Actor.serial] = spec
|
||||
|
||||
Actor.spec = spec
|
||||
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
|
||||
|
||||
if (container) then
|
||||
container.need_refresh = true
|
||||
@@ -307,6 +310,8 @@ do
|
||||
local spec = _detalhes.cached_specs [Actor.serial]
|
||||
if (spec) then
|
||||
Actor.spec = spec
|
||||
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
|
||||
|
||||
Actor.guessing_spec = nil
|
||||
|
||||
if (container) then
|
||||
@@ -332,6 +337,8 @@ do
|
||||
_detalhes.cached_specs [Actor.serial] = spec
|
||||
|
||||
Actor.spec = spec
|
||||
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
|
||||
|
||||
Actor.guessing_spec = nil
|
||||
|
||||
if (container) then
|
||||
@@ -354,6 +361,7 @@ do
|
||||
_detalhes.cached_specs [Actor.serial] = spec
|
||||
|
||||
Actor.spec = spec
|
||||
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
|
||||
Actor.guessing_spec = nil
|
||||
|
||||
if (container) then
|
||||
@@ -379,6 +387,7 @@ do
|
||||
_detalhes.cached_specs [Actor.serial] = spec
|
||||
|
||||
Actor.spec = spec
|
||||
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
|
||||
Actor.guessing_spec = nil
|
||||
|
||||
if (container) then
|
||||
@@ -410,6 +419,7 @@ do
|
||||
_detalhes.cached_specs [Actor.serial] = spec
|
||||
|
||||
Actor.spec = spec
|
||||
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
|
||||
Actor.guessing_spec = nil
|
||||
|
||||
if (container) then
|
||||
@@ -434,6 +444,7 @@ do
|
||||
_detalhes.cached_specs [Actor.serial] = spec
|
||||
|
||||
Actor.spec = spec
|
||||
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
|
||||
Actor.need_refresh = true
|
||||
Actor.guessing_spec = nil
|
||||
|
||||
|
||||
+22
-1
@@ -1000,6 +1000,7 @@ local default_profile = {
|
||||
force_activity_time_pvp = true,
|
||||
death_tooltip_width = 300,
|
||||
override_spellids = true,
|
||||
all_players_are_group = false,
|
||||
|
||||
--> skins
|
||||
standard_skin = false,
|
||||
@@ -1073,6 +1074,7 @@ local default_player_data = {
|
||||
combat_counter = 0,
|
||||
last_instance_id = 0,
|
||||
last_instance_time = 0,
|
||||
mythic_dungeon_id = 0,
|
||||
--> nicktag cache
|
||||
nick_tag_cache = {},
|
||||
ignore_nicktag = false,
|
||||
@@ -1121,6 +1123,10 @@ local default_player_data = {
|
||||
enabled = true,
|
||||
channel = "SELF",
|
||||
},
|
||||
announce_damagerecord = {
|
||||
enabled = true,
|
||||
channel = "SELF",
|
||||
},
|
||||
--> benchmark
|
||||
benchmark_db = {
|
||||
frame = {},
|
||||
@@ -1143,7 +1149,7 @@ local default_global_data = {
|
||||
savedCustomSpells = {},
|
||||
savedTimeCaptures = {},
|
||||
lastUpdateWarning = 0,
|
||||
update_warning_timeout = 30,
|
||||
update_warning_timeout = 10,
|
||||
report_where = "SAY",
|
||||
realm_sync = true,
|
||||
spell_school_cache = {},
|
||||
@@ -1195,6 +1201,21 @@ local default_global_data = {
|
||||
},
|
||||
spell_pool = {},
|
||||
encounter_spell_pool = {},
|
||||
--> aura creation frame libwindow
|
||||
createauraframe = {},
|
||||
--> min health done on the death report
|
||||
deathlog_healingdone_min = 1,
|
||||
|
||||
--> mythic plus config
|
||||
mythic_plus = {
|
||||
always_in_combat = false, --
|
||||
merge_boss_trash = true, --
|
||||
delete_trash_after_merge = true, --
|
||||
--merge_boss_with_trash = false, --this won't be used
|
||||
boss_dedicated_segment = true, --
|
||||
make_overall_when_done = true, --
|
||||
make_overall_boss_only = false, --
|
||||
},
|
||||
|
||||
-- important auras
|
||||
--[=[
|
||||
|
||||
+11
-11
@@ -66,7 +66,7 @@ local _
|
||||
micro_frames = {left = "DETAILS_STATUSBAR_PLUGIN_THREAT"},
|
||||
|
||||
instance_cprops = {
|
||||
["menu_icons_size"] = 1,
|
||||
["menu_icons_size"] = 0.85,
|
||||
["color"] = {
|
||||
1, -- [1]
|
||||
1, -- [2]
|
||||
@@ -75,7 +75,7 @@ local _
|
||||
},
|
||||
["menu_anchor"] = {
|
||||
13, -- [1]
|
||||
2, -- [2]
|
||||
1, -- [2]
|
||||
["side"] = 2,
|
||||
},
|
||||
["bg_r"] = 0.0941,
|
||||
@@ -142,7 +142,7 @@ local _
|
||||
["bars_grow_direction"] = 1,
|
||||
["row_info"] = {
|
||||
["textR_outline"] = true,
|
||||
["spec_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal_alpha",
|
||||
["spec_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal",
|
||||
["textL_outline"] = true,
|
||||
["texture_highlight"] = "Interface\\FriendsFrame\\UI-FriendsList-Highlight",
|
||||
["textR_show_data"] = {
|
||||
@@ -162,7 +162,7 @@ local _
|
||||
["between"] = 1,
|
||||
},
|
||||
["texture_background_class_color"] = false,
|
||||
["start_after_icon"] = false,
|
||||
["start_after_icon"] = true,
|
||||
["font_face_file"] = "Fonts\\ARIALN.TTF",
|
||||
["textL_custom_text"] = "{data1}. {data3}{data2}",
|
||||
["font_size"] = 10,
|
||||
@@ -217,7 +217,7 @@ local _
|
||||
["textR_separator"] = ",",
|
||||
["textL_class_colors"] = false,
|
||||
},
|
||||
["show_statusbar"] = true,
|
||||
["show_statusbar"] = false,
|
||||
["bg_alpha"] = 0.699999988079071,
|
||||
["wallpaper"] = {
|
||||
["enabled"] = false,
|
||||
@@ -425,7 +425,7 @@ local _
|
||||
["between"] = 0,
|
||||
},
|
||||
["texture_background_class_color"] = false,
|
||||
["start_after_icon"] = false,
|
||||
["start_after_icon"] = true,
|
||||
["font_face_file"] = "Interface\\Addons\\Details\\fonts\\Accidental Presidency.ttf",
|
||||
["textL_custom_text"] = "{data1}. {data3}{data2}",
|
||||
["font_size"] = 10,
|
||||
@@ -571,7 +571,7 @@ local _
|
||||
["between"] = 1,
|
||||
},
|
||||
["texture_background_class_color"] = false,
|
||||
["start_after_icon"] = false,
|
||||
["start_after_icon"] = true,
|
||||
["font_face_file"] = "Fonts\\ARIALN.TTF",
|
||||
["textL_custom_text"] = "{data1}. {data3}{data2}",
|
||||
["font_size"] = 10,
|
||||
@@ -848,7 +848,7 @@ local _
|
||||
["between"] = 0,
|
||||
},
|
||||
["texture_background_class_color"] = false,
|
||||
["start_after_icon"] = false,
|
||||
["start_after_icon"] = true,
|
||||
["font_face_file"] = "Interface\\Addons\\Details\\fonts\\Accidental Presidency.ttf",
|
||||
["textL_custom_text"] = "{data1}. {data3}{data2}",
|
||||
["font_size"] = 10,
|
||||
@@ -1517,7 +1517,7 @@ local _
|
||||
["between"] = 1,
|
||||
},
|
||||
["texture_background_class_color"] = false,
|
||||
["start_after_icon"] = false,
|
||||
["start_after_icon"] = true,
|
||||
["font_face_file"] = "Interface\\Addons\\Details\\fonts\\FORCED SQUARE.ttf",
|
||||
["textL_custom_text"] = "{data1}. {data3}{data2}",
|
||||
["font_size"] = 10,
|
||||
@@ -1706,7 +1706,7 @@ local _
|
||||
["textL_enable_custom_text"] = false,
|
||||
["icon_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal",
|
||||
["texture_background_file"] = "Interface\\AddOns\\Details\\images\\BantoBar",
|
||||
["start_after_icon"] = false,
|
||||
["start_after_icon"] = true,
|
||||
["texture_highlight"] = "Interface\\FriendsFrame\\UI-FriendsList-Highlight",
|
||||
["textR_enable_custom_text"] = false,
|
||||
["textR_custom_text"] = "{data1} ({data2}, {data3}%)",
|
||||
@@ -2207,7 +2207,7 @@ local _
|
||||
["between"] = 0,
|
||||
},
|
||||
["texture_background_class_color"] = false,
|
||||
["start_after_icon"] = false,
|
||||
["start_after_icon"] = true,
|
||||
["font_face_file"] = "Interface\\Addons\\Details\\fonts\\Accidental Presidency.ttf",
|
||||
["backdrop"] = {
|
||||
["enabled"] = false,
|
||||
|
||||
@@ -907,6 +907,95 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
print (Loc ["STRING_DETAILS1"] .. "diagnostic for character " .. rest .. " turned on.")
|
||||
return
|
||||
end
|
||||
|
||||
local current_combat = _detalhes.tabela_vigente
|
||||
|
||||
if (not _detalhes.DebugWindow) then
|
||||
_detalhes.DebugWindow = _detalhes.gump:CreateSimplePanel (UIParent, 800, 600, "Details! Debug", "DetailsDebugPanel")
|
||||
local TextBox = _detalhes.gump:NewSpecialLuaEditorEntry (_detalhes.DebugWindow, 760, 560, "text", "$parentTextEntry", true)
|
||||
TextBox:SetPoint ("center", _detalhes.DebugWindow, "center", 0, -10)
|
||||
TextBox:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
TextBox:SetBackdropColor (0, 0, 0, 0.9)
|
||||
TextBox:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
_detalhes.DebugWindow.TextBox = TextBox
|
||||
end
|
||||
|
||||
local text = [[
|
||||
Hello World!
|
||||
Details! Damage Meter Debug
|
||||
Release Version: @VERSION Core Version: @CORE
|
||||
|
||||
Update Thread Status:
|
||||
Tick Rate: @TICKRATE
|
||||
Threat Health: @TICKHEALTH
|
||||
Last Tick: @TICKLAST
|
||||
Next Tick In: @TICKNEXT
|
||||
|
||||
Current Combat Status:
|
||||
ID: @COMBATID
|
||||
Container Status: @COMBATCONTAINERS
|
||||
Damage Container Actors: @COMBATDAMAGEACTORS actors found
|
||||
|
||||
Parser Status:
|
||||
Parser Health: @PARSERHEALTH
|
||||
Parser Capture Status: @PARSERCAPTURE
|
||||
|
||||
Lower Instance Status (window 1):
|
||||
Is Shown: @INSTANCESHOWN
|
||||
Segment Status: @INSTANCESEGMENT
|
||||
Damage Update Status: @INSTANCEDAMAGESTATUS
|
||||
|
||||
]]
|
||||
|
||||
text = text:gsub ([[@VERSION]], _detalhes.userversion)
|
||||
text = text:gsub ([[@CORE]], _detalhes.realversion)
|
||||
|
||||
text = text:gsub ([[@TICKRATE]], _detalhes.update_speed)
|
||||
text = text:gsub ([[@TICKHEALTH]], _detalhes:TimeLeft (_detalhes.atualizador) ~= 0 and "|cFF22FF22good|r" or "|cFFFF2222bad|r")
|
||||
text = text:gsub ([[@TICKLAST]], _detalhes.LastUpdateTick .. " (" .. _detalhes._tempo - _detalhes.LastUpdateTick .. " seconds ago)")
|
||||
text = text:gsub ([[@TICKNEXT]], _detalhes:TimeLeft (_detalhes.atualizador))
|
||||
|
||||
text = text:gsub ([[@COMBATID]], _detalhes.combat_id)
|
||||
text = text:gsub ([[@COMBATCONTAINERS]], _detalhes.tabela_vigente[1] and _detalhes.tabela_vigente[2] and _detalhes.tabela_vigente[3] and _detalhes.tabela_vigente[4] and "|cFF22FF22good|r" or "|cFFFF2222bad|r")
|
||||
text = text:gsub ([[@COMBATDAMAGEACTORS]], #_detalhes.tabela_vigente[1] and _detalhes.tabela_vigente[1]._ActorTable and #_detalhes.tabela_vigente[1]._ActorTable)
|
||||
|
||||
text = text:gsub ([[@PARSERHEALTH]], _detalhes.parser_frame:GetScript ("OnEvent") == _detalhes.OnParserEvent and "|cFF22FF22good|r" or "|cFFFF2222bad|r")
|
||||
|
||||
local captureStr = ""
|
||||
for _ , captureName in ipairs (_detalhes.capture_types) do
|
||||
if (_detalhes.capture_current [captureName]) then
|
||||
captureStr = captureStr .. " " .. captureName .. ": |cFF22FF22okay|r"
|
||||
else
|
||||
captureStr = captureStr .. " " .. captureName .. ": |cFFFF2222X|r"
|
||||
end
|
||||
end
|
||||
text = text:gsub ([[@PARSERCAPTURE]], captureStr)
|
||||
|
||||
local instance = _detalhes:GetLowerInstanceNumber()
|
||||
if (instance) then
|
||||
instance = _detalhes:GetInstance (instance)
|
||||
end
|
||||
|
||||
if (instance) then
|
||||
if (instance:IsEnabled()) then
|
||||
text = text:gsub ([[@INSTANCESHOWN]], "|cFF22FF22good|r")
|
||||
else
|
||||
text = text:gsub ([[@INSTANCESHOWN]], "|cFFFFFF22not visible|r")
|
||||
end
|
||||
|
||||
text = text:gsub ([[@INSTANCESEGMENT]], (instance.showing == _detalhes.tabela_vigente and "|cFF22FF22good|r" or "|cFFFFFF22isn't the current combat object|r") .. (" window segment: " .. instance:GetSegment()))
|
||||
|
||||
text = text:gsub ([[@INSTANCEDAMAGESTATUS]], (_detalhes._tempo - (_detalhes.LastFullDamageUpdate or 0)) < 3 and "|cFF22FF22good|r" or "|cFFFF2222last update registered is > than 3 seconds, is there actors to show?|r")
|
||||
else
|
||||
text = text:gsub ([[@INSTANCESHOWN]], "|cFFFFFF22not found|r")
|
||||
text = text:gsub ([[@INSTANCESEGMENT]], "|cFFFFFF22not found|r")
|
||||
text = text:gsub ([[@INSTANCEDAMAGESTATUS]], "|cFFFFFF22not found|r")
|
||||
|
||||
end
|
||||
|
||||
_detalhes.DebugWindow.TextBox:SetText (text)
|
||||
|
||||
_detalhes.DebugWindow:Show()
|
||||
end
|
||||
|
||||
--> debug combat log
|
||||
@@ -1302,6 +1391,96 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
|
||||
instance:InstanceAlert ("Boss Defeated! Show Ranking", icon, 10, func, true)
|
||||
|
||||
elseif (msg == "merge") then
|
||||
|
||||
--> at this point, details! should not be in combat
|
||||
if (_detalhes.in_combat) then
|
||||
_detalhes:Msg ("already in combat, closing current segment.")
|
||||
_detalhes:SairDoCombate()
|
||||
end
|
||||
|
||||
--> create a new combat to be the overall for the mythic run
|
||||
_detalhes:EntrarEmCombate()
|
||||
|
||||
--> get the current combat just created and the table with all past segments
|
||||
local newCombat = _detalhes:GetCurrentCombat()
|
||||
local segmentHistory = _detalhes:GetCombatSegments()
|
||||
local totalTime = 0
|
||||
local startDate, endDate = "", ""
|
||||
local lastSegment
|
||||
local segmentsAdded = 0
|
||||
|
||||
--> add all boss segments from this run to this new segment
|
||||
for i = 1, 25 do
|
||||
local pastCombat = segmentHistory [i]
|
||||
if (pastCombat and pastCombat ~= newCombat) then
|
||||
newCombat = newCombat + pastCombat
|
||||
totalTime = totalTime + pastCombat:GetCombatTime()
|
||||
if (i == 1) then
|
||||
local _, endedDate = pastCombat:GetDate()
|
||||
endDate = endedDate
|
||||
end
|
||||
lastSegment = pastCombat
|
||||
segmentsAdded = segmentsAdded + 1
|
||||
end
|
||||
end
|
||||
|
||||
if (lastSegment) then
|
||||
startDate = lastSegment:GetDate()
|
||||
end
|
||||
|
||||
_detalhes:Msg ("done merging " .. segmentsAdded .. " segments.")
|
||||
|
||||
--[[ --mythic+ debug
|
||||
--> tag the segment as mythic overall segment
|
||||
newCombat.is_mythic_dungeon = {
|
||||
MapID = _detalhes.MythicPlus.Dungeon,
|
||||
StartedAt = _detalhes.MythicPlus.StartedAt, --the start of the run
|
||||
EndedAt = _detalhes.MythicPlus.EndedAt, --the end of the run
|
||||
SegmentID = "overall", --segment number within the dungeon
|
||||
--EncounterID = encounterID,
|
||||
--EncounterName = encounterName,
|
||||
RunID = _detalhes.MythicPlus.RunID,
|
||||
OverallSegment = true,
|
||||
}
|
||||
--]]
|
||||
|
||||
--> set some data
|
||||
newCombat:SetStartTime (GetTime() - totalTime)
|
||||
newCombat:SetEndTime (GetTime())
|
||||
|
||||
newCombat.data_inicio = startDate
|
||||
newCombat.data_fim = endDate
|
||||
|
||||
--> immediatly finishes the segment just started
|
||||
_detalhes:SairDoCombate()
|
||||
|
||||
--> cleanup the past segments table
|
||||
for i = 25, 1, -1 do
|
||||
local pastCombat = segmentHistory [i]
|
||||
if (pastCombat and pastCombat ~= newCombat) then
|
||||
wipe (pastCombat)
|
||||
segmentHistory [i] = nil
|
||||
end
|
||||
end
|
||||
|
||||
--> clear memory
|
||||
collectgarbage()
|
||||
|
||||
_detalhes:InstanciaCallFunction (_detalhes.gump.Fade, "in", nil, "barras")
|
||||
_detalhes:InstanciaCallFunction (_detalhes.AtualizaSegmentos)
|
||||
_detalhes:InstanciaCallFunction (_detalhes.AtualizaSoloMode_AfertReset)
|
||||
_detalhes:InstanciaCallFunction (_detalhes.ResetaGump)
|
||||
_detalhes:AtualizaGumpPrincipal (-1, true)
|
||||
|
||||
elseif (msg == "record") then
|
||||
|
||||
|
||||
_detalhes.ScheduleLoadStorage()
|
||||
_detalhes.TellDamageRecord = C_Timer.NewTimer (0.6, _detalhes.PrintEncounterRecord)
|
||||
_detalhes.TellDamageRecord.Boss = 2032
|
||||
_detalhes.TellDamageRecord.Diff = 16
|
||||
|
||||
elseif (msg == "recordtest") then
|
||||
|
||||
local f = DetailsRecordFrameAnimation
|
||||
|
||||
@@ -502,6 +502,56 @@ do
|
||||
|
||||
}
|
||||
|
||||
_detalhes.SpecIDToClass = {
|
||||
[577] = "DEMONHUNTER", -- Havoc Demon Hunter
|
||||
[581] = "DEMONHUNTER", -- Vengeance Demon Hunter
|
||||
|
||||
[252] = "DEATHKNIGHT", -- Unholy Death Knight
|
||||
[251] = "DEATHKNIGHT", -- Frost Death Knight
|
||||
[250] = "DEATHKNIGHT", -- Blood Death Knight
|
||||
|
||||
[102] = "DRUID", -- Balance Druid
|
||||
[103] = "DRUID", -- Feral Druid
|
||||
[104] = "DRUID", -- Guardian Druid
|
||||
[105] = "DRUID", -- Restoration Druid
|
||||
|
||||
[253] = "HUNTER", -- Beast Mastery Hunter
|
||||
[254] = "HUNTER", -- Marksmanship Hunter
|
||||
[255] = "HUNTER", -- Survival Hunter
|
||||
|
||||
[62] = "MAGE", -- Arcane Mage
|
||||
[63] = "MAGE", -- Fire Mage
|
||||
[64] = "MAGE", -- Frost Mage
|
||||
|
||||
[268] = "MONK", -- Brewmaster Monk
|
||||
[269] = "MONK", -- Windwalker Monk
|
||||
[270] = "MONK", -- Mistweaver Monk
|
||||
|
||||
[65] = "PALADIN", -- Holy Paladin
|
||||
[66] = "PALADIN", -- Protection Paladin
|
||||
[70] = "PALADIN", -- Retribution Paladin
|
||||
|
||||
[256] = "PRIEST", -- Discipline Priest
|
||||
[257] = "PRIEST", -- Holy Priest
|
||||
[258] = "PRIEST", -- Shadow Priest
|
||||
|
||||
[259] = "ROGUE", -- Assassination Rogue
|
||||
[260] = "ROGUE", -- Outlaw Rogue
|
||||
[261] = "ROGUE", -- Subtlety Rogue
|
||||
|
||||
[262] = "SHAMAN", -- Elemental Shaman
|
||||
[263] = "SHAMAN", -- Enhancement Shaman
|
||||
[264] = "SHAMAN", -- Restoration Shaman
|
||||
|
||||
[265] = "WARLOCK", -- Affliction Warlock
|
||||
[266] = "WARLOCK", -- Demonology Warlock
|
||||
[267] = "WARLOCK", -- Destruction Warlock
|
||||
|
||||
[71] = "WARRIOR", -- Arms Warrior
|
||||
[72] = "WARRIOR", -- Fury Warrior
|
||||
[73] = "WARRIOR", -- Protection Warrior
|
||||
}
|
||||
|
||||
_detalhes.ClassSpellList = {
|
||||
|
||||
--death knight
|
||||
|
||||
+115
-16
@@ -1504,6 +1504,42 @@ function gump:CriaJanelaInfo()
|
||||
este_gump.apoio_icone_direito:SetHeight (13)
|
||||
|
||||
|
||||
este_gump.topright_text1 = este_gump:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
este_gump.topright_text1:SetPoint ("bottomright", este_gump, "topright", -18 - (94 * (1-1)), -36)
|
||||
este_gump.topright_text1:SetJustifyH ("right")
|
||||
_detalhes.gump:SetFontSize (este_gump.topright_text1, 10)
|
||||
|
||||
este_gump.topright_text2 = este_gump:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
este_gump.topright_text2:SetPoint ("bottomright", este_gump, "topright", -18 - (94 * (1-1)), -48)
|
||||
este_gump.topright_text2:SetJustifyH ("right")
|
||||
_detalhes.gump:SetFontSize (este_gump.topright_text2, 10)
|
||||
|
||||
function este_gump:SetTopRightTexts (text1, text2, size, color, font)
|
||||
if (text1) then
|
||||
este_gump.topright_text1:SetText (text1)
|
||||
else
|
||||
este_gump.topright_text1:SetText ("")
|
||||
end
|
||||
if (text2) then
|
||||
este_gump.topright_text2:SetText (text2)
|
||||
else
|
||||
este_gump.topright_text2:SetText ("")
|
||||
end
|
||||
|
||||
if (size and type (size) == "number") then
|
||||
_detalhes.gump:SetFontSize (este_gump.topright_text1, size)
|
||||
_detalhes.gump:SetFontSize (este_gump.topright_text2, size)
|
||||
end
|
||||
if (color) then
|
||||
_detalhes.gump:SetFontColor (este_gump.topright_text1, color)
|
||||
_detalhes.gump:SetFontColor (este_gump.topright_text2, color)
|
||||
end
|
||||
if (font) then
|
||||
_detalhes.gump:SetFontFace (este_gump.topright_text1, font)
|
||||
_detalhes.gump:SetFontFace (este_gump.topright_text2, font)
|
||||
end
|
||||
end
|
||||
|
||||
-------------------------------------------------
|
||||
|
||||
|
||||
@@ -2365,6 +2401,11 @@ function gump:CriaJanelaInfo()
|
||||
--icon - name - applications - refreshes - uptime
|
||||
--
|
||||
|
||||
local wa_button = function (self, mouseButton, spellID, auraType)
|
||||
local spellName, _, spellIcon = GetSpellInfo (spellID)
|
||||
_detalhes:OpenAuraPanel (spellID, spellName, spellIcon, nil, auraType == "BUFF" and 4 or 2, 1)
|
||||
end
|
||||
|
||||
local scroll_createline = function (self, index)
|
||||
local line = CreateFrame ("button", "$parentLine" .. index, self)
|
||||
line:SetPoint ("topleft", self, "topleft", 0, -((index-1)*(scroll_line_height+1)))
|
||||
@@ -2382,6 +2423,10 @@ function gump:CriaJanelaInfo()
|
||||
local uptime = line:CreateFontString ("$parentName", "overlay", "GameFontNormal")
|
||||
local apply = line:CreateFontString ("$parentName", "overlay", "GameFontNormal")
|
||||
local refresh = line:CreateFontString ("$parentName", "overlay", "GameFontNormal")
|
||||
|
||||
local waButton = DF:CreateButton (line, wa_button, 18, 18)
|
||||
waButton:SetIcon ([[Interface\AddOns\WeakAuras\Media\Textures\icon]])
|
||||
|
||||
DF:SetFontSize (name, text_size)
|
||||
DF:SetFontSize (uptime, text_size)
|
||||
DF:SetFontSize (apply, text_size)
|
||||
@@ -2391,18 +2436,23 @@ function gump:CriaJanelaInfo()
|
||||
name:SetPoint ("left", icon, "right", 2, 0)
|
||||
uptime:SetPoint ("left", line, "left", 186, 0)
|
||||
apply:SetPoint ("left", line, "left", 260, 0)
|
||||
refresh:SetPoint ("left", line, "left", 310, 0)
|
||||
|
||||
refresh:SetPoint ("left", line, "left", 290, 0)
|
||||
waButton:SetPoint ("left", line, "left", 322, 0)
|
||||
|
||||
line.Icon = icon
|
||||
line.Name = name
|
||||
line.Uptime = uptime
|
||||
line.Apply = apply
|
||||
line.Refresh = refresh
|
||||
line.WaButton = waButton
|
||||
|
||||
name:SetJustifyH ("left")
|
||||
uptime:SetJustifyH ("left")
|
||||
apply:SetJustifyH ("left")
|
||||
refresh:SetJustifyH ("left")
|
||||
|
||||
apply:SetJustifyH ("center")
|
||||
refresh:SetJustifyH ("center")
|
||||
apply:SetWidth (20)
|
||||
refresh:SetWidth (20)
|
||||
|
||||
return line
|
||||
end
|
||||
@@ -2410,6 +2460,9 @@ function gump:CriaJanelaInfo()
|
||||
local line_bg_color = {{1, 1, 1, .1}, {1, 1, 1, 0}}
|
||||
|
||||
local scroll_buff_refresh = function (self, data, offset, total_lines)
|
||||
|
||||
local haveWA = _G.WeakAuras
|
||||
|
||||
for i = 1, total_lines do
|
||||
local index = i + offset
|
||||
local aura = data [index]
|
||||
@@ -2423,6 +2476,12 @@ function gump:CriaJanelaInfo()
|
||||
line.Apply:SetText (aura [4])
|
||||
line.Refresh:SetText (aura [5])
|
||||
|
||||
if (haveWA) then
|
||||
line.WaButton:SetClickFunction (wa_button, aura.spellID, line.AuraType)
|
||||
else
|
||||
line.WaButton:Disable()
|
||||
end
|
||||
|
||||
if (i%2 == 0) then
|
||||
line:SetBackdropColor (unpack (line_bg_color [1]))
|
||||
line.BackgroundColor = line_bg_color [1]
|
||||
@@ -2434,19 +2493,43 @@ function gump:CriaJanelaInfo()
|
||||
end
|
||||
end
|
||||
|
||||
local create_titledesc_frame = function (anchorWidget, desc)
|
||||
local f = CreateFrame ("frame", nil, frame)
|
||||
f:SetSize (40, 20)
|
||||
f:SetPoint ("center", anchorWidget, "center")
|
||||
f:SetScript ("OnEnter", function()
|
||||
GameTooltip:SetOwner (f, "ANCHOR_TOPRIGHT")
|
||||
GameTooltip:AddLine (desc)
|
||||
GameTooltip:Show()
|
||||
end)
|
||||
f:SetScript ("OnLeave", function()
|
||||
GameTooltip:Hide()
|
||||
end)
|
||||
return f
|
||||
end
|
||||
|
||||
local buffLabel = DF:CreateLabel (frame, "Buff Name")
|
||||
buffLabel:SetPoint (6, -10)
|
||||
local uptimeLabel = DF:CreateLabel (frame, "Uptime")
|
||||
uptimeLabel:SetPoint (200, -10)
|
||||
local appliedLabel = DF:CreateLabel (frame, "Applied")
|
||||
appliedLabel:SetPoint (250, -10)
|
||||
local refreshedLabel = DF:CreateLabel (frame, "Refreshed")
|
||||
refreshedLabel:SetPoint (300, -10)
|
||||
|
||||
local appliedLabel = DF:CreateLabel (frame, "A")
|
||||
appliedLabel:SetPoint (270, -10)
|
||||
create_titledesc_frame (appliedLabel.widget, "applications")
|
||||
|
||||
local refreshedLabel = DF:CreateLabel (frame, "R")
|
||||
refreshedLabel:SetPoint (301, -10)
|
||||
create_titledesc_frame (refreshedLabel.widget, "refreshes")
|
||||
|
||||
local waLabel = DF:CreateLabel (frame, "WA")
|
||||
waLabel:SetPoint (330, -10)
|
||||
create_titledesc_frame (waLabel.widget, "create weak aura")
|
||||
|
||||
local buffScroll = DF:CreateScrollBox (frame, "$parentBuffUptimeScroll", scroll_buff_refresh, {}, scroll_width, 340, scroll_line_amount, scroll_line_height)
|
||||
buffScroll:SetPoint ("topleft", frame, "topleft", 5, -30)
|
||||
for i = 1, scroll_line_amount do
|
||||
buffScroll:CreateLine (scroll_createline)
|
||||
local line = buffScroll:CreateLine (scroll_createline)
|
||||
line.AuraType = "BUFF"
|
||||
end
|
||||
buffScroll:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16})
|
||||
buffScroll:SetBackdropColor (0, 0, 0, .4)
|
||||
@@ -2460,15 +2543,25 @@ function gump:CriaJanelaInfo()
|
||||
debuffLabel:SetPoint (406, -10)
|
||||
local uptimeLabel2 = DF:CreateLabel (frame, "Uptime")
|
||||
uptimeLabel2:SetPoint (600, -10)
|
||||
local appliedLabel2 = DF:CreateLabel (frame, "Applied")
|
||||
appliedLabel2:SetPoint (650, -10)
|
||||
local refreshedLabel2 = DF:CreateLabel (frame, "Refreshed")
|
||||
refreshedLabel2:SetPoint (700, -10)
|
||||
|
||||
local appliedLabel2 = DF:CreateLabel (frame, "A")
|
||||
appliedLabel2:SetPoint (668, -10)
|
||||
create_titledesc_frame (appliedLabel2.widget, "applications")
|
||||
|
||||
local refreshedLabel2 = DF:CreateLabel (frame, "R")
|
||||
refreshedLabel2:SetPoint (699, -10)
|
||||
create_titledesc_frame (refreshedLabel2.widget, "refreshes")
|
||||
|
||||
local waLabel2 = DF:CreateLabel (frame, "WA")
|
||||
waLabel2:SetPoint (728, -10)
|
||||
create_titledesc_frame (waLabel2.widget, "create weak aura")
|
||||
|
||||
|
||||
local debuffScroll = DF:CreateScrollBox (frame, "$parentDebuffUptimeScroll", scroll_buff_refresh, {}, scroll_width, 340, scroll_line_amount, scroll_line_height)
|
||||
debuffScroll:SetPoint ("topleft", frame, "topleft", 405, -30)
|
||||
for i = 1, scroll_line_amount do
|
||||
debuffScroll:CreateLine (scroll_createline)
|
||||
local line = debuffScroll:CreateLine (scroll_createline)
|
||||
line.AuraType = "DEBUFF"
|
||||
end
|
||||
debuffScroll:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16})
|
||||
debuffScroll:SetBackdropColor (0, 0, 0, .4)
|
||||
@@ -4502,7 +4595,11 @@ function gump:CriaJanelaInfo()
|
||||
|
||||
tab:Show()
|
||||
amt_positive = amt_positive + 1
|
||||
tab:SetPoint ("BOTTOMLEFT", info.container_barras, "TOPLEFT", 490 - (94 * (amt_positive-1)), 1)
|
||||
|
||||
--tab:SetPoint ("BOTTOMLEFT", info.container_barras, "TOPLEFT", 490 - (94 * (amt_positive-1)), 1) --left to right
|
||||
tab:ClearAllPoints()
|
||||
tab:SetPoint ("bottomright", info, "topright", -17 - (94 * (amt_positive-1)), -74) --right to left
|
||||
|
||||
tab:SetAlpha (0.8)
|
||||
else
|
||||
tab.frame:Hide()
|
||||
@@ -4551,6 +4648,8 @@ function _detalhes:CreatePlayerDetailsTab (tabname, localized_name, condition, f
|
||||
newtab:SetWidth (100)
|
||||
newtab.middleTexture:SetWidth (70)
|
||||
|
||||
|
||||
|
||||
newtab:SetText (localized_name)
|
||||
_G ["DetailsInfoWindowTab" .. index .. "Text"]:SetWidth (70)
|
||||
|
||||
@@ -4606,7 +4705,7 @@ function _detalhes:CreatePlayerDetailsTab (tabname, localized_name, condition, f
|
||||
--f:Set
|
||||
|
||||
|
||||
newtab.frame:SetPoint ("TOPLEFT", info.container_barras, "TOPLEFT", 0, 0)
|
||||
newtab.frame:SetPoint ("TOPLEFT", info.container_barras, "TOPLEFT", 0, 2)
|
||||
newtab.frame:SetPoint ("bottomright", info, "bottomright", -3, 3)
|
||||
--newtab.frame:SetPoint ("TOPLEFT", info, "TOPLEFT", 19, -76)
|
||||
newtab.frame:SetSize (569, 274)
|
||||
|
||||
+62
-28
@@ -4,7 +4,7 @@
|
||||
search for "~number" without the quotes to quick access the page:
|
||||
|
||||
1 - general
|
||||
2 - combat
|
||||
2 - combat / pvp pve
|
||||
3 - skin
|
||||
4 - row settings
|
||||
5 - row texts
|
||||
@@ -4306,10 +4306,49 @@ function window:CreateFrame2()
|
||||
|
||||
window:CreateLineBackground2 (frame2, "DeathLogLimitDropdown", "DeathLogLimitLabel", Loc ["STRING_OPTIONS_DEATHLIMIT_DESC"])
|
||||
|
||||
--> damage taken always on everything
|
||||
g:NewLabel (frame2, _, "$parentDamageTakenEverythingLabel", "DamageTakenEverythingLabel", Loc ["STRING_OPTIONS_DTAKEN_EVERYTHING"], "GameFontHighlightLeft")
|
||||
g:NewSwitch (frame2, _, "$parentDamageTakenEverythingSlider", "DamageTakenEverythingSlider", 60, 20, _, _, _detalhes.damage_taken_everything, nil, nil, nil, nil, options_switch_template)
|
||||
|
||||
frame2.DamageTakenEverythingSlider:SetPoint ("left", frame2.DamageTakenEverythingLabel, "right", 2)
|
||||
frame2.DamageTakenEverythingSlider:SetAsCheckBox()
|
||||
frame2.DamageTakenEverythingSlider.OnSwitch = function (_, _, value)
|
||||
_detalhes.damage_taken_everything = value
|
||||
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
|
||||
end
|
||||
|
||||
window:CreateLineBackground2 (frame2, "DamageTakenEverythingSlider", "DamageTakenEverythingLabel", Loc ["STRING_OPTIONS_DTAKEN_EVERYTHING_DESC"])
|
||||
|
||||
--> deathlog healing done threshold
|
||||
g:NewLabel (frame2, _, "$parentDeathLogHealingThresholdLabel", "DeathLogHealingThresholdLabel", Loc ["STRING_OPTIONS_DEATHLOG_MINHEALING"], "GameFontHighlightLeft")
|
||||
|
||||
local s = g:NewSlider (frame2, _, "$parentDeathLogHealingThresholdSlider", "DeathLogHealingThresholdSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 0, 100000, 1, _detalhes.deathlog_healingdone_min, nil, nil, nil, options_slider_template)
|
||||
|
||||
frame2.DeathLogHealingThresholdSlider:SetPoint ("left", frame2.DeathLogHealingThresholdLabel, "right", 2, -1)
|
||||
frame2.DeathLogHealingThresholdSlider:SetHook ("OnValueChange", function (self, _, amount) --> slider, fixedValue, sliderValue
|
||||
_detalhes.deathlog_healingdone_min = amount
|
||||
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
|
||||
end)
|
||||
|
||||
window:CreateLineBackground2 (frame2, "DeathLogHealingThresholdSlider", "DeathLogHealingThresholdLabel", Loc ["STRING_OPTIONS_DEATHLOG_MINHEALING_DESC"])
|
||||
|
||||
--> always show players
|
||||
g:NewLabel (frame2, _, "$parentAlwaysShowPlayersLabel", "AlwaysShowPlayersLabel", Loc ["STRING_OPTIONS_ALWAYSSHOWPLAYERS"], "GameFontHighlightLeft")
|
||||
--
|
||||
g:NewSwitch (frame2, _, "$parentAlwaysShowPlayersSlider", "AlwaysShowPlayersSlider", 60, 20, _, _, _detalhes.all_players_are_group, nil, nil, nil, nil, options_switch_template)
|
||||
frame2.AlwaysShowPlayersSlider:SetPoint ("left", frame2.AlwaysShowPlayersLabel, "right", 2, 0)
|
||||
frame2.AlwaysShowPlayersSlider:SetAsCheckBox()
|
||||
frame2.AlwaysShowPlayersSlider.OnSwitch = function (self, _, amount) --> slider, fixedValue, sliderValue
|
||||
_detalhes.all_players_are_group = amount
|
||||
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
|
||||
end
|
||||
|
||||
window:CreateLineBackground2 (frame2, "AlwaysShowPlayersSlider", "AlwaysShowPlayersLabel", Loc ["STRING_OPTIONS_ALWAYSSHOWPLAYERS_DESC"])
|
||||
|
||||
--> Overall Data
|
||||
g:NewLabel (frame2, _, "$parentOverallDataAnchor", "OverallDataLabel", Loc ["STRING_OPTIONS_OVERALL_ANCHOR"], "GameFontNormal")
|
||||
|
||||
--raid boss
|
||||
--raid boss
|
||||
g:NewLabel (frame2, _, "$parentOverallDataRaidBossLabel", "OverallDataRaidBossLabel", Loc ["STRING_OPTIONS_OVERALL_RAIDBOSS"], "GameFontHighlightLeft")
|
||||
--
|
||||
g:NewSwitch (frame2, _, "$parentOverallDataRaidBossSlider", "OverallDataRaidBossSlider", 60, 20, _, _, false, nil, nil, nil, nil, options_switch_template)
|
||||
@@ -4327,7 +4366,7 @@ function window:CreateFrame2()
|
||||
--
|
||||
window:CreateLineBackground2 (frame2, "OverallDataRaidBossSlider", "OverallDataRaidBossLabel", Loc ["STRING_OPTIONS_OVERALL_RAIDBOSS_DESC"])
|
||||
|
||||
--raid cleanup
|
||||
--raid cleanup
|
||||
g:NewLabel (frame2, _, "$parentOverallDataRaidCleaupLabel", "OverallDataRaidCleaupLabel", Loc ["STRING_OPTIONS_OVERALL_RAIDCLEAN"], "GameFontHighlightLeft")
|
||||
--
|
||||
local raid_cleanup = g:NewSwitch (frame2, _, "$parentOverallDataRaidCleaupSlider", "OverallDataRaidCleaupSlider", 60, 20, _, _, false, nil, nil, nil, nil, options_switch_template)
|
||||
@@ -4345,7 +4384,7 @@ function window:CreateFrame2()
|
||||
--
|
||||
window:CreateLineBackground2 (frame2, "OverallDataRaidCleaupSlider", "OverallDataRaidCleaupLabel", Loc ["STRING_OPTIONS_OVERALL_RAIDCLEAN_DESC"])
|
||||
|
||||
--dungeon boss
|
||||
--dungeon boss
|
||||
g:NewLabel (frame2, _, "$parentOverallDataDungeonBossLabel", "OverallDataDungeonBossLabel", Loc ["STRING_OPTIONS_OVERALL_DUNGEONBOSS"], "GameFontHighlightLeft")
|
||||
--
|
||||
g:NewSwitch (frame2, _, "$parentOverallDataDungeonBossSlider", "OverallDataDungeonBossSlider", 60, 20, _, _, false, nil, nil, nil, nil, options_switch_template)
|
||||
@@ -4363,7 +4402,7 @@ function window:CreateFrame2()
|
||||
--
|
||||
window:CreateLineBackground2 (frame2, "OverallDataDungeonBossSlider", "OverallDataDungeonBossLabel", Loc ["STRING_OPTIONS_OVERALL_DUNGEONBOSS_DESC"])
|
||||
|
||||
--dungeon cleanup
|
||||
--dungeon cleanup
|
||||
g:NewLabel (frame2, _, "$parentOverallDataDungeonCleaupLabel", "OverallDataDungeonCleaupLabel", Loc ["STRING_OPTIONS_OVERALL_DUNGEONCLEAN"], "GameFontHighlightLeft")
|
||||
--
|
||||
g:NewSwitch (frame2, _, "$parentOverallDataDungeonCleaupSlider", "OverallDataDungeonCleaupSlider", 60, 20, _, _, false, nil, nil, nil, nil, options_switch_template)
|
||||
@@ -4381,7 +4420,7 @@ function window:CreateFrame2()
|
||||
--
|
||||
window:CreateLineBackground2 (frame2, "OverallDataDungeonCleaupSlider", "OverallDataDungeonCleaupLabel", Loc ["STRING_OPTIONS_OVERALL_DUNGEONCLEAN_DESC"])
|
||||
|
||||
--everything
|
||||
--everything
|
||||
g:NewLabel (frame2, _, "$parentOverallDataAllLabel", "OverallDataAllLabel", Loc ["STRING_OPTIONS_OVERALL_ALL"], "GameFontHighlightLeft")
|
||||
--
|
||||
g:NewSwitch (frame2, _, "$parentOverallDataAllSlider", "OverallDataAllSlider", 60, 20, _, _, false, nil, nil, nil, nil, options_switch_template)
|
||||
@@ -4420,7 +4459,7 @@ function window:CreateFrame2()
|
||||
--
|
||||
window:CreateLineBackground2 (frame2, "OverallDataAllSlider", "OverallDataAllLabel", Loc ["STRING_OPTIONS_OVERALL_ALL_DESC"])
|
||||
|
||||
--erase on new boss
|
||||
--erase on new boss
|
||||
g:NewLabel (frame2, _, "$parentOverallNewBossLabel", "OverallNewBossLabel", Loc ["STRING_OPTIONS_OVERALL_NEWBOSS"], "GameFontHighlightLeft")
|
||||
--
|
||||
g:NewSwitch (frame2, _, "$parentOverallNewBossSlider", "OverallNewBossSlider", 60, 20, _, _, false, nil, nil, nil, nil, options_switch_template)
|
||||
@@ -4434,8 +4473,8 @@ function window:CreateFrame2()
|
||||
--
|
||||
window:CreateLineBackground2 (frame2, "OverallNewBossSlider", "OverallNewBossLabel", Loc ["STRING_OPTIONS_OVERALL_NEWBOSS_DESC"])
|
||||
|
||||
--erase on challenge mode
|
||||
g:NewLabel (frame2, _, "$parentOverallNewChallengeLabel", "OverallNewChallengeLabel", Loc ["STRING_OPTIONS_OVERALL_CHALLENGE"], "GameFontHighlightLeft")
|
||||
--erase on new mythic+ dungeon
|
||||
g:NewLabel (frame2, _, "$parentOverallNewChallengeLabel", "OverallNewChallengeLabel", Loc ["STRING_OPTIONS_OVERALL_MYTHICPLUS"], "GameFontHighlightLeft")
|
||||
--
|
||||
g:NewSwitch (frame2, _, "$parentOverallNewChallengeSlider", "OverallNewChallengeSlider", 60, 20, _, _, false, nil, nil, nil, nil, options_switch_template)
|
||||
frame2.OverallNewChallengeSlider:SetPoint ("left", frame2.OverallNewChallengeLabel, "right", 2, 0)
|
||||
@@ -4446,9 +4485,9 @@ function window:CreateFrame2()
|
||||
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
|
||||
end
|
||||
--
|
||||
window:CreateLineBackground2 (frame2, "OverallNewChallengeSlider", "OverallNewChallengeLabel", Loc ["STRING_OPTIONS_OVERALL_CHALLENGE_DESC"])
|
||||
window:CreateLineBackground2 (frame2, "OverallNewChallengeSlider", "OverallNewChallengeLabel", Loc ["STRING_OPTIONS_OVERALL_MYTHICPLUS_DESC"])
|
||||
|
||||
--erase on logout overall_clear_logout
|
||||
--erase on logout overall_clear_logout
|
||||
g:NewLabel (frame2, _, "$parentOverallOnLogoutLabel", "OverallOnLogoutLabel", Loc ["STRING_OPTIONS_OVERALL_LOGOFF"], "GameFontHighlightLeft")
|
||||
--
|
||||
g:NewSwitch (frame2, _, "$parentOverallOnLogoutSlider", "OverallOnLogoutSlider", 60, 20, _, _, false, nil, nil, nil, nil, options_switch_template)
|
||||
@@ -4474,7 +4513,7 @@ function window:CreateFrame2()
|
||||
end
|
||||
window:CreateLineBackground2 (frame2, "RemoteParserSlider", "RemoteParserLabel", Loc ["STRING_OPTIONS_BG_REMOTE_PARSER_DESC"])
|
||||
|
||||
--> show all
|
||||
--> show all
|
||||
g:NewLabel (frame2, _, "$parentShowAllLabel", "ShowAllLabel", Loc ["STRING_OPTIONS_BG_ALL_ALLY"], "GameFontHighlightLeft")
|
||||
g:NewSwitch (frame2, _, "$parentShowAllSlider", "ShowAllSlider", 60, 20, _, _, _detalhes.pvp_as_group, nil, nil, nil, nil, options_switch_template)
|
||||
frame2.ShowAllSlider:SetPoint ("left", frame2.ShowAllLabel, "right", 2)
|
||||
@@ -4486,18 +4525,7 @@ function window:CreateFrame2()
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
--> damage taken always on everything
|
||||
g:NewLabel (frame2, _, "$parentDamageTakenEverythingLabel", "DamageTakenEverythingLabel", Loc ["STRING_OPTIONS_DTAKEN_EVERYTHING"], "GameFontHighlightLeft")
|
||||
g:NewSwitch (frame2, _, "$parentDamageTakenEverythingSlider", "DamageTakenEverythingSlider", 60, 20, _, _, _detalhes.damage_taken_everything, nil, nil, nil, nil, options_switch_template)
|
||||
|
||||
frame2.DamageTakenEverythingSlider:SetPoint ("left", frame2.DamageTakenEverythingLabel, "right", 2)
|
||||
frame2.DamageTakenEverythingSlider:SetAsCheckBox()
|
||||
frame2.DamageTakenEverythingSlider.OnSwitch = function (_, _, value)
|
||||
_detalhes.damage_taken_everything = value
|
||||
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
|
||||
end
|
||||
|
||||
window:CreateLineBackground2 (frame2, "DamageTakenEverythingSlider", "DamageTakenEverythingLabel", Loc ["STRING_OPTIONS_DTAKEN_EVERYTHING_DESC"])
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -4516,11 +4544,11 @@ function window:CreateFrame2()
|
||||
|
||||
local left_side = {
|
||||
{"GeneralAnchorLabel", 1, true},
|
||||
{"fragsPvpLabel", 2},
|
||||
--{"EraseChartDataLabel", 3},
|
||||
--{"timetypeLabel", 4, true},
|
||||
{"DeathLogLimitLabel", 5, },
|
||||
{"DamageTakenEverythingLabel", 6, true},
|
||||
{"fragsPvpLabel"},
|
||||
{"DeathLogLimitLabel"},
|
||||
{"DeathLogHealingThresholdLabel"},
|
||||
{"DamageTakenEverythingLabel"},
|
||||
{"AlwaysShowPlayersLabel"},
|
||||
|
||||
{"BattlegroundAnchorLabel", 10, true},
|
||||
{"RemoteParserLabel", 11},
|
||||
@@ -10989,6 +11017,12 @@ end --> if not window
|
||||
--damage taken advanced
|
||||
_G.DetailsOptionsWindow2DamageTakenEverythingSlider.MyObject:SetValue (_detalhes.damage_taken_everything)
|
||||
|
||||
--healing done mim on death log
|
||||
_G.DetailsOptionsWindow2DeathLogHealingThresholdSlider.MyObject:SetValue (_detalhes.deathlog_healingdone_min)
|
||||
|
||||
--always show all players (consider they as in group)
|
||||
_G.DetailsOptionsWindow2AlwaysShowPlayersSlider.MyObject:SetValue (_detalhes.all_players_are_group)
|
||||
|
||||
--> window 3
|
||||
|
||||
local skin = editing_instance.skin
|
||||
|
||||
+348
-77
@@ -2121,6 +2121,7 @@ local set_bar_value = function (self, value)
|
||||
end
|
||||
end
|
||||
|
||||
-- ~talent ~icon
|
||||
local icon_frame_on_enter = function (self)
|
||||
local actor = self.row.minha_tabela
|
||||
|
||||
@@ -2145,6 +2146,8 @@ local icon_frame_on_enter = function (self)
|
||||
|
||||
|
||||
else
|
||||
--> is a normal actor
|
||||
|
||||
local serial = actor.serial
|
||||
local name = actor:name()
|
||||
local class = actor:class()
|
||||
@@ -2178,7 +2181,7 @@ local icon_frame_on_enter = function (self)
|
||||
else
|
||||
GameCooltip:AddIcon ([[Interface\GossipFrame\IncompleteQuestIcon]], 1, 2, icon_size, icon_size)
|
||||
end
|
||||
_detalhes:AddTooltipHeaderStatusbar (r, g, b, 0.6)
|
||||
_detalhes:AddTooltipHeaderStatusbar()
|
||||
|
||||
local talent_string = ""
|
||||
if (talents) then
|
||||
@@ -2200,40 +2203,55 @@ local icon_frame_on_enter = function (self)
|
||||
_detalhes:AddTooltipBackgroundStatusbar()
|
||||
got_info = true
|
||||
elseif (got_info) then
|
||||
GameCooltip:AddLine (TALENTS .. ":", Loc ["STRING_QUERY_INSPECT_TALENTS"]) --> Loc from GlobalStrings.lua
|
||||
GameCooltip:AddLine (TALENTS .. ":", Loc ["STRING_QUERY_INSPECT_REFRESH"]) --> Loc from GlobalStrings.lua
|
||||
_detalhes:AddTooltipBackgroundStatusbar()
|
||||
end
|
||||
|
||||
GameCooltip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\bar_skyline]])
|
||||
GameCooltip:SetOption ("MinButtonHeight", 15)
|
||||
GameCooltip:SetOption ("IgnoreButtonAutoHeight", false)
|
||||
|
||||
local height = 52
|
||||
if (not got_info) then
|
||||
--GameCooltip:AddLine (" ")
|
||||
--GameCooltip:AddLine ("Click to retrive item level and talents.", nil, 1, "orange")
|
||||
GameCooltip:AddLine (Loc ["STRING_QUERY_INSPECT"], nil, 1, "orange")
|
||||
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, icon_size, 8/512, 70/512, 224/512, 306/512)
|
||||
GameCooltip:SetOption ("FixedHeight", 42)
|
||||
else
|
||||
GameCooltip:SetOption ("FixedHeight", 52)
|
||||
height = 42
|
||||
end
|
||||
|
||||
local combat = instance:GetShowingCombat()
|
||||
local diff = combat:GetDifficulty()
|
||||
local attribute, subattribute = instance:GetDisplay()
|
||||
|
||||
--> check if is a raid encounter and if is heroic or mythic
|
||||
if (diff and (diff == 15 or diff == 16) and (attribute == 1 or attribute == 2)) then
|
||||
local db = _detalhes.OpenStorage()
|
||||
if (db) then
|
||||
local bestRank, encounterTable = _detalhes.storage:GetBestFromPlayer (diff, combat:GetBossInfo().id, attribute == 1 and "damage" or "healing", name, true)
|
||||
if (bestRank) then
|
||||
--GameCooltip:AddLine ("")
|
||||
|
||||
--> discover which are the player position in the guild rank
|
||||
local playerTable, onEncounter, rankPosition = _detalhes.storage:GetPlayerGuildRank (diff, combat:GetBossInfo().id, attribute == 1 and "damage" or "healing", name, true)
|
||||
|
||||
--" .. floor (bestRank[2] or 0) .. " ilvl" .. " |
|
||||
GameCooltip:AddLine ("Best Score:", _detalhes:ToK2 ((bestRank[1] or 0) / encounterTable.elapsed) .. " [|cFFFFFF00Rank: " .. (rankPosition or "#") .. "|r]", 1, "white")
|
||||
_detalhes:AddTooltipBackgroundStatusbar()
|
||||
|
||||
GameCooltip:AddLine ("|TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:14:12:0:1:512:512:8:70:224:306|t Open Rank", "|TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:14:12:0:1:512:512:8:70:328:409|t Refresh Talents", 1, "white", "white")
|
||||
_detalhes:AddTooltipBackgroundStatusbar()
|
||||
|
||||
--GameCooltip:AddLine ("On: " .. (encounterTable.date:gsub (".*%s", "")), , 1, "orange")
|
||||
--_detalhes:AddTooltipHeaderStatusbar()
|
||||
if (not got_info) then
|
||||
height = height + 25
|
||||
else
|
||||
height = height + 31
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--GameCooltip:AddLine ("Class:", LOCALIZED_CLASS_NAMES_MALE [class])
|
||||
--_detalhes:AddTooltipBackgroundStatusbar()
|
||||
|
||||
local damage = instance.showing (1, name)
|
||||
local healing = instance.showing (2, name)
|
||||
--GameCooltip:AddLine ("Damage:", _detalhes:ToK2 (damage and damage.total or 0))
|
||||
--_detalhes:AddTooltipBackgroundStatusbar()
|
||||
--GameCooltip:AddLine ("Healing:", _detalhes:ToK2 (healing and healing.total or 0))
|
||||
--_detalhes:AddTooltipBackgroundStatusbar()
|
||||
|
||||
--
|
||||
--GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, icon_size, 8/512, 70/512, 224/512, 306/512)
|
||||
--_detalhes:AddTooltipBackgroundStatusbar()
|
||||
|
||||
|
||||
--GameCooltip:SetOption ("FixedHeight", 114)
|
||||
|
||||
GameCooltip:SetOption ("FixedHeight", height)
|
||||
|
||||
GameCooltip:ShowCooltip()
|
||||
|
||||
@@ -2345,10 +2363,32 @@ local icon_frame_on_click_down = function (self)
|
||||
self:GetParent():GetParent().icone_classe:SetPoint ("left", self:GetParent():GetParent(), "left", 1, -1)
|
||||
end
|
||||
|
||||
local icon_frame_on_click_up = function (self)
|
||||
local icon_frame_on_click_up = function (self, button)
|
||||
|
||||
self:GetParent():GetParent().icone_classe:SetPoint ("left", self:GetParent():GetParent(), "left")
|
||||
|
||||
if (button == "LeftButton") then
|
||||
--> open the rank panel
|
||||
local instance = _detalhes:GetInstance (self.row.instance_id)
|
||||
if (instance) then
|
||||
local attribute, subattribute = instance:GetDisplay()
|
||||
local combat = instance:GetShowingCombat()
|
||||
local diff = combat:GetDifficulty()
|
||||
local bossInfo = combat:GetBossInfo()
|
||||
|
||||
if (attribute == 1 or attribute == 2 and bossInfo) then --if bossInfo is nil, means the combat isn't a boss
|
||||
local db = _detalhes.OpenStorage()
|
||||
if (db and bossInfo.id) then
|
||||
local haveData = _detalhes.storage:HaveDataForEncounter (diff, bossInfo.id, true) --attempt to index local 'bossInfo' (a nil value)
|
||||
if (haveData) then
|
||||
_detalhes:OpenRaidHistoryWindow (bossInfo.zone, bossInfo.id, diff, attribute == 1 and "damage" or "healing", true, 1, false, 2)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
if (_detalhes.in_combat) then
|
||||
_detalhes:Msg (Loc ["STRING_QUERY_INSPECT_FAIL1"])
|
||||
return
|
||||
@@ -4446,11 +4486,11 @@ end
|
||||
|
||||
-- search key: ~row
|
||||
function _detalhes:InstanceRefreshRows (instancia)
|
||||
|
||||
|
||||
if (instancia) then
|
||||
self = instancia
|
||||
end
|
||||
|
||||
|
||||
if (not self.barras or not self.barras[1]) then
|
||||
return
|
||||
end
|
||||
@@ -4651,7 +4691,7 @@ function _detalhes:InstanceRefreshRows (instancia)
|
||||
|
||||
if (is_mirror) then
|
||||
row.right_to_left_texture:Show()
|
||||
else
|
||||
else
|
||||
row.right_to_left_texture:Hide()
|
||||
end
|
||||
|
||||
@@ -4660,8 +4700,10 @@ function _detalhes:InstanceRefreshRows (instancia)
|
||||
row.textura:SetVertexColor (texture_r, texture_g, texture_b, alpha)
|
||||
row.right_to_left_texture:SetVertexColor (texture_r, texture_g, texture_b, alpha)
|
||||
else
|
||||
--automatically color the bar by the actor class
|
||||
--forcing alpha 1 instead of use the alpha from the fixed color
|
||||
local r, g, b = row.textura:GetVertexColor()
|
||||
row.textura:SetVertexColor (r, g, b, alpha)
|
||||
row.textura:SetVertexColor (r, g, b, 1) --alpha
|
||||
end
|
||||
|
||||
--> text class color: if true color changes on the fly through class refresh
|
||||
@@ -5832,6 +5874,10 @@ local segments_common_tex, segments_common_color = {0.5078125, 0.1171875, 0.0175
|
||||
local unknown_boss_tex, unknown_boss_color = {0.14453125, 0.9296875, 0.2625, 0.6546875}, {1, 1, 1, 0.5}
|
||||
|
||||
local party_line_color = {170/255, 167/255, 255/255, 1}
|
||||
local party_line_color_trash = {130/255, 130/255, 155/255, 1}
|
||||
local party_line_color2 = {210/255, 200/255, 255/255, 1}
|
||||
local party_line_color2_trash = {110/255, 110/255, 155/255, 1}
|
||||
|
||||
local party_wallpaper_tex, party_wallpaper_color, raid_wallpaper_tex = {0.09, 0.698125, 0, 0.833984375}, {1, 1, 1, 0.5}, {33/512, 361/512, 45/512, 295/512}
|
||||
|
||||
local segments_wallpaper_color = {1, 1, 1, 0.5}
|
||||
@@ -5925,6 +5971,10 @@ function _detalhes:GetSegmentInfo (index)
|
||||
|
||||
end
|
||||
|
||||
function _detalhes:UnpackMythicDungeonInfo (t)
|
||||
return t.OverallSegment, t.SegmentID, t.Level, t.EJID, t.MapID, t.ZoneName, t.EncounterID, t.EncounterName, t.StartedAt, t.EndedAt, t.RunID
|
||||
end
|
||||
|
||||
local segments_used = 0
|
||||
local segments_filled = 0
|
||||
|
||||
@@ -5946,7 +5996,7 @@ local build_segment_list = function (self, elapsed)
|
||||
CoolTip:SetFixedParameter (instancia)
|
||||
CoolTip:SetColor ("main", "transparent")
|
||||
|
||||
CoolTip:SetOption ("FixedWidthSub", 175)
|
||||
CoolTip:SetOption ("FixedWidthSub", 195)
|
||||
CoolTip:SetOption ("RightTextWidth", 105)
|
||||
CoolTip:SetOption ("RightTextHeight", 12)
|
||||
|
||||
@@ -5970,6 +6020,11 @@ local build_segment_list = function (self, elapsed)
|
||||
segments_used = 0
|
||||
segments_filled = fill
|
||||
|
||||
local dungeon_color = party_line_color
|
||||
local dungeon_color_trash = party_line_color_trash
|
||||
local dungeon_run_id = false
|
||||
|
||||
--> history table (segments container)
|
||||
for i = _detalhes.segments_amount, 1, -1 do
|
||||
|
||||
if (i <= fill) then
|
||||
@@ -5977,17 +6032,122 @@ local build_segment_list = function (self, elapsed)
|
||||
local thisCombat = _detalhes.tabela_historico.tabelas [i]
|
||||
if (thisCombat) then
|
||||
local enemy = thisCombat.is_boss and thisCombat.is_boss.name
|
||||
local segment_info_added = false
|
||||
|
||||
segments_used = segments_used + 1
|
||||
|
||||
--print (thisCombat.is_boss.name, thisCombat.instance_type, _detalhes:GetRaidIcon (thisCombat.is_boss.mapid), thisCombat.is_boss.ej_instance_id)
|
||||
|
||||
if (thisCombat.is_mythic_dungeon_segment) then
|
||||
|
||||
if (thisCombat.is_boss and thisCombat.is_boss.name) then
|
||||
local mythicDungeonInfo = thisCombat:GetMythicDungeonInfo()
|
||||
|
||||
if (mythicDungeonInfo) then
|
||||
--> is a boss, trash overall or run overall segment
|
||||
|
||||
local bossInfo = thisCombat.is_boss
|
||||
|
||||
local isMythicOverallSegment, segmentID, mythicLevel, EJID, mapID, zoneName, encounterID, encounterName, startedAt, endedAt, runID = _detalhes:UnpackMythicDungeonInfo (mythicDungeonInfo)
|
||||
local combat_time = thisCombat:GetCombatTime()
|
||||
|
||||
if (not dungeon_run_id) then
|
||||
dungeon_run_id = runID
|
||||
else
|
||||
if (dungeon_run_id ~= runID) then
|
||||
dungeon_color = dungeon_color == party_line_color and party_line_color2 or party_line_color
|
||||
dungeon_color_trash = dungeon_color_trash == party_line_color_trash and party_line_color2_trash or party_line_color_trash
|
||||
dungeon_run_id = runID
|
||||
end
|
||||
end
|
||||
|
||||
--> is mythic overall
|
||||
if (isMythicOverallSegment) then
|
||||
--mostrar o tempo da dungeon
|
||||
local totalTime = combat_time
|
||||
--CoolTip:AddLine (zoneName .. " +" .. mythicLevel .. " (overall)", _detalhes.gump:IntegerToTimer (totalTime), 1, dungeon_color)
|
||||
CoolTip:AddLine (zoneName .. " +" .. mythicLevel .. " (" .. Loc ["STRING_SEGMENTS_LIST_OVERALL"] .. ")", _detalhes.gump:IntegerToTimer (endedAt - startedAt), 1, dungeon_color)
|
||||
CoolTip:AddIcon ([[Interface\AddOns\Details\images\icons]], "main", "left", 14, 10, 479/512, 510/512, 24/512, 51/512)
|
||||
CoolTip:AddLine (zoneName .. " +" .. mythicLevel .. " (" .. Loc ["STRING_SEGMENTS_LIST_OVERALL"] .. ")", nil, 2, "white", "white")
|
||||
|
||||
else
|
||||
if (segmentID == "trashoverall") then
|
||||
--CoolTip:AddLine (encounterName .. " (" .. Loc ["STRING_SEGMENTS_LIST_TRASH"] .. ")", _detalhes.gump:IntegerToTimer (combat_time), 1, dungeon_color, "gray")
|
||||
CoolTip:AddLine ((encounterName or Loc ["STRING_UNKNOW"]) .. " (" .. Loc ["STRING_SEGMENTS_LIST_TRASH"] .. ")", _detalhes.gump:IntegerToTimer (endedAt - startedAt), 1, dungeon_color, "gray")
|
||||
CoolTip:AddLine ((encounterName or Loc ["STRING_UNKNOW"]) .. " (" .. Loc ["STRING_SEGMENTS_LIST_TRASH"] .. ")", nil, 2, "white", "white")
|
||||
else
|
||||
CoolTip:AddLine ((encounterName or Loc ["STRING_UNKNOW"]) .. " (" .. Loc ["STRING_SEGMENTS_LIST_BOSS"] .. ")", _detalhes.gump:IntegerToTimer (combat_time), 1, dungeon_color, "gray")
|
||||
CoolTip:AddLine ((encounterName or Loc ["STRING_UNKNOW"]) .. " (" .. Loc ["STRING_SEGMENTS_LIST_BOSS"] .. ")", nil, 2, "white", "white")
|
||||
end
|
||||
CoolTip:AddIcon ([[Interface\AddOns\Details\images\icons]], "main", "left", 14, 10, 479/512, 510/512, 24/512, 51/512)
|
||||
end
|
||||
|
||||
local portrait = (thisCombat.is_boss and thisCombat.is_boss.bossimage) or _detalhes:GetBossPortrait (nil, nil, encounterName, EJID)
|
||||
if (portrait) then
|
||||
CoolTip:AddIcon (portrait, 2, "top", 128, 64, 0, 1, 0, 0.96)
|
||||
end
|
||||
|
||||
local backgroundImage = _detalhes:GetRaidIcon (mapID, EJID, "party")
|
||||
if (backgroundImage) then
|
||||
CoolTip:SetWallpaper (2, backgroundImage, {0.070, 0.695, 0.087, 0.566}, {1, 1, 1, 0.5}, true) -- party_wallpaper_tex -- {0.09, 0.698125, .17, 0.833984375}
|
||||
end
|
||||
|
||||
--> sub menu
|
||||
local decorrido = thisCombat:GetCombatTime()
|
||||
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
|
||||
--CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
|
||||
|
||||
if (segmentID == "trashoverall") then
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_TIMEINCOMBAT"] .. ":", _detalhes.gump:IntegerToTimer (decorrido), 2, "white", "white")
|
||||
local totalRealTime = endedAt - startedAt
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_TOTALTIME"] .. ":", _detalhes.gump:IntegerToTimer (endedAt - startedAt) .. " [|cFFFF3300" .. _detalhes.gump:IntegerToTimer (totalRealTime - decorrido) .. "|r]", 2, "white", "white")
|
||||
elseif (isMythicOverallSegment) then
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_TIMEINCOMBAT"] .. ":", _detalhes.gump:IntegerToTimer (decorrido), 2, "white", "white")
|
||||
local totalRealTime = endedAt - startedAt
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_TOTALTIME"] .. ":", _detalhes.gump:IntegerToTimer (totalRealTime) .. " [|cFFFF3300" .. _detalhes.gump:IntegerToTimer (totalRealTime - decorrido) .. "|r]", 2, "white", "white")
|
||||
else
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", _detalhes.gump:IntegerToTimer (decorrido), 2, "white", "white")
|
||||
end
|
||||
|
||||
if (thisCombat.is_boss) then
|
||||
CoolTip:AddLine ("", "", 2, "white", "white")
|
||||
end
|
||||
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", thisCombat.data_inicio, 2, "white", "white")
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", thisCombat.data_fim or "in progress", 2, "white", "white")
|
||||
|
||||
else
|
||||
--> the combat has mythic dungeon tag but doesn't have a mythic dungeon table information
|
||||
--> so this is a trash cleanup segment
|
||||
|
||||
local trashInfo = thisCombat:GetMythicDungeonTrashInfo()
|
||||
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_TRASH"] .. " (#" .. i .. ")", _detalhes.gump:IntegerToTimer (thisCombat:GetCombatTime()), 1, dungeon_color_trash, "gray")
|
||||
--CoolTip:AddIcon ([[Interface\AddOns\Details\images\icons]], "main", "left", 16, 12, 0.02734375, 0.11328125, 0.19140625, 0.3125, "red")
|
||||
CoolTip:AddIcon ([[Interface\AddOns\Details\images\icons]], "main", "left", 14, 10, 479/512, 510/512, 24/512, 51/512, nil, nil, true)
|
||||
|
||||
--submenu
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_TRASH"], nil, 2, "white", "white")
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", _detalhes.gump:IntegerToTimer (thisCombat:GetCombatTime()), 2, "white", "white")
|
||||
CoolTip:AddLine ("", "", 2, "white", "white")
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", thisCombat.data_inicio, 2, "white", "white")
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", thisCombat.data_fim or "in progress", 2, "white", "white")
|
||||
|
||||
if (trashInfo) then
|
||||
local backgroundImage = _detalhes:GetRaidIcon (trashInfo.MapID, trashInfo.EJID, "party")
|
||||
if (backgroundImage) then
|
||||
CoolTip:SetWallpaper (2, backgroundImage, party_wallpaper_tex, {1, 1, 1, 0.5}, true)
|
||||
end
|
||||
end
|
||||
end
|
||||
segment_info_added = true
|
||||
|
||||
elseif (thisCombat.is_boss and thisCombat.is_boss.name) then
|
||||
|
||||
local try_number = thisCombat.is_boss.try_number
|
||||
local combat_time = thisCombat:GetCombatTime()
|
||||
|
||||
if (thisCombat.instance_type == "party") then
|
||||
CoolTip:AddLine (thisCombat.is_boss.name .." (#"..i..")", _, 1, party_line_color)
|
||||
CoolTip:AddLine (thisCombat.is_boss.name .." (#"..i..")", _, 1, dungeon_color)
|
||||
elseif (thisCombat.is_boss.killed) then
|
||||
if (try_number) then
|
||||
local m, s = _math_floor (combat_time/60), _math_floor (combat_time%60)
|
||||
@@ -6034,16 +6194,16 @@ local build_segment_list = function (self, elapsed)
|
||||
if (_detalhes.tooltip.submenu_wallpaper) then
|
||||
local background = _detalhes:GetRaidIcon (thisCombat.is_boss.mapid)
|
||||
if (background) then
|
||||
CoolTip:SetWallpaper (2, background, nil, segments_wallpaper_color)
|
||||
CoolTip:SetWallpaper (2, background, nil, segments_wallpaper_color, true)
|
||||
else
|
||||
local ej_id = thisCombat.is_boss.ej_instance_id
|
||||
if (ej_id and ej_id ~= 0) then
|
||||
local name, description, bgImage, buttonImage, loreImage, dungeonAreaMapID, link = EJ_GetInstanceInfo (ej_id)
|
||||
if (name) then
|
||||
if (thisCombat.instance_type == "party") then
|
||||
CoolTip:SetWallpaper (2, bgImage, party_wallpaper_tex, party_wallpaper_color)
|
||||
CoolTip:SetWallpaper (2, bgImage, party_wallpaper_tex, party_wallpaper_color, true)
|
||||
else
|
||||
CoolTip:SetWallpaper (2, loreImage, raid_wallpaper_tex, party_wallpaper_color)
|
||||
CoolTip:SetWallpaper (2, loreImage, raid_wallpaper_tex, party_wallpaper_color, true)
|
||||
end
|
||||
end
|
||||
else
|
||||
@@ -6063,7 +6223,7 @@ local build_segment_list = function (self, elapsed)
|
||||
if (_detalhes.tooltip.submenu_wallpaper) then
|
||||
local file, coords = _detalhes:GetBattlegroundInfo (thisCombat.is_pvp.mapid)
|
||||
if (file) then
|
||||
CoolTip:SetWallpaper (2, "Interface\\Glues\\LOADINGSCREENS\\" .. file, coords, empty_segment_color)
|
||||
CoolTip:SetWallpaper (2, "Interface\\Glues\\LOADINGSCREENS\\" .. file, coords, empty_segment_color, true)
|
||||
end
|
||||
else
|
||||
--> wallpaper = main window
|
||||
@@ -6078,7 +6238,7 @@ local build_segment_list = function (self, elapsed)
|
||||
if (_detalhes.tooltip.submenu_wallpaper) then
|
||||
local file, coords = _detalhes:GetArenaInfo (thisCombat.is_arena.mapid)
|
||||
if (file) then
|
||||
CoolTip:SetWallpaper (2, "Interface\\Glues\\LOADINGSCREENS\\" .. file, coords, empty_segment_color)
|
||||
CoolTip:SetWallpaper (2, "Interface\\Glues\\LOADINGSCREENS\\" .. file, coords, empty_segment_color, true)
|
||||
end
|
||||
else
|
||||
--> wallpaper = main window
|
||||
@@ -6099,7 +6259,7 @@ local build_segment_list = function (self, elapsed)
|
||||
end
|
||||
|
||||
if (_detalhes.tooltip.submenu_wallpaper) then
|
||||
CoolTip:SetWallpaper (2, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-StatsBackground]], segments_common_tex, segments_common_color)
|
||||
CoolTip:SetWallpaper (2, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-StatsBackground]], segments_common_tex, segments_common_color, true)
|
||||
else
|
||||
--> wallpaper = main window
|
||||
CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
|
||||
@@ -6109,14 +6269,15 @@ local build_segment_list = function (self, elapsed)
|
||||
|
||||
CoolTip:AddMenu (1, instancia.TrocaTabela, i)
|
||||
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_ENEMY"] .. ":", enemy, 2, "white", "white")
|
||||
|
||||
local decorrido = thisCombat:GetCombatTime()
|
||||
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
|
||||
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", thisCombat.data_inicio, 2, "white", "white")
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", thisCombat.data_fim or "in progress", 2, "white", "white")
|
||||
if (not segment_info_added) then
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_ENEMY"] .. ":", enemy, 2, "white", "white")
|
||||
local decorrido = thisCombat:GetCombatTime()
|
||||
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
|
||||
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", thisCombat.data_inicio, 2, "white", "white")
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", thisCombat.data_fim or "in progress", 2, "white", "white")
|
||||
end
|
||||
|
||||
fight_amount = fight_amount + 1
|
||||
else
|
||||
@@ -6143,14 +6304,123 @@ local build_segment_list = function (self, elapsed)
|
||||
GameCooltip:AddLine ("$div", nil, nil, -5, -13)
|
||||
|
||||
----------- current
|
||||
CoolTip:AddLine (segmentos.current_standard, _, 1, "white")
|
||||
CoolTip:AddMenu (1, instancia.TrocaTabela, 0)
|
||||
CoolTip:AddIcon ([[Interface\QUESTFRAME\UI-Quest-BulletPoint]], "main", "left", 16, 16, nil, nil, nil, nil, "orange")
|
||||
|
||||
local enemy = _detalhes.tabela_vigente.is_boss and _detalhes.tabela_vigente.is_boss.name or _detalhes.tabela_vigente.enemy or "--x--x--"
|
||||
local file, coords
|
||||
|
||||
if (_detalhes.tabela_vigente.is_boss and _detalhes.tabela_vigente.is_boss.name) then
|
||||
local thisCombat = _detalhes.tabela_vigente
|
||||
local segment_info_added
|
||||
|
||||
--> add the new line
|
||||
CoolTip:AddLine (segmentos.current_standard, _, 1, "white")
|
||||
CoolTip:AddMenu (1, instancia.TrocaTabela, 0)
|
||||
CoolTip:AddIcon ([[Interface\QUESTFRAME\UI-Quest-BulletPoint]], "main", "left", 16, 16, nil, nil, nil, nil, "orange")
|
||||
--
|
||||
|
||||
--> current segment is a dungeon mythic+?
|
||||
if (thisCombat.is_mythic_dungeon_segment) then
|
||||
local mythicDungeonInfo = thisCombat:GetMythicDungeonInfo()
|
||||
|
||||
if (mythicDungeonInfo) then
|
||||
--> is a boss, trash overall or run overall segment
|
||||
|
||||
local bossInfo = thisCombat.is_boss
|
||||
|
||||
local isMythicOverallSegment, segmentID, mythicLevel, EJID, mapID, zoneName, encounterID, encounterName, startedAt, endedAt, runID = _detalhes:UnpackMythicDungeonInfo (mythicDungeonInfo)
|
||||
local combat_time = thisCombat:GetCombatTime()
|
||||
|
||||
if (not dungeon_run_id) then
|
||||
dungeon_run_id = runID
|
||||
else
|
||||
if (dungeon_run_id ~= runID) then
|
||||
dungeon_color = dungeon_color == party_line_color and party_line_color2 or party_line_color
|
||||
dungeon_color_trash = dungeon_color_trash == party_line_color_trash and party_line_color2_trash or party_line_color_trash
|
||||
dungeon_run_id = runID
|
||||
end
|
||||
end
|
||||
|
||||
--> is mythic overall
|
||||
if (isMythicOverallSegment) then
|
||||
--mostrar o tempo da dungeon
|
||||
local totalTime = combat_time
|
||||
--CoolTip:AddLine (zoneName .. " +" .. mythicLevel .. " (overall)", _detalhes.gump:IntegerToTimer (totalTime), 1, dungeon_color)
|
||||
--CoolTip:AddLine (zoneName .. " +" .. mythicLevel .. " (overall)", _detalhes.gump:IntegerToTimer (endedAt - startedAt), 1, dungeon_color)
|
||||
--CoolTip:AddIcon ([[Interface\AddOns\Details\images\icons]], "main", "left", 14, 10, 479/512, 510/512, 24/512, 51/512)
|
||||
CoolTip:AddLine (zoneName .. " +" .. mythicLevel .. " (" .. Loc ["STRING_SEGMENTS_LIST_OVERALL"] .. ")", nil, 2, "white", "white")
|
||||
|
||||
else
|
||||
if (segmentID == "trashoverall") then
|
||||
--CoolTip:AddLine (encounterName .. " (" .. Loc ["STRING_SEGMENTS_LIST_TRASH"] .. ")", _detalhes.gump:IntegerToTimer (combat_time), 1, dungeon_color, "gray")
|
||||
--CoolTip:AddLine (encounterName .. " (" .. Loc ["STRING_SEGMENTS_LIST_TRASH"] .. ")", _detalhes.gump:IntegerToTimer (endedAt - startedAt), 1, dungeon_color, "gray")
|
||||
CoolTip:AddLine (encounterName .. " (" .. Loc ["STRING_SEGMENTS_LIST_TRASH"] .. ")", nil, 2, "white", "white")
|
||||
else
|
||||
--CoolTip:AddLine (encounterName .. " (" .. Loc ["STRING_SEGMENTS_LIST_BOSS"] .. ")", _detalhes.gump:IntegerToTimer (combat_time), 1, dungeon_color, "gray")
|
||||
CoolTip:AddLine (encounterName .. " (" .. Loc ["STRING_SEGMENTS_LIST_BOSS"] .. ")", nil, 2, "white", "white")
|
||||
end
|
||||
--CoolTip:AddIcon ([[Interface\AddOns\Details\images\icons]], "main", "left", 14, 10, 479/512, 510/512, 24/512, 51/512)
|
||||
end
|
||||
|
||||
local portrait = (thisCombat.is_boss and thisCombat.is_boss.bossimage) or _detalhes:GetBossPortrait (nil, nil, encounterName, EJID)
|
||||
if (portrait) then
|
||||
CoolTip:AddIcon (portrait, 2, "top", 128, 64, 0, 1, 0, 0.96)
|
||||
end
|
||||
|
||||
local backgroundImage = _detalhes:GetRaidIcon (mapID, EJID, "party")
|
||||
if (backgroundImage) then
|
||||
CoolTip:SetWallpaper (2, backgroundImage, {0.070, 0.695, 0.087, 0.566}, {1, 1, 1, 0.5}, true) -- party_wallpaper_tex -- {0.09, 0.698125, .17, 0.833984375}
|
||||
end
|
||||
|
||||
--> sub menu
|
||||
local decorrido = thisCombat:GetCombatTime()
|
||||
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
|
||||
--CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
|
||||
|
||||
if (segmentID == "trashoverall") then
|
||||
local totalRealTime = endedAt - startedAt
|
||||
CoolTip:AddLine (Loc["STRING_SEGMENTS_LIST_TIMEINCOMBAT"] .. ":", _detalhes.gump:IntegerToTimer (decorrido), 2, "white", "white")
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_TOTALTIME"] .. ":", _detalhes.gump:IntegerToTimer (endedAt - startedAt) .. " [|cFFFF3300" .. _detalhes.gump:IntegerToTimer (totalRealTime - decorrido) .. "|r]", 2, "white", "white")
|
||||
|
||||
elseif (isMythicOverallSegment) then
|
||||
CoolTip:AddLine (Loc["STRING_SEGMENTS_LIST_TIMEINCOMBAT"] .. ":", _detalhes.gump:IntegerToTimer (decorrido), 2, "white", "white")
|
||||
local totalRealTime = endedAt - startedAt
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_TOTALTIME"] .. ":", _detalhes.gump:IntegerToTimer (totalRealTime) .. " [|cFFFF3300" .. _detalhes.gump:IntegerToTimer (totalRealTime - decorrido) .. "|r]", 2, "white", "white")
|
||||
|
||||
else
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", _detalhes.gump:IntegerToTimer (decorrido), 2, "white", "white")
|
||||
end
|
||||
|
||||
if (thisCombat.is_boss) then
|
||||
CoolTip:AddLine ("", "", 2, "white", "white")
|
||||
end
|
||||
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", thisCombat.data_inicio, 2, "white", "white")
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", thisCombat.data_fim or "in progress", 2, "white", "white")
|
||||
|
||||
else
|
||||
--> the combat has mythic dungeon tag but doesn't have a mythic dungeon table information
|
||||
--> so this is a trash cleanup segment
|
||||
|
||||
local trashInfo = thisCombat:GetMythicDungeonTrashInfo()
|
||||
|
||||
--CoolTip:AddLine (Loc ["STRING_SEGMENT_TRASH"], _detalhes.gump:IntegerToTimer (thisCombat:GetCombatTime()), 1, dungeon_color_trash, "gray")
|
||||
--CoolTip:AddIcon ([[Interface\AddOns\Details\images\icons]], "main", "left", 16, 12, 0.02734375, 0.11328125, 0.19140625, 0.3125, "red")
|
||||
--CoolTip:AddIcon ([[Interface\AddOns\Details\images\icons]], "main", "left", 14, 10, 479/512, 510/512, 24/512, 51/512, nil, nil, true)
|
||||
|
||||
--submenu
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_TRASH"], nil, 2, "white", "white")
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", _detalhes.gump:IntegerToTimer (thisCombat:GetCombatTime()), 2, "white", "white")
|
||||
CoolTip:AddLine ("", "", 2, "white", "white")
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", thisCombat.data_inicio, 2, "white", "white")
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", thisCombat.data_fim or "in progress", 2, "white", "white")
|
||||
|
||||
local backgroundImage = _detalhes:GetRaidIcon (trashInfo.MapID, trashInfo.EJID, "party")
|
||||
if (backgroundImage) then
|
||||
CoolTip:SetWallpaper (2, backgroundImage, party_wallpaper_tex, {1, 1, 1, 0.5}, true)
|
||||
end
|
||||
end
|
||||
|
||||
segment_info_added = true
|
||||
|
||||
elseif (_detalhes.tabela_vigente.is_boss and _detalhes.tabela_vigente.is_boss.name) then
|
||||
local portrait = _detalhes:GetBossPortrait (_detalhes.tabela_vigente.is_boss.mapid, _detalhes.tabela_vigente.is_boss.index) or _detalhes.tabela_vigente.is_boss.bossimage
|
||||
if (portrait) then
|
||||
CoolTip:AddIcon (portrait, 2, "top", 128, 64)
|
||||
@@ -6173,16 +6443,16 @@ local build_segment_list = function (self, elapsed)
|
||||
if (_detalhes.tooltip.submenu_wallpaper) then
|
||||
local background = _detalhes:GetRaidIcon (_detalhes.tabela_vigente.is_boss.mapid)
|
||||
if (background) then
|
||||
CoolTip:SetWallpaper (2, background, nil, segments_wallpaper_color)
|
||||
CoolTip:SetWallpaper (2, background, nil, segments_wallpaper_color, true)
|
||||
else
|
||||
local ej_id = _detalhes.tabela_vigente.is_boss.ej_instance_id
|
||||
if (ej_id and ej_id ~= 0) then
|
||||
local name, description, bgImage, buttonImage, loreImage, dungeonAreaMapID, link = EJ_GetInstanceInfo (ej_id)
|
||||
if (name) then
|
||||
if (_detalhes.tabela_vigente.instance_type == "party") then
|
||||
CoolTip:SetWallpaper (2, bgImage, party_wallpaper_tex, party_wallpaper_color)
|
||||
CoolTip:SetWallpaper (2, bgImage, party_wallpaper_tex, party_wallpaper_color, true)
|
||||
else
|
||||
CoolTip:SetWallpaper (2, loreImage, raid_wallpaper_tex, party_wallpaper_color)
|
||||
CoolTip:SetWallpaper (2, loreImage, raid_wallpaper_tex, party_wallpaper_color, true)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -6191,6 +6461,7 @@ local build_segment_list = function (self, elapsed)
|
||||
--> wallpaper = main window
|
||||
CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
|
||||
end
|
||||
|
||||
elseif (_detalhes.tabela_vigente.is_pvp) then
|
||||
enemy = _detalhes.tabela_vigente.is_pvp.name
|
||||
file, coords = _detalhes:GetBattlegroundInfo (_detalhes.tabela_vigente.is_pvp.mapid)
|
||||
@@ -6199,41 +6470,43 @@ local build_segment_list = function (self, elapsed)
|
||||
file, coords = _detalhes:GetArenaInfo (_detalhes.tabela_vigente.is_arena.mapid)
|
||||
else
|
||||
if (_detalhes.tooltip.submenu_wallpaper) then
|
||||
CoolTip:SetWallpaper (2, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-StatsBackground]], segments_common_tex, segments_common_color)
|
||||
CoolTip:SetWallpaper (2, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-StatsBackground]], segments_common_tex, {1, 1, 1, 0.5}, true)
|
||||
else
|
||||
--> wallpaper = main window
|
||||
CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
|
||||
end
|
||||
end
|
||||
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_ENEMY"] .. ":", enemy, 2, "white", "white")
|
||||
|
||||
|
||||
if (_detalhes.tooltip.submenu_wallpaper) then
|
||||
if (file) then
|
||||
CoolTip:SetWallpaper (2, "Interface\\Glues\\LOADINGSCREENS\\" .. file, coords, empty_segment_color)
|
||||
CoolTip:SetWallpaper (2, "Interface\\Glues\\LOADINGSCREENS\\" .. file, coords, empty_segment_color, true)
|
||||
end
|
||||
else
|
||||
--> wallpaper = main window
|
||||
CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
|
||||
end
|
||||
|
||||
if (not _detalhes.tabela_vigente:GetEndTime()) then
|
||||
if (_detalhes.in_combat) then
|
||||
if (not segment_info_added) then
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_ENEMY"] .. ":", enemy, 2, "white", "white")
|
||||
|
||||
if (not _detalhes.tabela_vigente:GetEndTime()) then
|
||||
if (_detalhes.in_combat) then
|
||||
local decorrido = _detalhes.tabela_vigente:GetCombatTime()
|
||||
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
|
||||
else
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", "--x--x--", 2, "white", "white")
|
||||
end
|
||||
else
|
||||
local decorrido = _detalhes.tabela_vigente:GetCombatTime()
|
||||
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
|
||||
else
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", "--x--x--", 2, "white", "white")
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
|
||||
end
|
||||
else
|
||||
local decorrido = _detalhes.tabela_vigente:GetCombatTime()
|
||||
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
|
||||
end
|
||||
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", _detalhes.tabela_vigente.data_inicio, 2, "white", "white")
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", _detalhes.tabela_vigente.data_fim or "in progress", 2, "white", "white")
|
||||
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", _detalhes.tabela_vigente.data_inicio, 2, "white", "white")
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", _detalhes.tabela_vigente.data_fim or "in progress", 2, "white", "white")
|
||||
end
|
||||
|
||||
--> fill é a quantidade de menu que esta sendo mostrada
|
||||
if (instancia.segmento == 0) then
|
||||
if (fill - 2 == menuIndex) then
|
||||
@@ -6260,12 +6533,10 @@ local build_segment_list = function (self, elapsed)
|
||||
local combat_time = _detalhes.tabela_overall:GetCombatTime()
|
||||
local minutos, segundos = _math_floor (combat_time / 60), _math_floor (combat_time % 60)
|
||||
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
|
||||
|
||||
--CoolTip:SetWallpaper (2, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-StatsBackground]], segments_common_tex, segments_common_color)
|
||||
--CoolTip:SetWallpaper (2, [[Interface\PetBattles\MountJournal-NoMounts]], {0, 403/512, 0, 294/512}, {.5, .5, .5, 0.9})
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
|
||||
|
||||
if (_detalhes.tooltip.submenu_wallpaper) then
|
||||
CoolTip:SetWallpaper (2, [[Interface\PetPaperDollFrame\PetStatsBG-Hunter]], {321/512, 0, 0, 190/512}, {1, 1, 1, 0.9})
|
||||
CoolTip:SetWallpaper (2, [[Interface\PetPaperDollFrame\PetStatsBG-Hunter]], {321/512, 0, 0, 190/512}, {1, 1, 1, 0.9}, true)
|
||||
else
|
||||
--> wallpaper = main window
|
||||
CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
## Interface: 70200
|
||||
## Interface: 70300
|
||||
## Title: Details! 3D Model Viewer
|
||||
## Notes: When the 3d models option is enabled, this tool is used to select which model will be used on the window's rows.
|
||||
## DefaultState: Enabled
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Interface: 70200
|
||||
## Interface: 70300
|
||||
## Title: Details Storage
|
||||
## Notes: Stores information for Details!
|
||||
## DefaultState: Enabled
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Interface: 70200
|
||||
## Interface: 70300
|
||||
## Title: Details Damage, the Game! (plugin)
|
||||
## Notes: Plugin for Details
|
||||
## RequiredDeps: Details
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Interface: 70200
|
||||
## Interface: 70300
|
||||
## Title: Details Dps Tuning (plugin)
|
||||
## Notes: Plugin for Details
|
||||
## RequiredDeps: Details
|
||||
|
||||
@@ -146,7 +146,7 @@ local function CreatePluginFrames (data)
|
||||
EncounterDetails:AutoShowIcon()
|
||||
end
|
||||
|
||||
EncounterDetails:CreateCallbackListeners()
|
||||
--EncounterDetails:CreateCallbackListeners()
|
||||
|
||||
elseif (event == "COMBAT_PLAYER_ENTER") then --> combat started
|
||||
if (EncounterDetails.showing and EncounterDetails.db.hide_on_combat) then
|
||||
@@ -236,6 +236,8 @@ local function CreatePluginFrames (data)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--desativado, agora ele é gerenciado dentro do proprio details!
|
||||
function EncounterDetails:CreateCallbackListeners()
|
||||
|
||||
EncounterDetails.DBM_timers = {}
|
||||
@@ -538,6 +540,9 @@ local shift_monitor = function (self)
|
||||
if (IsShiftKeyDown()) then
|
||||
local spellname = GetSpellInfo (self.spellid)
|
||||
if (spellname) then
|
||||
if (GameCooltip) then
|
||||
GameCooltip:Hide()
|
||||
end
|
||||
GameTooltip:SetOwner (self, "ANCHOR_TOPLEFT")
|
||||
GameTooltip:SetSpellByID (self.spellid)
|
||||
GameTooltip:Show()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Interface: 70200
|
||||
## Interface: 70300
|
||||
## Title: Details Encounter (plugin)
|
||||
## Notes: Plugin for Details
|
||||
## RequiredDeps: Details
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Interface: 70200
|
||||
## Interface: 70300
|
||||
## Title: Details Raid Check (plugin)
|
||||
## Notes: Show a icon on Details title bar showing flask, food, pre-pots.
|
||||
## RequiredDeps: Details
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Interface: 70200
|
||||
## Interface: 70300
|
||||
## Title: Details: Emerald Nightmare
|
||||
## Notes: Plugin for Details
|
||||
## RequiredDeps: Details
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Interface: 70200
|
||||
## Interface: 70300
|
||||
## Title: Details: Nighthold
|
||||
## Notes: Plugin for Details
|
||||
## RequiredDeps: Details
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Interface: 70200
|
||||
## Interface: 70300
|
||||
## Title: Details: Tomb of Sargeras
|
||||
## Notes: Plugin for Details
|
||||
## RequiredDeps: Details
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Interface: 70200
|
||||
## Interface: 70300
|
||||
## Title: Details: Trial Of Valor
|
||||
## Notes: Plugin for Details
|
||||
## RequiredDeps: Details
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Interface: 70200
|
||||
## Interface: 70300
|
||||
## Title: Details!: Streamer (plugin)
|
||||
## Notes: Show which spells you are casting, viewers can see what are you doing and follow your steps.
|
||||
## RequiredDeps: Details
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Interface: 70200
|
||||
## Interface: 70300
|
||||
## Title: Details TimeAttack (plugin)
|
||||
## Notes: Plugin for Details
|
||||
## SavedVariablesPerCharacter: _detalhes_databaseTimeAttack
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Interface: 70200
|
||||
## Interface: 70300
|
||||
## Title: Details Tiny Threat (plugin)
|
||||
## Notes: Plugin for Details
|
||||
## RequiredDeps: Details
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Interface: 70200
|
||||
## Interface: 70300
|
||||
## Title: Details Vanguard (plugin)
|
||||
## Notes: Plugin for Details
|
||||
## SavedVariablesPerCharacter: _detalhes_databaseVanguard
|
||||
|
||||
+731
@@ -265,6 +265,737 @@ function _G._detalhes:Start()
|
||||
|
||||
self.listener:RegisterEvent ("PLAYER_SPECIALIZATION_CHANGED")
|
||||
|
||||
--test immersion stuff
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local immersionFrame = CreateFrame ("frame", "DetailsImmersionFrame", UIParent)
|
||||
immersionFrame:RegisterEvent ("ZONE_CHANGED_NEW_AREA")
|
||||
immersionFrame.DevelopmentDebug = false
|
||||
|
||||
--> check if can enabled the immersino stuff
|
||||
|
||||
function immersionFrame.CheckIfCanEnableImmersion()
|
||||
local mapFileName = GetMapInfo()
|
||||
if (mapFileName and mapFileName:find ("InvasionPoint")) then
|
||||
self.immersion_enabled = true
|
||||
if (immersionFrame.DevelopmentDebug) then
|
||||
print ("Details!", "CheckIfCanEnableImmersion() > immersion enabled.")
|
||||
end
|
||||
else
|
||||
if (self.immersion_enabled) then
|
||||
if (immersionFrame.DevelopmentDebug) then
|
||||
print ("Details!", "CheckIfCanEnableImmersion() > immersion disabled.")
|
||||
end
|
||||
self.immersion_enabled = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> check events
|
||||
immersionFrame:SetScript ("OnEvent", function (_, event, ...)
|
||||
if (event == "ZONE_CHANGED_NEW_AREA") then
|
||||
C_Timer.After (3, immersionFrame.CheckIfCanEnableImmersion)
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
--test mythic + stuff
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
--> data for the current mythic + dungeon
|
||||
self.MythicPlus = {
|
||||
RunID = 0,
|
||||
}
|
||||
|
||||
-- ~mythic ~dungeon
|
||||
local newFrame = CreateFrame ("frame", "DetailsMythicPlusFrame", UIParent)
|
||||
newFrame.DevelopmentDebug = false
|
||||
|
||||
--[
|
||||
newFrame:RegisterEvent ("CHALLENGE_MODE_START")
|
||||
newFrame:RegisterEvent ("CHALLENGE_MODE_COMPLETED")
|
||||
newFrame:RegisterEvent ("ZONE_CHANGED_NEW_AREA")
|
||||
newFrame:RegisterEvent ("ENCOUNTER_END")
|
||||
--]]
|
||||
|
||||
--[[
|
||||
all mythic segments have:
|
||||
.is_mythic_dungeon_segment = true
|
||||
.is_mythic_dungeon_run_id = run id from details.profile.mythic_dungeon_id
|
||||
boss, 'trash overall' and 'dungeon overall' segments have:
|
||||
.is_mythic_dungeon
|
||||
boss segments have:
|
||||
.is_boss
|
||||
'trash overall' segments have:
|
||||
.is_mythic_dungeon with .SegmentID = "trashoverall"
|
||||
'dungeon overall' segment have:
|
||||
.is_mythic_dungeon with .SegmentID = "overall"
|
||||
|
||||
--]]
|
||||
|
||||
--precisa converter um wipe em um trash segment? provavel que sim
|
||||
|
||||
-- at the end of a mythic run, if enable on settings, merge all the segments from the mythic run into only one
|
||||
function newFrame.MergeSegmentsOnEnd()
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", "MythicDungeonFinished() > starting to merge mythic segments.", "InCombatLockdown():", InCombatLockdown())
|
||||
end
|
||||
|
||||
--> create a new combat to be the overall for the mythic run
|
||||
self:EntrarEmCombate()
|
||||
|
||||
--> get the current combat just created and the table with all past segments
|
||||
local newCombat = self:GetCurrentCombat()
|
||||
local segmentHistory = self:GetCombatSegments()
|
||||
|
||||
local totalTime = 0
|
||||
local startDate, endDate = "", ""
|
||||
local lastSegment
|
||||
|
||||
--> add all boss segments from this run to this new segment
|
||||
for i = 1, 25 do --> from the newer combat to the oldest
|
||||
local pastCombat = segmentHistory [i]
|
||||
if (pastCombat and pastCombat.is_mythic_dungeon and pastCombat.is_mythic_dungeon.RunID == self.mythic_dungeon_id) then
|
||||
local canAddThisSegment = true
|
||||
if (_detalhes.mythic_plus.make_overall_boss_only) then
|
||||
if (not pastCombat.is_boss) then
|
||||
canAddThisSegment = false
|
||||
end
|
||||
end
|
||||
|
||||
if (canAddThisSegment) then
|
||||
newCombat = newCombat + pastCombat
|
||||
totalTime = totalTime + pastCombat:GetCombatTime()
|
||||
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("MythicDungeonFinished() > adding time:", pastCombat:GetCombatTime(), pastCombat.is_boss and pastCombat.is_boss.name)
|
||||
end
|
||||
|
||||
if (endDate == "") then
|
||||
local _, whenEnded = pastCombat:GetDate()
|
||||
endDate =whenEnded
|
||||
end
|
||||
lastSegment = pastCombat
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> get the date where the first segment started
|
||||
if (lastSegment) then
|
||||
startDate = lastSegment:GetDate()
|
||||
end
|
||||
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", "MythicDungeonFinished() > totalTime:", totalTime, "startDate:", startDate)
|
||||
end
|
||||
|
||||
local zoneName, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceMapID, instanceGroupSize = GetInstanceInfo()
|
||||
|
||||
--> tag the segment as mythic overall segment
|
||||
newCombat.is_mythic_dungeon = {
|
||||
StartedAt = self.MythicPlus.StartedAt, --the start of the run
|
||||
EndedAt = self.MythicPlus.EndedAt, --the end of the run
|
||||
SegmentID = "overall", --segment number within the dungeon
|
||||
RunID = self.mythic_dungeon_id,
|
||||
OverallSegment = true,
|
||||
ZoneName = self.MythicPlus.DungeonName,
|
||||
MapID = instanceMapID,
|
||||
Level = self.MythicPlus.Level,
|
||||
EJID = self.MythicPlus.ejID,
|
||||
}
|
||||
|
||||
newCombat.is_mythic_dungeon_segment = true
|
||||
newCombat.is_mythic_dungeon_run_id = self.mythic_dungeon_id
|
||||
|
||||
--> set the segment time and date
|
||||
newCombat:SetStartTime (GetTime() - totalTime)
|
||||
newCombat:SetEndTime (GetTime())
|
||||
newCombat:SetDate (startDate, endDate)
|
||||
|
||||
--> immediatly finishes the segment just started
|
||||
self:SairDoCombate()
|
||||
|
||||
--> update all windows
|
||||
self:InstanciaCallFunction (self.gump.Fade, "in", nil, "barras")
|
||||
self:InstanciaCallFunction (self.AtualizaSegmentos)
|
||||
self:InstanciaCallFunction (self.AtualizaSoloMode_AfertReset)
|
||||
self:InstanciaCallFunction (self.ResetaGump)
|
||||
self:AtualizaGumpPrincipal (-1, true)
|
||||
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", "MythicDungeonFinished() > finished merging segments.")
|
||||
print ("Details!", "MythicDungeonFinished() > all done, check in the segments list if everything is correct, if something is weird: '/details feedback' thanks in advance!")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--> after each boss fight, if enalbed on settings, create an extra segment with all trash segments from the boss just killed
|
||||
function newFrame.MergeTrashCleanup()
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", "MergeTrashCleanup() > running", newFrame.TrashMergeScheduled and #newFrame.TrashMergeScheduled)
|
||||
end
|
||||
|
||||
local segmentsToMerge = newFrame.TrashMergeScheduled
|
||||
|
||||
--> table exists and there's at least one segment
|
||||
if (segmentsToMerge and segmentsToMerge[1]) then
|
||||
--> do the merge
|
||||
|
||||
--> leave combat if still tagged as combat
|
||||
if (self.in_combat) then
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", "MergeTrashCleanup() > was in combat, calling SairDoCombate()", _detalhes.tabela_vigente, _detalhes.tabela_vigente.is_boss)
|
||||
end
|
||||
self:SairDoCombate()
|
||||
end
|
||||
|
||||
--> create a new combat to be the overall for the mythic run
|
||||
self:EntrarEmCombate()
|
||||
|
||||
--> get the current combat just created and the table with all past segments
|
||||
local newCombat = self:GetCurrentCombat()
|
||||
local totalTime = 0
|
||||
local startDate, endDate = "", ""
|
||||
local lastSegment
|
||||
|
||||
--> add segments
|
||||
for _, pastCombat in ipairs (segmentsToMerge) do
|
||||
newCombat = newCombat + pastCombat
|
||||
totalTime = totalTime + pastCombat:GetCombatTime()
|
||||
|
||||
--> tag this combat as already added to a boss trash overall
|
||||
pastCombat._trashoverallalreadyadded = true
|
||||
|
||||
if (endDate == "") then
|
||||
local _, whenEnded = pastCombat:GetDate()
|
||||
endDate = whenEnded
|
||||
end
|
||||
lastSegment = pastCombat
|
||||
end
|
||||
|
||||
--> get the date where the first segment started
|
||||
if (lastSegment) then
|
||||
startDate = lastSegment:GetDate()
|
||||
end
|
||||
|
||||
local zoneName, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceMapID, instanceGroupSize = GetInstanceInfo()
|
||||
|
||||
--> tag the segment as mythic overall segment
|
||||
newCombat.is_mythic_dungeon = {
|
||||
StartedAt = segmentsToMerge.PreviousBossKilledAt, --start of the mythic run or when the previous boss got killed
|
||||
EndedAt = segmentsToMerge.LastBossKilledAt, --the time() when encounter_end got triggered
|
||||
SegmentID = "trashoverall",
|
||||
RunID = self.mythic_dungeon_id,
|
||||
TrashOverallSegment = true,
|
||||
ZoneName = self.MythicPlus.DungeonName,
|
||||
MapID = instanceMapID,
|
||||
Level = self.MythicPlus.Level,
|
||||
EJID = self.MythicPlus.ejID,
|
||||
EncounterID = segmentsToMerge.EncounterID,
|
||||
EncounterName = segmentsToMerge.EncounterName or Loc ["STRING_UNKNOW"],
|
||||
}
|
||||
|
||||
newCombat.is_mythic_dungeon_segment = true
|
||||
newCombat.is_mythic_dungeon_run_id = self.mythic_dungeon_id
|
||||
|
||||
--> set the segment time / using a sum of combat times, this combat time is reliable
|
||||
newCombat:SetStartTime (GetTime() - totalTime)
|
||||
newCombat:SetEndTime (GetTime())
|
||||
--> set the segment date
|
||||
newCombat:SetDate (startDate, endDate)
|
||||
|
||||
--> immediatly finishes the segment just started
|
||||
self:SairDoCombate()
|
||||
|
||||
--o combate agora é _tabela_vigente e [1] na tabela de overall
|
||||
--seria necessario passar essa tabela para [2] na overall
|
||||
local segmentHistory = self:GetCombatSegments()
|
||||
local bossSegment = segmentHistory [2]
|
||||
if (bossSegment) then
|
||||
--set the boss as the current combat
|
||||
_detalhes.tabela_vigente = bossSegment
|
||||
--swap tables
|
||||
segmentHistory [1] = bossSegment --as the boss combat is done, it is also the first combat in the past combats table
|
||||
segmentHistory [2] = newCombat --se the overall trash as the second segment on the past table (the semgnet 2 was occupy by the boss segment)
|
||||
end
|
||||
|
||||
--> update all windows
|
||||
self:InstanciaCallFunction (self.gump.Fade, "in", nil, "barras")
|
||||
self:InstanciaCallFunction (self.AtualizaSegmentos)
|
||||
self:InstanciaCallFunction (self.AtualizaSoloMode_AfertReset)
|
||||
self:InstanciaCallFunction (self.ResetaGump)
|
||||
self:AtualizaGumpPrincipal (-1, true)
|
||||
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", "MergeTrashCleanup() > finished merging trash segments.", _detalhes.tabela_vigente, _detalhes.tabela_vigente.is_boss)
|
||||
end
|
||||
|
||||
--> should delete the trash segments after the merge?
|
||||
if (_detalhes.mythic_plus.delete_trash_after_merge) then
|
||||
local segmentHistory = self:GetCombatSegments()
|
||||
for _, pastCombat in ipairs (segmentsToMerge) do
|
||||
for i = #segmentHistory, 1, -1 do
|
||||
local segment = segmentHistory [i]
|
||||
if (segment == pastCombat) then
|
||||
wipe (segment)
|
||||
tremove (segmentHistory, i)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
wipe (segmentsToMerge)
|
||||
self:SendEvent ("DETAILS_DATA_SEGMENTREMOVED")
|
||||
else
|
||||
--> clear the segments to merge table
|
||||
for i = #segmentsToMerge, 1, -1 do
|
||||
tremove (segmentsToMerge, i)
|
||||
--> notify plugins about a segment deleted
|
||||
self:SendEvent ("DETAILS_DATA_SEGMENTREMOVED")
|
||||
end
|
||||
|
||||
--> clear encounter name and id
|
||||
segmentsToMerge.EncounterID = nil
|
||||
segmentsToMerge.EncounterName = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> this function merges trash segments after all bosses of the mythic dungeon are defeated
|
||||
--> happens when the group finishes all bosses but don't complete the trash requirement
|
||||
function newFrame.MergeRemainingTrashAfterAllBossesDone()
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", "MergeRemainingTrashAfterAllBossesDone() > running, #segments: ", #newFrame.TrashMergeScheduled2, "trash overall table:", newFrame.TrashMergeScheduled2_OverallCombat)
|
||||
end
|
||||
|
||||
local segmentsToMerge = newFrame.TrashMergeScheduled2
|
||||
local overallCombat = newFrame.TrashMergeScheduled2_OverallCombat
|
||||
|
||||
--> needs to merge, add the total combat time, set the date end to the date of the first segment
|
||||
local totalTime = 0
|
||||
local startDate, endDate = "", ""
|
||||
local lastSegment
|
||||
|
||||
--> add segments
|
||||
for _, pastCombat in ipairs (segmentsToMerge) do
|
||||
overallCombat = overallCombat + pastCombat
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("MergeRemainingTrashAfterAllBossesDone() > segment added")
|
||||
end
|
||||
totalTime = totalTime + pastCombat:GetCombatTime()
|
||||
|
||||
--> tag this combat as already added to a boss trash overall
|
||||
pastCombat._trashoverallalreadyadded = true
|
||||
|
||||
if (endDate == "") then --get the end date of the first index only
|
||||
local _, whenEnded = pastCombat:GetDate()
|
||||
endDate = whenEnded
|
||||
end
|
||||
lastSegment = pastCombat
|
||||
end
|
||||
|
||||
--> set the segment time / using a sum of combat times, this combat time is reliable
|
||||
local startTime = overallCombat:GetStartTime()
|
||||
overallCombat:SetStartTime (startTime - totalTime)
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("MergeRemainingTrashAfterAllBossesDone() > total combat time:", totalTime)
|
||||
end
|
||||
--> set the segment date
|
||||
local startDate = overallCombat:GetDate()
|
||||
overallCombat:SetDate (startDate, endDate)
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("MergeRemainingTrashAfterAllBossesDone() > new end date:", endDate)
|
||||
end
|
||||
|
||||
local mythicDungeonInfo = overallCombat:GetMythicDungeonInfo()
|
||||
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("MergeRemainingTrashAfterAllBossesDone() > elapsed time before:", mythicDungeonInfo.EndedAt - mythicDungeonInfo.StartedAt)
|
||||
end
|
||||
mythicDungeonInfo.StartedAt = mythicDungeonInfo.StartedAt - (self.MythicPlus.EndedAt - self.MythicPlus.PreviousBossKilledAt)
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("MergeRemainingTrashAfterAllBossesDone() > elapsed time after:", mythicDungeonInfo.EndedAt - mythicDungeonInfo.StartedAt)
|
||||
end
|
||||
|
||||
--> should delete the trash segments after the merge?
|
||||
if (_detalhes.mythic_plus.delete_trash_after_merge) then
|
||||
local segmentHistory = self:GetCombatSegments()
|
||||
for _, pastCombat in ipairs (segmentsToMerge) do
|
||||
for i = #segmentHistory, 1, -1 do
|
||||
local segment = segmentHistory [i]
|
||||
if (segment == pastCombat) then
|
||||
wipe (segment)
|
||||
tremove (segmentHistory, i)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
wipe (segmentsToMerge)
|
||||
self:SendEvent ("DETAILS_DATA_SEGMENTREMOVED")
|
||||
else
|
||||
--> clear the segments to merge table
|
||||
for i = #segmentsToMerge, 1, -1 do
|
||||
tremove (segmentsToMerge, i)
|
||||
|
||||
--> notify plugins about a segment deleted
|
||||
self:SendEvent ("DETAILS_DATA_SEGMENTREMOVED")
|
||||
end
|
||||
end
|
||||
|
||||
newFrame.TrashMergeScheduled2 = nil
|
||||
newFrame.TrashMergeScheduled2_OverallCombat = nil
|
||||
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", "MergeRemainingTrashAfterAllBossesDone() > done merging")
|
||||
end
|
||||
end
|
||||
|
||||
--this function is called right after defeat a boss inside a mythic dungeon
|
||||
function newFrame.BossDefeated (this_is_end_end, encounterID, encounterName, difficultyID, raidSize, endStatus) --hold your breath and count to ten
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", "BossDefeated() > boss defeated | SegmentID:", self.MythicPlus.SegmentID, " | mapID:", self.MythicPlus.DungeonID)
|
||||
end
|
||||
|
||||
local zoneName, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceMapID, instanceGroupSize = GetInstanceInfo()
|
||||
|
||||
--> addon the mythic dungeon info to the combat
|
||||
_detalhes.tabela_vigente.is_mythic_dungeon = {
|
||||
StartedAt = self.MythicPlus.StartedAt, --the start of the run
|
||||
EndedAt = time(), --when the boss got killed
|
||||
SegmentID = self.MythicPlus.SegmentID, --segment number within the dungeon
|
||||
EncounterID = encounterID,
|
||||
EncounterName = encounterName or Loc ["STRING_UNKNOW"],
|
||||
RunID = self.mythic_dungeon_id,
|
||||
ZoneName = self.MythicPlus.DungeonName,
|
||||
MapID = self.MythicPlus.DungeonID,
|
||||
OverallSegment = false,
|
||||
Level = self.MythicPlus.Level,
|
||||
EJID = self.MythicPlus.ejID,
|
||||
}
|
||||
|
||||
if (not this_is_end_end) then
|
||||
--> parser doesn't handle ENCOUNTER_END to party instances, so we close the combat from here
|
||||
self:SairDoCombate (true, {encounterID, encounterName, difficultyID, raidSize, endStatus})
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", "BossDefeated() > closing the combat with SairDoCombate()", _detalhes.tabela_vigente, _detalhes.tabela_vigente.is_boss)
|
||||
end
|
||||
end
|
||||
|
||||
--> check if need to merge the trash for this boss
|
||||
if (_detalhes.mythic_plus.merge_boss_trash) then
|
||||
--> store on an table all segments which should be merged
|
||||
local segmentsToMerge = newFrame.TrashMergeScheduled or {}
|
||||
--> table with all past semgnets
|
||||
local segmentHistory = self:GetCombatSegments()
|
||||
|
||||
--> iterate among segments
|
||||
for i = 1, 25 do --> from the newer combat to the oldest
|
||||
local pastCombat = segmentHistory [i]
|
||||
--> does the combat exists
|
||||
if (pastCombat and not pastCombat._trashoverallalreadyadded) then
|
||||
--> is the combat a mythic segment from this run?
|
||||
local isMythicSegment, SegmentID = pastCombat:IsMythicDungeon()
|
||||
if (isMythicSegment and SegmentID == self.mythic_dungeon_id and not pastCombat.is_boss) then
|
||||
|
||||
local mythicDungeonInfo = pastCombat:GetMythicDungeonInfo() -- .is_mythic_dungeon only boss, trash overall and run overall have it
|
||||
if (not mythicDungeonInfo or not mythicDungeonInfo.TrashOverallSegment) then
|
||||
--> trash segment found, schedule to merge
|
||||
tinsert (segmentsToMerge, pastCombat)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> add encounter information
|
||||
segmentsToMerge.EncounterID = encounterID
|
||||
segmentsToMerge.EncounterName = encounterName
|
||||
segmentsToMerge.PreviousBossKilledAt = self.MythicPlus.PreviousBossKilledAt
|
||||
|
||||
--> reduce this boss encounter time from the trash lenght time, since the boss doesn't count towards the time spent cleaning trash
|
||||
segmentsToMerge.LastBossKilledAt = time() - _detalhes.tabela_vigente:GetCombatTime()
|
||||
|
||||
newFrame.TrashMergeScheduled = segmentsToMerge
|
||||
|
||||
if (not InCombatLockdown() and not UnitAffectingCombat ("player")) then
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", "BossDefeated() > not in combat, merging trash now")
|
||||
end
|
||||
newFrame.MergeTrashCleanup()
|
||||
else
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", "BossDefeated() > player in combatlockdown, scheduling trash merge")
|
||||
end
|
||||
_detalhes.schedule_mythicdungeon_trash_merge = true
|
||||
end
|
||||
end
|
||||
|
||||
--> close the combat
|
||||
if (this_is_end_end) then
|
||||
--> player left the dungeon
|
||||
if (in_combat and _detalhes.mythic_plus.always_in_combat) then
|
||||
self:SairDoCombate()
|
||||
end
|
||||
else
|
||||
--> re-enter in combat if details! is set to always be in combat during mythic plus
|
||||
if (self.mythic_plus.always_in_combat) then
|
||||
self:EntrarEmCombate()
|
||||
end
|
||||
|
||||
--> increase the segment number for the mythic run
|
||||
self.MythicPlus.SegmentID = self.MythicPlus.SegmentID + 1
|
||||
|
||||
--> register the time when the last boss has been killed (started a clean up for the next trash)
|
||||
self.MythicPlus.PreviousBossKilledAt = time()
|
||||
end
|
||||
end
|
||||
|
||||
function newFrame.MythicDungeonFinished()
|
||||
if (newFrame.IsDoingMythicDungeon) then
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", "MythicDungeonFinished() > the dungeon was a Mythic+ and just ended.")
|
||||
end
|
||||
|
||||
newFrame.IsDoingMythicDungeon = false
|
||||
self.MythicPlus.Started = false
|
||||
self.MythicPlus.EndedAt = time()-1.9
|
||||
|
||||
--> at this point, details! should not be in combat, but if something triggered a combat start, just close the combat right away
|
||||
if (self.in_combat) then
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", "MythicDungeonFinished() > was in combat, calling SairDoCombate():", InCombatLockdown())
|
||||
end
|
||||
self:SairDoCombate()
|
||||
end
|
||||
|
||||
local segmentsToMerge = {}
|
||||
|
||||
--> check if there is trash segments after the last boss. need to merge these segments with the trash segment of the last boss
|
||||
if (_detalhes.mythic_plus.merge_boss_trash) then
|
||||
--> is the current combat not a boss fight? this means a combat was opened after the mythic run completed
|
||||
if (not self.tabela_vigente.is_boss and self.tabela_vigente:GetCombatTime() > 5) then
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", "MythicDungeonFinished() > the last combat isn't a boss fight, might have trash after bosses done.")
|
||||
end
|
||||
|
||||
--> table with all past semgnets
|
||||
local segmentHistory = self:GetCombatSegments()
|
||||
|
||||
for i = 1, #segmentHistory do
|
||||
local pastCombat = segmentHistory [i]
|
||||
--> does the combat exists
|
||||
|
||||
if (pastCombat and not pastCombat._trashoverallalreadyadded and pastCombat:GetCombatTime() > 5) then
|
||||
--> is the last boss?
|
||||
if (pastCombat.is_boss) then
|
||||
break
|
||||
end
|
||||
--> is the combat a mythic segment from this run?
|
||||
local isMythicSegment, SegmentID = pastCombat:IsMythicDungeon()
|
||||
if (isMythicSegment and SegmentID == self.mythic_dungeon_id) then
|
||||
--> if have mythic dungeon info, cancel the loop
|
||||
local mythicDungeonInfo = pastCombat:GetMythicDungeonInfo()
|
||||
if (mythicDungeonInfo) then
|
||||
break
|
||||
end
|
||||
--> merge this segment
|
||||
tinsert (segmentsToMerge, pastCombat)
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("MythicDungeonFinished() > found after last boss combat")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (#segmentsToMerge > 0) then
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", "MythicDungeonFinished() > found ", #segmentsToMerge, "segments after the last boss")
|
||||
end
|
||||
|
||||
--> find the latest trash overall
|
||||
local segmentHistory = self:GetCombatSegments()
|
||||
local latestTrashOverall
|
||||
for i = 1, #segmentHistory do
|
||||
local pastCombat = segmentHistory [i]
|
||||
if (pastCombat and pastCombat.is_mythic_dungeon and pastCombat.is_mythic_dungeon.SegmentID == "trashoverall") then
|
||||
latestTrashOverall = pastCombat
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if (latestTrashOverall) then
|
||||
--> stores the segment table and the trash overall segment to use on the merge
|
||||
newFrame.TrashMergeScheduled2 = segmentsToMerge
|
||||
newFrame.TrashMergeScheduled2_OverallCombat = latestTrashOverall
|
||||
|
||||
if (not InCombatLockdown() and not UnitAffectingCombat ("player")) then
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", "MythicDungeonFinished() > not in combat, merging last pack of trash now")
|
||||
end
|
||||
newFrame.MergeRemainingTrashAfterAllBossesDone()
|
||||
else
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", "MythicDungeonFinished() > player in combatlockdown, scheduling the merge for last trash packs")
|
||||
end
|
||||
_detalhes.schedule_mythicdungeon_endtrash_merge = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> merge segments
|
||||
if (_detalhes.mythic_plus.make_overall_when_done) then
|
||||
if (not InCombatLockdown() and not UnitAffectingCombat ("player")) then
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", "MythicDungeonFinished() > not in combat, creating overall segment now")
|
||||
end
|
||||
newFrame.MergeSegmentsOnEnd()
|
||||
else
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", "MythicDungeonFinished() > player in combatlockdown, scheduling the creation of the overall segment")
|
||||
end
|
||||
_detalhes.schedule_mythicdungeon_overallrun_merge = true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function newFrame.MythicDungeonStarted()
|
||||
--> flag as a mythic dungeon
|
||||
newFrame.IsDoingMythicDungeon = true
|
||||
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("=========")
|
||||
print ("Details!", "Thanks for using an alpha version of Details!, please don't mind all these debug lines.")
|
||||
print ("Details!", "We are developing new stuff.")
|
||||
print ("=========")
|
||||
print ("Details!", "MythicDungeonStarted() > CHALLENGE_MODE_START triggered, setting up details!")
|
||||
end
|
||||
|
||||
local mythicLevel = C_ChallengeMode.GetActiveKeystoneInfo()
|
||||
local zoneName, _, _, _, _, _, _, currentZoneID = GetInstanceInfo()
|
||||
local ejID = EJ_GetCurrentInstance()
|
||||
|
||||
--> setup the mythic run info
|
||||
self.MythicPlus.Started = true
|
||||
self.MythicPlus.DungeonName = zoneName
|
||||
self.MythicPlus.DungeonID = currentZoneID
|
||||
self.MythicPlus.StartedAt = time()+9.7 --> there's the countdown timer of 10 seconds
|
||||
self.MythicPlus.SegmentID = 1
|
||||
self.MythicPlus.Level = mythicLevel
|
||||
self.MythicPlus.ejID = ejID
|
||||
self.MythicPlus.PreviousBossKilledAt = time()
|
||||
|
||||
--> this counter is individual for each character
|
||||
self.mythic_dungeon_id = self.mythic_dungeon_id + 1 --14 --15
|
||||
|
||||
--> start a new combat segment after 10 seconds
|
||||
if (_detalhes.mythic_plus.always_in_combat) then
|
||||
C_Timer.After (9.7, function()
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", "New segment for mythic dungeon created.")
|
||||
end
|
||||
_detalhes:EntrarEmCombate()
|
||||
end)
|
||||
end
|
||||
|
||||
local name, groupType, difficultyID, difficult = GetInstanceInfo()
|
||||
if (groupType == "party" and self.overall_clear_newchallenge) then
|
||||
self.historico:resetar_overall()
|
||||
if (self.debug) then
|
||||
self:Msg ("(debug) timer is for a mythic+ dungeon, overall has been reseted.")
|
||||
end
|
||||
end
|
||||
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", "MythicDungeonStarted() > State set to Mythic Dungeon, new combat starting in 10 seconds.")
|
||||
end
|
||||
end
|
||||
|
||||
newFrame:SetScript ("OnEvent", function (_, event, ...)
|
||||
|
||||
if (event == "CHALLENGE_MODE_START") then
|
||||
--> CHALLENGE_MODE_START does trigger every time the player enters a mythic dungeon already in progress
|
||||
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", event, ...)
|
||||
end
|
||||
|
||||
--> is this a mythic dungeon?
|
||||
local _, _, difficulty, _, _, _, _, currentZoneID = GetInstanceInfo()
|
||||
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", "Dungeon Dificulty:", difficulty, currentZoneID)
|
||||
end
|
||||
|
||||
if (difficulty == 8) then
|
||||
--> start the dungeon on Details!
|
||||
newFrame.MythicDungeonStarted()
|
||||
end
|
||||
|
||||
elseif (event == "CHALLENGE_MODE_COMPLETED") then
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", event, ...)
|
||||
end
|
||||
|
||||
--> delay to wait the encounter_end trigger first
|
||||
--> assuming here the party cleaned the mobs kill objective before going to kill the last boss
|
||||
C_Timer.After (2, newFrame.MythicDungeonFinished)
|
||||
|
||||
elseif (event == "ENCOUNTER_END") then
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", event, ...)
|
||||
end
|
||||
|
||||
if (newFrame.IsDoingMythicDungeon) then
|
||||
local encounterID, encounterName, difficultyID, raidSize, endStatus = ...
|
||||
if (endStatus == 1) then
|
||||
newFrame.BossDefeated (false, encounterID, encounterName, difficultyID, raidSize, endStatus)
|
||||
else
|
||||
--> remove the boss table, so it will be considered trash
|
||||
if (self.tabela_vigente.is_boss) then
|
||||
--> check if is still in combat
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", "Boss Wipe, removing the boss table from the segment.")
|
||||
end
|
||||
if (self.in_combat) then
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", "Boss Wipe, was in combat, calling SairDoCombate().")
|
||||
end
|
||||
self:SairDoCombate()
|
||||
end
|
||||
self.tabela_vigente.is_boss = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
elseif (event == "ZONE_CHANGED_NEW_AREA") then
|
||||
if (newFrame.IsDoingMythicDungeon) then
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Details!", event, ...)
|
||||
print ("Zone changed and is Doing Mythic Dungeon")
|
||||
end
|
||||
local _, _, difficulty, _, _, _, _, currentZoneID = GetInstanceInfo()
|
||||
if (currentZoneID ~= self.MythicPlus.DungeonID) then
|
||||
if (newFrame.DevelopmentDebug) then
|
||||
print ("Zone changed and the zone is different than the dungeon")
|
||||
end
|
||||
--> finish the segment
|
||||
newFrame.BossDefeated (true)
|
||||
|
||||
--> finish the mythic run
|
||||
newFrame.MythicDungeonFinished()
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end)
|
||||
|
||||
|
||||
--fazer a captura de dados para o gráfico ao iniciar a corrida e parar ao sair da dungeon ou terminar a run.
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
self.parser_frame:RegisterEvent ("COMBAT_LOG_EVENT_UNFILTERED")
|
||||
|
||||
--> group
|
||||
|
||||
Reference in New Issue
Block a user