Skip to content

Commit

Permalink
Use :GetSeason() where appropriate
Browse files Browse the repository at this point in the history
  • Loading branch information
funkydude committed Jul 27, 2024
1 parent e693ca6 commit 1bf4423
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion MoltenCore/Gehennas.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ mod:SetEncounterID(665)

local L = mod:GetLocale()
if L then
L["19716_desc"] = BigWigsLoader.isSeasonOfDiscovery and 461232 or 19716
L["19716_desc"] = mod:GetSeason() == 2 and 461232 or 19716
end

--------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions MoltenCore/Magmadar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function mod:GetOptions()
}
end

if BigWigsLoader.isSeasonOfDiscovery then
if mod:GetSeason() == 2 then
function mod:GetOptions()
return {
19408, -- Panic
Expand All @@ -56,7 +56,7 @@ function mod:OnBossEnable()
self:Log("SPELL_DISPEL", "EnrageFrenzyDispelled", "*")
self:Log("SPELL_AURA_APPLIED", "ConflagrationApplied", 19428)
self:Log("SPELL_AURA_REFRESH", "ConflagrationApplied", 19428)
if BigWigsLoader.isSeasonOfDiscovery then
if self:GetSeason() == 2 then
self:Log("SPELL_CAST_SUCCESS", "Panic", 461125)
self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
self:RegisterMessage("BigWigs_BossComm")
Expand Down
4 changes: 2 additions & 2 deletions MoltenCore/Majordomo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function mod:GetOptions()
}
end

if BigWigsLoader.isSeasonOfDiscovery then
if mod:GetSeason() == 2 then
function mod:GetOptions()
return {
{20619, "CASTBAR"}, -- Magic Reflection
Expand All @@ -47,7 +47,7 @@ function mod:OnBossEnable()
self:Log("SPELL_CAST_SUCCESS", "MagicReflection", 20619)
self:Log("SPELL_CAST_SUCCESS", "DamageShield", 21075)
self:Log("SPELL_CAST_SUCCESS", "Teleport", 20534)
if BigWigsLoader.isSeasonOfDiscovery then
if self:GetSeason() == 2 then
self:Log("SPELL_CAST_START", "RagingFlareStart", 461056)
self:Log("SPELL_CAST_SUCCESS", "RagingFlare", 461056)
end
Expand Down
6 changes: 3 additions & 3 deletions MoltenCore/Ragnaros.lua
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function mod:OnEngage()
timer = nil
self:SetStage(1)
self:CDBar(20566, 26, CL.knockback) -- Wrath of Ragnaros
if BigWigsLoader.isSeasonOfDiscovery then
if self:GetSeason() == 2 then
self:RegisterEvent("UNIT_HEALTH")
else
self:Bar("submerge", 180, L.submerge_bar, L.submerge_icon)
Expand Down Expand Up @@ -146,7 +146,7 @@ function mod:Emerge()
self:SetStage(1)
self:CDBar(20566, 27, CL.knockback)
self:Message("emerge", "yellow", L.emerge_message, L.emerge_icon)
if not BigWigsLoader.isSeasonOfDiscovery then
if self:GetSeason() ~= 2 then
self:Bar("submerge", 180, L.submerge_bar, L.submerge_icon)
self:DelayedMessage("submerge", 60, "yellow", CL.custom_min:format(L.submerge, 2))
self:DelayedMessage("submerge", 120, "yellow", CL.custom_min:format(L.submerge, 1))
Expand All @@ -162,7 +162,7 @@ function mod:Submerge()
self:SetStage(2)
timer = self:ScheduleTimer("Emerge", 90)
self:StopBar(CL.knockback)
if BigWigsLoader.isSeasonOfDiscovery then
if self:GetSeason() == 2 then
self:Message("submerge", "yellow", CL.percent:format(50, L.submerge_message), L.submerge_icon)
else
self:Message("submerge", "yellow", L.submerge_message, L.submerge_icon)
Expand Down
12 changes: 6 additions & 6 deletions MoltenCore/Shazzrah.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function mod:GetOptions()
}
end

if BigWigsLoader.isSeasonOfDiscovery then
if mod:GetSeason() == 2 then
function mod:GetOptions()
return {
19714, -- Deaden Magic
Expand All @@ -44,7 +44,7 @@ function mod:OnBossEnable()
self:Log("SPELL_DISPEL", "MagicGroundingDeadenMagicDispelled", "*") -- Normal, Level 1 & 2
self:Log("SPELL_CAST_SUCCESS", "Counterspell", 19715)
self:Log("SPELL_CAST_SUCCESS", "ShazzrahsCurse", 19713) -- Normal, Level 1
if BigWigsLoader.isSeasonOfDiscovery then
if self:GetSeason() == 2 then
self:Log("SPELL_CAST_SUCCESS", "ShazzrahsCurse", 461343) -- Level 2 & 3
self:Log("SPELL_CAST_START", "ReflectMagic", 460856) -- Level 3
self:Log("SPELL_AURA_APPLIED", "ReflectMagicApplied", 460856) -- Level 3
Expand All @@ -55,7 +55,7 @@ end
function mod:OnEngage()
self:CDBar(19713, 6.4, CL.curse) -- Shazzrah's Curse
self:CDBar(19715, 9.7) -- Counterspell
self:CDBar(23138, BigWigsLoader.isSeasonOfDiscovery and 21 or 30, CL.teleport) -- Gate of Shazzrah
self:CDBar(23138, self:GetSeason() == 2 and 21 or 30, CL.teleport) -- Gate of Shazzrah
if self:GetPlayerAura(458842) or self:GetPlayerAura(458843) then -- Level 2 & 3 only
self:CDBar(460856, 16) -- Reflect Magic
end
Expand All @@ -66,7 +66,7 @@ end
--

function mod:GateOfShazzrah()
self:CDBar(23138, BigWigsLoader.isSeasonOfDiscovery and 21 or 41, CL.teleport) -- 21-30 on SoD, 41-50 elsewhere
self:CDBar(23138, self:GetSeason() == 2 and 21 or 41, CL.teleport) -- 21-30 on SoD, 41-50 elsewhere
self:Message(23138, "red", CL.teleport)
self:PlaySound(23138, "long")
end
Expand All @@ -85,13 +85,13 @@ function mod:MagicGroundingDeadenMagicDispelled(args)
end

function mod:Counterspell(args)
self:CDBar(args.spellId, BigWigsLoader.isSeasonOfDiscovery and 9.6 or 15) -- 9.6-12.9 on SoD, 15-19 elsewhere
self:CDBar(args.spellId, self:GetSeason() == 2 and 9.6 or 15) -- 9.6-12.9 on SoD, 15-19 elsewhere
self:Message(args.spellId, "yellow")
self:PlaySound(args.spellId, "info")
end

function mod:ShazzrahsCurse()
self:CDBar(19713, BigWigsLoader.isSeasonOfDiscovery and 16.2 or 22.6, CL.curse) -- 16.2-21 on SoD, 22.6-25 elsewhere
self:CDBar(19713, self:GetSeason() == 2 and 16.2 or 22.6, CL.curse) -- 16.2-21 on SoD, 22.6-25 elsewhere
self:Message(19713, "yellow", CL.curse)
if self:Dispeller("curse") then
self:PlaySound(19713, "warning")
Expand Down
6 changes: 3 additions & 3 deletions Onyxia_Classic/Onyxia.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function mod:GetOptions()
}
end

if BigWigsLoader.isSeasonOfDiscovery then
if mod:GetSeason() == 2 then
function mod:GetOptions()
return {
"stages",
Expand Down Expand Up @@ -78,7 +78,7 @@ function mod:OnBossEnable()
self:Log("SPELL_CAST_START", "Breath", 17086, 18351, 18564, 18576, 18584, 18596, 18609, 18617) -- Deep Breath (various directions)
self:Log("SPELL_CAST_START", "BellowingRoar", 18431)

if BigWigsLoader.isSeasonOfDiscovery then
if self:GetSeason() == 2 then
self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
self:RegisterMessage("BigWigs_BossComm")
end
Expand Down Expand Up @@ -162,7 +162,7 @@ function mod:CHAT_MSG_MONSTER_YELL(event, msg)
if msg:find(L.stage2_yell_trigger, nil, true) then
self:SetStage(2)
self:StopBar(CL.frontal_cone) -- Flame Breath
if BigWigsLoader.isSeasonOfDiscovery then
if self:GetSeason() == 2 then
self:Bar(17086, 28.5, L.deep_breath) -- Stage 2 "Deep Breath"
end
self:Message("stages", "cyan", CL.percent:format(65, CL.stage:format(2)), false)
Expand Down

0 comments on commit 1bf4423

Please sign in to comment.