Skip to content

Commit

Permalink
Update wipe checking for some old bosses
Browse files Browse the repository at this point in the history
  • Loading branch information
funkydude committed Sep 29, 2024
1 parent fd994bf commit aa59016
Show file tree
Hide file tree
Showing 18 changed files with 51 additions and 35 deletions.
4 changes: 2 additions & 2 deletions Cataclysm/ZulGurub/Zanzil.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ function mod:OnBossEnable()
self:Log("SPELL_AURA_APPLIED", "GraveyardGasCast", 96338)
self:Log("SPELL_AURA_REMOVED", "GraveyardGasCastOver", 96338)

self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckForEngage")
self:CheckForEngage()
self:Death("Win", 52053)
end

function mod:OnEngage()
self:RegisterEvent("PLAYER_REGEN_ENABLED", "CheckForWipe")
self:CheckForWipe()
end

-------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion MoP/MogushanPalace/Gekkan.lua
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function mod:OnEngage()
deaths = 0

self:UnregisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT") -- Reset fires after Gekkan dies, even if the encounter hasn't ended
self:RegisterEvent("PLAYER_REGEN_ENABLED", "CheckForWipe")
self:CheckForWipe()
end

--------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions TBC/AuchenaiCrypts/Maladaar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ function mod:OnBossEnable()
self:Log("SPELL_AURA_APPLIED", "StolenSoul", 32346)
self:Log("SPELL_CAST_SUCCESS", "SummonAvatar", 32424)

self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckForEngage")
self:CheckForEngage()
self:Death("Win", 18373)
end

function mod:OnEngage()
self:RegisterEvent("PLAYER_REGEN_ENABLED", "CheckForWipe")
self:CheckForWipe()
self:RegisterEvent("UNIT_HEALTH")
end

Expand Down
4 changes: 2 additions & 2 deletions TBC/HellfireRamparts/Vazruden.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ end
function mod:OnBossEnable()
self:RegisterEvent("CHAT_MSG_RAID_BOSS_EMOTE")

self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckForEngage")
self:CheckForEngage()
self:Death("Win", 17537)
end

function mod:OnEngage()
self:RegisterEvent("PLAYER_REGEN_ENABLED", "CheckForWipe")
self:CheckForWipe()
self:RegisterEvent("UNIT_HEALTH")
end

Expand Down
4 changes: 2 additions & 2 deletions TBC/MagistersTerrace/KaelthasSunstrider.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function mod:OnBossEnable()
self:Log("SPELL_AURA_APPLIED", "ShockBarrier", 46165)

if self:Classic() then
self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckForEngage")
self:CheckForEngage()
self:RegisterEvent("UNIT_HEALTH")
else
self:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT", "CheckBossStatus")
Expand All @@ -58,7 +58,7 @@ end
function mod:OnEngage()
self:UnregisterEvent("CHAT_MSG_MONSTER_YELL") -- if you engage him before killing the trash pack in front of him, he skips roleplaying
if self:Classic() then
self:RegisterEvent("PLAYER_REGEN_ENABLED", "CheckForWipe")
self:CheckForWipe()
end
if not self:Normal() then
self:CDBar(-5180, 60) -- Shock Barrier
Expand Down
4 changes: 2 additions & 2 deletions TBC/ShadowLabyrinth/Blackheart.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ end
function mod:OnBossEnable()
self:Log("SPELL_CAST_SUCCESS", "Chaos", 33676)

self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckForEngage")
self:CheckForEngage()
self:Death("Win", 18667)
end

function mod:OnEngage()
self:RegisterEvent("PLAYER_REGEN_ENABLED", "CheckForWipe")
self:CheckForWipe()
self:CDBar(33676, 15) -- Incite Chaos
end

Expand Down
4 changes: 2 additions & 2 deletions TBC/ShadowLabyrinth/Hellmaw.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ end
function mod:OnBossEnable()
self:Log("SPELL_CAST_SUCCESS", "Fear", 33547)

self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckForEngage")
self:CheckForEngage()
self:Death("Win", 18731)
end

function mod:OnEngage()
self:RegisterEvent("PLAYER_REGEN_ENABLED", "CheckForWipe")
self:CheckForWipe()
self:CDBar(33547, 15) -- Fear
if not self:Normal() then
self:Berserk(180)
Expand Down
4 changes: 2 additions & 2 deletions TBC/ShadowLabyrinth/Vorpil.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ function mod:OnBossEnable()
self:Log("SPELL_AURA_APPLIED", "Banish", 38791)
self:Log("SPELL_AURA_REMOVED", "BanishRemoved", 38791)

self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckForEngage")
self:CheckForEngage()
self:Death("Win", 18732)
end

function mod:OnEngage()
self:RegisterEvent("PLAYER_REGEN_ENABLED", "CheckForWipe")
self:CheckForWipe()
self:CDBar(-5267, 44) -- Draw Shadows
end

Expand Down
4 changes: 2 additions & 2 deletions TBC/TheMechanar/Capacitus.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ function mod:OnBossEnable()
self:Log("SPELL_CAST_START", "PolarityShift", 39096)
self:Log("SPELL_CAST_SUCCESS", "PolarityShiftSuccess", 39096)

self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckForEngage")
self:CheckForEngage()
self:Death("Win", 19219)
end

function mod:OnEngage()
self:RegisterEvent("PLAYER_REGEN_ENABLED", "CheckForWipe")
self:CheckForWipe()
if not self:Normal() then
self:Berserk(180)
end
Expand Down
4 changes: 2 additions & 2 deletions TBC/TheSlavePens/Rokmar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ function mod:OnBossEnable()
self:Log("SPELL_AURA_REMOVED", "EnsnaringMossRemoved", 31948)
self:Log("SPELL_AURA_APPLIED", "GrievousWound", 31956, 38801)

self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckForEngage")
self:CheckForEngage()
self:Death("Win", 17991)
end

function mod:OnEngage()
self:RegisterEvent("PLAYER_REGEN_ENABLED", "CheckForWipe")
self:CheckForWipe()
self:RegisterEvent("UNIT_HEALTH")
end

Expand Down
4 changes: 2 additions & 2 deletions TBC/TheUnderbog/Ghazan.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function mod:OnBossEnable()
self:Log("SPELL_AURA_APPLIED", "Enrage", 15716)

if self:Classic() then
self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckForEngage")
self:CheckForEngage()
self:RegisterEvent("UNIT_HEALTH")
else
self:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT", "CheckBossStatus")
Expand All @@ -42,7 +42,7 @@ end

function mod:OnEngage()
if self:Classic() then
self:RegisterEvent("PLAYER_REGEN_ENABLED", "CheckForWipe")
self:CheckForWipe()
end
end

Expand Down
4 changes: 2 additions & 2 deletions TBC/TheUnderbog/Hungarfen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function mod:OnBossEnable()
self:Log("SPELL_MISSED", "FoulSporesDamage", 31697)

if self:Classic() then
self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckForEngage")
self:CheckForEngage()
self:RegisterEvent("UNIT_HEALTH")
else
self:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT", "CheckBossStatus")
Expand All @@ -42,7 +42,7 @@ end

function mod:OnEngage()
if self:Classic() then
self:RegisterEvent("PLAYER_REGEN_ENABLED", "CheckForWipe")
self:CheckForWipe()
end
end

Expand Down
6 changes: 4 additions & 2 deletions WotLK/DrakTharonKeep/Trollgore.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ end

function mod:OnBossEnable()
if self:Classic() then
self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckForEngage")
self:RegisterEvent("PLAYER_REGEN_ENABLED", "CheckForWipe")
self:CheckForEngage()
else
self:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT", "CheckBossStatus")
end
Expand All @@ -37,6 +36,9 @@ function mod:OnBossEnable()
end

function mod:OnEngage()
if self:Classic() then
self:CheckForWipe()
end
self:CDBar(49639, 8.5) -- Crush
self:CDBar(59803, 15.6) -- Consume
self:CDBar(49637, 19.2) -- Infected Wound
Expand Down
9 changes: 7 additions & 2 deletions WotLK/HallsOfReflection/Marwyn.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,19 @@ function mod:OnBossEnable()
self:Log("SPELL_AURA_REMOVED", "CorruptedTouchRemoved", 72383)

if self:Classic() then
self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckForEngage")
self:RegisterEvent("PLAYER_REGEN_ENABLED", "CheckForWipe")
self:CheckForEngage()
else
self:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT", "CheckBossStatus")
end
self:Death("Win", 38113)
end

function mod:OnEngage()
if self:Classic() then
self:CheckForWipe()
end
end

-------------------------------------------------------------------------------
-- Event Handlers

Expand Down
4 changes: 2 additions & 2 deletions WotLK/TheVioletHold/Cyanigosa.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ function mod:OnBossEnable()
self:Log("SPELL_AURA_APPLIED", "ManaDestruction", 59374)
self:Log("SPELL_AURA_REMOVED", "ManaDestructionRemoved", 59374)

self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckForEngage")
self:CheckForEngage()
self:Death("Win", 31134)
end

function mod:OnEngage()
self:RegisterEvent("PLAYER_REGEN_ENABLED", "CheckForWipe")
self:CheckForWipe()

self:CDBar(58688, 7) -- Uncontrollable Energy
self:CDBar(58694, 26) -- Arcane Vacuum
Expand Down
9 changes: 7 additions & 2 deletions WotLK/TrialOfTheChampion/Eadric.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ end

function mod:OnBossEnable()
if self:Classic() then
self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckForEngage")
self:RegisterEvent("PLAYER_REGEN_ENABLED", "CheckForWipe")
self:CheckForEngage()
else
self:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT", "CheckBossStatus")
end
Expand All @@ -31,6 +30,12 @@ function mod:VerifyEnable(unit) -- becomes friendly after being defeated
return UnitCanAttack("player", unit)
end

function mod:OnEngage()
if self:Classic() then
self:CheckForWipe()
end
end

-------------------------------------------------------------------------------
-- Event Handlers

Expand Down
6 changes: 4 additions & 2 deletions WotLK/TrialOfTheChampion/Paletress.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ end

function mod:OnBossEnable()
if self:Classic() then
self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckForEngage")
self:RegisterEvent("PLAYER_REGEN_ENABLED", "CheckForWipe")
self:CheckForEngage()
else
self:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT", "CheckBossStatus")
end
Expand All @@ -60,6 +59,9 @@ end

function mod:OnEngage()
shielded = false
if self:Classic() then
self:CheckForWipe()
end
end

function mod:VerifyEnable(unit) -- becomes friendly after being defeated
Expand Down
6 changes: 4 additions & 2 deletions WotLK/UtgardeKeep/Ingvar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ end

function mod:OnBossEnable()
if self:Classic() then
self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckForEngage")
self:RegisterEvent("PLAYER_REGEN_ENABLED", "CheckForWipe")
self:CheckForEngage()
else
self:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT", "CheckBossStatus")
end
Expand All @@ -48,6 +47,9 @@ end

function mod:OnEngage()
deaths = 0
if self:Classic() then
self:CheckForWipe()
end
self:MessageOld("stages", "cyan", nil, CL.stage:format(1), false)
end

Expand Down

0 comments on commit aa59016

Please sign in to comment.