Mercurial > wow > reaction
comparison modules/State.lua @ 134:d186e041ca14
Added stance bar support
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Tue, 17 Mar 2009 23:38:38 +0000 |
parents | 5c189f44e776 |
children | 42cade25d40d |
comparison
equal
deleted
inserted
replaced
133:729e284b2576 | 134:d186e041ca14 |
---|---|
374 function InitRules() | 374 function InitRules() |
375 local forms = { } | 375 local forms = { } |
376 -- sort by icon since it's locale-independent | 376 -- sort by icon since it's locale-independent |
377 for i = 1, GetNumShapeshiftForms() do | 377 for i = 1, GetNumShapeshiftForms() do |
378 local icon, name, active = GetShapeshiftFormInfo(i) | 378 local icon, name, active = GetShapeshiftFormInfo(i) |
379 -- if it's the current form, the icon is wrong (Ability_Spell_WispSplode) | 379 -- if it's the current form, the icon is wrong (Spell_Nature_WispSplode) |
380 -- so capture it from the spell info directly | 380 -- so capture it from the spell info directly |
381 if active then | 381 if active then |
382 local _1, _2 | 382 local _1, _2 |
383 _1, _2, icon = GetSpellInfo(name) | 383 _1, _2, icon = GetSpellInfo(name) |
384 end | 384 end |
1340 | 1340 |
1341 | 1341 |
1342 -- Export methods to Bar class -- | 1342 -- Export methods to Bar class -- |
1343 | 1343 |
1344 function ReAction.Bar:GetState() | 1344 function ReAction.Bar:GetState() |
1345 return GetManagedEnvironment(self:GetFrame()).state | 1345 local env = GetManagedEnvironment(self:GetFrame()) |
1346 return env and env.state | |
1346 end | 1347 end |
1347 | 1348 |
1348 ReAction.Bar.GetStateProperty = GetProperty | 1349 ReAction.Bar.GetStateProperty = GetProperty |
1349 ReAction.Bar.SetStateProperty = SetProperty | 1350 ReAction.Bar.SetStateProperty = SetProperty |