Skip to content

Instantly share code, notes, and snippets.

@StinkyTwitch
Created February 16, 2015 22:04
Show Gist options
  • Save StinkyTwitch/2d80f20540f35308ceb0 to your computer and use it in GitHub Desktop.
Save StinkyTwitch/2d80f20540f35308ceb0 to your computer and use it in GitHub Desktop.
Spell Regen
-- Spell Regen
ProbablyEngine.condition.register("spell.regen", function(target, spell)
local name, rank, icon, base_cast_ime, min_range, max_range = GetSpellInfo(spell)
local cur_power = UnitPower(target)
local cur_haste = UnitSpellHaste(target)
local cur_regen = select(2, GetPowerRegen(target))
local cast_time = (base_cast_time / ((cur_haste / 100) + 1))
local cast_regen = cast_time * cur_regen
return cast_regen
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment