Skip to content

Commit

Permalink
Updates and cleanups for classic
Browse files Browse the repository at this point in the history
  • Loading branch information
funkydude committed Jul 30, 2024
1 parent 2a42878 commit 2ae7cbb
Show file tree
Hide file tree
Showing 13 changed files with 124 additions and 15 deletions.
12 changes: 8 additions & 4 deletions MoltenCore/BaronGeddon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,20 @@ do
playerList[#playerList+1] = args.destName
self:TargetsMessage(20475, "orange", playerList, args.spellId == 461090 and 2 or 3, CL.bomb)
self:CustomIcon(livingBombMarker, args.destName, icon)
icon = icon - 1
if self:Me(args.destGUID) then
self:Say(20475, CL.bomb, nil, "Bomb")
self:SayCountdown(20475, 8)
self:SayCountdown(20475, 8, icon)
self:TargetBar(20475, 8, args.destName, CL.bomb)
end
icon = icon - 1
end
end
end

function mod:LivingBombApplied(args)
if self:Me(args.destGUID) then
self:Say(20475, CL.bomb, nil, "Bomb")
self:SayCountdown(20475, 8)
self:SayCountdown(20475, 8, 8)
end
self:TargetMessage(20475, "red", args.destName, CL.bomb)
self:TargetBar(20475, 8, args.destName, CL.bomb)
Expand Down Expand Up @@ -130,7 +130,11 @@ function mod:ArmageddonSoD(args)
self:StopBar(19659) -- Ignite Mana
self:StopBar(19695) -- Inferno
self:CastBar(20478, 15, CL.explosion)
self:Message(20478, "orange", CL.percent:format(10, args.spellName))
if self:GetPlayerAura(458841) then -- Level 1
self:Message(20478, "orange", CL.percent:format(5, args.spellName))
else -- Level 2 & 3
self:Message(20478, "orange", CL.percent:format(10, args.spellName))
end
self:PlaySound(20478, "long")
end

Expand Down
2 changes: 2 additions & 0 deletions MoltenCore/Locales/deDE.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ if L then
L.emerge_desc = "Warnt, wenn Ragnaros auftaucht."
L.emerge_message = "Ragnaros aufgetaucht! Untertauchen in 3 min!"
L.emerge_bar = "Auftauchen"

L.son = "Sohn der Flamme" -- NPC ID 12143
end

L = BigWigs:NewBossLocale("The Molten Core", "deDE")
Expand Down
2 changes: 2 additions & 0 deletions MoltenCore/Locales/esES.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ if L then
L.emerge_desc = "Anuncia la emersión de Ragnaros."
L.emerge_message = "¡Ragnaros se emergió, 3 minutos hasta que se sumerge!"
L.emerge_bar = "Emersión"

L.son = "Hijo de la llama" -- NPC ID 12143
end

L = BigWigs:NewBossLocale("The Molten Core", "esES")
Expand Down
2 changes: 2 additions & 0 deletions MoltenCore/Locales/esMX.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ if L then
L.emerge_desc = "Anuncia la emersión de Ragnaros."
L.emerge_message = "¡Ragnaros se emergió, 3 minutos hasta que se sumerge!"
L.emerge_bar = "Emersión"

L.son = "Hijo de la llama" -- NPC ID 12143
end

L = BigWigs:NewBossLocale("The Molten Core", "esMX")
Expand Down
2 changes: 2 additions & 0 deletions MoltenCore/Locales/frFR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ if L then
L.emerge_desc = "Préviens quand Ragnaros émerge."
L.emerge_message = "Ragnaros en surface, 3 min. avant immersion !"
L.emerge_bar = "Retour de Ragnaros"

L.son = "Fils des flammes" -- NPC ID 12143
end

L = BigWigs:NewBossLocale("The Molten Core", "frFR")
Expand Down
2 changes: 2 additions & 0 deletions MoltenCore/Locales/itIT.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ if L then
--L.emerge_desc = "Warn for Ragnaros' emerge."
--L.emerge_message = "Ragnaros emerged, 3 mins until submerge!"
--L.emerge_bar = "Emerge"

L.son = "Figlio delle Fiamme" -- NPC ID 12143
end

L = BigWigs:NewBossLocale("The Molten Core", "itIT")
Expand Down
2 changes: 2 additions & 0 deletions MoltenCore/Locales/koKR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ if L then
L.emerge_desc = "라그나로스 등장에 대한 경고"
L.emerge_message = "라그나로스가 등장했습니다. 3분후 피조물 소환!"
L.emerge_bar = "라그나로스 등장"

L.son = "화염의 피조물" -- NPC ID 12143
end

L = BigWigs:NewBossLocale("The Molten Core", "koKR")
Expand Down
2 changes: 2 additions & 0 deletions MoltenCore/Locales/ptBR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ if L then
L.emerge_desc = "Aviso para a emersão de Ragnaros."
L.emerge_message = "Ragnaros emergiu, 3 minutos até a submersão!"
L.emerge_bar = "Emersão"

L.son = "Filho das Chamas" -- NPC ID 12143
end

L = BigWigs:NewBossLocale("The Molten Core", "ptBR")
Expand Down
2 changes: 2 additions & 0 deletions MoltenCore/Locales/ruRU.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ if L then
L.emerge_desc = "Предупреждать о всплытии Рагнароса"
L.emerge_message = "Рагнарос появился, 3 минуты до погружения!"
L.emerge_bar = "Рагнарос погрузился"

L.son = "Сын пламени" -- NPC ID 12143
end

L = BigWigs:NewBossLocale("The Molten Core", "ruRU")
Expand Down
2 changes: 2 additions & 0 deletions MoltenCore/Locales/zhCN.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ if L then
L.emerge_desc = "当拉格纳罗斯出现时发出警报。"
L.emerge_message = "拉格纳罗斯已经激活,3分钟后消失!"
L.emerge_bar = "出现"

L.son = "烈焰之子" -- NPC ID 12143
end

L = BigWigs:NewBossLocale("The Molten Core", "zhCN")
Expand Down
2 changes: 2 additions & 0 deletions MoltenCore/Locales/zhTW.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ if L then
L.emerge_desc = "當拉格納羅斯出現時發出警報。"
L.emerge_message = "拉格納羅斯已經進入戰鬥,3分鐘後消失!"
L.emerge_bar = "出現"

--L.son = "Son of Flame" -- NPC ID 12143
end

L = BigWigs:NewBossLocale("The Molten Core", "zhTW")
Expand Down
82 changes: 80 additions & 2 deletions MoltenCore/Ragnaros.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ local mod, CL = BigWigs:NewBoss("Ragnaros Classic", 409, 1528)
if not mod then return end
mod:RegisterEnableMob(
11502, -- Ragnaros
12143, -- Son of Flame
12018, -- Majordomo Executus
54404, -- Majordomo Executus (Retail)
228438, -- Ragnaros (Season of Discovery)
Expand All @@ -21,6 +22,10 @@ mod:SetStage(1)
local sonsDead = 0
local timer = nil
local warmupTimer = mod:Retail() and 74 or 84
local sonsTracker = {}
local sonsMarker = 8
local lineCount = 3
local UpdateInfoBoxList

--------------------------------------------------------------------------------
-- Localization
Expand All @@ -43,26 +48,36 @@ if L then
L.emerge_icon = "Achievement_boss_ragnaros"
L.emerge_message = "Ragnaros emerged, 3 mins until submerge!"
L.emerge_bar = "Emerge"

L.son = "Son of Flame" -- NPC ID 12143
end

--------------------------------------------------------------------------------
-- Initialization
--

local sonOfFlameMarker = mod:AddMarkerOption(true, "npc", 8, "son", 8, 7, 6, 5, 4, 3, 2, 1) -- Son of Flame
function mod:GetOptions()
return {
"warmup",
"submerge",
"emerge",
"adds",
sonOfFlameMarker,
{"health", "INFOBOX"},
20566, -- Wrath of Ragnaros
},nil,{
[20566] = CL.knockback, -- Wrath of Ragnaros (Knockback)
}
end

function mod:OnRegister()
-- Delayed for custom locale
sonOfFlameMarker = mod:AddMarkerOption(true, "npc", 8, "son", 8, 7, 6, 5, 4, 3, 2, 1) -- Son of Flame
end

function mod:VerifyEnable(unit, mobId)
if mobId == 11502 or mobId == 228438 then -- Ragnaros
if mobId == 11502 or mobId == 228438 or mobId == 12143 then -- Ragnaros, Ragnaros (Season of Discovery), Son of Flame
return true
else -- Majordomo Executus
return not UnitCanAttack(unit, "player")
Expand All @@ -84,6 +99,9 @@ end
function mod:OnEngage()
sonsDead = 0
timer = nil
sonsTracker = {}
sonsMarker = 8
lineCount = 3
self:SetStage(1)
self:CDBar(20566, 26, CL.knockback) -- Wrath of Ragnaros
if self:GetSeason() == 2 then
Expand Down Expand Up @@ -145,6 +163,7 @@ function mod:Emerge()
sonsDead = 10 -- Block this firing again if sons are killed after he emerges
timer = nil
self:SetStage(1)
self:CloseInfo("health")
self:CDBar(20566, 27, CL.knockback)
if self:GetSeason() == 2 then
self:Message("emerge", "yellow", L.emerge_bar, L.emerge_icon)
Expand All @@ -157,11 +176,25 @@ function mod:Emerge()
self:DelayedMessage("submerge", 170, "orange", CL.custom_sec:format(L.submerge, 10), false, "alarm")
self:DelayedMessage("submerge", 175, "orange", CL.custom_sec:format(L.submerge, 5), false, "alarm")
end
self:RemoveLog("SWING_DAMAGE", "*")
self:RemoveLog("RANGE_DAMAGE", "*")
self:RemoveLog("SPELL_DAMAGE", "*")
self:RemoveLog("SPELL_PERIODIC_DAMAGE", "*")
self:PlaySound("emerge", "long")
end

function mod:Submerge()
sonsDead = 0 -- reset counter
sonsTracker = {}
sonsMarker = 8
lineCount = 3
self:OpenInfo("health", CL.other:format("BigWigs", CL.health))
self:SetInfo("health", 1, L.son)
-- No SUMMON events unfortunately, using CLEU damage events so that everyone assigns markers in the same (combat log) order
self:Log("SWING_DAMAGE", "Damage", "*")
self:Log("RANGE_DAMAGE", "Damage", "*")
self:Log("SPELL_DAMAGE", "Damage", "*")
self:Log("SPELL_PERIODIC_DAMAGE", "Damage", "*")
self:SetStage(2)
timer = self:ScheduleTimer("Emerge", 90)
self:StopBar(CL.knockback)
Expand All @@ -175,13 +208,22 @@ function mod:Submerge()
self:DelayedMessage("emerge", 60, "yellow", CL.custom_sec:format(L.emerge, 30))
self:DelayedMessage("emerge", 80, "orange", CL.custom_sec:format(L.emerge, 10), false, "alarm")
self:DelayedMessage("emerge", 85, "orange", CL.custom_sec:format(L.emerge, 5), false, "alarm")
self:SimpleTimer(UpdateInfoBoxList, 1)
self:PlaySound("submerge", "long")
end

function mod:SonDeaths()
function mod:SonDeaths(args)
sonsDead = sonsDead + 1
if sonsDead < 9 then
self:Message("adds", "green", CL.add_killed:format(sonsDead, 8), "spell_fire_elemental_totem")
local tbl = sonsTracker[args.destGUID]
if tbl then
sonsTracker[args.destGUID] = nil
local line = tbl[1]
local marker = tbl[2]
local icon = self:GetIconTexture(marker)
self:SetInfo("health", line, ("%s %s"):format(icon, CL.dead))
end
end
if sonsDead == 8 then
self:CancelTimer(timer)
Expand All @@ -205,3 +247,39 @@ function mod:UNIT_HEALTH(event, unit)
end
end
end

function mod:Damage(args)
if not sonsTracker[args.destGUID] and self:MobId(args.destGUID) == 12143 then -- Son of Flame
sonsTracker[args.destGUID] = {lineCount, sonsMarker}
self:SetInfo("health", lineCount, ("%s 99%%"):format(self:GetIconTexture(sonsMarker)))
lineCount = lineCount + 1
sonsMarker = sonsMarker - 1
if sonsMarker == 0 then
self:RemoveLog("SWING_DAMAGE", "*")
self:RemoveLog("RANGE_DAMAGE", "*")
self:RemoveLog("SPELL_DAMAGE", "*")
self:RemoveLog("SPELL_PERIODIC_DAMAGE", "*")
end
end
end

function UpdateInfoBoxList()
if not mod:IsEngaged() or mod:GetStage() == 1 then return end
mod:SimpleTimer(UpdateInfoBoxList, 0.5)

for guid, tbl in next, sonsTracker do
local unitToken = tbl[3]
if not unitToken or mod:UnitGUID(unitToken) ~= guid then
unitToken = mod:GetUnitIdByGUID(guid)
tbl[3] = unitToken
end
if unitToken then
local line = tbl[1]
local marker = tbl[2]
local currentHealthPercent = math.floor(mod:GetHealth(unitToken))
local icon = mod:GetIconTexture(marker)
mod:SetInfo("health", line, ("%s %d%%"):format(icon, currentHealthPercent))
mod:CustomIcon(sonOfFlameMarker, unitToken, marker)
end
end
end
25 changes: 16 additions & 9 deletions MoltenCore/TheMoltenCore.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ function mod:OnBossEnable()
self:Log("SPELL_AURA_APPLIED", "FrigidCurrentApplied", 460899)
self:Log("SWING_DAMAGE", "SwingDamage", "*")
self:Log("SPELL_DAMAGE", "SpellDamage", "*")
self:Death("FirefighterDeaths", 228820)
end

function mod:OnEngage()
Expand Down Expand Up @@ -169,7 +170,7 @@ function mod:Doomsday(args)
end

function mod:FrigidCurrentApplied(args)
if self:MobId(args.sourceGUID) == 228820 and self:MobId(args.destGUID) == 227939 then
if self:MobId(args.sourceGUID) == 228820 and self:MobId(args.destGUID) == 227939 then -- Hydraxian Firefighter, The Molten Core
if not firefighters[args.sourceGUID] and lineCount < 10 then
firefighters[args.sourceGUID] = {lineCount, 77700}
self:SetInfo("health", 1, args.sourceName)
Expand All @@ -187,12 +188,10 @@ function mod:SwingDamage(args)
if tbl then
local line = tbl[1]
local hp = tbl[2]
local newHp = hp - args.spellId
local newHp = hp - args.spellId -- spellId = Damage the melee swing did
tbl[2] = newHp
local icon = self:GetIconTexture(self:GetIcon(args.destRaidFlags))
if icon then
self:SetInfo("health", line, icon)
end
self:SetInfo("health", line, icon or "")
local currentHealthPercent = math.floor((newHp / 77700) * 100)
self:SetInfoBar("health", line, currentHealthPercent/100)
self:SetInfo("health", line + 1, ("%d%%"):format(currentHealthPercent))
Expand All @@ -204,14 +203,22 @@ function mod:SpellDamage(args)
if tbl then
local line = tbl[1]
local hp = tbl[2]
local newHp = hp - args.extraSpellId
local newHp = hp - args.extraSpellId -- extraSpellId = Damage the spell did
tbl[2] = newHp
local icon = self:GetIconTexture(self:GetIcon(args.destRaidFlags))
if icon then
self:SetInfo("health", line, icon)
end
self:SetInfo("health", line, icon or "")
local currentHealthPercent = math.floor((newHp / 77700) * 100)
self:SetInfoBar("health", line, currentHealthPercent/100)
self:SetInfo("health", line + 1, ("%d%%"):format(currentHealthPercent))
end
end

function mod:FirefighterDeaths(args)
local tbl = firefighters[args.destGUID]
if tbl then
firefighters[args.destGUID] = nil
local line = tbl[1]
self:SetInfoBar("health", line, 0)
self:SetInfo("health", line + 1, CL.dead)
end
end

0 comments on commit 2ae7cbb

Please sign in to comment.