WoWInterface SVN RaidWatch2

[/] [trunk/] [RaidWatch_Icecrown/] [ThePlagueworks/] [Rotface.lua] - Rev 22

Compare with Previous | Blame | View Log

local mod = RW:Boss("Rotface", "Icecrown Citadel", "The Plagueworks")
local L

mod.BossIcon = [[Interface\Icons\spell_nature_acid_01]]

------------------------------------
-- Variables
--Infection
local wInfection, mInfection, iInfection, tInfectionDur
--Slime Spray
local wSlimeSpray, tSlimeSprayDur, tSlimeSprayCD
--Ooze
local wOozeExplode, tOozeExplode, wExplodeSoon
--Flood
local tFloodCD
-- Gas
local iGas, mGas, wGas, tGasCD

-----------------------------------
-- Init

function mod:OnRegister()
        L = mod:RegisterLocale("enUS")
        if L then
                L.slime1 = "Good news, everyone! I've fixed the poison slime pipes!"
                L.slime2 = "Great news, everyone! The slime is flowing again!"
                
                L.explode_soon = "Exploding Ooze Soon!"
                L.explode_soon_opt = "Warning at 4 stacks on the Big Ooze"
                
                L.big_ooze = "Big Ooze"
        end
        L = mod:GetLocale()
        mod.L = L
        
        mod:SetTrigger(36627)
        mod:SetWin()
        
        local gasName = GetSpellInfo(69240)
        self:AddRangeCheckOption("ShowRangeCheck", gasName, 8, self.isCaster)
        
        tInfectionDur   = self:DurTargetTimer(12, 73023)
        tFloodCD                = self:CDTimer(20, 71588)
        tGasCD                  = self:CDTimer(30, 72273)
        tOozeExplode    = self:CastTimer(69839)
        tSlimeSprayDur  = self:DurTimer(3, 69508)
        tSlimeSprayCD   = self:CDTimer(20, 69508)
        
        wInfection              = self:RunawayWarning(73023)
        wOozeExplode    = self:RunawayWarning(69839)
        wSlimeSpray             = self:CastWarning(69508)
        wExplodeSoon    = self:CustomWarning(L.explode_soon, L.explode_soon_opt, 69839)
        wGas                    = self:RunawayWarning(72273)
        
        mInfection              = self:TargetMessage(73023)
        mGas                    = self:TargetMessage(72273)
        
        iInfection              = self:Icon("SKULL", 73023, false, 12, "CROSS")
        iGas                    = self:Icon("TRIANGLE", 72273, false, nil, "STAR", "CIRCLE", "DIAMOND")
end

-----------------------------------------
-- Locals
local explodeSpamm
local trackedOozeStacks = {}
local trackedOozes = {}
local oozeCount
local unstableTex = select(3, GetSpellInfo(69558))

-----------------------------------------
-- Start

function mod:OnEngage(trigger)
        self:Track("Infection", 73023, 73022, 71224, 69674)
        self:Track("Gas", 69240, 72274, 72272, 73019, 73020, 72273, 69248, 72218)
        self:Track("UnstableOoze", 69558)
        self:Track("OozeExplode", 69839)
        self:Track("SlimeSpray", 69508)
        
        self:YellTrack("Flood", L.slime1, L.slime2)
        
        wipe(trackedOozeStacks)
        wipe(trackedOozes)
        
        oozeCount = 0
        explodeSpamm = 0
        
        if self.db.profile.ShowRangeCheck and self:IsHeroic() then
                RW.Callbacks:Fire("RangeCheckShow", true, 8)
        end
end

function mod:Infection(event, args)
        if event == "SPELL_AURA_APPLIED" then
                tInfectionDur:Start(args.dName)
                iInfection:Show(args.dName)
                mInfection:Show(args.dName)
                if args:IsPlayer() then
                        wInfection:Show()
                end
        elseif event == "SPELL_AURA_REMOVED" then
                tInfectionDur:Stop(args.dName)
                iInfection:Hide(args.dName)
        end
end

function mod:Gas(event, args)
        if event == "SPELL_AURA_APPLIED" then
                if args:IsPlayer() then
                        wGas:Show()
                end
                iGas:Show(args.dName)
                mGas:AddDelayTarget(args.dName)
                mGas:DelayedShow(0.5)
                
        elseif event == "SPELL_AURA_REMOVED" then
                iGas:Hide(args.dName)
                
        elseif event == "SPELL_CAST_SUCCESS" then
                tGasCD:Start()
        end
end

function mod:UnstableOoze(event, args)
        if event == "SPELL_AURA_APPLIED_DOSE" or event == "SPELL_AURA_APPLIED" then
                if (args.amount or 1) == 4 then
                        wExplodeSoon:Show()
                end
                
                if not trackedOozes[args.dGUID] then
                        oozeCount = oozeCount + 1
                        trackedOozes[args.dGUID] = L.big_ooze.." #"..oozeCount
                        RW.Callbacks:Fire("MPBSpellStackCombat", args.dGUID, 69558, 5)
                end
        
        elseif event == "SPELL_AURA_REMOVED" then
                RW.Callbacks:Fire("MPBSpellStackHide", args.dGUID)
        end
end

function mod:OozeExplode(event, args)
        if event == "SPELL_CAST_START" and (GetTime() - explodeSpamm) > 4 then
                tOozeExplode:Start()
                wOozeExplode:Schedule(tOozeExplode.time)
                explodeSpamm = GetTime()
        end
end

function mod:SlimeSpray(event, args)
        if event == "SPELL_CAST_START" then
                wSlimeSpray:Show()
                tSlimeSprayDur:Schedule(1.5)
                tSlimeSprayCD:Start()
        end
end

function mod:Flood(event, msg, name)
        tFloodCD:Start()
end

Compare with Previous | Blame