local mod = DBM:NewMod("RageWinterchill", "DBM-Hyjal") local L = mod:GetLocalizedStrings() mod:SetRevision(("$Revision: 183 $"):sub(12, -3)) mod:SetCreatureID(17767) mod:SetUsedIcons(8) mod:RegisterCombat("combat", 17767) mod:RegisterEvents( "SPELL_AURA_APPLIED", "SPELL_DAMAGE", "SPELL_AURA_APPLIED_DOSE", "SPELL_CAST_START", "SPELL_CAST_SUCCESS", "SPELL_MISSED", "CHAT_MSG_RAID_BOSS_EMOTE", "CHAT_MSG_MONSTER_YELL", "UNIT_HEALTH", "UNIT_DIED" ) --DnD local warnDnDSoon = mod:NewSoonAnnounce(2140600, 2) local timerDnDCD = mod:NewNextTimer(30, 2140601) local timerDnDextra = mod:NewNextTimer(10, 2140601) local specWarnDnD = mod:NewSpecialWarningMove(2140600, 2) -- Frozen Solid local specWarnFrozen = mod:NewSpecialWarningYou(2140617, 2) local timerFrozen = mod:NewTimer(10,"Frozen Solid", 2140617) local sayFrozenFade = mod:NewFadesYell(2140617) -- Lich Slap local timerNextSlap = mod:NewNextTimer(30, 2140645) local warnLichSlap = mod:NewTargetAnnounce(2140645) -- Winter's Touch local warnWT = mod:NewTargetAnnounce(2140605, 2) local specWarnWT = mod:NewSpecialWarningYou(2140605, 2) local timerNextWT = mod:NewCDTimer(15, 2140605) local timerWT = mod:NewCastTimer(1.3, 2140605) -- Transitions local warnTransSoon = mod:NewSpecialWarning("Intermission Phase Soon", 1, 500933) local warnTransmission = mod:NewAnnounce("Transmission: Kill the Phylacteries!", 2, 500933) -- Ice Barrage local warnIceBarrage = mod:NewSpellAnnounce(2140624, 2) local timerIceBarrage = mod:NewCastTimer(8, 2140624) local timerNextBarrage = mod:NewNextTimer(45, 2140624) --Chilled to the Bone local SpecWarnChilled = mod:NewSpecialWarning("You have %s stacks of Chilled to the Bone!", 2140612) --Frost Nova local timerNextNova = mod:NewNextTimer(30, 2140620) -- Chains of Winterchill local warnChains = mod:NewAnnounce("%s is chained with >%s 14 and DBM:AntiSpam(5,4) then SpecWarnChilled:Show(args.amount) end end function mod:SPELL_CAST_START(args) if args:IsSpellID(2140605) then self:ScheduleMethod(0.2,"WTouch") lastWintersTouch = GetTime() timerNextWT:Start() end if args:IsSpellID(2140624) then warnIceBarrage:Show() timerIceBarrage:Start() timerNextBarrage:Start(70) remaininTouch = (15 - (GetTime() - lastWintersTouch)) remainingDnD = (30 - (GetTime() - lastDnD)) remainingNova = (30 - (GetTime() - lastNova)) remainingSlap = (30 - (GetTime() - lastSlap)) timerDnDCD:Stop() warnDnDSoon:Cancel() warnDnDSoon:Schedule(remainingDnD + 5) timerDnDCD:Start(remainingDnD + 10) self:UnscheduleMethod("DnD") self:ScheduleMethod(remainingDnD + 10,"DnD") timerNextWT:Stop() timerNextWT:Start(remaininTouch + 10) timerNextNova:Stop() timerNextNova:Start(remainingNova + 10) timerNextSlap:Stop() timerNextSlap:Start(remainingSlap + 10) end end function mod:SPELL_CAST_SUCCESS(args) if args:IsSpellID(2140645) then timerNextSlap:Start(30) lastSlap = GetTime() warnLichSlap:Show(args.destName) end end function mod:CHAT_MSG_MONSTER_YELL(msg) if msg == L.TransitionYell or msg:find(L.TransitionYell) then self:ScheduleMethod(0,"Intermission") end end function mod:UNIT_DIED(args) local cid = self:GetCIDFromGUID(args.destGUID) if cid == 26634 then phylDeath = phylDeath + 1 phylRemaining = (6 - phylDeath) phylAnnounce:Show(phylRemaining) end if cid == 26634 and phylRemaining == 0 then self:ScheduleMethod(1,"BossPhase") end end function mod:UNIT_HEALTH(uId) if self:GetUnitCreatureId(uId) == 17767 and (UnitHealth(uId) / UnitHealthMax(uId)) <= 0.70 and prewarn == 1 and DBM:AntiSpam(5,2) then prewarn = 2 warnTransSoon:Show() elseif self:GetUnitCreatureId(uId) == 17767 and (UnitHealth(uId) / UnitHealthMax(uId)) <= 0.36 and prewarn == 2 and DBM:AntiSpam(5,3) then prewarn = 3 warnTransSoon:Show() end end function mod:OnCombatEnd() DBM.BossHealth:RemoveBoss(17772) self:UnscheduleMethod("BossPhase") self:UnscheduleMethod("Intermission") end --function mod:CHAT_MSG_RAID_BOSS_EMOTE(msg) -- if msg == L.Transition1 or msg:find(L.Transition1) and phase == 1 then -- self:ScheduleMethod(0,"Intermission") -- phase = 2 -- elseif msg == L.Transition2 or msg:find(L.Transition2) and phase == 2 then -- self:ScheduleMethod(0,"BossPhase") -- phase = 1 -- end --end --function mod:CHAT_MSG_MONSTER_EMOTE(msg) -- if msg == L.Transition1 or msg:find(L.Transition1) and phase == 1 then -- self:ScheduleMethod(0,"Intermission") -- phase = 2 -- elseif msg == L.Transition2 or msg:find(L.Transition2) and phase == 2 then -- self:ScheduleMethod(0,"BossPhase") -- phase = 1 -- end --end