- Encounter Details (plugin): added a report button on Emotes tab.

- Encounter Details (plugin): improved Weakauras creation.
- Encounter Details (plugin): fixed the report text for interrupts and dispells.
- Truncated left text on bars now shows the entire text when hover over the bar.
- Added an extra option on minimap menu to disable the minimap icon.
- Fixed a problem when disabling the minimap icon through options panel.
- Fixed an issue with item level tracker feature.
This commit is contained in:
Tercio
2015-04-02 12:04:41 -03:00
parent bbf87488f1
commit fd74008fac
9 changed files with 213 additions and 51 deletions
@@ -1442,7 +1442,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
if (not barra) then
barra = EncounterDetails:CreateRow (index, container, 3, 0, -6)
barra.TTT = "total_interrupt" -- tool tip type
barra.report_text = "Details! ".. Loc ["STRING_INTERRUPT_BY"]
barra.report_text = "Details! ".. Loc ["STRING_INTERRUPTS_OF"]
barra:SetBackdrop (backdrop_bar_onleave)
barra:SetBackdropColor (.0, .0, .0, 0.3)
barra:SetWidth (155)
@@ -1556,7 +1556,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
if (not barra) then
barra = EncounterDetails:CreateRow (index, container, 3, 3, -6)
barra.TTT = "dispell" -- tool tip type
barra.report_text = "Details! ".. Loc ["STRING_DISPELLED_BY"]
barra.report_text = "Details! ".. Loc ["STRING_DISPELLS_OF"]
barra:SetBackdrop (backdrop_bar_onleave)
barra:SetBackdropColor (.0, .0, .0, 0.3)
barra:SetWidth (160)
@@ -27,6 +27,8 @@ Loc ["STRING_INFLICTED_BY"] = "Damage inflicted by"
Loc ["STRING_INFLICTED"] = "Damage inflicted"
Loc ["STRING_ADDS"] = "Adds"
Loc ["STRING_INTERRUPTS"] = "Interrupts"
Loc ["STRING_INTERRUPTS_OF"] = "Interrupts of"
Loc ["STRING_DISPELLS_OF"] = "dispells of"
Loc ["STRING_DISPELLS"] = "Dispells"
Loc ["STRING_DEATH_LOG"] = "Death Log"
Loc ["STRING_FIGHT_SUMMARY"] = "Encounter Summary"
+73 -1
View File
@@ -1338,7 +1338,13 @@ do
emote_pool = emote_search_table
end
BossFrame.SearchResults:Show()
BossFrame.SearchResults:SetText ("Found " .. i .. " results")
BossFrame.SearchResults:SetText ("Found " .. i .. " matches")
if (i > 0) then
BossFrame.ReportEmoteButton:Enable()
elseif (i == 0) then
BossFrame.ReportEmoteButton:Disable()
end
else
BossFrame.SearchResults:Hide()
end
@@ -1428,6 +1434,8 @@ do
local link = GetSpellLink (spell)
text = text:gsub ("(|Hspell).*(|h)", link)
end
-- remove unit links
text = text:gsub ("(|Hunit).-(|h)", "")
-- remove the left space
text = text:gsub ("^%s$", "")
@@ -1518,9 +1526,11 @@ do
if (searching == "") then
searching = nil
FauxScrollFrame_SetOffset (scrollframe, 0)
BossFrame.ReportEmoteButton:Disable()
scrollframe:Update()
else
FauxScrollFrame_SetOffset (scrollframe, 0)
BossFrame.ReportEmoteButton:Enable()
scrollframe:Update()
end
end)
@@ -1540,6 +1550,68 @@ do
tinsert (BossFrame.EmoteWidgets, reset)
tinsert (BossFrame.EmoteWidgets, emotes_search_label)
-- report button
local report_emote_button = DetailsFrameWork:NewButton (BossFrame, nil, "$parentReportEmoteButton", "ReportEmoteButton", 120, 20, function()
local reportFunc = function (IsCurrent, IsReverse, AmtLines)
local segment = EncounterDetails.charsaved.emotes and EncounterDetails.charsaved.emotes [emote_segment]
if (segment) then
EncounterDetails.report_lines = {"Details!: Emotes for " .. segment.boss}
local added = 0
for index = 1, 16 do
local bar = emote_lines [index]
if (bar:IsShown() and added < AmtLines) then
local time = bar.lefttext:GetText()
local text = bar.righttext:GetText()
--"|Hunit:77182:Oregorger|hOregorger prepares to cast |cFFFF0000|Hspell:156879|h[Blackrock Barrage]|h|r."
-- remove textures
text = text:gsub ("(|T).*(|t)", "")
-- remove colors
text = text:gsub ("|c%x?%x?%x?%x?%x?%x?%x?%x?", "")
text = text:gsub ("|r", "")
-- replace links
for _, spellid in text:gmatch ("(|Hspell:)(.-)(|h)") do
local spell = tonumber (spellid)
local link = GetSpellLink (spell)
text = text:gsub ("(|Hspell).*(|h)", link)
end
-- remove unit links
text = text:gsub ("(|Hunit).-(|h)", "")
-- remove the left space
text = text:gsub ("^%s$", "")
tinsert (EncounterDetails.report_lines, time .. " " .. text)
added = added + 1
if (added == AmtLines) then
break
end
end
end
EncounterDetails:SendReportLines (EncounterDetails.report_lines)
else
EncounterDetails:Msg ("There is nothing to report.")
end
end
local use_slider = true
EncounterDetails:SendReportWindow (reportFunc, nil, nil, use_slider)
end, nil, nil, nil, "Report Lines")
report_emote_button:SetIcon ([[Interface\AddOns\Details\images\report_button]], 8, 16, nil, {0, 1, 0, 1}, nil, nil, 2)
report_emote_button:SetPoint ("topleft", BossFrame.SearchResults, "bottomleft", 0, -2)
report_emote_button:InstallCustomTexture()
report_emote_button:Disable()
tinsert (BossFrame.EmoteWidgets, report_emote_button)
--
for _, widget in pairs (BossFrame.EmoteWidgets) do
widget:Hide()
end