Maybe someone can shed some light on this little piece of code:
Code:
local hasTarget = UnitExists("Target")
local isDead = UnitIsDead("Target")
if hasTarget and not isDead then
for i=1,40 do
local name,rank,icon,count,debuffType, duration, expirationTime,unitCaster,isStealable,shouldConsolidate,spellId = UnitBuff("Player",i)
local direction = GetEclipseDirection()
if name == "Eclipse (Solar)" or direction == "moon" or direction == "none" then
CastSpellByName(tostring(GetSpellInfo(5176)))
elseif name == "Eclipse (Lunar)" or direction == "sun" then
CastSpellByName(tostring(GetSpellInfo(2912)))
end
end
end
It works good and all, but for some reason, it want's to cancel a cast half way through and wants to start over. And when I make into a function and call the function for either Lunar or Solar state, it just returns 1 stat and never refreshes when you get to a new state, for example going from Solar > none > Lunar. It will always report Solar, never changing.
I'm passing stuff to it when it's a function, but it still does not want to refresh.
For the above code, the best way I can say to see what it's doing is to make a new ability and rotation and just copy and paste the code in and watch what it's doing. If this can get fixed, it would be the BEST way to do Wrath/Starfire for Balance Druid's IMO.