Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Handle the spells properly
Browse files Browse the repository at this point in the history
  • Loading branch information
p3lim committed Oct 4, 2009
1 parent 56ce067 commit a463b7b
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions Chill.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
local spells = {
'Dash',
GetSpellInfo(50213), -- tiger's fury
'Berserk',
'Rebirth',
33357, -- Druid: Dash
50213, -- Druid: Tiger's Fury
50334, -- Druid: Berserk
48477, -- Druid: Rebirth
}

-- MAJIK!
Expand Down Expand Up @@ -105,8 +105,16 @@ addon:SetScript('OnEvent', function(self, event)
self:SetPoint('BOTTOM', 0, 90)
self.frames = {}

-- Repack the spells
local knownSpells = {}
for index, id in next, spells do
if(IsSpellKnown(id)) then
knownSpells[index] = GetSpellInfo(id)
end
end

local index = 1
for k in next, spells do
for k in next, knownSpells do
local frame = self:CreateCooldown()
frame:SetPoint('BOTTOMLEFT', self, 'BOTTOMLEFT', (index - 1) * (self:GetHeight() + 3), 0)
frame.index = index
Expand Down

0 comments on commit a463b7b

Please sign in to comment.