From 5885559ee4b9afc6d8f7b75e8189247726dd91c5 Mon Sep 17 00:00:00 2001 From: Arrvis the Lion Date: Mon, 7 Feb 2022 17:33:19 +0300 Subject: [PATCH] [KA] Added Butcher's Fire Shaman's meteors announcements (Yandir's HM) --- BuffsDebuffs.lua | 7 +++++-- Settings.lua | 8 ++++++++ TrialKynesAegis.lua | 17 +++++++++-------- lang/en.lua | 6 ++++-- 4 files changed, 26 insertions(+), 12 deletions(-) diff --git a/BuffsDebuffs.lua b/BuffsDebuffs.lua index 2515371..93f0bf5 100644 --- a/BuffsDebuffs.lua +++ b/BuffsDebuffs.lua @@ -597,8 +597,11 @@ kynes_aegis.yandir_harpy_totem_spawn = 133511 kynes_aegis.yandir_gargoyle_totem_spawn = 133514 -- Chaurus Totem spawn at Yandir the Butcher boss kynes_aegis.yandir_chaurus_totem_spawn = 133516 --- Meteor casted by Vrolsworn Fire Mage during the Captain Vrol boss encounter -kynes_aegis.vrol_firemage_meteor = 134023 +-- Meteors +kynes_aegis.firemage_meteor = { + [140606] = "yandir_fireshaman_meteor", -- Meteor casted by Butcher's Fire Shaman during the Yandir the Butcher boss encounter on hardmode difficulty + [134023] = "vrol_firemage_meteor", -- Meteor casted by Vrolsworn Fire Mage during the Captain Vrol boss encounter +} -- Effect which fires when Lord Falgravn starts his Ichor Eruption mechanic kynes_aegis.falgravn_ichor_eruption_timer = 136548 diff --git a/Settings.lua b/Settings.lua index c67ad86..d12801b 100644 --- a/Settings.lua +++ b/Settings.lua @@ -300,6 +300,7 @@ do ------------------ bitter_knight_sanguine_prison = false, bloodknight_blood_fountain = false, yandir_totem_spawn = 0, -- "Off" + yandir_fireshaman_meteor = 0, -- "Off" vrol_firemage_meteor = 0, -- "Off" falgravn_ichor_eruption = false, falgravn_ichor_eruption_time_before = 3, @@ -555,6 +556,7 @@ function RaidNotifier:CreateSettingsMenu() L.Settings_General_Choices_OnlyChaurusTotem, L.Settings_General_Choices_All, }, + yandir_fireshaman_meteor = off_self_all, vrol_firemage_meteor = off_self_all, }, rockgrove = { @@ -1621,6 +1623,12 @@ function RaidNotifier:CreateSettingsMenu() tooltip = L.Settings_KynesAegis_Totem_TT, choices = choices.kynesAegis.yandir_totem_spawn, }, "kynesAegis", "yandir_totem_spawn") + MakeControlEntry({ + type = "dropdown", + name = L.Settings_KynesAegis_Yandir_FireShaman_Meteor, + tooltip = L.Settings_KynesAegis_Yandir_FireShaman_Meteor_TT, + choices = choices.kynesAegis.yandir_fireshaman_meteor, + }, "kynesAegis", "yandir_fireshaman_meteor") MakeControlEntry({ type = "dropdown", name = L.Settings_KynesAegis_Vrol_FireMage_Meteor, diff --git a/TrialKynesAegis.lua b/TrialKynesAegis.lua index 043dfa1..e998f55 100644 --- a/TrialKynesAegis.lua +++ b/TrialKynesAegis.lua @@ -77,23 +77,24 @@ function RaidNotifier.KA.OnCombatEvent(_, result, isError, aName, aGraphic, aAct self:AddAnnouncement(GetString(RAIDNOTIFIER_ALERTS_KYNESAEGIS_CHAURUS_TOTEM), "kynesAegis", "yandir_totem_spawn") end end - -- Vrolsworn Fire Mage's meteors (3 meteors at once) + -- Butcher's Fire Shaman's or Vrolsworn Fire Mage's meteors (3 meteors at once) -- hitValue = 1 for casting or 2250 as the duration of meteor's reaching the targets - if (abilityId == buffsDebuffs.vrol_firemage_meteor and hitValue > 1) then + if (buffsDebuffs.firemage_meteor[abilityId] and hitValue > 1) then + local settingName = buffsDebuffs.firemage_meteor[abilityId] -- If player is tracking only meteors on himself we don't need to use any tricks - if (settings.vrol_firemage_meteor == 1 and tType == COMBAT_UNIT_TYPE_PLAYER) then - self:StartCountdown(hitValue, GetString(RAIDNOTIFIER_ALERTS_KYNESAEGIS_VROL_FIREMAGE_METEOR), "kynesAegis", "vrol_firemage_meteor", true, 2) - elseif (settings.vrol_firemage_meteor == 2) then + if (settings[settingName] == 1 and tType == COMBAT_UNIT_TYPE_PLAYER) then + self:StartCountdown(hitValue, GetString(RAIDNOTIFIER_ALERTS_KYNESAEGIS_FIREMAGE_METEOR), "kynesAegis", settingName, true, 2) + elseif (settings[settingName] == 2) then -- There will be several events for each of the targeted players -- In order to determine if our player himself is meteor's target we will analyze all of them RaidNotifier.DelayedEventHandler.Add( - "vrol_firemage_meteor", + settingName, { tType = tType }, function(argsBag) if (argsBag:ContainsArgumentWithValue("tType", COMBAT_UNIT_TYPE_PLAYER)) then - self:StartCountdown(hitValue, GetString(RAIDNOTIFIER_ALERTS_KYNESAEGIS_VROL_FIREMAGE_METEOR), "kynesAegis", "vrol_firemage_meteor", true, 2) + self:StartCountdown(hitValue, GetString(RAIDNOTIFIER_ALERTS_KYNESAEGIS_FIREMAGE_METEOR), "kynesAegis", settingName, true, 2) else - self:StartCountdown(hitValue, GetString(RAIDNOTIFIER_ALERTS_KYNESAEGIS_VROL_FIREMAGE_METEOR_OTHER), "kynesAegis", "vrol_firemage_meteor", false, 2) + self:StartCountdown(hitValue, GetString(RAIDNOTIFIER_ALERTS_KYNESAEGIS_FIREMAGE_METEOR_OTHER), "kynesAegis", settingName, false, 2) end end, diff --git a/lang/en.lua b/lang/en.lua index c77d814..7ec7102 100644 --- a/lang/en.lua +++ b/lang/en.lua @@ -561,6 +561,8 @@ L.Settings_KynesAegis_Blood_Fountain = "General: Blood Fountain" L.Settings_KynesAegis_Blood_Fountain_TT = "Alerts you when Bloodknight starts his Blood Fountain attack, counting down until it is unleashed. It looks like cross-shaped AoE, and need to be avoided as it deals heavy damage." L.Settings_KynesAegis_Totem = "Yandir: Totems spawn" L.Settings_KynesAegis_Totem_TT = "Alerts you when certain totem appeared during the battle with Yandir the Butcher boss.\n\nDragon Totems: always two appears at the same time; each one blows out fire along a straight line in two opposite directions.\nHarpy Totem: spawns a lightning aura that will radiate out.\nGargoyle totem: encases random players into stone.\nChaurus Totem: poisons several people, and this poison should not be spread to others, that's why you should not stack at this phase." +L.Settings_KynesAegis_Yandir_FireShaman_Meteor = "Yandir HM: Meteors" +L.Settings_KynesAegis_Yandir_FireShaman_Meteor_TT = "Alerts you when Butcher's Fire Shamans will cast meteors on players." L.Settings_KynesAegis_Vrol_FireMage_Meteor = "Vrol: Meteors" L.Settings_KynesAegis_Vrol_FireMage_Meteor_TT = "Alerts you when Vrolsworn Fire Mages from the boat will cast meteors on players." L.Settings_KynesAegis_Ichor_Eruption = "Falgravn: Ichor Eruption" @@ -576,8 +578,8 @@ L.Alerts_KynesAegis_Dragon_Totem = "Two |cffa500Dragon Totems L.Alerts_KynesAegis_Harpy_Totem = "|c00bfffHarpy Totem|r spawned." L.Alerts_KynesAegis_Gargoyle_Totem = "|cf5f5dcGargoyle Totem|r spawned." L.Alerts_KynesAegis_Chaurus_Totem = "|c39942eChaurus Totem|r spawned. Don't stack!" -L.Alerts_KynesAegis_Vrol_FireMage_Meteor = "|cffa500Meteor|r on you in" -L.Alerts_KynesAegis_Vrol_FireMage_Meteor_Other = "Meteors in" +L.Alerts_KynesAegis_FireMage_Meteor = "|cffa500Meteor|r on you in" +L.Alerts_KynesAegis_FireMage_Meteor_Other = "Meteors in" L.Alerts_KynesAegis_Ichor_Eruption = "|cb00000Ichor Eruption|r in"