Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Controls what types of spells this front-end displays
- aura_env.types = {
- ["HEALING"] = true,
- }
- aura_env.indexes = {
- --DRUID
- [740] = 1, -- Tranquility
- [33891] = 2, -- Incarnation: Tree of Life
- --[319454] = 3, -- Heart of the Wild
- --[102351] = 4, -- Cenarion Ward
- --[203651] = 5, -- Overgrowth
- --[197721] = 6, -- Flourish
- --MONK
- [115310] = 7, -- Revival
- --[322118] = 8, -- Invoke Yu'lon, the Jade Serpent
- --[325197] = 9, -- Invoke Chi-Ji, the Red Crane
- --PALADIN
- [633] = 10, -- Lay on Hands
- [31884] = 11, -- Avenging Wrath
- [216331] = 12, -- Avenging Crusader
- [105809] = 13, -- Holy Avenger
- [200025] = 14, -- Beacon of Virtue
- --PRIEST
- [15286] = 15, -- Vampiric Embrace
- [64843] = 16, -- Divine Hymn
- [265202] = 17, -- Holy Word: Salvation
- [10060] = 18, -- Power Infusion
- [47536] = 19, -- Rapture
- [109964] = 20, -- Spirit Shell
- [200183] = 21, -- Apotheosis
- [246287] = 22, -- Evangelism
- --SHAMAN
- [108280] = 23, -- Healing Tide Totem
- --[198838] = 24, -- Earthen Wall Totem
- [108281] = 25, -- Ancestral Guidance
- [114052] = 26, -- Ascendance
- }
- local sort1 = function(a, b) return a.state.index < b.state.index end
- local sort2 = function(a, b) return a.state.expirationTime < b.state.expirationTime end
- local sort3 = function(a, b) return a.state.expirationTime > b.state.expirationTime end
- local c = aura_env.config
- aura_env.sortAndOffset = function()
- local spacing = c.spacing
- local count = 0
- local byIndex = {}
- local byExp = {}
- for k, v in pairs(WeakAuras.clones[aura_env.id]) do
- if v.state and v.state.show and v.state.classColor and v.state.expirationTime then
- local onCD = v.state.expirationTime - GetTime()
- if onCD > 0 then
- table.insert(byExp, v)
- elseif onCD <= 0 then
- table.insert(byIndex, v)
- end
- end
- end
- table.sort(byIndex, sort1)
- if c.sorting == 1 then
- table.sort(byExp, sort2)
- else
- table.sort(byExp, sort3)
- end
- for i, region in pairs(byIndex) do
- if region.toShow then
- local xOffset = 0
- local yOffset = 0
- if c.direction == 1 then
- xOffset = 0
- yOffset = 0 + (region.height + spacing) * count
- elseif c.direction == 2 then
- xOffset = 0
- yOffset = 0 - (region.height + spacing) * count
- elseif c.direction == 3 then
- xOffset = 0 - (region.width + spacing) * count
- yOffset = 0
- elseif c.direction == 4 then
- xOffset = 0 + (region.width + spacing) * count
- yOffset = 0
- end
- region:SetAnchor("CENTER" , WeakAuras.regions[aura_env.id].region, "CENTER")
- region:SetOffset(xOffset, yOffset)
- count = region.state.dead and count or count + 1
- end
- end
- for i, region in pairs(byExp) do
- if region.toShow then
- local xOffset = 0
- local yOffset = 0
- if c.direction == 1 then
- xOffset = 0
- yOffset = 0 + (region.height + spacing) * count
- elseif c.direction == 2 then
- xOffset = 0
- yOffset = 0 - (region.height + spacing) * count
- elseif c.direction == 3 then
- xOffset = 0 - (region.width + spacing) * count
- yOffset = 0
- elseif c.direction == 4 then
- xOffset = 0 + (region.width + spacing) * count
- yOffset = 0
- end
- region:SetAnchor("CENTER" , WeakAuras.regions[aura_env.id].region, "CENTER")
- region:SetOffset(xOffset, yOffset)
- count = region.state.dead and count or count + 1
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement