Just want to give props to your deathknight profiles. They absolutely rock!
Thanks to you I don't need to create my own profiles anymore.
I must admit I like your previous profile better, tho... the last one you released before start using PQ_Interface was almost flawless. Only thing I changed was putting a combat check before activating hotkeys and checking if mouseover was an alive enemy before casting DnD on mouseover (for DW single target and 2Hand AoE).
I also noticed you are not porting SimCraft's "
(target.health.pct%target.time_to_die)" correctly. Your code translates it as (
TargetHP/TimeToDie) when you should be using (
TargetHP % TimeToDie). This causes some errors when calculating the right time to cast Soul Reaper (and i *think* is the source of your difficulty to correctly implement Blood Tap).
That said, I tried correcting it and stuff went really crazy... probably because LUA numbers aren't integers but doubles instead.
Anyways, I think we can correctly predict Soul Reaper so when it procs (5s later) the target HP pct is equal or under 35 (45 w/ t15) like this:
PHP Code:
if 100 * (UnitHealth("target") - DpsOnTarget * 5) / UnitHealthMax("target") <= 35 then ...
DpsOnTarget can be easily calculated by modifying team nova's TimeToDie function so it returns the dps on target instead of it's time to die.
This is, in fact, the same principle of SimCraft's formula... just written differently.
Best regards!