Update to 5.21 Sunwell (#6)

* 5.20

* Update to 5.21

---------

Co-authored-by: Szyler <Szyler@Szyler.com>
This commit is contained in:
Szyler
2024-10-01 05:09:41 +02:00
committed by GitHub
parent 5b5fee4a2d
commit 82a9ac0937
36 changed files with 3003 additions and 833 deletions
+83 -59
View File
@@ -20,42 +20,42 @@ mod:RegisterEvents(
"SPELL_MISSED"
)
local WarnInfernal = mod:NewSpellAnnounce(30511, 2)
local WarnHeal = mod:NewCastAnnounce(30528, 2, nil, false)
local WarnNova = mod:NewSpellAnnounce(30616, 2)
local specWarnNova = mod:NewSpecialWarning("Pre-Quake Blast Nova in 10 seconds!")
local WarnQuake = mod:NewSpellAnnounce(85026, 2)
local specWarnDebris = mod:NewSpecialWarningYou(85030)
local specWarnConflag = mod:NewSpecialWarningYou(351085)
local warnMortalCleave = mod:NewAnnounce(L.MagCleave, 2, 85178)
local warnInterrupt = mod:NewAnnounce("Magtheridon interrupted", 3, "Interface\\Icons\\ability_kick")
local warnPhaseTwo = mod:NewAnnounce("Magtheridon is free!", 3, "Interface\\Icons\\Achievement_Boss_Magtheridon")
local warnPhaseThree = mod:NewAnnounce("Phase 3", 3, "Interface\\Icons\\Achievement_Boss_Magtheridon")
local WarnInfernal = mod:NewSpellAnnounce(2132327, 2)
local WarnHeal = mod:NewCastAnnounce(30528, 2, nil, false)
local WarnNova = mod:NewSpellAnnounce(2132301, 2)
local specWarnNova = mod:NewSpecialWarning("Pre-Quake Blast Nova in 10 seconds!")
local WarnQuake = mod:NewSpellAnnounce(2132310, 2)
local specWarnDebris = mod:NewSpecialWarningYou(85030)
local specWarnConflag = mod:NewSpecialWarningYou(2132315)
local warnGlaiveCleave = mod:NewAnnounce(L.MagCleave, 2, 2132300)
local warnInterrupt = mod:NewAnnounce("Magtheridon interrupted", 3, "Interface\\Icons\\ability_kick")
local warnPhaseTwo = mod:NewAnnounce("Magtheridon is free!", 3, "Interface\\Icons\\Achievement_Boss_Magtheridon")
local warnPhaseThree = mod:NewAnnounce("Phase 3", 3, "Interface\\Icons\\Achievement_Boss_Magtheridon")
local timerQuake = mod:NewNextTimer(60, 85026)
local timerSpecialNova = mod:NewTimer(55, "!!Pre-Quake Blast Nova!!", 30616, 3)
local Nova = 1;
local timerNova = mod:NewTimer(55, "Blast Nova #%s", 30616)
local timerPhaseTwo = mod:NewPhaseTimer(120, 30205, "Magtheridon breaks free")
local timerFallingRoof = mod:NewTimer(10, "Roof is collapsing!")
local timerNextQuake = mod:NewNextTimer(60, 2132310)
local timerNextSpecialNova = mod:NewTimer(55, "!!Pre-Quake Blast Nova!!", 2132301, 3)
local timerNextNova = mod:NewTimer(55, "Blast Nova #%s", 2132301)
local timerPhaseTwo = mod:NewPhaseTimer(120, 30205, "Magtheridon breaks free")
local timerFallingRoof = mod:NewTimer(10, "Roof is collapsing!")
--Heroic
-- local AnnounceHandofDeath = mod:NewTargetAnnounce(85437,2)
local specWarnYouHand = mod:NewSpecialWarningYou(85437)
local warnHandofDeath = mod:NewTargetAnnounce(85437, 3.8)
local timerHandofDeath = mod:NewTargetTimer(4, 85437)
local timerNextHandofDeath = mod:NewNextTimer(30, 85437)
-- local AnnounceHandofDeath = mod:NewTargetAnnounce(2132323,2)
local specWarnYouHand = mod:NewSpecialWarningYou(2132323)
local warnHandofDeath = mod:NewTargetAnnounce(2132323, 3.8)
local timerHandofDeath = mod:NewTargetTimer(4, 2132323)
local timerNextHandofDeath = mod:NewNextTimer(30, 2132323)
-- local AnnounceFingerofDeath = mod:NewTargetAnnounce(85408,2)
local specWarnYouFinger = mod:NewSpecialWarningYou(85408)
local warnFingerofDeath = mod:NewTargetAnnounce(85408, 3.8)
local timerFingerofDeath = mod:NewTargetTimer(4, 85408)
local timerNextFingerofDeath = mod:NewNextTimer(30, 85408)
-- local AnnounceFingerofDeath = mod:NewTargetAnnounce(2132319,2)
local specWarnYouFinger = mod:NewSpecialWarningYou(2132319)
local warnFingerofDeath = mod:NewTargetAnnounce(2132319, 3.8)
local timerFingerofDeath = mod:NewTargetTimer(4, 2132319)
local timerNextFingerofDeath = mod:NewNextTimer(30, 2132319)
local specWarnYouFelShock = mod:NewSpecialWarningYou(85407)
local timerNextFelShock = mod:NewNextTimer(11, 85407)
local specWarnYouFelShock = mod:NewSpecialWarningYou(2132333)
local timerNextFelShock = mod:NewNextTimer(11, 2132333)
-- local
local Nova = 1;
local isMag = false;
local below30 = false;
local deathAbility = 0;
@@ -110,25 +110,25 @@ function mod:NextHandofDeath()
end
function mod:OnCombatEnd()
timerQuake:Cancel()
timerSpecialNova:Cancel()
timerNova:Cancel()
timerNextQuake:Cancel()
timerNextSpecialNova:Cancel()
timerNextNova:Cancel()
end
function mod:SPELL_AURA_APPLIED(args)
if args:IsSpellID(85030) and args:IsPlayer() then
specWarnDebris:Show()
elseif args:IsSpellID(30168) then
elseif args:IsSpellID(2132337) then
warnInterrupt:Show()
elseif args:IsSpellID(85405) then
elseif args:IsSpellID(2132331) then
if args:IsPlayer() then
-- SendChatMessage("Fel Shock on "..UnitName("PLAYER")..", STACK ON ME!", "YELL")
specWarnYouFelShock:Show()
end
timerNextFelShock:Start()
elseif args:IsSpellID(30619) then
warnMortalCleave:Show(args.spellName, args.destName, args.amount or 1)
elseif args:IsSpellID(351085) then
elseif args:IsSpellID(2132300) then
warnGlaiveCleave:Show(args.spellName, args.destName, args.amount or 1)
elseif args:IsSpellID(2132315, 2132316, 2132317, 2132318) then
if args:IsPlayer() then
specWarnConflag:Show()
end
@@ -136,9 +136,9 @@ function mod:SPELL_AURA_APPLIED(args)
end
function mod:SPELL_AURA_APPLIED_DOSE(args)
if args:IsSpellID(30619) and args.amount >= 4 then
warnMortalCleave:Show(args.spellName, args.destName, args.amount or 1)
elseif args:IsSpellID(351085) then
if args:IsSpellID(2132300) and args.amount >= 4 then
warnGlaiveCleave:Show(args.spellName, args.destName, args.amount or 1)
elseif args:IsSpellID(2132315) then
if args:IsPlayer() then
specWarnConflag:Show()
end
@@ -180,8 +180,8 @@ end
function mod:CHAT_MSG_MONSTER_YELL(msg)
if msg == L.DBM_MAG_YELL_PHASE2 and self.vb.phase == 1 then
timerQuake:Cancel()
timerNova:Cancel()
timerNextQuake:Cancel()
timerNextNova:Cancel()
if mod:IsDifficulty("heroic10", "heroic25") then
timerNextFingerofDeath:Start(21)
timerNextHandofDeath:Start(36)
@@ -189,8 +189,8 @@ function mod:CHAT_MSG_MONSTER_YELL(msg)
self:ScheduleMethod(36,"NextHandofDeath");
end
timerPhaseTwo:Cancel()
timerQuake:Start(41)
timerNova:Start(66, tostring(Nova))
timerNextQuake:Start(41)
timerNextNova:Start(66, tostring(Nova))
below30 = false;
isMag = true;
self.vb.phase = 2
@@ -222,25 +222,49 @@ end
function mod:SPELL_CAST_START(args)
if args:IsSpellID(30528) then
WarnHeal:Show()
elseif args:IsSpellID(85026) then
elseif args:IsSpellID(2132310) then
WarnQuake:Show()
timerQuake:Start()
elseif args:IsSpellID(30616) then
timerNextQuake:Start()
local elapsedHand, totalHand = timerNextHandofDeath:GetTime()
local remainingTimerNextHand = totalHand - elapsedHand
local elapsedFinger, totalFinger = timerNextFingerofDeath:GetTime()
local remainingTimerNextFinger = totalFinger - elapsedFinger
if math.min(remainingTimerNextFinger, remainingTimerNextHand) - 7 < 0 then
if remainingTimerNextFinger < remainingTimerNextHand then
timerNextFingerofDeath:AddTime(7)
else
timerNextHandofDeath:AddTime(7)
end
end
elseif args:IsSpellID(2132301) then
Nova = Nova + 1;
WarnNova:Show()
if Nova >= 7 then
timerSpecialNova:Start()
timerNextSpecialNova:Start()
specWarnNova:Schedule(45)
else
timerNova:Start(55, tostring(Nova))
timerNextNova:Start(55, tostring(Nova))
local elapsedHand, totalHand = timerNextHandofDeath:GetTime()
local remainingTimerNextHand = totalHand - elapsedHand
local elapsedFinger, totalFinger = timerNextFingerofDeath:GetTime()
local remainingTimerNextFinger = totalFinger - elapsedFinger
if math.min(remainingTimerNextFinger, remainingTimerNextHand) - 7 < 0 then
if remainingTimerNextFinger < remainingTimerNextHand then
timerNextFingerofDeath:AddTime(3)
else
timerNextHandofDeath:AddTime(3)
end
end
end
end
if args:IsSpellID(85437, 85409) then
if args:IsSpellID(2132323, 2132324, 2132325, 2132326) then
self:ScheduleMethod(0.2, "HandofDeath")
elseif args:IsSpellID(85408) then
elseif args:IsSpellID(2132319, 2132320, 2132321, 2132322) then
self:ScheduleMethod(0.2, "FingerofDeath")
end
end
end
@@ -252,7 +276,7 @@ function mod:SPELL_SUMMON(args)
end
function mod:SPELL_CAST_SUCCESS(args)
if args:IsSpellID(30511) then
if args:IsSpellID(2132327, 2132328, 2132329, 2132330) then
WarnInfernal:Show()
end
end
@@ -275,14 +299,14 @@ function mod:UNIT_HEALTH(unit)
local hp = (math.max(0,UnitHealth(unit)) / math.max(1, UnitHealthMax(unit))) * 100;
if (hp <= 30) then
self.vb.phase = 3
local elapsed, total = timerQuake:GetTime();
timerQuake:Update(elapsed, total+12);
local elapsed, total = timerNextQuake:GetTime();
timerNextQuake:Update(elapsed, total+12);
if Nova >= 7 then
local elapsed, total = timerSpecialNova:GetTime();
timerSpecialNova:Update(elapsed, total+12);
local elapsed, total = timerNextSpecialNova:GetTime();
timerNextSpecialNova:Update(elapsed, total+12);
else
local elapsed, total = timerNova:GetTime(tostring(Nova));
timerNova:Update(elapsed, total+12, tostring(Nova));
local elapsed, total = timerNextNova:GetTime(tostring(Nova));
timerNextNova:Update(elapsed, total+12, tostring(Nova));
end
below30 = true;
end