Skip to content

Commit

Permalink
[DSR] Added alert if Reef Heart was destroyed in time or not
Browse files Browse the repository at this point in the history
  • Loading branch information
MysteryDragon committed Aug 13, 2022
1 parent 802b78b commit 349efab
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 8 deletions.
6 changes: 6 additions & 0 deletions BuffsDebuffs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,12 @@ dreadsail_reef.destructive_ember = 166209
dreadsail_reef.piercing_hailstone = 166178
-- Reef Guardian's cast on Reef Heart
dreadsail_reef.reef_guardian_heartburn = 163692
-- Reef Guardian's buff that Reef Heart receives (60s)
dreadsail_reef.reef_guardian_heartburn_buff = 170481
-- Vulnerability in case Heart was destroyed in time
dreadsail_reef.reef_guardian_heartburn_vulnerability = 166031
-- Empowerment in case Heart wasn't destroyed in time
dreadsail_reef.reef_guardian_heartburn_empowerment = 166032
-- Tideborn Taleria's Rapid Deluge
dreadsail_reef.taleria_rapid_deluge = {
[174959] = true, -- Normal
Expand Down
9 changes: 9 additions & 0 deletions Settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ do ------------------
imminent_debuffs = false,
brothers_heavy_attack = 0, -- "Off"
reef_guardian_reef_heart = false,
reef_guardian_reef_heart_result = false,
taleria_rapid_deluge = 0, -- "Off"
},
dbg = {
Expand Down Expand Up @@ -1743,6 +1744,14 @@ function RaidNotifier:CreateSettingsMenu()
name = L.Settings_DreadsailReef_ReefGuardian_ReefHeart,
tooltip = L.Settings_DreadsailReef_ReefGuardian_ReefHeart_TT,
}, "dreadsailReef", "reef_guardian_reef_heart")
MakeControlEntry({
type = "checkbox",
name = L.Settings_DreadsailReef_ReefHeart_Result,
tooltip = L.Settings_DreadsailReef_ReefHeart_Result_TT,
disabled = function()
return savedVars.dreadsailReef.reef_guardian_reef_heart == false;
end,
}, "dreadsailReef", "reef_guardian_reef_heart_result")
MakeControlEntry({
type = "dropdown",
name = L.Settings_DreadsailReef_Rapid_Deluge,
Expand Down
46 changes: 38 additions & 8 deletions TrialDreadsailReef.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ function RaidNotifier.DSR.Initialize()

data = {}
data.reefHeartCounter = 0
data.reefHearts = {}
end

function RaidNotifier.DSR.OnCombatStateChanged(inCombat)
Expand All @@ -22,6 +23,7 @@ function RaidNotifier.DSR.OnCombatStateChanged(inCombat)

if bossCount == 0 or bossAlive == 0 or bossFull == bossCount then
data.reefHeartCounter = 0
data.reefHearts = {}
end
end
end
Expand Down Expand Up @@ -50,14 +52,6 @@ function RaidNotifier.DSR.OnCombatEvent(_, result, isError, aName, aGraphic, aAc
elseif (settings.brothers_heavy_attack == 2 and tName ~= "") then
self:AddAnnouncement(zo_strformat(GetString(RAIDNOTIFIER_ALERTS_DREADSAILREEF_STINGING_SHEAR_OTHER), tName), "dreadsailReef", "brothers_heavy_attack")
end
-- Reef Guardian's Heartburn cast on Reef Heart
elseif (abilityId == buffsDebuffs.reef_guardian_heartburn and settings.reef_guardian_reef_heart) then
data.reefHeartCounter = data.reefHeartCounter + 1
self:AddAnnouncement(
zo_strformat(GetString(RAIDNOTIFIER_ALERTS_DREADSAILREEF_REEFGUARDIAN_REEFHEART), data.reefHeartCounter),
"dreadsailReef",
"reef_guardian_reef_heart"
)
end
elseif (result == ACTION_RESULT_EFFECT_GAINED_DURATION) then
-- Lylanar's Imminent Blister debuff
Expand Down Expand Up @@ -97,6 +91,42 @@ function RaidNotifier.DSR.OnCombatEvent(_, result, isError, aName, aGraphic, aAc
"dreadsailReef",
"dome_activation"
)
-- Reef Guardian's Heartburn buff on Reef Heart
elseif (abilityId == buffsDebuffs.reef_guardian_heartburn_buff and (settings.reef_guardian_reef_heart or settings.reef_guardian_reef_heart_result)) then
data.reefHeartCounter = data.reefHeartCounter + 1
data.reefHearts[tUnitId] = data.reefHeartCounter

if (settings.reef_guardian_reef_heart) then
self:AddAnnouncement(
zo_strformat(GetString(RAIDNOTIFIER_ALERTS_DREADSAILREEF_REEFGUARDIAN_REEFHEART), data.reefHeartCounter),
"dreadsailReef",
"reef_guardian_reef_heart"
)
end
-- Reef Heart was successfully destroyed
elseif (abilityId == buffsDebuffs.reef_guardian_heartburn_vulnerability and settings.reef_guardian_reef_heart_result) then
local alertMsg

if (tUnitId and data.reefHearts[tUnitId]) then
alertMsg = zo_strformat(GetString(RAIDNOTIFIER_ALERTS_DREADSAILREEF_REEFHEART_SUCCESS), data.reefHearts[tUnitId])
else
-- It shouldn't happen, but for now we'd like to handle it just in case
alertMsg = GetString(RAIDNOTIFIER_ALERTS_DREADSAILREEF_REEFHEART_SUCCESS_UNKNOWN)
end

self:AddAnnouncement(alertMsg, "dreadsailReef", "reef_guardian_reef_heart_result")
-- Reef Heart wasn't destroyed in time
elseif (abilityId == buffsDebuffs.reef_guardian_heartburn_empowerment and settings.reef_guardian_reef_heart_result) then
local alertMsg

if (tUnitId and data.reefHearts[tUnitId]) then
alertMsg = zo_strformat(GetString(RAIDNOTIFIER_ALERTS_DREADSAILREEF_REEFHEART_FAILURE), data.reefHearts[tUnitId])
else
-- It shouldn't happen, but for now we'd like to handle it just in case
alertMsg = GetString(RAIDNOTIFIER_ALERTS_DREADSAILREEF_REEFHEART_FAILURE_UNKNOWN)
end

self:AddAnnouncement(alertMsg, "dreadsailReef", "reef_guardian_reef_heart_result")
end
end
end
6 changes: 6 additions & 0 deletions lang/en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,8 @@ L.Settings_DreadsailReef_Brothers_Heavy_Attack = "Lylanar & Turlassil: Heavy
L.Settings_DreadsailReef_Brothers_Heavy_Attack_TT = "Alerts you when Lylanar or Turlassil makes their heavy attack (Broiling Hew / Stinging Shear)."
L.Settings_DreadsailReef_ReefGuardian_ReefHeart = "Reef Guardian: Reef Heart spawn"
L.Settings_DreadsailReef_ReefGuardian_ReefHeart_TT = "Alerts you when Reef Heart appears. You have 60 seconds to kill it or it's a group wipe. There can be several Hearts active at the same time."
L.Settings_DreadsailReef_ReefHeart_Result = "Reef Guardian: Reef Heart success/failure"
L.Settings_DreadsailReef_ReefHeart_Result_TT = "Alerts you if you have executed Reef Heart or not."
L.Settings_DreadsailReef_Rapid_Deluge = "Taleria: Rapid Deluge"
L.Settings_DreadsailReef_Rapid_Deluge_TT = "Alerts you when you or someone got Rapid Deluge debuff. They'll explode in 6 seconds, and the best option to handle the damage is to be swimming at that time."

Expand All @@ -653,6 +655,10 @@ L.Alerts_DreadsailReef_Broiling_Hew_Other = "Incoming |cCDCDCDBroiling
L.Alerts_DreadsailReef_Stinging_Shear = "Incoming |cCDCDCDStinging Shear|r on you!"
L.Alerts_DreadsailReef_Stinging_Shear_Other = "Incoming |cCDCDCDStinging Shear|r on |cFF0000<<!aC:1>>|r!"
L.Alerts_DreadsailReef_ReefGuardian_ReefHeart = "Reef Heart #|cFF0000<<1>>|r spawned!"
L.Alerts_DreadsailReef_ReefHeart_Success = "Reef Heart #|cFF0000<<1>>|r |c7CFC00destroyed|r!"
L.Alerts_DreadsailReef_ReefHeart_Success_Unknown = "Reef Heart |c7CFC00destroyed|r!"
L.Alerts_DreadsailReef_ReefHeart_Failure = "Reef Heart #|cFF0000<<1>>|r |cFF0000empowered|r. You're doomed!"
L.Alerts_DreadsailReef_ReefHeart_Failure_Unknown = "Reef Heart |cFF0000empowered|r. You're doomed!"
L.Alerts_DreadsailReef_Rapid_Deluge = "You got |c1CA3ECRapid Deluge|r! You should be swimming in"
L.Alerts_DreadsailReef_Rapid_Deluge_Other = "|cFF0000<<!aC:1>>|r got |c1CA3ECRapid Deluge|r! Swim in"

Expand Down

0 comments on commit 349efab

Please sign in to comment.