Originally Posted by
js1974
@
firepong
Currently under the rotation I'm using I need the ability to judge a focus target if I have one and judge my target if I don't have one. Right now I have to have 2 different rotations and swap between them depending if there is going to be a focus target or not. If I forget to focus a target judgement just doesn't go off. Here is the code for both judgements under with and without Zealotry.
Code:
local holyPower = UnitPower("player", 9)
local zealotry = PQR_UnitBuffID("player", 85696)
if holyPower <= 2 and zealotry == nil then
return true
end
Code:
local holyPower = UnitPower("player", 9)
local zealotry = PQR_UnitBuffID("player", 85696)
if zealotry and holyPower < 3 then
return true
end
Is there anyway I can clean this code up so it's under one ability and on top of that making it default to my target if I don't have a focus? Right now I just have 2 versions 1 for focus and 1 for target.
I don't see any code there for your judgement, so I'll try and do what I can. Since this is for Retribution DPS Spec, your mainly doing it off CD for the 4piece free HoPo and mana correct? If so, if should be something like this, hopefully:
Name: Judgement
SpellID: 0
Delay: 0
Target: Custom
Code:
local judgeCD = GetSpellCooldown(20271)
local HoPo = UnitPower("Player", 9)
local zeal = UnitBuffID("Player", 85696)
local Focus = UnitExists("Focus")
local Target = UnitExists("Target")
if judgeCD == 0 and HoPo <= 2 and Focus == 1 and not zeal then
CastSpellByName(tostring(GetSpellInfo(20271)), "Focus")
elseif judgeCD == 0 and HoPo <= 2 and Target == 1 and Focus == nil and not zeal then
CastSpellByName(tostring(GetSpellInfo(20271)), "Target")
elseif judgeCD == 0 and HoPo < 3 and Focus == 1 and zeal then
CastSpellByName(tostring(GetSpellInfo(20271)), "Focus")
elseif judgeCD == 0 and HoPo < 3 and Target == 1 and Focus == nil and zeal then
CastSpellByName(tostring(GetSpellInfo(20271)), "Focus")
end
Tested and Working. My pally doesn't have the 4piece DPS set, so I wasn't getting HoPo, but it was working as intended. Working good enough to get rid of every Judgement code in Ralphiuss' profile except the one at the very beginning. And even then, I could have coded that in as well, but I figured he put judgement lower down in the rotation for a reason.