if UnitChannelInfo("target") then
local spellName = select(1, UnitChannelInfo("target"))
if spellName == "Penance" and IsSpellInRange("Hammer of Justice", "target") and GetSpellCooldown("Hammer of Justice") == 0 then
CastSpellByName("Hammer of Justice", "target")
return true
end
end
local spellName = select(1, UnitChannelInfo("target"))
if spellName == "Penance" and IsSpellInRange("Hammer of Justice", "target") and GetSpellCooldown("Hammer of Justice") == 0 then
CastSpellByName("Hammer of Justice", "target")
return true
end
end