I've been having issues with PQR as of late with my shaman. It seems that neither of the resto profiles that I've got (Onya and Sheuron) will do Chain Heal at all. I've redownloaded both PQR and the profiles, and have turned off every addon, and still neither profile will cast chain heal.
I've added a simple output to chat type debug to each of the profiles chain heal ability, so that i can get a visual notice on if it's casting it, however it never seems to fire off at all.
Here's what Onya's current CH ability lookes like:
Code:
function IsInRange(u1,u2)
local range = DistanceBetweenUnits(member[u1].name,member[u2].name)
if range == nil then range = 100 end
if range < 11.5 then
return true
else
return false
end
end
function getDefHealth(unit)
local hp = member[unit].health
if UnitBuffID(member[unit].name, 974) then hp = hp - 5 end
return (100 - hp)
end
function sortDefHealth(aUnit, anotherUnit)
return getDefHealth(aUnit) > getDefHealth(anotherUnit)
end
function getnexthop(u)
for nh = 1, table.maxn(chhops) do
local onlist = 0
for xxx = 1, table.maxn(nexthop) do
if tostring(member[nexthop[xxx]].name) == tostring(member[chhops[nh]].name) then
onlist = 1
end
end
if nexthop[u] ~= nil and onlist == 0 then
if IsInRange(nexthop[u],chhops [nh]) then return chhops[nh] end
end
end
end
function findGoodTarget()
if table.maxn(chtargets) ~=0 and table.maxn(chhops) >= hops then
table.sort(chtargets, sortDefHealth)
table.sort(chhops, sortDefHealth)
for x = 1, table.maxn(chtargets) do
nexthop = {}
nexthop[1] = chtargets[x]
for z = 1,hops do
nexthop[z+1] = getnexthop(z)
if nexthop[(hops + 1)] ~= nil then
return chtargets[x]
end
if nexthop[z] == nil then z = hops end
end
end
end
end
if PQR_SpellAvailable(1064) and spell ~= GetSpellInfo(1064)then
local chtarget = findGoodTarget()
if chtarget ~= nil and moving == 0 then
SilentCast(1064,member[chtarget].name)
PQR_WriteToChat("Casting Chain Heal")
return true
end
end
Even with everyone stacked up for fights like ultraxion, it seems that the profile can't seem to find a good target to start casting on.