- Battle for Dazaralor update.

- Fixed rogue spec icons.
- Some visual improvements.
- Framework update.
This commit is contained in:
Tercioo
2019-01-20 00:22:22 -02:00
parent b198c62489
commit 0c486a24a2
32 changed files with 3069 additions and 248 deletions
+206
View File
@@ -4860,6 +4860,212 @@ function _detalhes:OpenPlayerDetails (window)
end
end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> extra buttons at the death options (release, death recap)
local detailsOnDeathMenu = CreateFrame ("frame", "DetailsOnDeathMenu", UIParent)
detailsOnDeathMenu:SetHeight (30)
detailsOnDeathMenu.Debug = false
detailsOnDeathMenu:RegisterEvent ("PLAYER_REGEN_ENABLED")
detailsOnDeathMenu:RegisterEvent ("ENCOUNTER_END")
DetailsFramework:ApplyStandardBackdrop (detailsOnDeathMenu)
detailsOnDeathMenu:SetAlpha (0.75)
--disable text
detailsOnDeathMenu.disableLabel = _detalhes.gump:CreateLabel (detailsOnDeathMenu, "you can disable this at /details > Raid Tools", 9)
detailsOnDeathMenu.warningLabel = _detalhes.gump:CreateLabel (detailsOnDeathMenu, "", 11)
detailsOnDeathMenu.warningLabel.textcolor = "red"
detailsOnDeathMenu.warningLabel:SetPoint ("bottomleft", detailsOnDeathMenu, "bottomleft", 5, 2)
detailsOnDeathMenu.warningLabel:Hide()
detailsOnDeathMenu:SetScript ("OnEvent", function (self, event, ...)
if (event == "ENCOUNTER_END") then --event == "PLAYER_REGEN_ENABLED" or
print ("encounter ended")
C_Timer.After (0.5, detailsOnDeathMenu.ShowPanel)
end
end)
function detailsOnDeathMenu.OpenEncounterBreakdown()
if (not _detalhes: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()
detailsOnDeathMenu.warningLabel:Hide()
end)
end
Details:OpenPlugin ("Encounter Breakdown")
end
function detailsOnDeathMenu.OpenPlayerEndurance()
if (not _detalhes: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()
detailsOnDeathMenu.warningLabel:Hide()
end)
end
DetailsPluginContainerWindow.OnMenuClick (nil, nil, "DETAILS_PLUGIN_DEATH_GRAPHICS", true)
C_Timer.After (0, function()
local a = Details_DeathGraphsModeEnduranceButton and Details_DeathGraphsModeEnduranceButton.MyObject:Click()
end)
end
function detailsOnDeathMenu.OpenPlayerSpells()
local window1 = Details:GetWindow (1)
local window2 = Details:GetWindow (2)
local window3 = Details:GetWindow (3)
local window4 = Details:GetWindow (4)
local assignedRole = UnitGroupRolesAssigned ("player")
if (assignedRole == "HEALER") then
if (window1 and window1:GetDisplay() == 2) then
Details:OpenPlayerDetails(1)
elseif (window2 and window2:GetDisplay() == 2) then
Details:OpenPlayerDetails(2)
elseif (window3 and window3:GetDisplay() == 2) then
Details:OpenPlayerDetails(3)
elseif (window4 and window4:GetDisplay() == 2) then
Details:OpenPlayerDetails(4)
else
Details:OpenPlayerDetails (1)
end
else
if (window1 and window1:GetDisplay() == 1) then
Details:OpenPlayerDetails(1)
elseif (window2 and window2:GetDisplay() == 1) then
Details:OpenPlayerDetails(2)
elseif (window3 and window3:GetDisplay() == 1) then
Details:OpenPlayerDetails(3)
elseif (window4 and window4:GetDisplay() == 1) then
Details:OpenPlayerDetails(4)
else
Details:OpenPlayerDetails (1)
end
end
end
--encounter breakdown button
detailsOnDeathMenu.breakdownButton = _detalhes.gump:CreateButton (detailsOnDeathMenu, detailsOnDeathMenu.OpenEncounterBreakdown, 120, 20, "Encounter Breakdown", "breakdownButton")
detailsOnDeathMenu.breakdownButton:SetTemplate (_detalhes.gump:GetTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
detailsOnDeathMenu.breakdownButton:SetPoint ("topleft", detailsOnDeathMenu, "topleft", 5, -5)
detailsOnDeathMenu.breakdownButton:Hide()
--player endurance button
detailsOnDeathMenu.enduranceButton = _detalhes.gump:CreateButton (detailsOnDeathMenu, detailsOnDeathMenu.OpenPlayerEndurance, 120, 20, "Player Endurance", "enduranceButton")
detailsOnDeathMenu.enduranceButton:SetTemplate (_detalhes.gump:GetTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
detailsOnDeathMenu.enduranceButton:SetPoint ("topleft", detailsOnDeathMenu.breakdownButton, "topright", 2, 0)
detailsOnDeathMenu.enduranceButton:Hide()
--spells
detailsOnDeathMenu.spellsButton = _detalhes.gump:CreateButton (detailsOnDeathMenu, detailsOnDeathMenu.OpenPlayerSpells, 48, 20, "Spells", "SpellsButton")
detailsOnDeathMenu.spellsButton:SetTemplate (_detalhes.gump:GetTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
detailsOnDeathMenu.spellsButton:SetPoint ("topleft", detailsOnDeathMenu.enduranceButton, "topright", 2, 0)
detailsOnDeathMenu.spellsButton:Hide()
function detailsOnDeathMenu.CanShowPanel()
if (StaticPopup_Visible ("DEATH")) then
if (not _detalhes.on_death_menu) then
return
end
if (detailsOnDeathMenu.Debug) then
return true
end
--> check if the player just wiped in an encounter
if (IsInRaid()) then
local isInInstance = IsInInstance()
if (isInInstance) then
--> 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)
return false
end
end
if (_detalhes.in_combat) then
C_Timer.After (0.5, detailsOnDeathMenu.ShowPanel)
return false
end
return true
end
end
end
end
function detailsOnDeathMenu.ShowPanel()
if (not detailsOnDeathMenu.CanShowPanel()) then
return
end
if (ElvUI) then
detailsOnDeathMenu:SetPoint ("topleft", StaticPopup1, "bottomleft", 0, -1)
detailsOnDeathMenu:SetPoint ("topright", StaticPopup1, "bottomright", 0, -1)
else
detailsOnDeathMenu:SetPoint ("topleft", StaticPopup1, "bottomleft", 4, 2)
detailsOnDeathMenu:SetPoint ("topright", StaticPopup1, "bottomright", -4, 2)
end
detailsOnDeathMenu.breakdownButton:Show()
detailsOnDeathMenu.enduranceButton:Show()
detailsOnDeathMenu.spellsButton:Show()
detailsOnDeathMenu:Show()
detailsOnDeathMenu:SetHeight (30)
if (not _detalhes:GetTutorialCVar ("DISABLE_ONDEATH_PANEL")) then
detailsOnDeathMenu.disableLabel:Show()
detailsOnDeathMenu.disableLabel:SetPoint ("bottomleft", detailsOnDeathMenu, "bottomleft", 5, 1)
detailsOnDeathMenu.disableLabel.color = "gray"
detailsOnDeathMenu.disableLabel.alpha = 0.5
detailsOnDeathMenu:SetHeight (detailsOnDeathMenu:GetHeight() + 10)
if (math.random (1, 3) == 3) then
_detalhes:SetTutorialCVar ("DISABLE_ONDEATH_PANEL", true)
end
end
end
hooksecurefunc ("StaticPopup_Show", function (which, text_arg1, text_arg2, data, insertedFrame)
--print (which, text_arg1, text_arg2, data, insertedFrame)
--print ("popup Show:", which)
if (which == "DEATH") then
--StaticPopup1
if (detailsOnDeathMenu.Debug) then
C_Timer.After (0.5, detailsOnDeathMenu.ShowPanel)
end
end
end)
hooksecurefunc ("StaticPopup_Hide", function (which, data)
-- if (which and which:find ("EQUIP")) then
-- return
-- end
--print ("popup Hide:", which)
if (which == "DEATH") then
detailsOnDeathMenu:Hide()
end
end)
--endd
+3
View File
@@ -1246,6 +1246,9 @@ local default_player_data = {
last_difficulty = 15,
last_raid = "",
},
--> death panel buttons
on_death_menu = true,
}
_detalhes.default_player_data = default_player_data
+188
View File
@@ -2,6 +2,194 @@
--> install data for raiding tiers
do
--> data for Crucible of Storms (BFA tier 1)
local INSTANCE_EJID = 1177
local INSTANCE_MAPID = 0 --TBD
local HDIMAGESPATH = "Details\\images\\raid"
local HDFILEPREFIX = "CrucibleRaid"
local LOADINGSCREEN_FILE, LOADINGSCREEN_COORDS = "LoadingScreen_Seapriestraid_wide_BattleforAzeroth", {0, 1, 285/1024, 875/1024}
local EJ_LOREBG = "UI-EJ-LOREBG-CrucibleOfStorms"
local PORTRAIT_LIST = {
2497795, --Zaxasj the Speaker - The Restless Cabal
2497794, --Uu'nat - Uu'nat, Harbinger of the Void
}
local ENCOUNTER_ID_CL = {
2269, 2273,
[2269] = 1, --The Restless Cabal
[2273] = 2, --Uu'nat, Harbinger of the Void
}
local ENCOUNTER_ID_EJ = {
2328, 2332,
[2328] = 1, --The Restless Cabal
[2332] = 2, --Uu'nat, Harbinger of the Void
}
--> install the raid
C_Timer.After (10, function()
--load encounter journal
EJ_SelectInstance (INSTANCE_EJID)
local InstanceName = EJ_GetInstanceInfo (INSTANCE_EJID)
--build the boss name list
local BOSSNAMES = {}
local ENCOUNTERS = {}
for i = 1, #PORTRAIT_LIST do
local bossName = EJ_GetEncounterInfoByIndex (i, INSTANCE_EJID)
if (bossName) then
tinsert (BOSSNAMES, bossName)
local encounterTable = {
boss = bossName,
--portrait = "Interface\\EncounterJournal\\" .. PORTRAIT_LIST [i],
portrait = PORTRAIT_LIST [i],
}
tinsert (ENCOUNTERS, encounterTable)
else
break
end
end
_detalhes:InstallEncounter ({
id = INSTANCE_MAPID, --map id
ej_id = INSTANCE_EJID, --encounter journal id
name = InstanceName,
icons = "Interface\\AddOns\\" .. HDIMAGESPATH .. "\\" .. HDFILEPREFIX .. "_BossFaces",
icon = "Interface\\AddOns\\" .. HDIMAGESPATH .. "\\" .. HDFILEPREFIX .. "_Icon256x128",
is_raid = true,
backgroundFile = {file = "Interface\\Glues\\LOADINGSCREENS\\" .. LOADINGSCREEN_FILE, coords = LOADINGSCREEN_COORDS},
backgroundEJ = "Interface\\EncounterJournal\\" .. EJ_LOREBG,
encounter_ids = ENCOUNTER_ID_EJ,
encounter_ids2 = ENCOUNTER_ID_CL,
boss_names = BOSSNAMES,
encounters = ENCOUNTERS,
boss_ids = {
--npc ids
},
})
end)
end
do
--> data for Battle for Dazar'alor (BFA tier 1)
-- DazaralorRaid_BossFaces.tga --TBD
-- DazaralorRaid_Icon256x128.tga --TBD
local INSTANCE_EJID = 1176
local INSTANCE_MAPID = 2070
local HDIMAGESPATH = "Details\\images\\raid"
local HDFILEPREFIX = "DazaralorRaid"
local LOADINGSCREEN_FILE, LOADINGSCREEN_COORDS = "LoadScreen_ZuldazarRaid_Wide", {0, 1, 285/1024, 875/1024}
local EJ_LOREBG = "UI-EJ-LOREBG-BattleOfDazaralor"
local PORTRAIT_LIST = {
2497778, --Frida Ironbellows - Champion of the Light
2497783, --Grong - Grong, the Jungle Lord
2529383, --Manceroy Flamefist - Jadefire Masters
2497790, --Opulence - Opulence
2497779, --Pa'ku's Aspect - Conclave of the Chosen
2497784, --King Rastakhan - King Rastakhan
2497788, --High Tinker Mekkatorque - High Tinker Mekkatorque
2497786, --Laminaria - Stormwall Blockade
2497785, --Lady Jaina Proudmoore - Lady Jaina Proudmoore
}
local ENCOUNTER_ID_CL = {
2265, 2263, 2266, 2271, 2268, 2272, 2276, 2280, 2281,
[2265] = 1, --Champion of the Light
[2263] = 2, --Grong, the Jungle Lord
[2266] = 3, --Jadefire Masters
[2271] = 4, --Opulence
[2268] = 5, --Conclave of the Chosen
[2272] = 6, --King Rastakhan
[2276] = 7, --High Tinker Mekkatorque
[2280] = 8, --Stormwall Blockade
[2281] = 9, --Lady Jaina Proudmoore
}
local ENCOUNTER_ID_EJ = {
2333, 2325, 2341, 2342, 2330, 2335, 2334, 2337, 2343,
[2333] = 1, --Champion of the Light
[2325] = 2, --Grong, the Jungle Lord
[2341] = 3, --Jadefire Masters
[2342] = 4, --Opulence
[2330] = 5, --Conclave of the Chosen
[2335] = 6, --King Rastakhan
[2334] = 7, --High Tinker Mekkatorque
[2337] = 8, --Stormwall Blockade
[2343] = 9, --Lady Jaina Proudmoore
}
--> install the raid
C_Timer.After (10, function()
--load encounter journal
EJ_SelectInstance (INSTANCE_EJID)
local InstanceName = EJ_GetInstanceInfo (INSTANCE_EJID)
--build the boss name list
local BOSSNAMES = {}
local ENCOUNTERS = {}
for i = 1, #PORTRAIT_LIST do
local bossName = EJ_GetEncounterInfoByIndex (i, INSTANCE_EJID)
if (bossName) then
tinsert (BOSSNAMES, bossName)
local encounterTable = {
boss = bossName,
--portrait = "Interface\\EncounterJournal\\" .. PORTRAIT_LIST [i],
portrait = PORTRAIT_LIST [i],
}
tinsert (ENCOUNTERS, encounterTable)
else
break
end
end
_detalhes:InstallEncounter ({
id = INSTANCE_MAPID, --map id
ej_id = INSTANCE_EJID, --encounter journal id
name = InstanceName,
icons = "Interface\\AddOns\\" .. HDIMAGESPATH .. "\\" .. HDFILEPREFIX .. "_BossFaces",
icon = "Interface\\AddOns\\" .. HDIMAGESPATH .. "\\" .. HDFILEPREFIX .. "_Icon256x128",
is_raid = true,
backgroundFile = {file = "Interface\\Glues\\LOADINGSCREENS\\" .. LOADINGSCREEN_FILE, coords = LOADINGSCREEN_COORDS},
backgroundEJ = "Interface\\EncounterJournal\\" .. EJ_LOREBG,
encounter_ids = ENCOUNTER_ID_EJ,
encounter_ids2 = ENCOUNTER_ID_CL,
boss_names = BOSSNAMES,
encounters = ENCOUNTERS,
boss_ids = {
--npc ids
},
})
end)
end
do
--> data for Uldir (BFA tier 1)