diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..06797a9 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,110 @@ +Version 0.1.9.6: (Panaa) +Thanks to @neomortis1 for the contribution +Adding DSR and SE basic support (mini split and multi hm is not available yet) + +Version 0.1.9.5 : (nogetrandom) +Added more options and keybinds to the UI. +Added Food Buff Reminder +I'm working on a lot of things for next update, which I wanted to have ready for this one, but they will have to wait. + +Version 0.1.9.4 : (nogetrandom) +Fixed issue where the addon would fail to load if you deleted the characters current profile while logged in on another character. +Fixed wrong score calculated from timer for Rockgrove. +Fixed a few issues with editing and applying times in settings. + +Version 0.1.9.3 : (nogetrandom) +Fixed the difficulty button on the panel not updating correctly sometimes. + +Added extended options for nameplates and health bars when using the addons "Hide Group" function. +This is still being tested in order to improve it. For now I recommend using the options I added for name plates, to +select what settings you want for them when turning hide group off. This is not needed if you don't use this function. + +Version 0.1.9.2 : (nogetrandom) +Added options for the addons own hide group function: +- decide if you want the group shown instantly when you turn it off. +- enable "Necromancer Mode" to automatically disable it without showing group members when you enter combat. (still a work in progress, and I plan to find the best ways to have it automated) + +Added more shortcuts to the panel dropdown: +- port to primary house. +- open the settings menu for the addon. +- the profile name will now be sorted alphabetically in the drop down. + +Version 0.1.9.1 : (nogetrandom) +Fixed issue causing an error for players using the French client. +Updated how the UI window is constructed to avoid inconsistencies. + +Version 0.1.9 : (nogetrandom) +Long over due update with many fixes and some new features: +- Fixed issue where the addon would sometimes think the fight was reset in CR and AS when player is resurrected. +- Improved the Simulate function in settings and added more functionality to each trial submenu. +- Added a small panel to the UI, which can be set to be visible outside of trials, and is equipped with buttons for changing profile, changing dungeon difficulty and toggling the addons built-in "Hide Group" function. More shortcuts and options will be added later. +- Added a "+ / -" button to the main UI window, which can be used to show or hide the steps of trials, so only the title, profile and trial labels are visible along with the score, timer and vitality trackers. +- Added Rockgrove support. +- Changed saved timers for Vateshran Hollows and Maelstrom Arena to be separated from profiles, so each characters individual timers will be loaded across profiles, with an option to use the active profile to share timers from all characters with the option enabled and has the same profile set as active. First time loading this update on each character, the addon will gather that characters timers from all profiles and save the best for each step to it's personal timers. + +Probably forgot to mention a minor thing or two, but I've been working on these updates for so long now that I lost track. + +Version 0.1.8.4 : (nogetrandom) +Stopped "Hide Group" function from spamming chat. + +Version 0.1.8.3 : (nogetrandom) +Added option to change between profiles if you want to save progression for multiple groups or purposes separate. + +By default all your previously saved timers will be transferred to the "Default" profile, but from there you can reset the profile to a blank if you wish. All of your old data will be kept as is and left untouched so you can import it whenever you want to any new profile. + +Each new profile will save times for MA and VH from each your characters individually, and I plan to add an option to switch to "account wide" and back without interfering with each other. I will also make it possible to copy individual steps, all trial timers and entire profiles in the menu for next update. + +Also, it will remember which profile to use for each of your characters, in case you run with more than one group and use different characters for each of them, so you wont have to change back and forth all the time. + +Added [Active Profile] to the UI display. For now it's centered above the timer window, but will later have options for placement and visibility. + +Version 0.1.8.2 : (nogetrandom) +API bump. +Added support for Vateshran Hollows which also displays how many adds you killed. +Added new features; see info tab in settings for more info. +Changed BRP tracking. For now it displays 25 steps, which im aware is a long list, but i will be more customizable next update. + +Version 0.1.8.1 : (nogetrandom) +Last update was a mess, sorry it took so long to make a new one. +Fixed some wrong entries which resulted in UI-errors, and resolved a few minor issues. +Still working on some permanent fixes for errors that occur when certain trials have been cleared. +Disabled display in trials on normal difficulty. + +Version 0.1.8 : (nogetrandom) +Few bug fixes +Updated the display and added vitality (green if full, red if 0 left, otherwise white) +Slightly organized settings menu + +Version 0.1.7 : (nogetrandom) +API bump +Kyne's Aegis support + +Version 0.1.6.3 : (Floliroy) +API bump + +Version 0.1.6.2 : (Floliroy) +Fix the error occuring on last vMA arena + +Version 0.1.6.1 : (Floliroy) +API bump + +Version 0.1.6 : (Panaa) +Add a setting to display or not the UI, without disable other addon functions + +Version 0.1.5 : (Floliroy) +Fix on vDSA segment trigger + +Version 0.1.4 : (Floliroy / Panaa) +Another fix for CR and AS function + +Version 0.1.3 : (Floliroy) +Fixed bug on CR and AS function +Fixed bug on score not updating at the end of trial + +Version 0.1.2 : (Floliroy) +Modified Begin / Kill at each boss to nothing for begin and a skull icon for Kill +Added Reset Data button option +Maelstrom will now save per character and not per account + +Version 0.1.1 : (Floliroy / Panaa) +Initial version of the Add-On (beta) \ No newline at end of file diff --git a/Lang/en.lua b/Lang/en.lua index 40afeaf..846b1d1 100644 --- a/Lang/en.lua +++ b/Lang/en.lua @@ -1,4 +1,4 @@ -local strings = { +local strings = { SI_SPEEDRUN_LANG = "en", ---------------------- ---- Data Tables ----- @@ -83,6 +83,26 @@ SI_SPEEDRUN_KA_BEGIN_FALGRAVN = "Falgravn", SI_SPEEDRUN_KA_KILL_FALGRAVN = "Falgravn |t20:20:esoui\\art\\icons\\poi\\poi_groupboss_incomplete.dds|t", + --DSR + SI_SPEEDRUN_DSR_BEGIN_TWINS = "Fire and Ice", + SI_SPEEDRUN_DSR_FINISH_TWINS = "Fire and Ice |t20:20:esoui\\art\\icons\\poi\\poi_groupboss_incomplete.dds|t", + SI_SPEEDRUN_DSR_BEGIN_MINI1 = "First Mini", + SI_SPEEDRUN_DSR_FINISH_MINI1 = "First Mini |t20:20:esoui\\art\\icons\\poi\\poi_groupboss_incomplete.dds|t", + SI_SPEEDRUN_DSR_BEGIN_MINI2 = "Second Mini", + SI_SPEEDRUN_DSR_FINISH_MINI2 = "Second Mini |t20:20:esoui\\art\\icons\\poi\\poi_groupboss_incomplete.dds|t", + SI_SPEEDRUN_DSR_BEGIN_GUARDIAN = "Reef Guardian", + SI_SPEEDRUN_DSR_FINISH_GUARDIAN = "Reef Guardian |t20:20:esoui\\art\\icons\\poi\\poi_groupboss_incomplete.dds|t", + SI_SPEEDRUN_DSR_BEGIN_TALERIA = "Taleria", + SI_SPEEDRUN_DSR_FINISH_TALERIA = "Taleria |t20:20:esoui\\art\\icons\\poi\\poi_groupboss_incomplete.dds|t", + + --SE + SI_SPEEDRUN_SE_BEGIN_EXARCH = "Yaseyla", + SI_SPEEDRUN_SE_FINISH_EXARCH = "Yaseyla |t20:20:esoui\\art\\icons\\poi\\poi_groupboss_incomplete.dds|t", + SI_SPEEDRUN_SE_BEGIN_TWELVANE = "Chimera", + SI_SPEEDRUN_SE_FINISH_TWELVANE = "Chimera |t20:20:esoui\\art\\icons\\poi\\poi_groupboss_incomplete.dds|t", + SI_SPEEDRUN_SE_BEGIN_ANSUUL = "Ansuul", + SI_SPEEDRUN_SE_FINISH_ANSUUL = "Ansuul |t20:20:esoui\\art\\icons\\poi\\poi_groupboss_incomplete.dds|t", + --ARENAS SI_SPEEDRUN_ARENA_FIRST = "First Stage", SI_SPEEDRUN_ARENA_SECOND = "Second Stage", @@ -120,6 +140,8 @@ SI_SPEEDRUN_ADDS_CR_DESC = "Select if you're killing adds on side platforms (without killing mini bosses) before engaging Z'maja.", SI_SPEEDRUN_HM_SS_NAME = "Hard Modes", SI_SPEEDRUN_HM_SS_DESC = "Set how many of the bosses you're going to engage on Hard Mode in Sunspire.", + SI_SPEEDRUN_HM_DSR_NAME = "Hard Modes", + SI_SPEEDRUN_HM_DSR_DESC = "Set how many of the bosses you're going to engage on Hard Mode in Dreadsail Reef.", SI_SPEEDRUN_ZERO = "Zero", SI_SPEEDRUN_ONE = "One", SI_SPEEDRUN_TWO = "Two", diff --git a/Speedrun.lua b/Speedrun.lua index ed8b059..af78347 100644 --- a/Speedrun.lua +++ b/Speedrun.lua @@ -7,7 +7,7 @@ local EM = EVENT_MANAGER local sV local cV Speedrun.name = "Speedrun" -Speedrun.version = "0.1.9.5" +Speedrun.version = "0.1.9.6" Speedrun.activeProfile = "" Speedrun.raidID = 0 Speedrun.zone = 0 @@ -154,6 +154,14 @@ function Speedrun.GetScore(timer, vitality, raidID) elseif raidID == 1227 then return (205450 + (1000 * vitality)) * (1 + (5400 - timer) / 10000) -- RG elseif raidID == 1263 then return (232200 + (1000 * vitality)) * (1 + (2700 - timer) / 10000) + -- DSR + elseif raidID == 1344 then + if Speedrun.hmOnDSR == 1 then return (145830 + (1000 * vitality)) * (1 + (2700 - timer) / 10000) + elseif Speedrun.hmOnDSR == 2 then return (185830 + (1000 * vitality)) * (1 + (2700 - timer) / 10000) + elseif Speedrun.hmOnDSR == 3 then return (225830 + (1000 * vitality)) * (1 + (2700 - timer) / 10000) + elseif Speedrun.hmOnDSR == 4 then return (265830 + (1000 * vitality)) * (1 + (2700 - timer) / 10000) end + -- SE false scoring + elseif raidID == 1427 then return (232200 + (1000 * vitality)) * (1 + (2700 - timer) / 10000) else return 0 end end @@ -640,7 +648,7 @@ function Speedrun.BossFightBegin() if IsUnitInCombat("player") and (current < max) then EM:UnregisterForUpdate(Speedrun.name .. "BossFight") Speedrun.UpdateWaypointNew(GetRaidDuration()) - -- Speedrun:dbg(2, "|cffffff<<1>>|r Started at: |cffffff<<2>>|r!", GetUnitName("boss" .. i), Speedrun.FormatTimerForChatUpdate(GetRaidDuration())) + --Speedrun:dbg(2, "|cffffff<<1>>|r Started at: |cffffff<<2>>|r!", GetUnitName("boss" .. i), Speedrun.FormatTimerForChatUpdate(GetRaidDuration())) --test end end end @@ -675,7 +683,11 @@ function Speedrun.MainBoss() if (string.find(Speedrun.currentBossName, "snakes") or string.find(Speedrun.currentBossName, "titan")) then return end end - if Speedrun.currentBossName == Speedrun.lastBossName then return end + if Speedrun.raidID == 1427 then + if (string.find(Speedrun.currentBossName, "herablasser") or string.find(Speedrun.currentBossName, "descender") or string.find(Speedrun.currentBossName, "descensor") or string.find(Speedrun.currentBossName, "vice spiral")) then return end + end + + if Speedrun.currentBossName == Speedrun.lastBossName then return end -- test for SE local currentTargetHP, maxTargetHP, effmaxTargetHP = GetUnitPower("boss" .. i, POWERTYPE_HEALTH) @@ -697,7 +709,7 @@ function Speedrun.MainBoss() end local function BossMainZoneCheck(zone) - local mbZones = { [638] = true, [639] = true, [725] = true, [975] = true, [1121] = true, [1196] = true, [1263] = true } + local mbZones = { [638] = true, [639] = true, [725] = true, [975] = true, [1121] = true, [1196] = true, [1263] = true, [1344] = true, [1427] = true } if mbZones[zone] then return true end return false end @@ -705,12 +717,21 @@ end Speedrun.BossDead = function(eventCode, scoreUpdateReason, scoreAmount, totalScore) local timer + if Speedrun.raidID == 1344 then -- track dsr minibosses + if scoreUpdateReason == RAID_POINT_REASON_KILL_MINIBOSS then + timer = (GetRaidDuration() - Speedrun.fightBegin) / 1000 + Speedrun:dbg(2, "|cffffff<<1>>|r fight time: |cffffff<<2>>|r!", Speedrun.currentBossName, Speedrun.FormatTimerForChatUpdate(timer)) - -- if scoreUpdateReason == RAID_POINT_REASON_KILL_MINIBOSS then - -- timer = (GetRaidDuration() - Speedrun.fightBegin) / 1000 - -- Speedrun:dbg(2, "|cffffff<<1>>|r fight time: |cffffff<<2>>|r!", Speedrun.currentBossName, Speedrun.FormatTimerForChatUpdate(timer)) - -- return - -- end + Speedrun.lastBossName = Speedrun.currentBossName + sV.lastBossName = Speedrun.lastBossName + Speedrun.currentBossName = "" + sV.currentBossName = Speedrun.currentBossName + Speedrun.isBossDead = true + sV.isBossDead = Speedrun.isBossDead + Speedrun.UpdateWaypointNew(GetRaidDuration()) + return + end + end if scoreUpdateReason == RAID_POINT_REASON_KILL_BOSS then @@ -746,7 +767,7 @@ end Speedrun.OnTrialComplete = function(eventCode, trialName, score, totalTime) -- for mini-trials and HRC - if Speedrun.raidID == 636 or Speedrun.raidID == 1000 or Speedrun.raidID == 1082 or Speedrun.raidID == 677 or Speedrun.raidID == 1227 then + if Speedrun.raidID == 636 or Speedrun.raidID == 1000 or Speedrun.raidID == 1082 or Speedrun.raidID == 677 or Speedrun.raidID == 1227 or Speedrun.raidID == 1427 then --test fir SE Speedrun.UpdateWaypointNew(totalTime) end -- for CR diff --git a/Speedrun.txt b/Speedrun.txt index 17f6295..3db622f 100644 --- a/Speedrun.txt +++ b/Speedrun.txt @@ -1,7 +1,7 @@ ## Title: Speed|cdf4242Run|r -## APIVersion: 101032 +## APIVersion: 101037 ## Author: Floliroy, Panaa, @nogetrandom [PC EU] -## Version: 0.1.9.5 +## Version: 0.1.9.6 ## DependsOn: LibAddonMenu-2.0>=32 LibCustomMenu ## SavedVariables: SpeedrunVariables diff --git a/SpeedrunData.lua b/SpeedrunData.lua index 24a307c..306652b 100644 --- a/SpeedrunData.lua +++ b/SpeedrunData.lua @@ -115,6 +115,28 @@ Speedrun.Data = { bestScore = 0, scoreReasons = {}, }, + }, + [1344] = { + name = "DSR", + id = 1344, + timerSteps = {}, + scoreFactors = { + vitality = 0, + bestTime = nil, + bestScore = 0, + scoreReasons = {}, + }, + }, + [1427] = { + name = "SE", + id = 1427, + timerSteps = {}, + scoreFactors = { + vitality = 0, + bestTime = nil, + bestScore = 0, + scoreReasons = {}, + }, }, [1082] = { name = "BRP", @@ -259,7 +281,27 @@ Speedrun.Data = { [5] = "", [6] = "" }, - [1263] = { --RG + [1263] = { --RG + [1] = "", + [2] = "", + [3] = "", + [4] = "", + [5] = "", + [6] = "" + }, + [1344] = { --DSR + [1] = "", + [2] = "", + [3] = "", + [4] = "", + [5] = "", + [6] = "", + [7] = "", + [8] = "", + [9] = "", + [10] = "" + }, + [1427] = { --SE [1] = "", [2] = "", [3] = "", @@ -436,13 +478,34 @@ Speedrun.Data = { [6] = zo_strformat(SI_SPEEDRUN_KA_KILL_FALGRAVN), -- [7] = "", }, - [1263] = { --KA + [1263] = { --RG [1] = "Oaxiltso", [2] = "Oaxiltso |t20:20:esoui\\art\\icons\\poi\\poi_groupboss_incomplete.dds|t", [3] = "Flame-Herald Bahsei", [4] = "Flame-Herald Bahsei |t20:20:esoui\\art\\icons\\poi\\poi_groupboss_incomplete.dds|t", [5] = "Xalvakka", [6] = "Xalvakka |t20:20:esoui\\art\\icons\\poi\\poi_groupboss_incomplete.dds|t", + }, + [1344] = { --DSR + [1] = zo_strformat(SI_SPEEDRUN_DSR_BEGIN_TWINS), + [2] = zo_strformat(SI_SPEEDRUN_DSR_FINISH_TWINS), + [3] = zo_strformat(SI_SPEEDRUN_DSR_BEGIN_MINI1), + [4] = zo_strformat(SI_SPEEDRUN_DSR_FINISH_MINI1), + [5] = zo_strformat(SI_SPEEDRUN_DSR_BEGIN_MINI2), + [6] = zo_strformat(SI_SPEEDRUN_DSR_FINISH_MINI2), + [7] = zo_strformat(SI_SPEEDRUN_DSR_BEGIN_GUARDIAN), + [8] = zo_strformat(SI_SPEEDRUN_DSR_FINISH_GUARDIAN), + [9] = zo_strformat(SI_SPEEDRUN_DSR_BEGIN_TALERIA), + [10] = zo_strformat(SI_SPEEDRUN_DSR_FINISH_TALERIA), + }, + [1427] = { --SE + [1] = zo_strformat(SI_SPEEDRUN_SE_BEGIN_EXARCH), + [2] = zo_strformat(SI_SPEEDRUN_SE_FINISH_EXARCH), + [3] = zo_strformat(SI_SPEEDRUN_SE_BEGIN_TWELVANE), + [4] = zo_strformat(SI_SPEEDRUN_SE_FINISH_TWELVANE), + [5] = zo_strformat(SI_SPEEDRUN_SE_BEGIN_ANSUUL), + [6] = zo_strformat(SI_SPEEDRUN_SE_FINISH_ANSUUL), + -- [7] = "", }, [1082] = { --BRP [1] = "1.1", @@ -641,6 +704,10 @@ Speedrun.Data = { ["mynar"] = true, }, + [1427] = { + ["gewundender herablasser"] = true, + ["Spiral Descender"] = true + }, }, } -- {"oaxiltso" = true, string.lower("Оазилцо") = true, string.lower("オアジルツォ") = true}, diff --git a/SpeedrunDefaults.lua b/SpeedrunDefaults.lua index 4a223ce..1cd8c46 100644 --- a/SpeedrunDefaults.lua +++ b/SpeedrunDefaults.lua @@ -96,7 +96,8 @@ local defaultProfile = { raidList = {}, customTimerSteps = {}, addsOnCR = true, - hmOnSS = 4 + hmOnSS = 4, + hmOnDSR = 4 } local defaultScoreFactors = { vitality = 0, @@ -215,6 +216,28 @@ local defaultRaidList = { scoreReasons = {} } }, + [1344] = { + name = "DSR", + id = 1344, + timerSteps = {}, + scoreFactors = { + vitality = 0, + bestTime = nil, + bestScore = 0, + scoreReasons = {} + } + }, + [1427] = { + name = "SE", + id = 1427, + timerSteps = {}, + scoreFactors = { + vitality = 0, + bestTime = nil, + bestScore = 0, + scoreReasons = {} + } + }, [1082] = { name = "BRP", id = 1082, @@ -349,6 +372,26 @@ local defaultCustomTimerSteps = { [5] = "", [6] = "" }, + [1344] = { --DSR + [1] = "", + [2] = "", + [3] = "", + [4] = "", + [5] = "", + [6] = "", + [7] = "", + [8] = "", + [9] = "", + [10] = "" + }, + [1427] = { --SE + [1] = "", + [2] = "", + [3] = "", + [4] = "", + [5] = "", + [6] = "" + }, [1082] = { --BRP [1] = "", [2] = "", @@ -647,6 +690,8 @@ function Speedrun.LoadVariables() Speedrun.trialState = sV.trialState Speedrun.addsOnCR = sV.profiles[Speedrun.activeProfile].addsOnCR Speedrun.hmOnSS = sV.profiles[Speedrun.activeProfile].hmOnSS + Speedrun.hmOnDSR = sV.profiles[Speedrun.activeProfile].hmOnDSR + end -------------------- ---- Player Data --- @@ -664,6 +709,8 @@ function Speedrun.LoadRaidlist(profile) Speedrun.raidList[1121] = sV.profiles[profile].raidList[1121] Speedrun.raidList[1196] = sV.profiles[profile].raidList[1196] Speedrun.raidList[1263] = sV.profiles[profile].raidList[1263] + Speedrun.raidList[1344] = sV.profiles[profile].raidList[1344] + Speedrun.raidList[1427] = sV.profiles[profile].raidList[1427] if cV.individualArenaTimers then Speedrun.raidList[677] = cV.arenaList[677] Speedrun.raidList[1227] = cV.arenaList[1227] @@ -686,6 +733,8 @@ function Speedrun.LoadCustomTimers(profile) Speedrun.customTimerSteps[1121] = sV.profiles[profile].customTimerSteps[1121] Speedrun.customTimerSteps[1196] = sV.profiles[profile].customTimerSteps[1196] Speedrun.customTimerSteps[1263] = sV.profiles[profile].customTimerSteps[1263] + Speedrun.customTimerSteps[1344] = sV.profiles[profile].customTimerSteps[1344] + Speedrun.customTimerSteps[1427] = sV.profiles[profile].customTimerSteps[1427] if cV.individualArenaTimers then Speedrun.customTimerSteps[677] = cV.customTimerSteps[677] Speedrun.customTimerSteps[1227] = cV.customTimerSteps[1227] @@ -770,6 +819,7 @@ function Speedrun.GetDefaultProfile() customTimerSteps = {}, addsOnCR = true, hmOnSS = 4, + hmOnDSR = 4, } profile.raidList = Speedrun.GetDefaultRaidList() profile.customTimerSteps = Speedrun.GetDefaultCustomTimerSteps() @@ -895,6 +945,8 @@ function Speedrun.ImportVariables() local customTimerStepsData = sV.customTimerSteps ~= nil and true or false local addsOnCRData = sV.addsOnCR ~= nil and true or false local hmOnSSData = sV.hmOnSS ~= nil and true or false + local hmOnDSRData = sV.hmOnDSR ~= nil and true or false + local MA = 677 .. GetUnitName("player") local VH = 1227 .. GetUnitName("player") @@ -942,15 +994,18 @@ function Speedrun.ImportVariables() if addsOnCRData == true then savedData.addsOnCR = sV.addsOnCR end if hmOnSSData == true then savedData.hmOnSS = sV.hmOnSS end + if hmOnDSRData == true then savedData.hmOnDSR = sV.hmOnDSR end sV.profiles[Speedrun.profileToImportTo].raidList = savedData.raidList sV.profiles[Speedrun.profileToImportTo].customTimerSteps = savedData.customTimerSteps sV.profiles[Speedrun.profileToImportTo].addsOnCR = savedData.addsOnCR sV.profiles[Speedrun.profileToImportTo].hmOnSS = savedData.hmOnSS + sV.profiles[Speedrun.profileToImportTo].hmOnDSR = savedData.hmOnDSR sV.customTimerSteps = nil sV.addsOnCR = nil sV.hmOnSS = nil + sV.hmOnDSR = nil sV.debugMode = nil sV.isTracking = nil Speedrun.profileToImportTo = "" diff --git a/SpeedrunExtra.lua b/SpeedrunExtra.lua index b8ed49b..d2540e4 100644 --- a/SpeedrunExtra.lua +++ b/SpeedrunExtra.lua @@ -941,7 +941,7 @@ function Speedrun.GetTrialMaxVitality(raidID) if raidID == 638 or raidID == 636 or raidID == 639 or raidID == 1082 or raidID == 635 then vitality = 24 - elseif raidID == 725 or raidID == 975 or raidID == 1000 or raidID == 1051 or raidID == 1121 or raidID == 1196 or raidID == 1263 then + elseif raidID == 725 or raidID == 975 or raidID == 1000 or raidID == 1051 or raidID == 1121 or raidID == 1196 or raidID == 1263 or raidID == 1344 or raidID == 1427 then vitality = 36 elseif raidID == 677 or raidID == 1227 then diff --git a/SpeedrunMenu.lua b/SpeedrunMenu.lua index 5d9600f..1322fa9 100644 --- a/SpeedrunMenu.lua +++ b/SpeedrunMenu.lua @@ -26,7 +26,9 @@ local trialMenuTimers = { [1121] = {}, [1196] = {}, [1227] = {}, - [1263] = {} + [1263] = {}, + [1344] = {}, + [1427] = {} } local trialSubmenus = { [635] = {}, @@ -42,7 +44,9 @@ local trialSubmenus = { [1121] = {}, [1196] = {}, [1227] = {}, - [1263] = {} + [1263] = {}, + [1344] = {}, + [1427] = {} } local NAMEPLATE_CHOICE_NEVER = NAMEPLATE_CHOICE_NEVER local NAMEPLATE_CHOICE_ALWAYS = NAMEPLATE_CHOICE_ALWAYS @@ -328,6 +332,7 @@ function Speedrun.RefreshProfileSettings() Speedrun:dbg(2, "Updating Menu") Speedrun.addsOnCR = sV.profiles[Speedrun.activeProfile].addsOnCR Speedrun.hmOnSS = sV.profiles[Speedrun.activeProfile].hmOnSS + Speedrun.hmOnDSR = sV.profiles[Speedrun.activeProfile].hmOnDSR Speedrun.LoadRaidlist(Speedrun.activeProfile) Speedrun.LoadCustomTimers(Speedrun.activeProfile) Speedrun.UpdateDropdowns() @@ -590,6 +595,33 @@ function Speedrun.CreateRaidMenu(raidID) } ) end + if raidID == 1344 then + local choices = { + [1] = zo_strformat(SI_SPEEDRUN_ZERO), + [2] = zo_strformat(SI_SPEEDRUN_ONE), + [3] = zo_strformat(SI_SPEEDRUN_TWO), + [4] = zo_strformat(SI_SPEEDRUN_THREE), + } + + table.insert(raidMenu, + { type = "dropdown", + name = zo_strformat(SI_SPEEDRUN_HM_DSR_NAME), + tooltip = zo_strformat(SI_SPEEDRUN_HM_DSR_DESC), + choices = choices, + default = choices[4], + getFunc = function() return choices[Speedrun.hmOnDSR] end, + setFunc = function(selected) + for index, name in ipairs(choices) do + if name == selected then + Speedrun.hmOnDSR = index + sV.profiles[Speedrun.activeProfile].hmOnDSR = Speedrun.hmOnDSR + break + end + end + end, + } + ) + end for i, x in ipairs(Speedrun.Data.stepList[raidID]) do table.insert(raidMenu, Speedrun.CreateOptionTable(raidID, i)) @@ -1260,6 +1292,8 @@ function Speedrun.CreateSettingsWindow() Speedrun.CreateRaidMenu(1121), Speedrun.CreateRaidMenu(1196), Speedrun.CreateRaidMenu(1263), + Speedrun.CreateRaidMenu(1344), + Speedrun.CreateRaidMenu(1427), }, reference = "Speedrun_Trial_Menu" },