Skip to content

Commit

Permalink
[RG] Added alert about Unstable Charge (staying on blob) at Xalvakka HM
Browse files Browse the repository at this point in the history
  • Loading branch information
MysteryDragon committed Mar 2, 2024
1 parent 5bbe71f commit bfc7fa4
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 4 deletions.
2 changes: 2 additions & 0 deletions BuffsDebuffs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,8 @@ rockgrove.bahsei_death_touch = 150078
rockgrove.bahsei_creeping_eye_clockwise = 153517
-- Creeping Eye effect on Flame-Herald Bahsei's fight that indicated counterclockwise cone direction
rockgrove.bahsei_creeping_eye_countercw = 153518
-- Unstable Charge - applies when player stands on blob during Xalvakka HM fight
rockgrove.xalvakka_unstable_charge = 153164

RaidNotifier.BuffsDebuffs[RAID_ROCKGROVE] = rockgrove

Expand Down
13 changes: 13 additions & 0 deletions RaidNotifier.lua
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,8 @@ do ----------------------
local combatEventCallback = trial.OnCombatEvent
local bossesChangedCallback = trial.OnBossesChanged
local effectChangedCallback = trial.OnEffectChanged
local effectChangedForGroupCallback = trial.OnEffectChangedForGroup
local effectChangedForPlayerCallback = trial.OnEffectChangedForPlayer
combatStateChangedCallback = trial.OnCombatStateChanged

local abilityList = {}
Expand Down Expand Up @@ -692,6 +694,17 @@ do ----------------------
EVENT_MANAGER:AddFilterForEvent(self.Name, EVENT_EFFECT_CHANGED, REGISTER_FILTER_UNIT_TAG_PREFIX, "group")
end
end

if (effectChangedForGroupCallback) then
EVENT_MANAGER:RegisterForEvent(self.Name.."_EffectChangedGroup", EVENT_EFFECT_CHANGED, effectChangedForGroupCallback)
EVENT_MANAGER:AddFilterForEvent(self.Name.."_EffectChangedGroup", EVENT_EFFECT_CHANGED, REGISTER_FILTER_UNIT_TAG_PREFIX, "group")
end

if (effectChangedForPlayerCallback) then
EVENT_MANAGER:RegisterForEvent(self.Name.."_EffectChangedPlayer", EVENT_EFFECT_CHANGED, effectChangedForPlayerCallback)
EVENT_MANAGER:AddFilterForEvent(self.Name.."_EffectChangedPlayer", EVENT_EFFECT_CHANGED, REGISTER_FILTER_UNIT_TAG, "player")
end

if (bossesChangedCallback) then
EVENT_MANAGER:RegisterForEvent(self.Name, EVENT_BOSSES_CHANGED, bossesChangedCallback)
end
Expand Down
6 changes: 6 additions & 0 deletions Settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ do ------------------
oaxiltso_annihilator_cinder_cleave = 0, -- "Off"
bahsei_embrace_of_death = 0, -- "Off"
bahsei_cone_direction = false,
xalvakka_unstable_charge = false,
},
dreadsailReef = {
dome_type = 3, -- "All"
Expand Down Expand Up @@ -1746,6 +1747,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_Xalvakka_Unstable_Charge,
tooltip = L.Settings_Rockgrove_Xalvakka_Unstable_Charge_TT,
}, "rockgrove", "xalvakka_unstable_charge")
subTable = nil --end submenu

-- Dreadsail Reef
Expand Down
28 changes: 24 additions & 4 deletions TrialRockgrove.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ function RaidNotifier.RG.Initialize()
data = {}
end

function RaidNotifier.RG.OnEffectChanged(eventCode, changeType, eSlot, eName, uTag, beginTime, endTime, stackCount, iconName, buffType, eType, aType, statusEffectType, uName, uId, abilityId, uType)
function RaidNotifier.RG.OnEffectChangedForGroup(eventCode, changeType, eSlot, eName, uTag, beginTime, endTime, stackCount, iconName, buffType, eType, aType, statusEffectType, uName, uId, abilityId, uType)
local raidId = RaidNotifier.raidId
local self = RaidNotifier

local buffsDebuffs, settings = self.BuffsDebuffs[raidId], self.Vars.rockgrove

if (string.sub(uTag, 1, 5) ~= "group") then return end

-- Prime Meteor
if (buffsDebuffs.meteor_radiating_heat[abilityId] and string.sub(uTag, 1, 5) == "group") then
if (buffsDebuffs.meteor_radiating_heat[abilityId]) then
if (settings.prime_meteor) then
if (changeType == EFFECT_RESULT_GAINED) then
if (AreUnitsEqual(uTag, "player")) then
Expand All @@ -31,7 +33,7 @@ function RaidNotifier.RG.OnEffectChanged(eventCode, changeType, eSlot, eName, uT
end
end
-- Oaxiltso's Noxious Sludge
elseif (abilityId == buffsDebuffs.oaxiltso_noxious_sludge and string.sub(uTag, 1, 5) == "group") then
elseif (abilityId == buffsDebuffs.oaxiltso_noxious_sludge) then
if (changeType == EFFECT_RESULT_GAINED) then
if (settings.oaxiltso_noxious_sludge == 1 and AreUnitsEqual(uTag, "player")) then
self:AddAnnouncement(GetString(RAIDNOTIFIER_ALERTS_ROCKGROVE_NOXIOUS_SLUDGE_SELF), "rockgrove", "oaxiltso_noxious_sludge")
Expand All @@ -55,7 +57,7 @@ function RaidNotifier.RG.OnEffectChanged(eventCode, changeType, eSlot, eName, uT
end
end
-- Flame-Herald Bahsei's Embrace of Death (Death Touch debuff)
elseif (abilityId == buffsDebuffs.bahsei_death_touch and string.sub(uTag, 1, 5) == "group") then
elseif (abilityId == buffsDebuffs.bahsei_death_touch) then
if (changeType == EFFECT_RESULT_GAINED) then
if (settings.bahsei_embrace_of_death >= 1 and AreUnitsEqual(uTag, "player")) then
self:StartCountdown(8000, GetString(RAIDNOTIFIER_ALERTS_ROCKGROVE_EMBRACE_OF_DEATH), "rockgrove", "bahsei_embrace_of_death", true)
Expand All @@ -68,6 +70,24 @@ function RaidNotifier.RG.OnEffectChanged(eventCode, changeType, eSlot, eName, uT
end
end

function RaidNotifier.RG.OnEffectChangedForPlayer(eventCode, changeType, eSlot, eName, uTag, beginTime, endTime, stackCount, iconName, buffType, eType, aType, statusEffectType, uName, uId, abilityId, uType)
local raidId = RaidNotifier.raidId
local self = RaidNotifier

local buffsDebuffs, settings = self.BuffsDebuffs[raidId], self.Vars.rockgrove

if (uTag ~= "player") then return end

if (abilityId == buffsDebuffs.xalvakka_unstable_charge and settings.xalvakka_unstable_charge) then
if (changeType == EFFECT_RESULT_GAINED) then
self:AddAnnouncement(GetString(RAIDNOTIFIER_ALERTS_ROCKGROVE_XALVAKKA_UNSTABLE_CHARGE), "rockgrove", "xalvakka_unstable_charge")
self:UpdateXalvakkaUnstableCharge(true)
elseif (changeType == EFFECT_RESULT_FADED) then
self:UpdateXalvakkaUnstableCharge(false)
end
end
end

function RaidNotifier.RG.OnCombatEvent(_, result, isError, aName, aGraphic, aActionSlotType, sName, sType, tName, tType, hitValue, pType, dType, log, sUnitId, tUnitId, abilityId)
local raidId = RaidNotifier.raidId
local self = RaidNotifier
Expand Down
30 changes: 30 additions & 0 deletions UI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,34 @@ do -------------------
end
end

function RaidNotifier:UpdateXalvakkaUnstableCharge(active)
local settings = self.Vars.rockgrove
if not settings.xalvakka_unstable_charge then return end

if not display then return end

if owner ~= "rg_xalvakka_unstable_charge" then
owner = "rg_xalvakka_unstable_charge"
display:SetTexture([[RaidNotifier/assets/green_alert_sign.dds]])
display.timer:SetHidden(true)
display.label:SetHidden(true)
end

local currentTime = GetGameTimeMillis() / 1000

if active then
iconTimer:Start(currentTime, currentTime+3600, 0.5) -- just for making it 'active'
display.flashTimeline:PlayFromStart()
else
iconTimer:Start(currentTime, currentTime, 0.5) -- finish time doesn't matter
iconTimer:SetExpired() -- start fading
if display.flashTimeline:IsPlaying() then
display.flashTimeline:PlayInstantlyToEnd()
display.flashTimeline:Stop()
end
end
end

SLASH_COMMANDS["/rnstatus"] = function(status)
local currentTime = GetGameTimeMillis() / 1000
if status == "scalded" then
Expand All @@ -495,6 +523,8 @@ do -------------------
RaidNotifier:UpdateSphereVenom(true, currentTime, currentTime + 8.3)
elseif status == "troll" then
RaidNotifier:UpdateSpreadingPoison(true, currentTime, currentTime + 10)
elseif status == "unstable_charge" then
RaidNotifier:UpdateXalvakkaUnstableCharge(true)
else
RaidNotifier:UpdateTwinAspect(status)
end
Expand Down
Binary file added assets/green_alert_sign.dds
Binary file not shown.
3 changes: 3 additions & 0 deletions lang/en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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_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!"

-- Alerts
L.Alerts_Rockgrove_Sundering_Strike = "Incoming |cCDCDCDSundering Strike|r on you!"
Expand All @@ -633,6 +635,7 @@ L.Alerts_Rockgrove_Embrace_Of_Death = "You're cursed by |c0A929BE
L.Alerts_Rockgrove_Embrace_Of_Death_Other = "|cFF0000<<!aC:1>>|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_Xalvakka_Unstable_Charge = "Move away from |c008C22blob|r!"


--------------------------------
Expand Down

0 comments on commit bfc7fa4

Please sign in to comment.