WoWInterface SVN RaidWatch2

[/] [trunk/] [RaidWatch_RubySanctum/] [Saviana.lua] - Rev 22

Compare with Previous | Blame | View Log

local mod = RW:Boss("Saviana Ragefire", "The Ruby Sanctum")
local L
local Utils = RW.Utils

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

---------------------------
-- Variables

-- Enrage
local tEnrageDur, wEnrage, tEnrageCD

-- Conflagration
local wConflagOnYou, wConflagClose, tConflagCD, mConflag, iConflag

-- Breath
local tBreathCD

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

function mod:OnRegister()
        L = mod:RegisterLocale(self:GetName(), "enUS", true)
        if L then
                L.conflag_close = "Conflagration target close!"
                L.conflag_close_opt = "Warning when the target is close to you."
                
                L.say_conflag = "\"Say-message\" when you are the target of Conflagration"
        end
        L = mod:GetLocale()
        self.L = L
        
        self:SetTrigger(39747)
        self:SetWin()
        
        self:AddBoolOption("SayOnConflag", L.say_conflag, nil, true, select(3, GetSpellInfo(74452)))
        
        -- Enrage
        tEnrageCD                       = mod:CDTimer(20, 78722)
        tEnrageDur                      = mod:DurTimer(10, 78722)
        wEnrage                         = mod:CastWarning(78722)
        
        -- Conflagration
        tConflagCD                      = mod:CDTimer(35, 74452)
        wConflagClose           = mod:CustomWarning(L.conflag_close, L.conflag_close_opt, 74452)
        wConflagOnYou           = mod:OnYouWarning(74452)
        mConflag                        = mod:TargetMessage(74452)
        iConflag                        = mod:Icon("SKULL", 74452, false, 10, "CROSS", "SQUARE", "TRIANGLE", "DIAMOND", "MOON")
        
        -- Breath
        tBreathCD                       = mod:CDTimer(25, 74404)
end

---------------------------
-- Locals

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

function mod:OnEngage(trigger)
        self:Track("Enrage", 78722)
        self:Track("Conflag", 74453)
        self:Track("Breath", 74404)
end

function mod:Enrage(event, args)
        if event == "SPELL_AURA_APPLIED" then
                tEnrageDur:Start()
                wEnrage:Show()
                tEnrageCD:Start()
                
        elseif event == "SPELL_AURA_REMOVED" then
                tEnrageDur:Stop()
        end
end


function mod:Conflag(event, args)
        if event == "SPELL_AURA_APPLIED" then
                tConflagCD:Start()
                
                if args:IsPlayer() then
                        wConflagOnYou:Show()
                        SendChatMessage("Conflagration on "..self.pName.."!", "SAY")
                end
                
                iConflag:Show(args.dName)
                
        elseif event == "SPELL_AURA_REMOVED" then
                iConflag:Hide(args.dName)
        end
end

function mod:Breath(event, args)
        if event == "SPELL_CAST_START" then
                tBreathCD:Start()
        end
end

Compare with Previous | Blame