Details! v4.0
This commit is contained in:
@@ -56,6 +56,10 @@ local function CreatePluginFrames (data)
|
||||
end
|
||||
end
|
||||
|
||||
local close_button = DmgRank:CreateSoloCloseButton()
|
||||
close_button:SetPoint ("TOPRIGHT", DmgRankFrame, "TOPRIGHT", 3, 5)
|
||||
close_button:SetSize (24, 24)
|
||||
|
||||
------------- Build Ranking ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
--> damage goal table
|
||||
|
||||
@@ -127,6 +127,10 @@ local function CreatePluginFrames()
|
||||
end
|
||||
end
|
||||
|
||||
local close_button = DpsTuningPlugin:CreateSoloCloseButton()
|
||||
close_button:SetPoint ("TOPRIGHT", SDF, "TOPRIGHT", -15, 5)
|
||||
close_button:SetSize (24, 24)
|
||||
|
||||
function DpsTuningPlugin.GetActivityTime (thisspell, time)
|
||||
if (thisspell.tempo_end) then --> o tempo do jogador esta trancado
|
||||
local t = thisspell.tempo_end - thisspell.start
|
||||
|
||||
@@ -249,22 +249,26 @@ local function CreatePluginFrames (data)
|
||||
|
||||
elseif (event == "ENCOUNTER_END" or event == "PLAYER_REGEN_ENABLED") then
|
||||
if (current_encounter) then
|
||||
|
||||
if (_G.DBM) then
|
||||
local db = _detalhes.global_plugin_database ["DETAILS_PLUGIN_ENCOUNTER_DETAILS"]
|
||||
for spell, timer_table in pairs (current_table_dbm) do
|
||||
if (not EncounterDetails.db.encounter_timers_dbm [timer_table[1]] and timer_table[1]:find ("Timer")) then
|
||||
if (not db.encounter_timers_dbm [timer_table[1]]) then
|
||||
timer_table.id = current_encounter
|
||||
EncounterDetails.db.encounter_timers_dbm [timer_table[1]] = timer_table
|
||||
db.encounter_timers_dbm [timer_table[1]] = timer_table
|
||||
end
|
||||
end
|
||||
end
|
||||
if (BigWigs) then
|
||||
local db = _detalhes.global_plugin_database ["DETAILS_PLUGIN_ENCOUNTER_DETAILS"]
|
||||
for timer_id, timer_table in pairs (current_table_bigwigs) do
|
||||
if (not EncounterDetails.db.encounter_timers_bw [timer_id]) then
|
||||
if (not db.encounter_timers_bw [timer_id]) then
|
||||
timer_table.id = current_encounter
|
||||
EncounterDetails.db.encounter_timers_bw [timer_id] = timer_table
|
||||
db.encounter_timers_bw [timer_id] = timer_table
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
current_encounter = false
|
||||
@@ -276,13 +280,16 @@ local function CreatePluginFrames (data)
|
||||
event_frame:RegisterEvent ("ENCOUNTER_END")
|
||||
event_frame:RegisterEvent ("PLAYER_REGEN_ENABLED")
|
||||
|
||||
--EncounterDetails.DBM_timers
|
||||
--DBM_TimerStart Timer183828cdcount 2 Death Brand CD (2) 42.5 Interface\Icons\warlock_summon_doomguard cdcount 183828 1 1438
|
||||
--DBM_TimerStart Timer183828cdcount 3 Death Brand CD (3) 42.5 Interface\Icons\warlock_summon_doomguard cdcount 183828 1 1438
|
||||
|
||||
--EncounterDetails.DBM_timers
|
||||
if (_G.DBM) then
|
||||
local dbm_timer_callback = function (event, timer_id, message, duration)
|
||||
local spell = tonumber (timer_id:match ("(%d+)"))
|
||||
local dbm_timer_callback = function (bar_type, id, msg, timer, icon, bartype, spellId, colorId, modid)
|
||||
--print (bar_type, id, msg, timer, icon, bartype, spellId, colorId, modid)
|
||||
local spell = tostring (spellId)
|
||||
if (spell and not current_table_dbm [spell]) then
|
||||
current_table_dbm [spell] = {timer_id, message, duration}
|
||||
current_table_dbm [spell] = {spell, id, msg, timer, icon, bartype, spellId, colorId, modid}
|
||||
end
|
||||
end
|
||||
DBM:RegisterCallback ("DBM_TimerStart", dbm_timer_callback)
|
||||
@@ -291,9 +298,10 @@ local function CreatePluginFrames (data)
|
||||
if (BigWigs) then
|
||||
BigWigs:Enable()
|
||||
function EncounterDetails:BigWigs_StartBar (event, module, spellid, bar_text, time, icon, ...)
|
||||
--print (event, module, spellid, bar_text, time, icon, ...)
|
||||
spellid = tostring (spellid)
|
||||
if (not current_table_bigwigs [spellid]) then
|
||||
current_table_bigwigs [spellid] = {spellid, bar_text, time, icon}
|
||||
current_table_bigwigs [spellid] = {(type (module) == "string" and module) or (module and module.moduleName) or "", spellid or "", bar_text or "", time or 0, icon or ""}
|
||||
end
|
||||
end
|
||||
BigWigs.RegisterMessage (EncounterDetails, "BigWigs_StartBar")
|
||||
@@ -1836,6 +1844,11 @@ function EncounterDetails:OnEvent (_, event, ...)
|
||||
|
||||
EncounterDetails.boss_emotes_table = EncounterDetails.charsaved.emotes
|
||||
|
||||
--> build a table on global saved variables
|
||||
if (not _detalhes.global_plugin_database ["DETAILS_PLUGIN_ENCOUNTER_DETAILS"]) then
|
||||
_detalhes.global_plugin_database ["DETAILS_PLUGIN_ENCOUNTER_DETAILS"] = {encounter_timers_dbm = {}, encounter_timers_bw= {}}
|
||||
end
|
||||
|
||||
--> Register needed events
|
||||
_G._detalhes:RegisterEvent (EncounterDetails, "COMBAT_PLAYER_ENTER")
|
||||
_G._detalhes:RegisterEvent (EncounterDetails, "COMBAT_PLAYER_LEAVE")
|
||||
|
||||
@@ -1933,55 +1933,42 @@ do
|
||||
BossFrame.label_dbm_bars = label_dbm_bars
|
||||
BossFrame.label_bw_bars = label_bw_bars
|
||||
|
||||
local on_select_dbm_bar = function (_, _, timer_id)
|
||||
local timer_table = EncounterDetails.db.encounter_timers_dbm [timer_id]
|
||||
local spell = tonumber (timer_id:match ("(%d+)"))
|
||||
|
||||
if (spell > 30000) then
|
||||
local spellname, _, spellicon = _GetSpellInfo (spell)
|
||||
EncounterDetails:OpenAuraPanel (spell, spellname, spellicon, timer_table.id, DETAILS_WA_TRIGGER_DBM_TIMER, DETAILS_WA_AURATYPE_TEXT, {dbm_timer_id = timer_id, text = "== Next " .. spellname .. " In ==", text_size = 72})
|
||||
else
|
||||
local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = EJ_GetSectionInfo (spell)
|
||||
EncounterDetails:OpenAuraPanel (spell, title, abilityIcon, timer_table.id, DETAILS_WA_TRIGGER_DBM_TIMER, DETAILS_WA_AURATYPE_TEXT, {dbm_timer_id = timer_id, text = "== Next " .. title .. " In ==", text_size = 72})
|
||||
end
|
||||
local on_select_dbm_bar = function (_, _, value)
|
||||
local timer_id, spellname, spellicon, encounterid, spellid = unpack (value)
|
||||
EncounterDetails:OpenAuraPanel (timer_id, spellname, spellicon, encounterid, DETAILS_WA_TRIGGER_DBM_TIMER, DETAILS_WA_AURATYPE_TEXT, {dbm_timer_id = timer_id, spellid = spellid, text = "Next " .. spellname .. " In", text_size = 72, icon = spellicon})
|
||||
end
|
||||
|
||||
local on_select_bw_bar = function (_, _, timer_id)
|
||||
local timer_table = EncounterDetails.db.encounter_timers_bw [timer_id]
|
||||
local spell = timer_id
|
||||
local int_spell = tonumber (spell)
|
||||
|
||||
if (not int_spell) then
|
||||
local spellname = timer_table [2]:gsub (" %(.%)", "")
|
||||
EncounterDetails:OpenAuraPanel (spell, spellname, timer_table [4], timer_table.id, DETAILS_WA_TRIGGER_BW_TIMER, DETAILS_WA_AURATYPE_TEXT, {bw_timer_id = timer_id, text = "== Next " .. spellname .. " In ==", text_size = 72})
|
||||
elseif (int_spell < 0) then
|
||||
local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = EJ_GetSectionInfo (abs (int_spell))
|
||||
EncounterDetails:OpenAuraPanel (spell, title, abilityIcon, timer_table.id, DETAILS_WA_TRIGGER_BW_TIMER, DETAILS_WA_AURATYPE_TEXT, {bw_timer_id = timer_id, text = "== Next " .. title .. " In ==", text_size = 72})
|
||||
else
|
||||
local spellname, _, spellicon = _GetSpellInfo (int_spell)
|
||||
EncounterDetails:OpenAuraPanel (spell, spellname, spellicon, timer_table.id, DETAILS_WA_TRIGGER_BW_TIMER, DETAILS_WA_AURATYPE_TEXT, {bw_timer_id = timer_id, text = "== Next " .. spellname .. " In ==", text_size = 72})
|
||||
end
|
||||
local on_select_bw_bar = function (_, _, value)
|
||||
local timer_id, spellname, spellicon, encounterid = unpack (value)
|
||||
EncounterDetails:OpenAuraPanel (timer_id, spellname, spellicon, encounterid, DETAILS_WA_TRIGGER_BW_TIMER, DETAILS_WA_AURATYPE_TEXT, {bw_timer_id = timer_id, text = "Next " .. spellname .. " In", text_size = 72, icon = spellicon})
|
||||
end
|
||||
|
||||
local already_added = {}
|
||||
local build_dbm_bars = function()
|
||||
local t = {}
|
||||
if (EncounterDetails.db) then
|
||||
local db = _detalhes.global_plugin_database ["DETAILS_PLUGIN_ENCOUNTER_DETAILS"]
|
||||
if (db) then
|
||||
wipe (already_added)
|
||||
local encounter_id = EncounterDetails_SpellAurasScroll.encounter_id
|
||||
|
||||
for timer_id, timer_table in pairs (EncounterDetails.db.encounter_timers_dbm) do
|
||||
if (timer_id:find ("Timer") and timer_table.id == encounter_id) then
|
||||
local spell = tonumber (timer_id:match ("(%d+)"))
|
||||
for timer_id, timer_table in pairs (db.encounter_timers_dbm) do
|
||||
if (timer_table.id == encounter_id) then
|
||||
local spellId = timer_table [7]
|
||||
local spellIcon = timer_table [5]
|
||||
local spellName
|
||||
|
||||
local spell = timer_id
|
||||
spell = spell:gsub ("ej", "")
|
||||
spell = tonumber (spell)
|
||||
|
||||
if (spell and not already_added [spell]) then
|
||||
if (spell > 30000) then
|
||||
local spellname, _, spellicon = _GetSpellInfo (spell)
|
||||
tinsert (t, {label = spellname, value = timer_id, icon = spellicon, onclick = on_select_dbm_bar})
|
||||
tinsert (t, {label = spellname, value = {timer_table [2], spellname, spellIcon or spellicon, timer_table.id, timer_table [7]}, icon = spellIcon or spellicon, onclick = on_select_dbm_bar})
|
||||
else
|
||||
local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = EJ_GetSectionInfo (spell)
|
||||
tinsert (t, {label = title, value = timer_id, icon = abilityIcon, onclick = on_select_dbm_bar})
|
||||
tinsert (t, {label = title, value = {timer_table [2], title, spellIcon or abilityIcon, timer_table.id, timer_table [7]}, icon = spellIcon or abilityIcon, onclick = on_select_dbm_bar})
|
||||
end
|
||||
|
||||
already_added [spell] = true
|
||||
end
|
||||
end
|
||||
@@ -1992,24 +1979,25 @@ do
|
||||
|
||||
local build_bigwigs_bars = function()
|
||||
local t = {}
|
||||
if (EncounterDetails.db) then
|
||||
local db = _detalhes.global_plugin_database ["DETAILS_PLUGIN_ENCOUNTER_DETAILS"]
|
||||
if (db) then
|
||||
wipe (already_added)
|
||||
local encounter_id = EncounterDetails_SpellAurasScroll.encounter_id
|
||||
|
||||
for timer_id, timer_table in pairs (EncounterDetails.db.encounter_timers_bw) do
|
||||
for timer_id, timer_table in pairs (db.encounter_timers_bw) do
|
||||
if (timer_table.id == encounter_id) then
|
||||
local spell = timer_id
|
||||
if (spell and not already_added [spell]) then
|
||||
local int_spell = tonumber (spell)
|
||||
if (not int_spell) then
|
||||
local spellname = timer_table [2]:gsub (" %(.%)", "")
|
||||
tinsert (t, {label = spellname, value = timer_id, icon = timer_table [4], onclick = on_select_bw_bar})
|
||||
tinsert (t, {label = spellname, value = {timer_table [2], spellname, timer_table [5], timer_table.id}, icon = timer_table [5], onclick = on_select_bw_bar})
|
||||
elseif (int_spell < 0) then
|
||||
local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = EJ_GetSectionInfo (abs (int_spell))
|
||||
tinsert (t, {label = title, value = timer_id, icon = abilityIcon, onclick = on_select_bw_bar})
|
||||
tinsert (t, {label = title, value = {timer_table [2], title, timer_table [5] or abilityIcon, timer_table.id}, icon = timer_table [5] or abilityIcon, onclick = on_select_bw_bar})
|
||||
else
|
||||
local spellname, _, spellicon = _GetSpellInfo (int_spell)
|
||||
tinsert (t, {label = spellname, value = timer_id, icon = spellicon, onclick = on_select_bw_bar})
|
||||
tinsert (t, {label = spellname, value = {timer_table [2], spellname, timer_table [5] or spellicon, timer_table.id}, icon = timer_table [5] or spellicon, onclick = on_select_bw_bar})
|
||||
end
|
||||
|
||||
already_added [spell] = true
|
||||
|
||||
@@ -50,6 +50,8 @@ local food_list = {
|
||||
[180759] = true, --125 versa
|
||||
[180762] = true, --125 mastery
|
||||
[180760] = true, --187 stam
|
||||
|
||||
[188534] = true, --Felmouth Frenzy
|
||||
}
|
||||
|
||||
local best_food = {
|
||||
|
||||
@@ -59,6 +59,10 @@ local function CreatePluginFrames()
|
||||
TimeAttackFrame:SetWidth (300) --> need to be 300x300 to fit details window
|
||||
TimeAttackFrame:SetHeight (300) --> need to be 300x300 to fit details window
|
||||
|
||||
local close_button = TimeAttack:CreateSoloCloseButton()
|
||||
close_button:SetPoint ("TOPRIGHT", TimeAttackFrame, "TOPRIGHT", -68, 3)
|
||||
close_button:SetSize (24, 24)
|
||||
|
||||
--> default background picture, will hold the actor spec background, like old school talent frame
|
||||
local background = TimeAttackFrame:CreateTexture (nil, "background")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user