Skip to content

Commit b59267c

Browse files
committed
add soulshriek timer and silent mode option
1 parent 5143726 commit b59267c

File tree

2 files changed

+30
-6
lines changed

2 files changed

+30
-6
lines changed

DBM-Core/DBM-Core.lua

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ DBM.DefaultOptions = {
135135
DontSendYells = false,
136136
DebugMode = false,
137137
DebugLevel = 1,
138+
SilentMode = false,
138139
-- HelpMessageShown = false,
139140
}
140141

@@ -1146,6 +1147,9 @@ SlashCmdList["DEADLYBOSSMODS"] = function(msg)
11461147
elseif cmd:sub(1, 5) == "debug" then
11471148
DBM.Options.DebugMode = DBM.Options.DebugMode == false and true or false
11481149
DBM:AddMsg("Debug Message is " .. (DBM.Options.DebugMode and "ON" or "OFF"))
1150+
elseif cmd:sub(1, 6) == "silent" then
1151+
DBM.Options.SilentMode = DBM.Options.SilentMode == false and true or false
1152+
DBM:AddMsg("Silent Mode is " .. (DBM.Options.SilentMode and "ON" or "OFF"), nil, true)
11491153
else
11501154
DBM:LoadGUI()
11511155
end
@@ -2989,14 +2993,17 @@ end
29892993
-----------------------
29902994
-- Misc. Functions --
29912995
-----------------------
2992-
function DBM:AddMsg(text, prefix)
2996+
function DBM:AddMsg(text, prefix, force)
29932997
local tag = prefix or (self.localization and self.localization.general.name) or "DBM"
29942998
local frame = _G[tostring(DBM.Options.ChatFrame)]
2999+
local force = force or false
29953000
frame = frame and frame:IsShown() and frame or DEFAULT_CHAT_FRAME
2996-
if prefix ~= false then
3001+
if prefix ~= false and not DBM.Options.SilentMode then
29973002
frame:AddMessage(("|cffff7d0a<|r|cffffd200%s|r|cffff7d0a>|r %s"):format(tostring(tag), tostring(text)), 0.41, 0.8, 0.94)
2998-
else
3003+
elseif not DBM.Options.SilentMode then
29993004
frame:AddMessage(text, 0.41, 0.8, 0.94)
3005+
elseif force then
3006+
frame:AddMessage(("|cffff7d0a<|r|cffffd200%s|r|cffff7d0a>|r %s"):format(tostring(tag), tostring(text)), 0.41, 0.8, 0.94)
30003007
end
30013008
end
30023009
AddMsg = DBM.AddMsg

DBM-Icecrown/TheFrozenThrone/LichKing.lua

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ mod:RegisterEvents(
1919
"CHAT_MSG_MONSTER_YELL",
2020
"UNIT_AURA",
2121
"UNIT_EXITING_VEHICLE",
22-
"UNIT_DIED"
22+
"UNIT_DIED",
23+
"UNIT_SPELLCAST_SUCCEEDED"
2324
)
2425

2526
local isPAL = select(2, UnitClass("player")) == "PALADIN"
@@ -81,6 +82,7 @@ local timerNecroticCleanse = mod:NewTimer(5, "TimerNecroticPlagueCleanse", 73912
8182
local timerNecroticPlagueCD = mod:NewNextTimer(30, 73912)
8283
local timerDefileCD = mod:NewNextTimer(32.5, 72762)
8384
local timerEnrageCD = mod:NewCDTimer(20, 72143, nil, true)
85+
local timerSoulShriekCD = mod:NewCDTimer(12, 69242, nil, true)
8486
local timerEnrageCDnext = mod:NewCDTimer(41, 72143, nil, true)
8587
local timerShamblingHorror = mod:NewNextTimer(60, 70372)
8688
local timerDrudgeGhouls = mod:NewNextTimer(20, 70358)
@@ -134,6 +136,8 @@ local plagueHop = GetSpellInfo(70338)--Hop spellID only, not cast one.
134136
local plagueExpires = {}
135137
local lastPlague
136138

139+
local soulshriek = GetSpellInfo(69242)
140+
137141
function mod:RestoreWipeTime(self)
138142
mod:SetWipeTime(5) --Restore it after frostmourn room.
139143
end
@@ -214,7 +218,7 @@ function mod:SPELL_CAST_START(args)
214218
if args:IsSpellID(68981, 74270, 74271, 74272) or args:IsSpellID(72259, 74273, 74274, 74275) then -- Remorseless Winter (phase transition start)
215219
warnRemorselessWinter:Show()
216220
timerPhaseTransition:Start()
217-
timerRagingSpiritCD:Start(4)
221+
timerRagingSpiritCD:Start(3.5)
218222
warnShamblingSoon:Cancel()
219223
timerShamblingHorror:Cancel()
220224
timerDrudgeGhouls:Cancel()
@@ -317,6 +321,7 @@ function mod:SPELL_CAST_SUCCESS(args)
317321
end
318322
elseif args:IsSpellID(69200) then -- Raging Spirit
319323
warnRagingSpirit:Show(args.destName)
324+
timerSoulShriekCD:Start(20, args.destName)
320325
if args:IsPlayer() then
321326
specWarnRagingSpirit:Show()
322327
end
@@ -349,6 +354,8 @@ function mod:SPELL_CAST_SUCCESS(args)
349354
warnDefileSoon:Cancel()
350355
mod:SetWipeTime(50)--We set a 45 sec min wipe time to keep mod from ending combat if you die while rest of raid is in frostmourn
351356
self:ScheduleMethod(50, "RestoreWipeTime")
357+
elseif args:IsSpellID(69242) then -- Soul Shriek Raging spirits
358+
timerSoulShriekCD:Start(args.sourceGUID)
352359
end
353360
end
354361

@@ -494,6 +501,8 @@ function mod:UNIT_DIED(args)
494501
if cid == 37698 then--Shambling Horror
495502
timerEnrageCD:Cancel(args.sourceGUID)
496503
timerEnrageCDnext:Cancel(args.sourceGUID)
504+
elseif cid == 36701 then
505+
timerSoulShriekCD:Cancel(args.sourceGUID)
497506
end
498507
end
499508

@@ -566,12 +575,20 @@ function mod:UNIT_AURA(uId)
566575
end
567576
end
568577

578+
function mod:UNIT_SPELLCAST_SUCCEEDED(uId, spellName)
579+
if spellName == soulshriek and mod:LatencyCheck() then
580+
self:SendSync("SoulShriek", UnitGUID(uId))
581+
end
582+
end
583+
569584
function mod:UNIT_EXITING_VEHICLE(uId)
570585
mod:RemoveEntry(UnitName(uId))
571586
end
572587

573588
function mod:OnSync(msg, target)
574-
if msg == "PALGrabbed" then--Does this function fail to alert second healer if 2 different paladins are grabbed within < 2.5 seconds?
589+
if msg == "SoulShriek" and self:AntiSpam(1, target) then
590+
timerSoulShriekCD:Start(target)
591+
elseif msg == "PALGrabbed" then--Does this function fail to alert second healer if 2 different paladins are grabbed within < 2.5 seconds?
575592
if self.Options.specWarnHealerGrabbed then
576593
specWarnPALGrabbed:Show(target)
577594
end

0 commit comments

Comments
 (0)