Skip to content

Commit

Permalink
Cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
funkydude committed Oct 23, 2024
1 parent 82cc7b2 commit 99ff139
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 22 deletions.
4 changes: 2 additions & 2 deletions BlackfathomDeeps_Classic/Ghamoo-ra.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ function mod:CrunchArmorApplied(args)
self:PlaySound(args.spellId, "alert")
end
elseif args.amount and self:Player(args.destFlags) then -- Players, not pets
local bossUnit = self:GetUnitIdByGUID(args.sourceGUID)
if bossUnit and self:Tanking(bossUnit, args.destName) then
local bossUnit, targetUnit = self:GetUnitIdByGUID(args.sourceGUID), self:UnitTokenFromGUID(args.destGUID, true)
if bossUnit and targetUnit and self:Tanking(bossUnit, targetUnit) then
self:StackMessage(args.spellId, "purple", args.destName, args.amount, 3)
if args.amount >= 3 then
self:PlaySound(args.spellId, "alert")
Expand Down
3 changes: 0 additions & 3 deletions BlackwingLair/Nefarian.lua
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,6 @@ end

function mod:CHAT_MSG_MONSTER_YELL(_, msg)
if msg:find(L.engage_yell_trigger, nil, true) then
if self:IsEngaged() then
self:Wipe()
end
self:Engage()
elseif msg:find(L.stage3_yell_trigger, nil, true) then
self:SetStage(3)
Expand Down
2 changes: 1 addition & 1 deletion BlackwingLair/Trash.lua
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ function mod:NaturesFuryApplied(args)
self:TargetBar(args.spellId, 8, args.destName)
self:CustomIcon(naturesFuryMarker, args.destName, 4)
if self:Me(args.destGUID) then
self:Say(args.spellId, CL.rticon:format(args.spellName, 4), nil, "Natures Fury ({rt4})")
self:Say(args.spellId, CL.rticon:format(args.spellName, 4), nil, "Nature's Fury ({rt4})")
self:SayCountdown(args.spellId, 8, 4, 5)
self:PlaySound(args.spellId, "warning", nil, args.destName)
end
Expand Down
6 changes: 4 additions & 2 deletions BlackwingLair/Vaelastrasz.lua
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ end

function mod:BurningAdrenalineAppliedSoD(args)
local unit = bossGUID and self:GetUnitIdByGUID(bossGUID)
if unit and self:Tanking(unit, args.destName) then
local targetUnit = self:UnitTokenFromGUID(args.destGUID, true)
if unit and targetUnit and self:Tanking(unit, targetUnit) then
self:TargetMessage(23620, "purple", args.destName, L.tank_bomb)
if self:Me(args.destGUID) then
self:Say(23620, L.tank_bomb, nil, "Tank Bomb")
Expand All @@ -146,7 +147,8 @@ function mod:BurningAdrenalineAppliedDoseSoD(args)
self:StackMessage(18173, "blue", args.destName, args.amount, 30, CL.bomb)
else
local unit = bossGUID and self:GetUnitIdByGUID(bossGUID)
if unit and self:Tanking(unit, args.destName) then
local targetUnit = self:UnitTokenFromGUID(args.destGUID, true)
if unit and targetUnit and self:Tanking(unit, args.destName) then
self:StackMessage(23620, "purple", args.destName, args.amount, 30, L.tank_bomb)
self:PlaySound(23620, "long", nil, args.destName)
end
Expand Down
15 changes: 9 additions & 6 deletions Gnomeregan_Classic/MekgineerThermaplugg.lua
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,9 @@ function mod:SprocketfireApplied(args)
if self:Me(args.destGUID) then
self:StackMessage(args.spellId, "blue", args.destName, args.amount, 4)
else
local bossUnit = self:GetUnitIdByGUID(currentBossGUID) -- Source can vary or be nil
if bossUnit and self:Tanking(bossUnit, args.destName) then
local bossUnit = self:GetUnitIdByGUID(currentBossGUID) -- Source can vary or be nil here, so store it from other abilities
local targetUnit = self:UnitTokenFromGUID(args.destGUID, true)
if bossUnit and targetUnit and self:Tanking(bossUnit, targetUnit) then
self:StackMessage(args.spellId, "orange", args.destName, args.amount, 4)
end
end
Expand Down Expand Up @@ -277,8 +278,9 @@ function mod:FreezingApplied(args)
if self:Me(args.destGUID) then
self:StackMessage(args.spellId, "blue", args.destName, args.amount, 5)
elseif self:Player(args.destFlags) then -- Players, not pets
local bossUnit = self:GetUnitIdByGUID(currentBossGUID) -- Source can vary or be nil
if bossUnit and self:Tanking(bossUnit, args.destName) then
local bossUnit = self:GetUnitIdByGUID(currentBossGUID) -- Source can vary or be nil here, so store it from other abilities
local targetUnit = self:UnitTokenFromGUID(args.destGUID, true)
if bossUnit and targetUnit and self:Tanking(bossUnit, targetUnit) then
self:StackMessage(args.spellId, "orange", args.destName, args.amount, 5)
end
end
Expand Down Expand Up @@ -310,8 +312,9 @@ function mod:RadiationSicknessApplied(args)
if self:Me(args.destGUID) then
self:StackMessage(args.spellId, "blue", args.destName, args.amount, 3, CL.disease)
elseif args.amount then
local bossUnit = self:GetUnitIdByGUID(currentBossGUID) -- Source can vary or be nil
if bossUnit and self:Tanking(bossUnit, args.destName) then
local bossUnit = self:GetUnitIdByGUID(currentBossGUID) -- Source can vary or be nil here, so store it from other abilities
local targetUnit = self:UnitTokenFromGUID(args.destGUID, true)
if bossUnit and targetUnit and self:Tanking(bossUnit, targetUnit) then
self:StackMessage(args.spellId, "orange", args.destName, args.amount, 3, CL.disease)
end
end
Expand Down
4 changes: 2 additions & 2 deletions MoltenCore/Golemagg.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ function mod:MagmaSplashApplied(args)
self:PlaySound(args.spellId, "alert")
end
elseif self:Player(args.destFlags) and args.amount >= 3 then -- Players, not pets
local unit = self:GetUnitIdByGUID(args.sourceGUID)
if unit and self:Tanking(unit, args.destName) then
local unit, targetUnit = self:GetUnitIdByGUID(args.sourceGUID), self:UnitTokenFromGUID(args.destGUID, true)
if unit and targetUnit and self:Tanking(unit, targetUnit) then
self:StackMessage(args.spellId, "purple", args.destName, args.amount, 4)
if args.amount >= 4 then
self:PlaySound(args.spellId, "alert")
Expand Down
4 changes: 2 additions & 2 deletions Onyxia_Classic/Onyxia.lua
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ function mod:UNIT_HEALTH(event, unit)
end

function mod:FlameLashApplied(args)
local unit = self:GetUnitIdByGUID(args.sourceGUID)
if unit and self:Tanking(unit, args.destName) then
local unit, targetUnit = self:GetUnitIdByGUID(args.sourceGUID), self:UnitTokenFromGUID(args.destGUID, true)
if unit and targetUnit and self:Tanking(unit, targetUnit) then
self:StackMessage(args.spellId, "purple", args.destName, args.amount, 2)
end
end
4 changes: 2 additions & 2 deletions SunkenTemple_Classic/DreamscytheAndWeaver.lua
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ function mod:AcidBreathApplied(args)
self:PlaySound(args.spellId, "alert")
end
else
local bossUnit = self:GetUnitIdByGUID(args.sourceGUID)
if bossUnit and self:Tanking(bossUnit, args.destName) then
local bossUnit, targetUnit = self:GetUnitIdByGUID(args.sourceGUID), self:UnitTokenFromGUID(args.destGUID, true)
if bossUnit and targetUnit and self:Tanking(bossUnit, targetUnit) then
self:StackMessage(args.spellId, "purple", args.destName, args.amount, 2)
if args.amount then
self:PlaySound(args.spellId, "alert")
Expand Down
4 changes: 2 additions & 2 deletions SunkenTemple_Classic/MorphazAndHazzas.lua
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ function mod:CorruptedBreathApplied(args)
self:PlaySound(args.spellId, "alert")
end
else
local bossUnit = self:GetUnitIdByGUID(args.sourceGUID)
if bossUnit and self:Tanking(bossUnit, args.destName) then
local bossUnit, targetUnit = self:GetUnitIdByGUID(args.sourceGUID), self:UnitTokenFromGUID(args.destGUID, true)
if bossUnit and targetUnit and self:Tanking(bossUnit, targetUnit) then
self:StackMessage(args.spellId, "purple", args.destName, args.amount, 2)
if args.amount then
self:PlaySound(args.spellId, "alert")
Expand Down

0 comments on commit 99ff139

Please sign in to comment.