Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- aura_env.updateInterval = 0.05
- aura_env.lastUpdate = GetTime()
- aura_env.targetWipeInterval = 5
- aura_env.showCooldownRing = true
- aura_env.invertCooldownRing = false
- aura_env.showRangeHighlight = true
- aura_env.enabledToggle = "ALT-SHIFT-T"
- aura_env.cooldownsToggle = "ALT-SHIFT-R"
- WA_MiniHekili_Ret_Enabled = WeakAurasSaved.displays[aura_env.id].hekiliEnabled == nil and true or WeakAurasSaved.displays[aura_env.id].hekiliEnabled
- WA_MiniHekili_Ret_CDs = WeakAurasSaved.displays[aura_env.id].hekiliCooldowns == nil and false or WeakAurasSaved.displays[aura_env.id].hekiliCooldowns
- aura_env.bindsInitialized = false
- aura_env.keyhandler = aura_env.keyhandler or CreateFrame("Button", aura_env.id.."_Keyhandler", UIParent)
- aura_env.keyhandler.parent = aura_env
- aura_env.keyhandler:RegisterForClicks("AnyDown")
- aura_env.keyhandler:SetScript("OnClick", function (self, button, down)
- if button == "Cooldowns" then
- WA_MiniHekili_Ret_CDs = not WA_MiniHekili_Ret_CDs
- print("|cFF00FFFFMini-Hekili Cooldowns: " .. ( WA_MiniHekili_Ret_CDs and "|cFF00FF00ENABLED|r" or "|cFFFF0000DISABLED|r" ) )
- elseif button == "Enabled" then
- WA_MiniHekili_Ret_Enabled = not WA_MiniHekili_Ret_Enabled
- print("|cFF00FFFFMini-Hekili: " .. ( WA_MiniHekili_Ret_Enabled and "|cFF00FF00ENABLED|r" or "|cFFFF0000DISABLED|r" ) )
- end
- WeakAurasSaved.displays[self.parent.id].hekiliEnabled = WA_MiniHekili_Ret_Enabled
- WeakAurasSaved.displays[self.parent.id].hekiliCooldowns = WA_MiniHekili_Ret_CDs
- end)
- function aura_env.setupBinds()
- if InCombatLockdown() then return end
- ClearOverrideBindings( aura_env.keyhandler )
- SetOverrideBindingClick( aura_env.keyhandler, true, aura_env.enabledToggle, aura_env.id.."_Keyhandler", "Enabled" )
- SetOverrideBindingClick( aura_env.keyhandler, true, aura_env.cooldownsToggle, aura_env.id.."_Keyhandler", "Cooldowns" )
- aura_env.bindsInitialized = true
- end
- aura_env.setupBinds()
- aura_env.recommended = 35395
- aura_env.timeToReady = 0
- aura_env.timeOffset = 0
- aura_env.targets = {}
- aura_env.targetCount = 0
- aura_env.talents = {
- final_verdict = { 1, 1, 1 },
- execution_sentence = { 1, 2, 1 },
- consecration = { 1, 3, 1 },
- the_fires_of_justice = { 2, 1, 1 },
- zeal = { 2, 2, 1 },
- greater_judgment = { 2, 3, 1 },
- fist_of_justice = { 3, 1, 1 },
- repentance = { 3, 2, 1 },
- blinding_light = { 3, 3, 1 },
- virtues_blade = { 4, 1, 1 },
- blade_of_wrath = { 4, 2, 1 },
- divine_hammer = { 4, 3, 1 },
- justicars_vengeance = {5, 1, 1 },
- eye_for_an_eye = { 5, 2, 1 },
- word_of_glory = { 5, 3, 1 },
- divine_intervention = { 6, 1, 1 },
- divine_steed = { 6, 2, 1 },
- seal_of_light = {6, 3, 1 },
- divine_purpose = { 7, 1, 1 },
- crusade = { 7, 2, 1 },
- holy_wrath = { 7, 3, 1 }
- }
- aura_env.talented = {}
- aura_env.abilities = {
- avenging_wrath = 31884,
- blade_of_justice = 184575,
- blade_of_wrath = 184575,
- consecration = 205228,
- crusade = 224668,
- crusader_strike = 35395,
- divine_storm = 53385,
- divine_hammer = 198034,
- execution_sentence = 213757,
- hammer_of_justice = 853,
- holy_wrath = 210220,
- judgment = 20271,
- justicars_vengeance = 215661,
- templars_verdict = 85256,
- wake_of_ashes = 205273,
- zeal = 217020
- }
- aura_env.chargedAbilities = {
- crusader_strike = 35395,
- zeal = 217020,
- avenging_wrath = 31884,
- crusade = 224668
- }
- aura_env.chargesMax = {}
- aura_env.chargeTime = {}
- aura_env.treatAsCooldown = {
- holy_wrath = true,
- crusade = true,
- avenging_wrath = true,
- }
- aura_env.abilityNames = {}
- for k,v in pairs( aura_env.abilities ) do
- aura_env.abilityNames[ v ] = GetSpellInfo( v )
- end
- aura_env.cooldowns = {}
- aura_env.charges = {}
- aura_env.buffs = {
- avenging_wrath = 31884,
- crusade = 224668,
- divine_purpose = 223819,
- the_fires_of_justice = 209785,
- whisper_of_the_nathrezim = 207633,
- }
- aura_env.buffNames = {}
- for k,v in pairs( aura_env.buffs ) do
- aura_env.buffNames[ v ] = GetSpellInfo( v )
- end
- aura_env.buffRemains = {}
- aura_env.debuffs = {
- judgment = 197277,
- }
- -- ITEM 137020 whisper_of_the_nathrezim
- aura_env.debuffNames = {}
- for k,v in pairs( aura_env.debuffs ) do
- aura_env.debuffNames[ v ] = GetSpellInfo( v )
- end
- aura_env.debuffRemains = {}
- function aura_env.rec( spell )
- aura_env.recommended = aura_env.abilities[ spell ]
- aura_env.timeToReady = aura_env.cooldowns[ spell ]
- end
- function aura_env.ready( spell )
- if aura_env.talents[ spell ] and not aura_env.talented[ spell ] then
- return false
- end
- if aura_env.cooldowns[ spell ] + 0.1 < aura_env.timeToReady then
- aura_env.timeOffset = aura_env.cooldowns[ spell ] + 0.1 -- build in a 0.1s buffer
- return true
- end
- return false
- end
- function aura_env.try( spell, conditions )
- if not aura_env.ready( spell ) then return end
- if conditions ~= nil and not conditions then return end
- aura_env.rec( spell )
- end
- function aura_env.buffRem( buff )
- return max( 0, aura_env.buffRemains[ buff ] - aura_env.timeOffset )
- end
- function aura_env.buffUp( buff )
- return max( 0, aura_env.buffRemains[ buff ] - aura_env.timeOffset ) > 0
- end
- function aura_env.debuffRem( debuff )
- return max( 0, aura_env.debuffRemains[ debuff ] - aura_env.timeOffset )
- end
- function aura_env.debuffUp( debuff )
- return max( 0, aura_env.debuffRemains[ debuff ] - aura_env.timeOffset ) > 0
- end
- function aura_env.chargeCt( spell )
- local rounded = tonumber( format( "%.1f", aura_env.timeOffset ) ) - 0.1
- return min( aura_env.chargesMax[ spell ], aura_env.charges[ spell ] + rounded / aura_env.chargeTime[ spell ] )
- end
- function aura_env.cdLeft( spell )
- return max( 0, aura_env.cooldowns[ spell ] - aura_env.timeOffset )
- end
- function aura_env.num_targets()
- return aura_env.targetCount
- end
- aura_env.buff = {
- handler = {}
- }
- setmetatable( aura_env.buff, { __index = function( t, k )
- t.handler.aura = k
- return t.handler
- end } )
- setmetatable( aura_env.buff.handler, { __index = function( t, k )
- if k == 'up' or k == 'react' then
- return aura_env.buffUp( t.aura )
- elseif k == 'remains' then
- return aura_env.buffRem( t.aura )
- end
- end } )
- aura_env.debuff = {
- handler = {}
- }
- setmetatable( aura_env.debuff, { __index = function( t, k )
- t.handler.aura = k
- return t.handler
- end } )
- setmetatable( aura_env.debuff.handler, { __index = function( t, k )
- if k == 'up' or k == 'react' then
- return aura_env.debuffUp( t.aura )
- elseif k == 'remains' then
- return aura_env.debuffRem( t.aura )
- end
- end } )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement