diff --git a/boot.lua b/boot.lua index 19e7e7e18..f6ba1517d 100644 --- a/boot.lua +++ b/boot.lua @@ -72,7 +72,7 @@ do [2070] = true, --Battle for Dazaralor (BFA) GetInstanceInfo [1148] = true, --Uldir (BFA) uiMapID [1861] = true, --Uldir (BFA) from GetInstanceInfo - + [2164] = true, --Eternal Palace } --must fail in map and encounter id to not store data @@ -100,6 +100,15 @@ do [2269] = 1, --The Restless Cabal [2273] = 2, --Uu'nat, Harbinger of the Void + [2298] = 1, --Abyssal Commander Sivara + [2289] = 2, --Blackwater Behemoth + [2305] = 3, --Radiance of Azshara + [2304] = 4, --Lady Ashvane + [2303] = 5, --Orgozoa + [2311] = 6, --The Queen's Court + [2293] = 7, --Za'qul, Harbinger of Ny'alotha + [2299] = 8, --Queen Azshara + --EJID [2168] = 1, --Taloc [2167] = 2, --MOTHER @@ -122,6 +131,16 @@ do [2328] = 1, --The Restless Cabal [2332] = 2, --Uu'nat, Harbinger of the Void + + [2352] = 1, --Abyssal Commander Sivara + [2347] = 2, --Blackwater Behemoth + [2353] = 3, --Radiance of Azshara + [2354] = 4, --Lady Ashvane + [2351] = 5, --Orgozoa + [2359] = 6, --The Queen's Court + [2349] = 7, --Za'qul, Harbinger of Ny'alotha + [2361] = 8, --Queen Azshara + } diff --git a/functions/raidinfo.lua b/functions/raidinfo.lua index 661c32bae..79868cc44 100644 --- a/functions/raidinfo.lua +++ b/functions/raidinfo.lua @@ -8,8 +8,8 @@ do local INSTANCE_EJID = 1179 local INSTANCE_MAPID = 2164 local HDIMAGESPATH = "Details\\images\\raid" - local HDFILEPREFIX = "DazaralorRaid" - local LOADINGSCREEN_FILE, LOADINGSCREEN_COORDS = "LoadingScreen_Nazjatar_RAID", {0, 1, 285/1024, 875/1024} + local HDFILEPREFIX = "EternalPalaceRaid" + local LOADINGSCREEN_FILE, LOADINGSCREEN_COORDS = "Expansion07\\Main\\LoadingScreen_Nazjatar_RAID", {0, 1, 285/1024, 875/1024} local EJ_LOREBG = "UI-EJ-LOREBG-EternalPalace" local PORTRAIT_LIST = { @@ -24,7 +24,7 @@ do } local ENCOUNTER_ID_CL = { - 2298, 2289, 2305, 2304, 2303, 2311, 2293, 2299 + 2298, 2289, 2305, 2304, 2303, 2311, 2293, 2299, [2298] = 1, --Abyssal Commander Sivara [2289] = 2, --Blackwater Behemoth [2305] = 3, --Radiance of Azshara @@ -36,7 +36,7 @@ do } local ENCOUNTER_ID_EJ = { - 2352, 2347, 2353, 2354, 2351, 2359, 2349 + 2352, 2347, 2353, 2354, 2351, 2359, 2349, [2352] = 1, --Abyssal Commander Sivara [2347] = 2, --Blackwater Behemoth [2353] = 3, --Radiance of Azshara diff --git a/gumps/janela_info.lua b/gumps/janela_info.lua index 1613f5567..1fde1e169 100644 --- a/gumps/janela_info.lua +++ b/gumps/janela_info.lua @@ -244,7 +244,22 @@ function _detalhes:AbreJanelaInfo (jogador, from_att_change, refresh, ShiftKeyDo info:ShowTabs() gump:Fade (info, 0) - return jogador:MontaInfo() + --check which tab was selected and reopen that tab + if (info.selectedTab == "Summary") then + return jogador:MontaInfo() + else + --open tab + for index = 1, #_detalhes.player_details_tabs do + local tab = _detalhes.player_details_tabs [index] + if (tab:condition (info.jogador, info.atributo, info.sub_atributo)) then + if (tab.tabname == info.selectedTab) then + --_detalhes.player_details_tabs [index]:Click() + --_detalhes.player_details_tabs [index].onclick() + _detalhes.player_details_tabs [index]:OnShowFunc() + end + end + end + end end -- for beta todo: info background need a major rewrite @@ -4838,7 +4853,7 @@ function gump:CriaJanelaInfo() -- ~compare - + -- ~tab ~tabs @@ -4907,6 +4922,7 @@ function gump:CriaJanelaInfo() _detalhes.player_details_tabs[1]:SetPoint ("BOTTOMLEFT", info.container_barras, "TOPLEFT", 490 - (94 * (1-0)), 1) end + --selected by default _detalhes.player_details_tabs[1]:Click() end @@ -4925,15 +4941,15 @@ function gump:CriaJanelaInfo() end +info.selectedTab = "Summary" + _detalhes.player_details_tabs = {} function _detalhes:CreatePlayerDetailsTab (tabname, localized_name, condition, fillfunction, onclick, oncreate, iconSettings) if (not tabname) then tabname = "unnamed" end - - local index = #_detalhes.player_details_tabs - + --create a button for the tab local newTabButton = gump:CreateButton (info, onclick, 20, 20) newTabButton:SetTemplate ("DETAILS_TAB_BUTTON_TEMPLATE") @@ -4997,7 +5013,7 @@ function _detalhes:CreatePlayerDetailsTab (tabname, localized_name, condition, f newTabButton.frame:SetBackdropColor (0, 0, 0, 0.3) newTabButton.frame:SetBackdropBorderColor (.3, .3, .3, 0) - + newTabButton.frame:SetPoint ("TOPLEFT", info.container_barras, "TOPLEFT", 0, 2) newTabButton.frame:SetPoint ("bottomright", info, "bottomright", -3, 3) newTabButton.frame:SetSize (569, 274) @@ -5008,26 +5024,42 @@ function _detalhes:CreatePlayerDetailsTab (tabname, localized_name, condition, f if (not onclick) then --> hide all tabs - newTabButton:SetScript ("OnClick", function() + newTabButton.OnShowFunc = function (self) + self = self.MyObject or self + for _, tab in _ipairs (_detalhes.player_details_tabs) do tab.frame:Hide() tab:SetTemplate ("DETAILS_TAB_BUTTON_TEMPLATE") end - newTabButton:SetTemplate ("DETAILS_TAB_BUTTONSELECTED_TEMPLATE") - newTabButton.frame:Show() - end) + self:SetTemplate ("DETAILS_TAB_BUTTONSELECTED_TEMPLATE") + self.frame:Show() + info.selectedTab = self.tabname + end + + newTabButton:SetScript ("OnClick", newTabButton.OnShowFunc) else --> custom - newTabButton:SetScript ("OnClick", function() + newTabButton.OnShowFunc = function (self) + self = self.MyObject or self + for _, tab in _ipairs (_detalhes.player_details_tabs) do tab.frame:Hide() tab:SetTemplate ("DETAILS_TAB_BUTTON_TEMPLATE") end - newTabButton:SetTemplate ("DETAILS_TAB_BUTTONSELECTED_TEMPLATE") - onclick() - end) + self:SetTemplate ("DETAILS_TAB_BUTTONSELECTED_TEMPLATE") + + info.selectedTab = self.tabname + + --run onclick func + local result, errorText = pcall (self.onclick) + if (not result) then + print (errorText) + end + end + + newTabButton:SetScript ("OnClick", newTabButton.OnShowFunc) end newTabButton:SetScript ("PostClick", function (self) diff --git a/images/raid/EternalPalaceRaid_BossFaces.tga b/images/raid/EternalPalaceRaid_BossFaces.tga new file mode 100644 index 000000000..46f385b58 Binary files /dev/null and b/images/raid/EternalPalaceRaid_BossFaces.tga differ diff --git a/images/raid/EternalPalaceRaid_Icon256x128.tga b/images/raid/EternalPalaceRaid_Icon256x128.tga new file mode 100644 index 000000000..c1f0cd891 Binary files /dev/null and b/images/raid/EternalPalaceRaid_Icon256x128.tga differ