Reduce information overflow on Lich King encounter. Now we need a button to manually reset settings to default after a DBM update or a respec. ;)
@@ -2364,6 +2364,19 @@
end
end
+local function getTalentpointsSpent(spellID)
+ local spellName = GetSpellInfo(spellID)
+ for tabIndex=1, GetNumTalentTabs() do
+ for talentID=1, GetNumTalents(tabIndex) do
+ local name, _, _, _, spent = GetTalentInfo(tabIndex, talentID)
+ if(name == spellName) then
+ return spent
+ end
+ end
+ end
+ return 0
+end
+
function bossModPrototype:IsMelee()
return select(2, UnitClass("player")) == "ROGUE"
or select(2, UnitClass("player")) == "WARRIOR"
@@ -2377,7 +2390,42 @@
return self:IsMelee() or select(2, UnitClass("player")) == "HUNTER"
end
+function bossModPrototype:CanRemoveEnrage()
+ return select(2, UnitClass("player")) == "HUNTER" or select(2, UnitClass("player")) == "ROGUE"
+end
+local function IsDeathKnightTank()
+ -- idea taken from addon 'ElitistJerks'
+ local tankTalents = (getTalentpointsSpent(16271) >= 5 and 1 or 0) + -- Anticipation
+ (getTalentpointsSpent(49042) >= 5 and 1 or 0) + -- Toughness
+ (getTalentpointsSpent(55225) >= 5 and 1 or 0) -- Blade Barrier
+ return tankTalents >= 3
+end
+
+local function IsDruidTank()
+ -- idea taken from addon 'ElitistJerks'
+ local tankTalents = (getTalentpointsSpent(57881) >= 2 and 1 or 0) + -- Natural Reaction
+ (getTalentpointsSpent(16929) >= 3 and 1 or 0) + -- Thick Hide
+ (getTalentpointsSpent(61336) >= 1 and 1 or 0) + -- Survival Instincts
+ (getTalentpointsSpent(57877) >= 3 and 1 or 0) -- Protector of the Pack
+ return tankTalents >= 3
+end
+
+function bossModPrototype:IsTank()
+ return (select(2, UnitClass("player")) == "WARRIOR" and select(3, GetTalentTabInfo(3)) >= 51)
+ or (select(2, UnitClass("player")) == "DEATHKNIGHT" and IsDeathKnightTank())
+ or (select(2, UnitClass("player")) == "PALADIN" and select(3, GetTalentTabInfo(2)) >= 51)
+ or (select(2, UnitClass("player")) == "DRUID" and select(3, GetTalentTabInfo(2)) >= 51 and IsDruidTank())
+end
+
+function bossModPrototype:IsHealer()
+ return (select(2, UnitClass("player")) == "PALADIN" and select(3, GetTalentTabInfo(1)) >= 51)
+ or (select(2, UnitClass("player")) == "SHAMAN" and select(3, GetTalentTabInfo(3)) >= 51)
+ or (select(2, UnitClass("player")) == "DRUID" and select(3, GetTalentTabInfo(3)) >= 51)
+ or (select(2, UnitClass("player")) == "PRIEST" and select(3, GetTalentTabInfo(3)) < 51)
+end
+
+
-------------------------
-- Boss Health Frame --
-------------------------
@@ -19,17 +19,17 @@
"CHAT_MSG_MONSTER_YELL"
)
-local warnRemorselessWinter = mod:NewSpellAnnounce(74270) --Phase Transition Start Ability
-local warnQuake = mod:NewSpellAnnounce(72262) --Phase Transition End Ability
+local warnRemorselessWinter = mod:NewSpellAnnounce(74270, false) --Phase Transition Start Ability
+local warnQuake = mod:NewSpellAnnounce(72262, false) --Phase Transition End Ability
local warnRagingSpirit = mod:NewTargetAnnounce(69200) --Transition Add
-local warnShamblingHorror = mod:NewSpellAnnounce(70372) --Phase 1 Add
-local warnDrudgeGhouls = mod:NewSpellAnnounce(70358) --Phase 1 Add
-local warnShamblingEnrage = mod:NewTargetAnnounce(72143) --Phase 1 Add Ability
+local warnShamblingHorror = mod:NewSpellAnnounce(70372, mod:IsTank()) --Phase 1 Add
+local warnDrudgeGhouls = mod:NewSpellAnnounce(70358, mod:IsTank()) --Phase 1 Add
+local warnShamblingEnrage = mod:NewTargetAnnounce(72143, mod:IsTank() or mod:CanRemoveEnrage()) --Phase 1 Add Ability
local warnNecroticPlague = mod:NewTargetAnnounce(73912) --Phase 1+ Ability
-local warnInfest = mod:NewSpellAnnounce(73779) --Phase 1 & 2 Ability
+local warnInfest = mod:NewSpellAnnounce(73779, mod:IsHealer()) --Phase 1 & 2 Ability
local warnPhase2Soon = mod:NewAnnounce("WarnPhase2Soon", 2)
local warnDefileSoon = mod:NewSoonAnnounce(73708) --Phase 2+ Ability
-local warnSoulreaper = mod:NewSpellAnnounce(73797) --Phase 2+ Ability
+local warnSoulreaper = mod:NewSpellAnnounce(73797, mod:IsTank() or mod:IsHealer()) --Phase 2+ Ability
local warnDefileCast = mod:NewTargetAnnounce(72762) --Phase 2+ Ability
local warnSummonValkyr = mod:NewSpellAnnounce(69037) --Phase 2 Add
local warnPhase3Soon = mod:NewAnnounce("WarnPhase3Soon", 2)
@@ -37,30 +37,30 @@
local warnHarvestSoul = mod:NewTargetAnnounce(74325) --Phase 3 Ability
local warnTrapCast = mod:NewTargetAnnounce(73539) --Phase 2+ Ability
-local specWarnSoulreaper = mod:NewSpecialWarningYou(73797) --Phase 1+ Ability
+local specWarnSoulreaper = mod:NewSpecialWarningYou(73797, mod:IsTank()) --Phase 1+ Ability
local specWarnNecroticPlague= mod:NewSpecialWarningYou(73912) --Phase 1+ Ability
-local specWarnRagingSpirit = mod:NewSpecialWarningYou(69200) --Transition Add
+local specWarnRagingSpirit = mod:NewSpecialWarningYou(69200, false) --Transition Add
local specWarnDefileCast = mod:NewSpecialWarning("specWarnDefileCast") --Phase 2+ Ability
local specWarnDefileNear = mod:NewSpecialWarning("specWarnDefileNear", false) --Phase 2+ Ability
local specWarnDefile = mod:NewSpecialWarningMove(73708) --Phase 2+ Ability
local specWarnWinter = mod:NewSpecialWarningMove(73791) --Transition Ability
local specWarnHarvestSoul = mod:NewSpecialWarningYou(74325) --Phase 3+ Ability
local specWarnInfest = mod:NewSpecialWarningSpell(73779, false) --Phase 1+ Ability
-local specwarnSoulreaper = mod:NewSpecialWarningTarget(73797, false) --phase 2+
+local specwarnSoulreaper = mod:NewSpecialWarningTarget(73797, mod:IsTank() or mod:IsHealer()) --phase 2+
local specWarnTrap = mod:NewSpecialWarningYou(73539) --Heroic Ability
local timerCombatStart = mod:NewTimer(54.5, "TimerCombatStart", 2457)
local timerPhaseTransition = mod:NewTimer(62, "PhaseTransition")
-local timerSoulreaper = mod:NewTargetTimer(5.1, 73797)
-local timerSoulreaperCD = mod:NewCDTimer(30, 73797)
+local timerSoulreaper = mod:NewTargetTimer(5.1, 73797, mod:IsTank() or mod:IsHealer())
+local timerSoulreaperCD = mod:NewCDTimer(30, 73797, mod:IsTank() or mod:IsHealer())
local timerHarvestSoul = mod:NewTargetTimer(6, 74325)
local timerHarvestSoulCD = mod:NewCDTimer(75, 74325)
-local timerInfestCD = mod:NewCDTimer(22, 73779)
+local timerInfestCD = mod:NewCDTimer(22, 73779, mod:IsHealer())
local timerNecroticPlagueCleanse = mod:NewTimer(5, "TimerNecroticPlagueCleanse", 73912, false)
local timerNecroticPlagueCD = mod:NewCDTimer(30, 73912)
local timerDefileCD = mod:NewCDTimer(32, 72762)
-local timerShamblingHorror = mod:NewNextTimer(60, 70372)
-local timerDrudgeGhouls = mod:NewNextTimer(20, 70358)
+local timerShamblingHorror = mod:NewNextTimer(60, 70372, mod:IsTank())
+local timerDrudgeGhouls = mod:NewNextTimer(20, 70358, mod:IsTank())
local timerSummonValkyr = mod:NewCDTimer(45, 69037)
local timerVileSpirit = mod:NewNextTimer(30, 70498)
local timerTrapCD = mod:NewCDTimer(16, 73539)