Skip to content

Commit

Permalink
feat: Added 10 mythic+ data
Browse files Browse the repository at this point in the history
  • Loading branch information
peti446 committed Nov 18, 2023
1 parent f0ccd65 commit 79b32a5
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 18 deletions.
41 changes: 24 additions & 17 deletions Frames/Main/MenuItems/TalentSuggestionConfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -197,17 +197,6 @@ local function DrawBossesSection(frame, expansion, contentType, jurnalInstanceID
end

local function DrawMythicPlusSection(frame, season, instancesIDs, validProfilesList)

--local instanceData = SwitchSwitch.My[expansion][contentType][jurnalInstanceID]
--local savedProfileSuggestions = SwitchSwitch:GetProfilesSuggestionInstanceData(instanceData["instanceID"])

-- Render header
frame:AddChild(TalentsSuggestionPage:CreateHeader(L["Profiles per Mythic+ Week"]))
local label = AceGUI:Create("Label")
label:SetFullWidth(true)
label:SetText(L["Allows to suggest a talent profile based on the current weeks affixes when entering a instance in mythic difficulty (before starting the key)"].. ".\n" .. L["If any value below is set to none the fallback `%s` will be used for that week"]:format(SwitchSwitch.DificultyStrings[SwitchSwitch.PreMythicPlusDificulty]) .. ".")
frame:AddChild(label)

-- Sort the week data so that it always appers in same order as ID are all over the palce
local mythicPlusWeekData = SwitchSwitch.MythicPlusAffixes[season] or {}

Expand All @@ -217,12 +206,12 @@ local function DrawMythicPlusSection(frame, season, instancesIDs, validProfilesL

local currentSeasonData = {}
for week, mythicPlusHash in pairs(mythicPlusWeekData) do
table.insert(currentSeasonData, {mythicPlusHash, BuildMythicPlusTitle(week, SwitchSwitch:decodeMythicPlusAffixesID(mythicPlusHash))})
currentSeasonData[week] = {mythicPlusHash, BuildMythicPlusTitle(week, SwitchSwitch:decodeMythicPlusAffixesID(mythicPlusHash))};
end

--Render dropboxes
local currentWeekAfixHash = SwitchSwitch:GetCurrentMythicPlusAfixHash()
for _, packedData in pairs(currentSeasonData) do
for _, packedData in ipairs(currentSeasonData) do
local mythicPlusHash, label = unpack(packedData)
local dropDown = AceGUI:Create("Dropdown")
local labelText = label;
Expand Down Expand Up @@ -292,17 +281,35 @@ local function OnGroupSelected(frame, _, group)
end

if(Expansion == "Mythic+") then

local currentMythicPlusSeasonID = SwitchSwitch:GetMythicPlusSeason()
if(ContentType ~= nil) then
-- Render header
scroll:AddChild(TalentsSuggestionPage:CreateHeader(L["Per Mythic+ Week profiles"]))
local label = AceGUI:Create("Label")
label:SetFullWidth(true)
label:SetText(L["Allows to suggest a talent profile based on the current weeks affixes when entering a instance in mythic difficulty (before starting the key)"]
.. ".\n"
.. L["If any value below is set to none the fallback `%s` will be used for that week"]:format(SwitchSwitch.DificultyStrings[SwitchSwitch.PreMythicPlusDificulty]) .. ".")
scroll:AddChild(label)
-- Draw dungoen specific sections
DrawMythicPlusSection(scroll, currentMythicPlusSeasonID, {ContentType}, validProfilesList)
else
-- Draw Overall Mytic+ section
frame:AddChild(TalentsSuggestionPage:CreateHeader(L["Profiles per Mythic+ Week"]))
-- Render header
scroll:AddChild(TalentsSuggestionPage:CreateHeader(L["Global Mythic+ profiles per Week"]))
local label = AceGUI:Create("Label")
label:SetFullWidth(true)
label:SetText(L["Allows to suggest a talent profile based on the current weeks affixes when entering a instance in mythic difficulty (before starting the key)"].. ".\n" .. L["If any value below is set to none the fallback `%s` will be used for that week"]:format(SwitchSwitch.DificultyStrings[SwitchSwitch.PreMythicPlusDificulty]) .. ".")
frame:AddChild(label)
label:SetText(L["Allows to suggest a talent profile based on the current weeks affixes when entering a instance in mythic difficulty (before starting the key)"]
.. ".\n"
.. L["If any value below is set to none the fallback `%s` will be used for that week"]:format(SwitchSwitch.DificultyStrings[SwitchSwitch.PreMythicPlusDificulty]) .. ".")
scroll:AddChild(label)

label = AceGUI:Create("Label")
label:SetFullWidth(true)
label:SetText("|cffff0000" .. L["Changes here will overwrite all specific data set in any specific mythic+"] .. "|r")
scroll:AddChild(label)

-- Draw Overall Mytic+ section
DrawMythicPlusSection(scroll, currentMythicPlusSeasonID, SwitchSwitch.MythicPlusDungeons[currentMythicPlusSeasonID], validProfilesList)
end
elseif(Expansion == "PVP") then
Expand Down
11 changes: 10 additions & 1 deletion InstancesData.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,16 @@ SwitchSwitch.MythicPlusAffixes = {
-- To retrive then affix info C_ChallengeMode.GetAffixInfo(ID)
-- Also normaly good to check is wowhead they tend to have a table of affixes that gets updated. For Season 3 https://www.wowhead.com/guides/season-3-shadowlands-mythic-plus-updates-item-levels
[11] = {
[1] = SwitchSwitch:encodeMythicPlusAffixesIDs(10, 136, 8)
[1] = SwitchSwitch:encodeMythicPlusAffixesIDs(10, 136, 8),
[2] = SwitchSwitch:encodeMythicPlusAffixesIDs(9, 134, 11),
[3] = SwitchSwitch:encodeMythicPlusAffixesIDs(10, 3, 123),
[4] = SwitchSwitch:encodeMythicPlusAffixesIDs(9, 124, 2),
[5] = SwitchSwitch:encodeMythicPlusAffixesIDs(10, 134, 7),
[6] = SwitchSwitch:encodeMythicPlusAffixesIDs(9, 136, 123),
[7] = SwitchSwitch:encodeMythicPlusAffixesIDs(10, 135, 2),
[8] = SwitchSwitch:encodeMythicPlusAffixesIDs(9, 3, 8),
[9] = SwitchSwitch:encodeMythicPlusAffixesIDs(10, 124, 11),
[10] = SwitchSwitch:encodeMythicPlusAffixesIDs(9, 135, 7),
},
-- Missed all the other seasons as I stopped updating the addon Feel free to add them
-- Sesason 3 Shadowlands
Expand Down

0 comments on commit 79b32a5

Please sign in to comment.