Skip to content

Commit

Permalink
Fix a few shadowlands errors
Browse files Browse the repository at this point in the history
  • Loading branch information
MysticalOS committed Apr 22, 2024
1 parent 6bbd674 commit 3906008
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 23 deletions.
2 changes: 1 addition & 1 deletion DBM-Raids-Shadowlands/CastleNathria/ArtificerXyMox.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ local warnPhase = mod:NewPhaseChangeAnnounce(2, nil, nil, nil, nil, nil
local warnDimensionalTear = mod:NewTargetNoFilterAnnounce(328437, 3, nil, nil, 327770)
local warnHyperlightSpark = mod:NewCountAnnounce(325399, 2, nil, false, 2)

local specWarnDimensionalTear = mod:NewSpecialWarningYouPos(328437, 327770, nil, nil, 1, 2)
local specWarnDimensionalTear = mod:NewSpecialWarningYouPos(328437, nil, 327770, nil, 1, 2)
local yellDimensionalTear = mod:NewPosYell(328437, 327770)
local yellDimensionalTearFades = mod:NewIconFadesYell(328437, 327770)
local specWarnGlyphofDestruction = mod:NewSpecialWarningMoveAwayCount(325361, nil, nil, nil, 1, 2)
Expand Down
32 changes: 19 additions & 13 deletions DBM-Raids-Shadowlands/CastleNathria/HungeringDestroyer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -111,26 +111,30 @@ do
if mod.Options.ShowTimeNotStacks then
--Higher Performance check that scans all debuff remaining times
for uId in DBM:GetGroupMembers() do
if not (UnitGroupRolesAssigned(uId) == "TANK" or GetPartyAssignment("MAINTANK", uId, 1) or UnitIsDeadOrGhost(uId)) then--Exclude tanks and dead
if not (UnitGroupRolesAssigned(uId) == "TANK" or GetPartyAssignment("MAINTANK", uId, true) or UnitIsDeadOrGhost(uId)) then--Exclude tanks and dead
local unitName = DBM:GetUnitFullName(uId)
local spellName3, _, _, _, _, expireTime3 = DBM:UnitDebuff(uId, 334755)
if spellName3 and expireTime3 then
tempLines[unitName] = mfloor(expireTime3-GetTime())
tempLinesSorted[#tempLinesSorted + 1] = unitName
else
tempLines[unitName] = 0
tempLinesSorted[#tempLinesSorted + 1] = unitName
if unitName then
local spellName3, _, _, _, _, expireTime3 = DBM:UnitDebuff(uId, 334755)
if spellName3 and expireTime3 then
tempLines[unitName] = mfloor(expireTime3-GetTime())
tempLinesSorted[#tempLinesSorted + 1] = unitName
else
tempLines[unitName] = 0
tempLinesSorted[#tempLinesSorted + 1] = unitName
end
end
end
end
else
--More performance friendly check that just returns all player stacks (the default option)
for uId in DBM:GetGroupMembers() do
local _, _, _, mapId = UnitPosition(uId)
if not (UnitGroupRolesAssigned(uId) == "TANK" or GetPartyAssignment("MAINTANK", uId, 1) or UnitIsDeadOrGhost(uId)) and mapId == 2296 then--Exclude tanks and dead and people not in zone
if not (UnitGroupRolesAssigned(uId) == "TANK" or GetPartyAssignment("MAINTANK", uId, true) or UnitIsDeadOrGhost(uId)) and mapId == 2296 then--Exclude tanks and dead and people not in zone
local unitName = DBM:GetUnitFullName(uId)
tempLines[unitName] = essenceSapStacks[unitName] or 0
tempLinesSorted[#tempLinesSorted + 1] = unitName
if unitName then
tempLines[unitName] = essenceSapStacks[unitName] or 0
tempLinesSorted[#tempLinesSorted + 1] = unitName
end
end
end
end
Expand Down Expand Up @@ -187,7 +191,9 @@ function mod:OnCombatStart(delay)
if self:IsMythic() then
for uId in DBM:GetGroupMembers() do
local unitName = DBM:GetUnitFullName(uId)
essenceSapStacks[unitName] = 0
if unitName then
essenceSapStacks[unitName] = 0
end
end
if self.Options.InfoFrame then
DBM.InfoFrame:SetHeader(OVERVIEW)
Expand All @@ -199,7 +205,7 @@ end
function mod:OnTimerRecovery()
for uId in DBM:GetGroupMembers() do
local unitName = DBM:GetUnitFullName(uId)
if self:IsMythic() then
if unitName and self:IsMythic() then
local _, _, currentStack = DBM:UnitDebuff(uId, 329298)
essenceSapStacks[unitName] = currentStack or 0
if UnitIsUnit(uId, "player") and currentStack then
Expand Down
1 change: 1 addition & 0 deletions DBM-Raids-Shadowlands/CastleNathria/Sludgefist.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---@diagnostic disable: cast-local-type
local mod = DBM:NewMod(2394, "DBM-Raids-Shadowlands", 3, 1190)
local L = mod:GetLocalizedStrings()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ mod:RegisterCombat("combat")

mod:RegisterEventsInCombat(
"SPELL_CAST_START 351680 350554 350421 353426 350169 354367 354265 357144 353603",
"SPELL_CAST_SUCCESS 350355",
-- "SPELL_CAST_SUCCESS 350355",
"SPELL_AURA_APPLIED 354365 351680 353432 350568 356065 353195 354964 357739",
-- "SPELL_AURA_APPLIED_DOSE",
"SPELL_AURA_REMOVED 354365 351680 350568 356065 353195 357739 353432",
Expand Down Expand Up @@ -505,7 +505,7 @@ function mod:INSTANCE_ENCOUNTER_ENGAGE_UNIT()
for i = 1, 5 do
local unitID = "boss"..i
local unitGUID = UnitGUID(unitID)
if UnitExists(unitID) and not castsPerGUID[unitGUID] then
if unitGUID and UnitExists(unitID) and not castsPerGUID[unitGUID] then
castsPerGUID[unitGUID] = 0
local cid = self:GetUnitCreatureId(unitID)
if cid == 180323 then--Fatespawn Monstrosity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,9 @@ function mod:OnCombatStart(delay)
for uId in DBM:GetGroupMembers() do
if DBM:UnitDebuff(uId, 352394) then
local unitName = DBM:GetUnitFullName(uId)
playersSafe[unitName] = true
if unitName then
playersSafe[unitName] = true
end
end
end
if DBM:UnitAura("boss1", 352385) then
Expand Down Expand Up @@ -467,7 +469,9 @@ function mod:OnTimerRecovery()
for uId in DBM:GetGroupMembers() do
if DBM:UnitDebuff(uId, 352394) then
local unitName = DBM:GetUnitFullName(uId)
playersSafe[unitName] = true
if unitName then
playersSafe[unitName] = true
end
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ local specWarnGraspofMalice = mod:NewSpecialWarningDodge(355123, nil, nil,

local timerOrbofTormentCD = mod:NewCDCountTimer(35, 349908, nil, nil, nil, 1, nil, nil, true)
local timerMalevolenceCD = mod:NewCDCountTimer(31.3, 350469, nil, nil, nil, 3, nil, DBM_COMMON_L.CURSE_ICON, true)--Rattlecage of Agony 31.7--49.7
local timerSufferingCD = mod:NewCDTimer(24.4, 350894, nil, nil, nil, 5, nil, DBM_COMMON_L.TANK_ICON, true, mod:IsTank() and 2, 3)
local timerSufferingCD = mod:NewCDTimer(24.4, 350894, nil, nil, nil, 5, nil, DBM_COMMON_L.TANK_ICON, true, mod:IsTank() and 2 or nil, 3)
local timerGraspofMaliceCD = mod:NewCDTimer(20.7, 355123, nil, nil, nil, 3, nil, nil, true)--Malicious Gauntlet (22 possibly the min time now?)
--local timerBurstofAgonyCD = mod:NewAITimer(23, 350096, nil, nil, nil, 3)

Expand Down
4 changes: 3 additions & 1 deletion DBM-Raids-Shadowlands/Sepulcher/AnduinWrynn.lua
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,9 @@ function mod:OnTimerRecovery()
for uId in DBM:GetGroupMembers() do
if DBM:UnitDebuff(uId, 362055) then
local name = DBM:GetUnitFullName(uId)
playersSouled[name] = true
if name then
playersSouled[name] = true
end
end
end
updateTimerFades(self)
Expand Down
1 change: 1 addition & 0 deletions DBM-Raids-Shadowlands/Sepulcher/ArtificerXymox.lua
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ function mod:SPELL_AURA_APPLIED(args)
end
end
end
mod.SPELL_AURA_APPLIED_DOSE = mod.SPELL_AURA_APPLIED

function mod:SPELL_AURA_REMOVED(args)
local spellId = args.spellId
Expand Down
2 changes: 1 addition & 1 deletion DBM-Raids-Shadowlands/Sepulcher/Lihuvim.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ local timerUnstableMoteCD = mod:NewCDCountTimer(20.6, 362622, nil, nil, nil
local timerUnstableMote = mod:NewBuffFadesTimer(5.9, 362622, nil, nil, nil, 5)--1.9+4
local timerProtoformRadiance = mod:NewBuffActiveTimer(28.8, 363537, nil, nil, nil, 2)
local timerProtoformCascadeCD = mod:NewCDCountTimer(10.9, 364652, 260885, nil, nil, 3)
local timerResonanceCD = mod:NewCDCountTimer(41.2, 368027, DBM_COMMON_L.TANKCOMBOC, "Tank", nil, 5, nil, DBM_COMMON_L.TANK_ICON)
local timerResonanceCD = mod:NewCDCountTimer(41.2, 368027, DBM_COMMON_L.TANKCOMBO.." (%s)", "Tank", nil, 5, nil, DBM_COMMON_L.TANK_ICON)
local timerCosmicShiftCD = mod:NewCDCountTimer(20.3, 363088, nil, nil, nil, 3)
local timerDeconstructingEnergyCD = mod:NewCDCountTimer(37.2, 363795, 119342, nil, nil, 3)--Shorttext "Bombs"
local timerSynthesizeCD = mod:NewCDCountTimer(101, 363130, nil, nil, nil, 6)
Expand Down
2 changes: 1 addition & 1 deletion DBM-Raids-Shadowlands/Sepulcher/PrototypePantheon.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---@diagnostic disable: dbm-sync-checker
local mod = DBM:NewMod(2460, "DBM-Raids-Shadowlands", 1, 1195)
local L = mod:GetLocalizedStrings()

Expand Down Expand Up @@ -783,7 +784,6 @@ function mod:SPELL_AURA_APPLIED(args)
warnNightHunter:CombinedShow(0.3, args.destName)
end
end
mod.SPELL_AURA_APPLIED_DOSE = mod.SPELL_AURA_APPLIED

function mod:SPELL_AURA_REMOVED(args)
local spellId = args.spellId
Expand Down
2 changes: 1 addition & 1 deletion DBM-Raids-Shadowlands/Sepulcher/VigilantGuardian.lua
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ function mod:INSTANCE_ENCOUNTER_ENGAGE_UNIT()
for i = 1, 5 do
local unitID = "boss"..i
local unitGUID = UnitGUID(unitID)
if UnitExists(unitID) and not castsPerGUID[unitGUID] then
if unitGUID and UnitExists(unitID) and not castsPerGUID[unitGUID] then
castsPerGUID[unitGUID] = {}
castsPerGUID[unitGUID][1] = 1--Diss
castsPerGUID[unitGUID][2] = 1--Wave
Expand Down
1 change: 1 addition & 0 deletions DBM-Shadowlands/Morgeth.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ function mod:SPELL_AURA_APPLIED(args)
end
end
end
mod.SPELL_AURA_APPLIED_DOSE = mod.SPELL_AURA_APPLIED

function mod:SPELL_PERIODIC_DAMAGE(_, _, _, _, destGUID, _, _, _, spellId, spellName)
if (spellId == 356382 or spellId == 353183) and destGUID == UnitGUID("player") and self:AntiSpam(2, 3) then
Expand Down

0 comments on commit 3906008

Please sign in to comment.