Small bug fixes and improvements

This commit is contained in:
Tercio Jose
2022-10-10 13:26:13 -03:00
parent b588d5e30c
commit 1ed29008aa
119 changed files with 6556 additions and 6650 deletions
+36 -36
View File
@@ -12,8 +12,8 @@ detailsOnDeathMenu.Debug = false
detailsOnDeathMenu:RegisterEvent ("PLAYER_REGEN_ENABLED")
detailsOnDeathMenu:RegisterEvent ("ENCOUNTER_END")
DetailsFramework:ApplyStandardBackdrop (detailsOnDeathMenu)
detailsOnDeathMenu:SetAlpha (0.75)
DetailsFramework:ApplyStandardBackdrop(detailsOnDeathMenu)
detailsOnDeathMenu:SetAlpha(0.75)
--disable text
detailsOnDeathMenu.disableLabel = Details.gump:CreateLabel(detailsOnDeathMenu, "you can disable this at /details > Raid Tools", 9)
@@ -25,7 +25,7 @@ detailsOnDeathMenu.warningLabel:Hide()
detailsOnDeathMenu:SetScript("OnEvent", function(self, event, ...)
if (event == "ENCOUNTER_END") then
C_Timer.After (0.5, detailsOnDeathMenu.ShowPanel)
C_Timer.After(0.5, detailsOnDeathMenu.ShowPanel)
end
end)
@@ -33,7 +33,7 @@ function detailsOnDeathMenu.OpenEncounterBreakdown()
if (not Details:GetPlugin ("DETAILS_PLUGIN_ENCOUNTER_DETAILS")) then
detailsOnDeathMenu.warningLabel.text = "Encounter Breakdown plugin is disabled! Please enable it in the Addon Control Panel."
detailsOnDeathMenu.warningLabel:Show()
C_Timer.After (5, function()
C_Timer.After(5, function()
detailsOnDeathMenu.warningLabel:Hide()
end)
end
@@ -46,14 +46,14 @@ function detailsOnDeathMenu.OpenPlayerEndurance()
if (not Details:GetPlugin ("DETAILS_PLUGIN_DEATH_GRAPHICS")) then
detailsOnDeathMenu.warningLabel.text = "Advanced Death Logs plugin is disabled! Please enable it (or download) in the Addon Control Panel."
detailsOnDeathMenu.warningLabel:Show()
C_Timer.After (5, function()
C_Timer.After(5, function()
detailsOnDeathMenu.warningLabel:Hide()
end)
end
DetailsPluginContainerWindow.OnMenuClick (nil, nil, "DETAILS_PLUGIN_DEATH_GRAPHICS", true)
C_Timer.After (0, function()
C_Timer.After(0, function()
local a = Details_DeathGraphsModeEnduranceButton and Details_DeathGraphsModeEnduranceButton.MyObject:Click()
end)
@@ -67,7 +67,7 @@ function detailsOnDeathMenu.OpenPlayerSpells()
local window3 = Details:GetWindow (3)
local window4 = Details:GetWindow (4)
local assignedRole = UnitGroupRolesAssigned ("player")
local assignedRole = UnitGroupRolesAssigned("player")
if (assignedRole == "HEALER") then
if (window1 and window1:GetDisplay() == 2) then
Details:OpenPlayerDetails(1)
@@ -106,27 +106,27 @@ function detailsOnDeathMenu.OpenPlayerSpells()
end
--encounter breakdown button
detailsOnDeathMenu.breakdownButton = Details.gump:CreateButton (detailsOnDeathMenu, detailsOnDeathMenu.OpenEncounterBreakdown, 120, 20, "Encounter Breakdown", "breakdownButton")
detailsOnDeathMenu.breakdownButton:SetTemplate (Details.gump:GetTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
detailsOnDeathMenu.breakdownButton = Details.gump:CreateButton(detailsOnDeathMenu, detailsOnDeathMenu.OpenEncounterBreakdown, 120, 20, "Encounter Breakdown", "breakdownButton")
detailsOnDeathMenu.breakdownButton:SetTemplate(Details.gump:GetTemplate("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
detailsOnDeathMenu.breakdownButton:SetPoint("topleft", detailsOnDeathMenu, "topleft", 5, -5)
detailsOnDeathMenu.breakdownButton:Hide()
detailsOnDeathMenu.breakdownButton.CoolTip = {
Type = "tooltip",
BuildFunc = function()
GameCooltip2:Preset (2)
GameCooltip2:AddLine ("Show a panel with:")
GameCooltip2:AddLine ("- Player Damage Taken")
GameCooltip2:AddLine ("- Damage Taken by Spell")
GameCooltip2:AddLine ("- Enemy Damage Taken")
GameCooltip2:AddLine ("- Player Deaths")
GameCooltip2:AddLine ("- Interrupts and Dispells")
GameCooltip2:AddLine ("- Damage Done Chart")
GameCooltip2:AddLine ("- Damage Per Phase")
GameCooltip2:AddLine ("- Weakauras Tool")
GameCooltip2:Preset(2)
GameCooltip2:AddLine("Show a panel with:")
GameCooltip2:AddLine("- Player Damage Taken")
GameCooltip2:AddLine("- Damage Taken by Spell")
GameCooltip2:AddLine("- Enemy Damage Taken")
GameCooltip2:AddLine("- Player Deaths")
GameCooltip2:AddLine("- Interrupts and Dispells")
GameCooltip2:AddLine("- Damage Done Chart")
GameCooltip2:AddLine("- Damage Per Phase")
GameCooltip2:AddLine("- Weakauras Tool")
if (not Details:GetPlugin ("DETAILS_PLUGIN_ENCOUNTER_DETAILS")) then
GameCooltip2:AddLine ("Encounter Breakdown plugin is disabled in the Addon Control Panel.", "", 1, "red")
GameCooltip2:AddLine("Encounter Breakdown plugin is disabled in the Addon Control Panel.", "", 1, "red")
end
end, --called when user mouse over the frame
@@ -150,24 +150,24 @@ detailsOnDeathMenu.breakdownButton.CoolTip = {
GameCooltip2:CoolTipInject (detailsOnDeathMenu.breakdownButton)
--player endurance button
detailsOnDeathMenu.enduranceButton = Details.gump:CreateButton (detailsOnDeathMenu, detailsOnDeathMenu.OpenPlayerEndurance, 120, 20, "Player Endurance", "enduranceButton")
detailsOnDeathMenu.enduranceButton:SetTemplate (Details.gump:GetTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
detailsOnDeathMenu.enduranceButton = Details.gump:CreateButton(detailsOnDeathMenu, detailsOnDeathMenu.OpenPlayerEndurance, 120, 20, "Player Endurance", "enduranceButton")
detailsOnDeathMenu.enduranceButton:SetTemplate(Details.gump:GetTemplate("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
detailsOnDeathMenu.enduranceButton:SetPoint("topleft", detailsOnDeathMenu.breakdownButton, "topright", 2, 0)
detailsOnDeathMenu.enduranceButton:Hide()
detailsOnDeathMenu.enduranceButton.CoolTip = {
Type = "tooltip",
BuildFunc = function()
GameCooltip2:Preset (2)
GameCooltip2:AddLine ("Open Player Endurance Breakdown")
GameCooltip2:AddLine ("")
GameCooltip2:AddLine ("Player endurance is calculated using the amount of player deaths.")
GameCooltip2:AddLine ("By default the plugin register the three first player deaths on each encounter to calculate who is under performing.")
GameCooltip2:Preset(2)
GameCooltip2:AddLine("Open Player Endurance Breakdown")
GameCooltip2:AddLine("")
GameCooltip2:AddLine("Player endurance is calculated using the amount of player deaths.")
GameCooltip2:AddLine("By default the plugin register the three first player deaths on each encounter to calculate who is under performing.")
--GameCooltip2:AddLine (" ")
--GameCooltip2:AddLine(" ")
if (not Details:GetPlugin ("DETAILS_PLUGIN_DEATH_GRAPHICS")) then
GameCooltip2:AddLine ("Advanced Death Logs plugin is disabled or not installed, check the Addon Control Panel or download it from the Curseforge APP.", "", 1, "red")
GameCooltip2:AddLine("Advanced Death Logs plugin is disabled or not installed, check the Addon Control Panel or download it from the Curseforge APP.", "", 1, "red")
end
end, --called when user mouse over the frame
@@ -191,16 +191,16 @@ detailsOnDeathMenu.enduranceButton.CoolTip = {
GameCooltip2:CoolTipInject (detailsOnDeathMenu.enduranceButton)
--spells
detailsOnDeathMenu.spellsButton = Details.gump:CreateButton (detailsOnDeathMenu, detailsOnDeathMenu.OpenPlayerSpells, 48, 20, "Spells", "SpellsButton")
detailsOnDeathMenu.spellsButton:SetTemplate (Details.gump:GetTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
detailsOnDeathMenu.spellsButton = Details.gump:CreateButton(detailsOnDeathMenu, detailsOnDeathMenu.OpenPlayerSpells, 48, 20, "Spells", "SpellsButton")
detailsOnDeathMenu.spellsButton:SetTemplate(Details.gump:GetTemplate("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
detailsOnDeathMenu.spellsButton:SetPoint("topleft", detailsOnDeathMenu.enduranceButton, "topright", 2, 0)
detailsOnDeathMenu.spellsButton:Hide()
detailsOnDeathMenu.spellsButton.CoolTip = {
Type = "tooltip",
BuildFunc = function()
GameCooltip2:Preset (2)
GameCooltip2:AddLine ("Open your player Details! breakdown.")
GameCooltip2:Preset(2)
GameCooltip2:AddLine("Open your player Details! breakdown.")
end, --called when user mouse over the frame
OnEnterFunc = function(self)
@@ -239,13 +239,13 @@ function detailsOnDeathMenu.CanShowPanel()
--check if all players in the raid are out of combat
for i = 1, GetNumGroupMembers() do
if (UnitAffectingCombat ("raid" .. i)) then
C_Timer.After (0.5, detailsOnDeathMenu.ShowPanel)
C_Timer.After(0.5, detailsOnDeathMenu.ShowPanel)
return false
end
end
if (Details.in_combat) then
C_Timer.After (0.5, detailsOnDeathMenu.ShowPanel)
C_Timer.After(0.5, detailsOnDeathMenu.ShowPanel)
return false
end
@@ -292,7 +292,7 @@ end
hooksecurefunc ("StaticPopup_Show", function(which, text_arg1, text_arg2, data, insertedFrame)
if (which == "DEATH") then
if (detailsOnDeathMenu.Debug) then
C_Timer.After (0.5, detailsOnDeathMenu.ShowPanel)
C_Timer.After(0.5, detailsOnDeathMenu.ShowPanel)
end
end
end)