Instead of
Code:
local crusaderStrikeStart, crusaderStrikeDuration = GetSpellCooldown(35395)
local crusaderStrikeCD = crusaderStrikeStart - GetTime() + crusaderStrikeDuration
local gcdSpell = PQR_GCDSpellID()
local gcdStartTime, gcdDuration = GetSpellCooldown(gcdSpell)
local gcdTimeLeft = gcdStartTime + gcdDuration - GetTime()
if gcdTimeLeft < 0 then
gcdTimeLeft = 0
end
crusaderStrikeCD = crusaderStrikeCD - gcdTimeLeft
if crusaderStrikeCD < 0 then
crusaderStrikeCD = 0
end
if crusaderStrikeCD < 0.2 and crusaderStrikeCD > 0 then
return true
end
Can I just do
Code:
local csCD = GetSpellCooldown(35395)
if PQR_SpellAvailable(35395) then
return false
end
if csCD - GetTime() <= 0.3 then
return true
end
edit: trying to do something like this and I don't want a huge mess of code.
Code:
--local holyPower = UnitPower("player", 9)
--local DivinePurpose = UnitBuffID("player", 86172)
--local Inquisition = select(7, UnitBuffID( "player", 84963))
--if PQR_SpellAvailable(31884) or PQR_SpellAvailable(85696) then
--return false
--end
--if avengingWrathCD - GetTime() <= 5 or zealotryCD - GetTime() <= 5 then
--if inquisition or inquisition - GetTime() <= 20 then
--if holyPower == 3 or divinePurpose ~= nil then
--return true
--end
--end
--end
Am I allowed to use decimals like this?
Code:
if PlayerMana <= 11.272 then
return true
end
edit: I remember forever ago Boss was asking how to check weapon speeds and I don't think he ever found out.
I just found this while looking through the api.
http://www.wowwiki.com/API_UnitAttackSpeed