diff --git a/main.lua b/main.lua index fb77670..8d5765b 100644 --- a/main.lua +++ b/main.lua @@ -12,6 +12,7 @@ textures['Savage Bite'] = 'Ability_Racial_Cannibalize' textures['Demoralizing Roar'] = 'Ability_Druid_DemoralizingRoar' textures['Shred'] = 'Spell_Shadow_VampiricAura' textures['Reshift'] = 'spell_reshift_2' +textures['Swipe'] = 'INV_Misc_MonsterClaw_03' local function getTexture(spellName) if textures[spellName] ~= nil then @@ -182,7 +183,7 @@ local function bear_solo() if (not PlayerFrame.inCombat) then AttackTarget() else - if isUsable('Reshift') and mana <= 30 then + if isUsable('Reshift') and mana <= 10 then cast('Reshift') elseif isUsable('Savage Bite') and not onCooldown('Savage Bite') then cast('Savage Bite') @@ -200,9 +201,43 @@ local function bear_solo() end end +local function bear_aoe() + if GetUnitName('target') == nil then + TargetNearestEnemy() + return + else + if UnitCanAttack('player', 'target') == nil then + ClearTarget() + return + elseif UnitIsDead('target') == 1 then + ClearTarget() + return + end + + local mana = UnitMana('player') + local health = UnitHealth('player') + + if (not PlayerFrame.inCombat) then + AttackTarget() + else + if isUsable('Reshift') and mana <= 10 then + cast('Reshift') + elseif isUsable('Enrage') and not buffed('Enrage', 'player') and not onCooldown('Enrage') then + cast('Enrage') + elseif isUsable('Demoralizing Roar') and not buffed('Demoralizing Roar', 'target') then + cast('Demoralizing Roar') + elseif isUsable('Swipe') then + cast('Swipe') + end + end + end +end + function obd_onLoad() SlashCmdList['OBD'] = attack - SlashCmdList['OBDB'] = bear_solo + SlashCmdList['OBDBS'] = bear_solo + SlashCmdList['OBDBA'] = bear_aoe SLASH_OBD1 = '/obd_lvl' - SLASH_OBDB1 = '/obd_bear_solo' + SLASH_OBDBS1 = '/obd_bear_solo' + SLASH_OBDBA1 = '/obd_bear_aoe' end