- -- CheckBuffs() -- Check if the player needs a buff when we receive certain events
- function SelfBuffReminder:CheckBuffs(event, arg1, ...)
- -- Don't show reminders under certain circumstances
- if not inCombat or (inBG and not self.db.char.pvp) or IsFlying() or UnitOnTaxi("player") then
- self:HideReminder()
- return
- end
- self:HideReminder()
- -- Warrior shouts
- if className == "WARRIOR" and UnitPower("player", SPELL_POWER_RAGE) >= 10 then
- -- Shouts
- if playerLevel >= 20 and not self:FindBuff(buffList["AP"]) and not self:FindBuff(buffList["Fort"]) and not self:IsOnCooldown("Battle Shout") then
- self:ShowReminder("Cast a Shout!")
- end
- -- Death knight buffs
- elseif className == "DEATHKNIGHT" then
- -- Presences
- if not self:FindBuff("Blood Presence") and not self:FindBuff("Blood Presence") and not self:FindBuff("Blood Presence") then
- self:ShowReminder("Cast a Presence!")
- return
- end
- -- Horn of Winter
- if playerLevel >= 65 and not self:FindBuff(buffList["AP"]) then
- self:ShowReminder("Cast Horn of Winter!")
- return
- end
- -- Priest buffs
- elseif className == "PRIEST" then
- -- Inner Fire/Will
- if playerLevel >= 7 and not self:FindBuff("Inner Fire") and not self:FindBuff("Inner Will") then
- self:ShowReminder("Cast Inner Fire!")
- return
- end
- -- Power Word: Fortitude
- if playerLevel >= 14 and not self:FindBuff(buffList["Fort"]) then
- self:ShowReminder("Cast Power Word: Fortitude!")
- return
- end
- -- Shadow Protection
- if playerLevel >= 52 and not self:FindBuff("Shadow Protection") then
- self:ShowReminder("Cast Shadow Protection!")
- return
- end
- -- Warlock buffs
- elseif className == "WARLOCK" then
- -- Warlock Armor
- if playerLevel >= 8 and not self:FindBuff("Demon Armor") and not self:FindBuff("Fel Armor") then
- self:ShowReminder("Cast a Warlock Armor!")
- return
- end
- -- Soul Link
- if playerLevel >= 20 and not self:FindBuff("Soul Link") then
- self:ShowReminder("Cast Soul Link!")
- return
- end
- -- Mage buffs
- elseif className == "MAGE" then
- -- Arcane Intellect
- if playerLevel >= 58 and not self:FindBuff("Arcane Brilliance") and not self:FindBuff("Dalaran Brilliance") then
- self:ShowReminder("Cast Arcane Brilliance!")
- return
- end
- -- Mage armor
- if playerLevel >= 35 and not self:FindBuff("Molten Armor") and not self:FindBuff("Mage Armor") and not self:FindBuff("Frost Armor") then
- self:ShowReminder("Cast a Mage Armor!")
- return
- end
- -- Shaman buffs
- elseif className == "SHAMAN" then
- -- Weapon enchants (windfury, flame tongue, etc..)
- if self.db.char.weapon then
- mainHandEnchant, _, _, offHandEnchant = GetWeaponEnchantInfo()
- if not mainHandEnchant or not offHandEnchant then
- self:ShowReminder("Apply Weapon Enchant!")
- return
- end
- end
- -- Shields
- if playerLevel >= 8 and not self:FindBuff("Earth Shield") and not self:FindBuff("Lightning Shield") and not self:FindBuff("Water Shield") then
- self:ShowReminder("Cast a Shaman Shield!")
- return
- end
- -- Rogue buffs
- elseif className == "ROGUE" then
- -- Poisons
- if self.db.char.weapon then
- mainHandEnchant, _, _, offHandEnchant = GetWeaponEnchantInfo()
- if not mainHandEnchant or not offHandEnchant then
- self:ShowReminder("Apply Poisons!")
- return
- end
- end
- -- Paladin buffs
- elseif className == "PALADIN" then
- -- Blessing of Kings/Might
- if playerLevel >= 22 and not self:FindBuff(buffList["Kings"]) and not self:FindBuff("Blessing of Might") then
- self:ShowReminder("Cast a Blessing!")
- return
- end
- -- Righteous Fury
- if playerLevel >= 12 and GetPrimaryTalentTree() == 2 and not self:FindBuff("Righteous Fury") then
- self:ShowReminder("Cast Righteous Fury!")
- end
- -- Druid buffs
- elseif className == "DRUID" then
- -- Mark of the Wild
- if playerLevel >= 30 and not self:FindBuff(buffList["Kings"]) then
- self:ShowReminder("Cast Mark of the Wild!")
- return
- end
- end
- end