I was having a problem with decursive dispels interrupting my pally healing in a 5 man. So i removed the addon and modified the decurse party function. Check this out and feel free to provide feedback. It isn't finished yet and just works for mages and pallys but you should get the idea:
function DecurseParty()
if MyMana()<220 then return end
if ImBusy() then return end
local y,x
for x=1,40 do
local name,count,debuffType=UnitDebuff("player",x)
if debuffType=="Curse" then
if SpellExists("Remove Lesser Curse") then TargetUnit(PartyID(UnitName("player"))) cast("Remove Lesser Curse") end
return
end
if debuffType=="Magic" then
if SpellExists("Cleanse") then TargetUnit(PartyID(UnitName("player"))) cast("Cleanse") end
return
end
if debuffType=="Disease" then
if SpellExists("Cleanse") then TargetUnit(PartyID(UnitName("player"))) cast("Cleanse") end
return
end
if debuffType=="Poison" then
if SpellExists("Cleanse") then TargetUnit(PartyID(UnitName("player"))) cast("Cleanse") end
return
end
end
for y=1,4 do
for x=1,16 do
local name,count,debuffType=UnitDebuff("party"..y,x)
if debuffType=="Curse" then
if SpellExists("Remove Lesser Curse") then TargetUnit(PartyID(UnitName("party"..y))) cast("Remove Lesser Curse") end
return
end
if debuffType=="Magic" then
if SpellExists("Cleanse") then TargetUnit(PartyID(UnitName("party"..y))) cast("Cleanse") end
return
end
if debuffType=="Disease" then
if SpellExists("Cleanse") then TargetUnit(PartyID(UnitName("party"..y))) cast("Cleanse") end
return
end
if debuffType=="Poison" then
if SpellExists("Cleanse") then TargetUnit(PartyID(UnitName("party"..y))) cast("Cleanse") end
return
end
end
end
TargetUnit("playertarget")
end
Also, you never need to use PartyID--its job is only to return a UnitName ("party1", "raid23","player", etc.) when given a toon name.
You don't need that, you already have the UnitName.