Skip to content

Commit

Permalink
Eternal Palace boss info and Player Detail Window fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Aug 3, 2019
1 parent 6b48e83 commit 85c23d9
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 19 deletions.
21 changes: 20 additions & 1 deletion boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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


}

Expand Down
8 changes: 4 additions & 4 deletions functions/raidinfo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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
Expand All @@ -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
Expand Down
60 changes: 46 additions & 14 deletions gumps/janela_info.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -4838,7 +4853,7 @@ function gump:CriaJanelaInfo()
-- ~compare





-- ~tab ~tabs
Expand Down Expand Up @@ -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

Expand All @@ -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")
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
Binary file added images/raid/EternalPalaceRaid_BossFaces.tga
Binary file not shown.
Binary file added images/raid/EternalPalaceRaid_Icon256x128.tga
Binary file not shown.

0 comments on commit 85c23d9

Please sign in to comment.