Hey guys! I seem to have encountered a really silly .. bug maybe? I'm not sure.
I've tried making the Shadowpriest rotation as perfect as I can but there's just two things that don't want to work, no matter how hard I try.
Take a look at this example with Devouring Plague:
Name: Devouring Plague
ID: 2944
Code:
local DP, _, _, _, _, _, timer = UnitDebuffID("target", 2944, "PLAYER")
local WoF = UnitBuffID("player", 98619)
local mF = UnitBuffID("player", 98734)
-- Check if we're moving.
if PQR_IsMoving(1) then
-- Are we fighting Alysrazor?
if WoF == 1 or mF == 1 then
-- Fetch current timer on Devouring Plague cast by us
if DP ~= nil then
if timer - GetTime() < 3 then
-- Cast if less than 3 seconds left
return true
end
else
-- Cast if we don't have Devouring Plague on the target
return true
end
else
return true
end
end
-- We want to refresh Devouring Plague regardless if movement.
if DP ~= nil then
if timer - GetTime() < 3 then
return true
end
else
return true
end
I've got this somewhere in the middle of the rotation, however, it seems to just stall, not cast or simply disable the entire boss, leaving me with this:
Code:
local DP, _, _, _, _, _, timer = UnitDebuffID("target", 2944, "PLAYER")
if PQR_IsMoving(1) then
return true
end
if DP ~= nil then
if timer - GetTime() < 3 then
return true
end
else
return true
end
return false
What I'm trying to achieve here is to spam-cast Devouring Plague and Shadow Word: Death (I believe it used to before, but don't seem to do that now) but it's not really doing anything besides casting once. Besides that, if you've been raiding Firelands, you would've noticed the buff you get from Alysrazor that lets you run and cast at the same time / fly, hence the reason to fall-back to the regular pattern. Do you guys recon I need to apply PQR_IsMoving(1) to the rest of my key abilities as well to achieve this or is the code just blindly wrong.
Cheers.