Skip to content

Commit

Permalink
Add anti spam measures for players zerging fallen protectors, so that…
Browse files Browse the repository at this point in the history
… the alert for their specials doesn't spam (cause you trigger 6 of them back to back)
  • Loading branch information
MysticalOS committed May 26, 2024
1 parent cfce086 commit 13c7bb8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions DBM-Raids-MoP/SiegeOfOrgrimmar/FallenProtectors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -339,13 +339,17 @@ function mod:UNIT_HEALTH(uId)
local hp = UnitHealth(uId) / UnitHealthMax(uId)
if hp < 0.71 and self.vb["warned"..cId] == 0 then
local bossName = UnitName(uId)
specWarnMeasures:Show(bossName)
specWarnMeasures:Play("specialsoon")
if (self:IsTrivial() or self:IsRemix()) and self:AntiSpam(3, 4) then--Throttle on remix or trivial. remix players are zerging boss and it's super spammy
specWarnMeasures:Show(bossName)
specWarnMeasures:Play("specialsoon")
end
self.vb["warned"..cId] = 1
elseif hp < 0.37 and self.vb["warned"..cId] == 1 then
local bossName = UnitName(uId)
specWarnMeasures:Show(bossName)
specWarnMeasures:Play("specialsoon")
if (self:IsTrivial() or self:IsRemix()) and self:AntiSpam(3, 4) then--Throttle on remix or trivial. remix players are zerging boss and it's super spammy
specWarnMeasures:Show(bossName)
specWarnMeasures:Play("specialsoon")
end
self.vb["warned"..cId] = 2
end
end
Expand Down

0 comments on commit 13c7bb8

Please sign in to comment.