diff --git a/Settings.lua b/Settings.lua index 87f6d2f..1cc8092 100644 --- a/Settings.lua +++ b/Settings.lua @@ -318,6 +318,7 @@ do ------------------ oaxiltso_annihilator_cinder_cleave = 0, -- "Off" bahsei_embrace_of_death = 0, -- "Off" bahsei_cone_direction = false, + bahsei_portal_number = false, xalvakka_unstable_charge = false, }, dreadsailReef = { @@ -1747,6 +1748,11 @@ function RaidNotifier:CreateSettingsMenu() name = L.Settings_Rockgrove_Bahsei_Cone_Direction, tooltip = L.Settings_Rockgrove_Bahsei_Cone_Direction_TT, }, "rockgrove", "bahsei_cone_direction") + MakeControlEntry({ + type = "checkbox", + name = L.Settings_Rockgrove_Bahsei_Portal_Number, + tooltip = L.Settings_Rockgrove_Bahsei_Portal_Number_TT, + }, "rockgrove", "bahsei_portal_number") MakeControlEntry({ type = "checkbox", name = L.Settings_Rockgrove_Xalvakka_Unstable_Charge, diff --git a/TrialRockgrove.lua b/TrialRockgrove.lua index 067581e..089303d 100644 --- a/TrialRockgrove.lua +++ b/TrialRockgrove.lua @@ -13,6 +13,23 @@ function RaidNotifier.RG.Initialize() dbg = RaidNotifier.dbg data = {} + data.bahseiPortalCounter = 0 +end + +function RaidNotifier.RG.OnCombatStateChanged(inCombat) + if (inCombat and DoesUnitExist("boss1")) then + local currentHealth, maxHealth = GetUnitPower("boss1", POWERTYPE_HEALTH) + + if currentHealth ~= nil and maxHealth ~= nil and currentHealth > 0 and maxHealth > 0 then + local healthPercent = currentHealth / maxHealth + + if healthPercent <= 99 then + return + end + end + end + + data.bahseiPortalCounter = 0 end function RaidNotifier.RG.OnEffectChangedForGroup(eventCode, changeType, eSlot, eName, uTag, beginTime, endTime, stackCount, iconName, buffType, eType, aType, statusEffectType, uName, uId, abilityId, uType) @@ -130,6 +147,12 @@ function RaidNotifier.RG.OnCombatEvent(_, result, isError, aName, aGraphic, aAct end elseif (result == ACTION_RESULT_EFFECT_GAINED) then if (abilityId == buffsDebuffs.bahsei_creeping_eye_clockwise or abilityId == buffsDebuffs.bahsei_creeping_eye_countercw) then + data.bahseiPortalCounter = data.bahseiPortalCounter % 2 + 1 + + if (settings.bahsei_portal_number) then + local text = zo_strformat(GetString(RAIDNOTIFIER_ALERTS_ROCKGROVE_BAHSEI_PORTAL_NUMBER), data.bahseiPortalCounter) + self:AddAnnouncement(text, "rockgrove", "bahsei_portal_number") + end if (settings.bahsei_cone_direction) then local text diff --git a/lang/en.lua b/lang/en.lua index acf0ff3..9d6a01f 100644 --- a/lang/en.lua +++ b/lang/en.lua @@ -615,6 +615,8 @@ L.Settings_Rockgrove_Embrace_Of_Death_TT = "Alerts you when someone go L.Settings_Rockgrove_Embrace_Of_Death_TT_All = "|cFF0000WARNING!|r If your group will get too much curses your screen may be fully covered in countdowns for a duration of those curses! We're working on ways to improve this notification." L.Settings_Rockgrove_Bahsei_Cone_Direction = "Flame-Herald Bahsei HM: Cone direction" L.Settings_Rockgrove_Bahsei_Cone_Direction_TT = "Alerts you of the cone direction if the portal opened." +L.Settings_Rockgrove_Bahsei_Portal_Number = "Flame-Herald Bahsei HM: Portal number (beta)" +L.Settings_Rockgrove_Bahsei_Portal_Number_TT = "Tells you the number of portal being opened." L.Settings_Rockgrove_Xalvakka_Unstable_Charge = "Xalvakka HM: Unstable charge (staying on blob)" L.Settings_Rockgrove_Xalvakka_Unstable_Charge_TT = "Alerts you when you're staying on blob. It's not healthy!" @@ -635,6 +637,7 @@ L.Alerts_Rockgrove_Embrace_Of_Death = "You're cursed by |c0A929BE L.Alerts_Rockgrove_Embrace_Of_Death_Other = "|cFF0000<>|r cursed by |c0A929BEmbrace of Death|r! Explosion in" L.Alerts_Rockgrove_Bahsei_Cone_Direction_Clockwise = "-> Move |cF48020clockwise|r ->" L.Alerts_Rockgrove_Bahsei_Cone_Direction_CounterCW = "<- Move |c15FFC2counterclockwise|r <-" +L.Alerts_Rockgrove_Bahsei_Portal_Number = "Portal #<<1>>" L.Alerts_Rockgrove_Xalvakka_Unstable_Charge = "Move away from |c008C22blob|r!"