- PLugins Update.

This commit is contained in:
Tercio
2015-08-17 17:28:13 -03:00
parent 2808036d55
commit 5fa349b6ff
4 changed files with 338 additions and 144 deletions
+2 -2
View File
File diff suppressed because one or more lines are too long
@@ -104,20 +104,14 @@ local function CreatePluginFrames (data)
end
local damage_done_func = function (support_table, time_table, tick_second)
local current_total_damage = _detalhes.tabela_vigente.totals_grupo[1]
local current_damage = current_total_damage - support_table.last_damage
time_table [tick_second] = current_damage
if (current_damage > support_table.max_damage) then
support_table.max_damage = current_damage
time_table.max_damage = current_damage
end
support_table.last_damage = current_total_damage
end
local string_damage_done_func = [[
@@ -147,6 +141,8 @@ local function CreatePluginFrames (data)
elseif (EncounterDetails.db.show_icon == 5) then
EncounterDetails:AutoShowIcon()
end
EncounterDetails:CreateCallbackListeners()
elseif (event == "COMBAT_PLAYER_ENTER") then --> combat started
if (EncounterDetails.showing and EncounterDetails.db.hide_on_combat) then
@@ -236,6 +232,83 @@ local function CreatePluginFrames (data)
end
end
function EncounterDetails:CreateCallbackListeners()
EncounterDetails.DBM_timers = {}
local current_encounter = false
local current_table_dbm = {}
local current_table_bigwigs = {}
local event_frame = CreateFrame ("frame", nil, UIParent)
event_frame:SetScript ("OnEvent", function (self, event, ...)
if (event == "ENCOUNTER_START") then
local encounterID, encounterName, difficultyID, raidSize = select (1, ...)
current_encounter = encounterID
elseif (event == "ENCOUNTER_END" or event == "PLAYER_REGEN_ENABLED") then
if (current_encounter) then
if (_G.DBM) then
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
timer_table.id = current_encounter
EncounterDetails.db.encounter_timers_dbm [timer_table[1]] = timer_table
end
end
end
if (BigWigs) then
for timer_id, timer_table in pairs (current_table_bigwigs) do
if (not EncounterDetails.db.encounter_timers_bw [timer_id]) then
timer_table.id = current_encounter
EncounterDetails.db.encounter_timers_bw [timer_id] = timer_table
end
end
end
end
current_encounter = false
wipe (current_table_dbm)
wipe (current_table_bigwigs)
end
end)
event_frame:RegisterEvent ("ENCOUNTER_START")
event_frame:RegisterEvent ("ENCOUNTER_END")
event_frame:RegisterEvent ("PLAYER_REGEN_ENABLED")
--EncounterDetails.DBM_timers
if (_G.DBM) then
local dbm_timer_callback = function (event, timer_id, message, duration)
local spell = tonumber (timer_id:match ("(%d+)"))
if (spell and not current_table_dbm [spell]) then
current_table_dbm [spell] = {timer_id, message, duration}
end
end
DBM:RegisterCallback ("DBM_TimerStart", dbm_timer_callback)
end
function EncounterDetails:RegisterBigWigsCallBack()
if (BigWigs) then
BigWigs:Enable()
function EncounterDetails:BigWigs_StartBar (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}
end
end
BigWigs.RegisterMessage (EncounterDetails, "BigWigs_StartBar")
end
end
EncounterDetails:ScheduleTimer ("RegisterBigWigsCallBack", 5)
--BigWigs_StartBar BigWigs_Bosses_Brackenspore mind_fungus Mind Fungus 51 Interface\Icons\inv_mushroom_10 true
--bigwigs startbar mind_fungus
--BigWigs_StartBar BigWigs_Bosses_Brackenspore 159996 Infesting Spores (2) 58 Interface\Icons\Ability_Creature_Disease_01
--bigwigs startbar 160013
end
function EncounterDetails:WasEncounter()
--> check if last combat was a boss encounter fight
@@ -1735,6 +1808,8 @@ function EncounterDetails:OnEvent (_, event, ...)
hide_on_combat = false, --hide the window when a new combat start
max_emote_segments = 3,
opened = 0,
encounter_timers_dbm = {},
encounter_timers_bw = {},
}
--> Install
+110
View File
@@ -1106,6 +1106,9 @@ do
end
BossFrame.segmentosDropdown:Enable()
BossFrame.DBMBars:Refresh()
BossFrame.BigWigsBars:Refresh()
elseif (to == "emotes") then
@@ -1905,6 +1908,107 @@ do
npc_id2:SetPoint ("left", npc_id, "right", 2, 0)
npc_id2:Hide()
--
local label_dbm_bars = DetailsFrameWork:CreateLabel (BossFrame, "DBM Bars:", 11, nil, "GameFontHighlightSmall")
label_dbm_bars:SetPoint ("topleft", BossFrame, "topleft", 25, -160)
local label_bw_bars = DetailsFrameWork:CreateLabel (BossFrame, "Big Wigs Bars:", 11, nil, "GameFontHighlightSmall")
label_bw_bars:SetPoint ("topleft", BossFrame, "topleft", 25, -205)
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
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
end
local already_added = {}
local build_dbm_bars = function()
local t = {}
if (EncounterDetails.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+)"))
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})
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})
end
already_added [spell] = true
end
end
end
end
return t
end
local build_bigwigs_bars = function()
local t = {}
if (EncounterDetails.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
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})
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})
else
local spellname, _, spellicon = _GetSpellInfo (int_spell)
tinsert (t, {label = spellname, value = timer_id, icon = spellicon, onclick = on_select_bw_bar})
end
already_added [spell] = true
end
end
end
end
return t
end
local dropdown_dbm_bars = DetailsFrameWork:NewDropDown (BossFrame, _, "$parentDBMBarsDropdown", "DBMBars", 160, 20, build_dbm_bars, 1)
dropdown_dbm_bars:SetPoint ("topleft", label_dbm_bars, "bottomleft", -1, -2)
local dropdown_bw_bars = DetailsFrameWork:NewDropDown (BossFrame, _, "$parentBigWigsBarsDropdown", "BigWigsBars", 160, 20, build_bigwigs_bars, 1)
dropdown_bw_bars:SetPoint ("topleft", label_bw_bars, "bottomleft", -1, -2)
--
tinsert (BossFrame.EnemySpellsWidgets, EnemyActorSpells_label)
tinsert (BossFrame.EnemySpellsWidgets, EnemyActorSpells)
tinsert (BossFrame.EnemySpellsWidgets, bar_div)
@@ -2441,6 +2545,12 @@ do
tinsert (EncounterDetails.current_whisper_table, {combat:GetCombatTime(), arg3, arg4, emote_table [arg2]})
end
end)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
end
end
--endd
@@ -1,146 +1,155 @@
do
--load encounter journal
if (not EJ_GetEncounterInfoByIndex (1, 669)) then
EJ_SelectInstance (669)
end
function Details:InstallHellfireCitadelEncounter()
local InstanceName = EJ_GetInstanceInfo (669)
--load encounter journal
if (not EJ_GetEncounterInfoByIndex (1, 669)) then
EJ_SelectInstance (669)
end
EJ_SelectInstance (669)
local boss_1_name = EJ_GetEncounterInfoByIndex (1, 669)
local boss_2_name = EJ_GetEncounterInfoByIndex (2, 669)
local boss_3_name = EJ_GetEncounterInfoByIndex (3, 669)
local boss_4_name = EJ_GetEncounterInfoByIndex (4, 669)
local boss_5_name = EJ_GetEncounterInfoByIndex (5, 669)
local boss_6_name = EJ_GetEncounterInfoByIndex (6, 669)
local boss_7_name = EJ_GetEncounterInfoByIndex (7, 669)
local boss_8_name = EJ_GetEncounterInfoByIndex (8, 669)
local boss_9_name = EJ_GetEncounterInfoByIndex (9, 669)
local boss_10_name = EJ_GetEncounterInfoByIndex (10, 669)
local boss_11_name = EJ_GetEncounterInfoByIndex (11, 669)
local boss_12_name = EJ_GetEncounterInfoByIndex (12, 669)
local boss_13_name = EJ_GetEncounterInfoByIndex (13, 669)
local InstanceName = EJ_GetInstanceInfo (669)
_detalhes:InstallEncounter ({
id = 1448, --map id
ej_id = 669, --encounter journal id
name = InstanceName,
icons = [[Interface\AddOns\Details_RaidInfo-HellfireCitadel\boss_faces]],
icon = [[Interface\AddOns\Details_RaidInfo-HellfireCitadel\icon256x128]],
is_raid = true,
backgroundFile = {file = [[Interface\Glues\LOADINGSCREENS\LoadScreen_HellfireRaid]], coords = {0, 1, 296/1024, 880/1024}},
backgroundEJ = [[Interface\EncounterJournal\UI-EJ-LOREBG-HellfireRaid]],
--
boss_names = {
boss_1_name, --"Hellfire Assault"
boss_2_name, --"Iron Reaver"
boss_3_name, --"Kormrok"
boss_4_name, --"Hellfire High Council"
boss_5_name, --"Kilrogg Deadeye"
boss_6_name, --"Gorefiend"
boss_7_name, --"Shadow-Lord Iskar"
boss_8_name, --"Socrethar the Eternal"
boss_9_name, --"Fel Lord Zakuun"
boss_10_name, --"Xhul'horac"
boss_11_name, --"Tyrant Velhari"
boss_12_name, --"Mannoroth"
boss_13_name, --"Archimonde"
},
encounter_ids = { --encounter journal encounter id
1426,1425,1392,1432,1396,1372,1433,1427,1391,1447,1394,1395,1438,
[1426] = 1,
[1425] = 2,
[1392] = 3,
[1432] = 4,
[1396] = 5,
[1372] = 6,
[1433] = 7,
[1427] = 8,
[1391] = 9,
[1447] = 10,
[1394] = 11,
[1395] = 12,
[1438] = 13,
},
encounter_ids2 = { --combatlog encounter id
[1778] = 1, --"Hellfire Assault"
[1785] = 2, --"Iron Reaver"
[1787] = 3, --"Kormrok"
[1798] = 4, --"Hellfire High Council"
[1786] = 5, --"Kilrogg Deadeye"
[1783] = 6, --"Gorefiend"
[1788] = 7, --"Shadow-Lord Iskar"
[1794] = 8, --"Socrethar the Eternal"
[1777] = 9, --"Fel Lord Zakuun"
[1800] = 10, --"Xhul'horac"
[1784] = 11, --"Tyrant Velhari"
[1795] = 12, --"Mannoroth"
[1799] = 13, --"Archimonde"
},
boss_ids = { --npc ids
local boss_1_name = EJ_GetEncounterInfoByIndex (1, 669)
local boss_2_name = EJ_GetEncounterInfoByIndex (2, 669)
local boss_3_name = EJ_GetEncounterInfoByIndex (3, 669)
local boss_4_name = EJ_GetEncounterInfoByIndex (4, 669)
local boss_5_name = EJ_GetEncounterInfoByIndex (5, 669)
local boss_6_name = EJ_GetEncounterInfoByIndex (6, 669)
local boss_7_name = EJ_GetEncounterInfoByIndex (7, 669)
local boss_8_name = EJ_GetEncounterInfoByIndex (8, 669)
local boss_9_name = EJ_GetEncounterInfoByIndex (9, 669)
local boss_10_name = EJ_GetEncounterInfoByIndex (10, 669)
local boss_11_name = EJ_GetEncounterInfoByIndex (11, 669)
local boss_12_name = EJ_GetEncounterInfoByIndex (12, 669)
local boss_13_name = EJ_GetEncounterInfoByIndex (13, 669)
_detalhes:InstallEncounter ({
id = 1448, --map id
ej_id = 669, --encounter journal id
name = InstanceName,
icons = [[Interface\AddOns\Details_RaidInfo-HellfireCitadel\boss_faces]],
icon = [[Interface\AddOns\Details_RaidInfo-HellfireCitadel\icon256x128]],
is_raid = true,
backgroundFile = {file = [[Interface\Glues\LOADINGSCREENS\LoadScreen_HellfireRaid]], coords = {0, 1, 296/1024, 880/1024}},
backgroundEJ = [[Interface\EncounterJournal\UI-EJ-LOREBG-HellfireRaid]],
--
boss_names = {
boss_1_name, --"Hellfire Assault"
boss_2_name, --"Iron Reaver"
boss_3_name, --"Kormrok"
boss_4_name, --"Hellfire High Council"
boss_5_name, --"Kilrogg Deadeye"
boss_6_name, --"Gorefiend"
boss_7_name, --"Shadow-Lord Iskar"
boss_8_name, --"Socrethar the Eternal"
boss_9_name, --"Fel Lord Zakuun"
boss_10_name, --"Xhul'horac"
boss_11_name, --"Tyrant Velhari"
boss_12_name, --"Mannoroth"
boss_13_name, --"Archimonde"
},
encounter_ids = { --encounter journal encounter id
1426,1425,1392,1432,1396,1372,1433,1427,1391,1447,1394,1395,1438,
[1426] = 1,
[1425] = 2,
[1392] = 3,
[1432] = 4,
[1396] = 5,
[1372] = 6,
[1433] = 7,
[1427] = 8,
[1391] = 9,
[1447] = 10,
[1394] = 11,
[1395] = 12,
[1438] = 13,
},
encounter_ids2 = { --combatlog encounter id
[1778] = 1, --"Hellfire Assault"
[1785] = 2, --"Iron Reaver"
[1787] = 3, --"Kormrok"
[1798] = 4, --"Hellfire High Council"
[1786] = 5, --"Kilrogg Deadeye"
[1783] = 6, --"Gorefiend"
[1788] = 7, --"Shadow-Lord Iskar"
[1794] = 8, --"Socrethar the Eternal"
[1777] = 9, --"Fel Lord Zakuun"
[1800] = 10, --"Xhul'horac"
[1784] = 11, --"Tyrant Velhari"
[1795] = 12, --"Mannoroth"
[1799] = 13, --"Archimonde"
},
boss_ids = { --npc ids
},
encounters = {
[1] = {
boss = boss_1_name, --"Hellfire Assault"
portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-hellfireassault]],
},
[2] = {
boss = boss_2_name, --"Iron Reaver",
portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-felreaver]],
},
[3] = {
boss = boss_3_name, --"Kormrok",
portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-kormok]],
},
[4] = {
boss = boss_4_name, --"Hellfire High Council",
portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-gurtoggbloodboil]],
},
[5] = {
boss = boss_5_name, --"Kilrogg Deadeye",
portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-kilroggdeadeye]],
},
[6] = {
boss = boss_6_name, --"Gorefiend",
portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-gorefiend]],
},
[7] = {
boss = boss_7_name, --"Shadow-Lord Iskar",
portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-shadowlordiskar]],
},
[8] = {
boss = boss_8_name, --"Socrethar the Eternal",
portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-soulboundconstruct]],
},
[9] = {
boss = boss_9_name, --"Fel Lord Zakuun",
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-FelLordZakuun]],
},
[10] = {
boss = boss_10_name, --"Xhul'horac",
portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-xhulhorac]],
},
[11] = {
boss = boss_11_name, --"Tyrant Velhari",
portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-tyrantvelhari]],
},
[12] = {
boss = boss_12_name, --"Mannoroth",
portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-mannorothwod]],
},
[13] = {
boss = boss_13_name, --"Archimonde",
portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-archimondewod]],
},
},
})
},
encounters = {
[1] = {
boss = boss_1_name, --"Hellfire Assault"
portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-hellfireassault]],
},
[2] = {
boss = boss_2_name, --"Iron Reaver",
portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-felreaver]],
},
[3] = {
boss = boss_3_name, --"Kormrok",
portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-kormok]],
},
[4] = {
boss = boss_4_name, --"Hellfire High Council",
portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-gurtoggbloodboil]],
},
[5] = {
boss = boss_5_name, --"Kilrogg Deadeye",
portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-kilroggdeadeye]],
},
[6] = {
boss = boss_6_name, --"Gorefiend",
portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-gorefiend]],
},
[7] = {
boss = boss_7_name, --"Shadow-Lord Iskar",
portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-shadowlordiskar]],
},
[8] = {
boss = boss_8_name, --"Socrethar the Eternal",
portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-soulboundconstruct]],
},
[9] = {
boss = boss_9_name, --"Fel Lord Zakuun",
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-FelLordZakuun]],
},
[10] = {
boss = boss_10_name, --"Xhul'horac",
portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-xhulhorac]],
},
[11] = {
boss = boss_11_name, --"Tyrant Velhari",
portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-tyrantvelhari]],
},
[12] = {
boss = boss_12_name, --"Mannoroth",
portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-mannorothwod]],
},
[13] = {
boss = boss_13_name, --"Archimonde",
portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-archimondewod]],
},
},
})
Details.InstallHellfireCitadelEncounter = nil
end
Details:ScheduleTimer ("InstallHellfireCitadelEncounter", 2)
end
--> replacement for healing function: